{"version":3,"sources":["../../../../../node_modules/core-js/modules/_is-object.js","../../../../../node_modules/core-js/modules/_an-object.js","../../../../../node_modules/core-js/modules/_fails.js","../../../../../node_modules/core-js/modules/_descriptors.js","../../../../../node_modules/core-js/modules/_global.js","../../../../../node_modules/core-js/modules/_dom-create.js","../../../../../node_modules/core-js/modules/_ie8-dom-define.js","../../../../../node_modules/core-js/modules/_to-primitive.js","../../../../../node_modules/core-js/modules/_object-dp.js","../../../../../node_modules/core-js/modules/es6.function.name.js","search.js"],"names":["createElement","wp","element","registerBlockType","blocks","components","ServerSideRender","TextControl","RadioControl","Panel","PanelBody","PanelRow","SVG","Path","InspectorControls","blockEditor","__","i18n","wphelpkit_search_block_editor","name","title","description","icon","category","supports","html","multiple","edit","props","e","preventDefault","attributes","placeholder","value","setAttributes","save"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AChBA;;AACA;IAEQA,gBAAsBC,EAAE,CAACC,QAAzBF;IACAG,oBAAsBF,EAAE,CAACG,OAAzBD;qBAUsBF,EAAE,CAACI;IAR7BC,kCAAAA;IACAC,6BAA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B,MAAA,IAAI,EAAC,KAA7B;AAAmC,MAAA,SAAS,EAAC,OAA7C;AAAqD,MAAA,KAAK,EAAC,4BAA3D;AAAwF,MAAA,KAAK,EAAC,IAA9F;AAAmG,MAAA,MAAM,EAAC,IAA1G;AAA+G,MAAA,OAAO,EAAC;AAAvH,OACI;AAAM,MAAA,CAAC,EAAC;AAAR,MADJ,CADJ,CAFJ,CAFG,EAYH,cAAC,iBAAD;AAAmB,MAAA,GAAG,EAAC;AAAvB,OACI,cAAC,SAAD;AACQ,MAAA,GAAG,EAAC,qCADZ;AAEQ,MAAA,KAAK,EAAGhB,EAAE,CAAC,iBAAD,CAFlB;AAGQ,MAAA,WAAW,EAAG;AAHtB,OAII,cAAC,WAAD;AACI,MAAA,GAAG,EAAC,wCADR;AAEI,MAAA,KAAK,EAAGA,EAAE,CAAC,kBAAD,CAFd;AAGI,MAAA,KAAK,EAAGY,KAAK,CAACG,UAAN,CAAiBC,WAH7B;AAII,MAAA,QAAQ,EAAG,kBAAEC,KAAF;AAAA,eAAaL,KAAK,CAACM,aAAN,CAAoB;AAAEF,UAAAA,WAAW,EAAEC;AAAf,SAApB,CAAb;AAAA;AAJf,MAJJ,CADJ,CAZG,CAAP;AA0BH,GAlDiD;;AAoDlD;;;;;;;AAOAE,EAAAA,IAAI,EAAE,gBAAY;AACd,WAAO,IAAP;AACH;AA7DiD,CAArC,CAAjB","file":"search.map","sourceRoot":"../../src/search","sourcesContent":["module.exports = function (it) {\n  return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n  if (!isObject(it)) throw TypeError(it + ' is not an object!');\n  return it;\n};\n","module.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (e) {\n    return true;\n  }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n  ? window : typeof self != 'undefined' && self.Math == Math ? self\n  // eslint-disable-next-line no-new-func\n  : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n  return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n  return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n  if (!isObject(it)) return it;\n  var fn, val;\n  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPrimitive(P, true);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return dP(O, P, Attributes);\n  } catch (e) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n  configurable: true,\n  get: function () {\n    try {\n      return ('' + this).match(nameRE)[1];\n    } catch (e) {\n      return '';\n    }\n  }\n});\n","/* global wp */\n/* global wphelpkit_search_block_editor */\n\nconst { createElement }     = wp.element;\nconst { registerBlockType } = wp.blocks;\nconst {\n    ServerSideRender,\n    TextControl,\n    RadioControl,\n    Panel,\n    PanelBody,\n    PanelRow,\n    SVG,\n    Path,\n}                           = wp.components;\nconst { InspectorControls } = wp.blockEditor;\nconst { __ }                = wp.i18n;\n\n/**\n * Register our search block.\n *\n * @since 0.0.5\n * @since 0.6.2 Changed block's icon.\n */\nregisterBlockType(wphelpkit_search_block_editor.name, {\n    title: __('WPHelpKit Search'),\n    description: __('Search WPHelpKit Articles.'),\n    icon:\n        <SVG xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\n            <Path fill='none' d='M0 0h24v24H0V0z' />\n            <Path d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59\n            4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z' />\n        </SVG>,\n    category: 'wphelpkit',\n    supports: {\n        html: false, // there's nothing for user to edit\n        multiple: false,\n    },\n\n    /**\n     * Render our search widget (and it's inspector controls) in the editor.\n     *\n     * @since 0.0.5\n     *\n     * @param {Object} props\n     * @return {array} Inspector controls and editor version of the form.\n     */\n    edit: function ( props ) {\n        return [\n            // the @onSubmit is so users don't submit the form while in the editor.\n            <form id='wphelpkit-search-form' method='GET' onSubmit={ e => e.preventDefault() } key='form'>\n                <input type='text' id=\"wphelpkit-search\" placeholder={ props.attributes.placeholder } />\n                <button type='submit' class='wphelpkit-search components-button is-button is-default is-large'>\n                    <svg aria-hidden=\"true\" role=\"img\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 30 30\">\n                        <path d=\"M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z\">\n                        </path>\n                    </svg>\n                </button>\n            </form>,\n\n            <InspectorControls key='wphelpkit-search-inspector'>\n                <PanelBody\n                        key='wphelpkit-search-inspector-settings'\n                        title={ __('Search Settings') }\n                        initialOpen={ true }>\n                    <TextControl\n                        key='wphelpkit-search-inspector-placeholder'\n                        label={ __('Placeholder Text') }\n                        value={ props.attributes.placeholder }\n                        onChange={ ( value ) => props.setAttributes({ placeholder: value }) }\n                    />\n                </PanelBody>\n            </InspectorControls>\n        ];\n    },\n\n    /**\n     * No-Op save method.\n     *\n     * Dyanmic block, so only attributes are saved.\n     *\n     * @since 0.0.5\n     */\n    save: function () {\n        return null;\n    },\n});\n"]}