From 83019cca5f64867bb1f47df698702011cde4ae08 Mon Sep 17 00:00:00 2001 From: Hamid Kamalpour Date: Tue, 31 Jan 2023 13:18:54 +0330 Subject: [PATCH] Compatible with PHP 8 and WP 6.1.1 Fixed: deprecated function errors. --- .babelrc | 39 + .eslintrc.json | 39 + PUBLISH.md | 8 + README.md | 150 + README.txt | 153 +- dist/main.js | 1 + dist/post.js | 1 + getyourguide-widget.php | 25 +- includes/fields/currency_field.php | 6 +- includes/fields/locale_field.php | 4 +- includes/fields/partner_id_field.php | 4 +- includes/widget-post-options.class.php | 142 - includes/widget-settings.class.php | 38 +- includes/widget.class.php | 174 +- jest.config.js | 3 + package-lock.json | 38251 ++++++++++++++++ package.json | 50 + screenshot-1.png | Bin 232281 -> 345523 bytes screenshot-2.png | Bin 0 -> 207911 bytes screenshot-3.png | Bin 0 -> 372416 bytes screenshot-4.png | Bin 0 -> 248618 bytes screenshot-5.png | Bin 0 -> 13777 bytes screenshot-6.png | Bin 0 -> 232281 bytes src/__tests__/CityEdit.test.js | 10 + src/__tests__/Iframe.test.js | 14 + src/__tests__/Search.test.js | 10 + .../__snapshots__/CityEdit.test.js.snap | 57 + .../__snapshots__/Iframe.test.js.snap | 31 + .../__snapshots__/Search.test.js.snap | 115 + src/__tests__/__snapshots__/util.test.js.snap | 33 + src/__tests__/util.test.js | 17 + src/block/Search/Search.js | 138 + src/block/activities/Edit.js | 71 + src/block/block.js | 115 + src/block/city/Edit.js | 24 + src/block/common/DataContext.js | 94 + src/block/common/Edit.js | 67 + src/block/common/Iframe.js | 132 + src/block/common/WPAttributes.js | 62 + src/block/common/Warning.js | 13 + src/block/common/util.js | 98 + src/block/config.js | 39 + src/blocks.js | 1 + src/init.php | 57 + src/post.js | 38 + webpack.config.js | 45 + 46 files changed, 40008 insertions(+), 361 deletions(-) create mode 100644 .babelrc create mode 100644 .eslintrc.json create mode 100644 PUBLISH.md create mode 100644 README.md create mode 100644 dist/main.js create mode 100644 dist/post.js delete mode 100644 includes/widget-post-options.class.php create mode 100644 jest.config.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 screenshot-2.png create mode 100644 screenshot-3.png create mode 100644 screenshot-4.png create mode 100644 screenshot-5.png create mode 100644 screenshot-6.png create mode 100644 src/__tests__/CityEdit.test.js create mode 100644 src/__tests__/Iframe.test.js create mode 100644 src/__tests__/Search.test.js create mode 100644 src/__tests__/__snapshots__/CityEdit.test.js.snap create mode 100644 src/__tests__/__snapshots__/Iframe.test.js.snap create mode 100644 src/__tests__/__snapshots__/Search.test.js.snap create mode 100644 src/__tests__/__snapshots__/util.test.js.snap create mode 100644 src/__tests__/util.test.js create mode 100644 src/block/Search/Search.js create mode 100644 src/block/activities/Edit.js create mode 100644 src/block/block.js create mode 100644 src/block/city/Edit.js create mode 100644 src/block/common/DataContext.js create mode 100644 src/block/common/Edit.js create mode 100644 src/block/common/Iframe.js create mode 100644 src/block/common/WPAttributes.js create mode 100644 src/block/common/Warning.js create mode 100644 src/block/common/util.js create mode 100644 src/block/config.js create mode 100644 src/blocks.js create mode 100644 src/init.php create mode 100644 src/post.js create mode 100644 webpack.config.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..661c717 --- /dev/null +++ b/.babelrc @@ -0,0 +1,39 @@ +{ + "env": { + "development": { + "presets": [ + "@babel/preset-env", + "@babel/preset-react", + "@babel/preset-flow" + ], + "plugins": [ + "@babel/plugin-proposal-class-properties", + "react-hot-loader/babel" + ] + }, + "test": { + "presets": [ + "@babel/preset-env", + "@babel/preset-react", + "@babel/preset-flow" + ], + "plugins": ["@babel/plugin-proposal-class-properties"] + }, + "production": { + "presets": [ + "@babel/preset-env", + "@babel/preset-react", + "@babel/preset-flow" + ], + "plugins": [ + "@babel/plugin-proposal-class-properties", + [ + "@babel/plugin-transform-react-jsx", + { + "pragma": "wp.element.createElement" + } + ] + ] + } + } +} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..775bb2f --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,39 @@ +{ + "root": true, + "parser": "babel-eslint", + "extends": [ + "airbnb", + "plugin:react/recommended", + "plugin:jsx-a11y/recommended", + "plugin:jest/recommended", + "plugin:flowtype/recommended" + ], + "env": { + "browser": false, + "es6": true, + "node": true, + "mocha": true, + "jest/globals": true + }, + "parserOptions": { + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "globals": { + "react": true, + "wp": true, + "wpApiSettings": true, + "window": true, + "document": true + }, + "plugins": ["react", "jsx-a11y", "jest", "flowtype"], + "settings": { + "import/resolver": "webpack" + }, + "rules": { + "indent": ["error", 2], + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] + } +} diff --git a/PUBLISH.md b/PUBLISH.md new file mode 100644 index 0000000..7b2b117 --- /dev/null +++ b/PUBLISH.md @@ -0,0 +1,8 @@ + +# Publishing +We use github actions to automate the deployment via svn. There are a few files that need to be updated then once it has been merged to master create a new matching [release](https://github.com/getyourguide/wordpress-plugin/releases/new) in github + +## Update Files with next semver version +- [README.txt]('./README.txt) +- [README.md]('./README.md) +- [getyourguide-widget.php]('./getyourguide-widget.php) diff --git a/README.md b/README.md new file mode 100644 index 0000000..aa73701 --- /dev/null +++ b/README.md @@ -0,0 +1,150 @@ +# GetYourGuide WordPress plugin + +Contributors: nicolaszanotti, fechu0307, janhrubes, zachgreen, hamid.kamalpour + +Tags: plugin, Gutenberg, widget, affiliate, travel, travel widget, activities, activity, tour, tours, booking, attractions, attraction, city + +Requires at least: 5.0 + +Tested up to: 6.1.1 + +Stable tag: 1.3.11 + +License: GPLv2 or later + +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +Get paid to travel. Make money by sharing activities with your readers. Share GetYourGuide's incredible selection of attractions, tours and activities with your readers. + +## Installation + +This plugin either be installed from the WordPress dashboard, or manually. + +### FROM THE WORDPRESS DASHBOARD + +1. Visit Dashboard > Plugins > Add New > Search "GetYourGuide" +2. Install Now +3. Visit Dashboard > Plugins +4. Activate the plugin. + +### MANUALLY + +1. [Download](https://downloads.wordpress.org/plugin/getyourguide-widget.1.3.0.zip) this plugin. +2. Upload the plugin folder to the /wp-content/plugins/ directory. +3. Visit Dashboard > Plugins +4. Activate the plugin. + +### Important! Add your GetYourGuide partner ID by navigating to Dashboard > Settings > GetYourGuide. + +## Description + +Easily promote top-rated tours and activities in your content with [GetYourGuide](https://www.getyourguide.com/). + +All of our widgets are fully responsive, and our high-quality, conversion-driven content options can be configured directly within the editor. + +Find the right integration type to fit your audience, whether it’s showcasing multiple products directly within your blog post. Check out this [activity widget example](https://widget.getyourguide.com/default/activites.frame?id=code-example&partner_id=8OXMHTJ&widget=activities&number_of_items=3&locale_code=en-us&q=berlin). + +Or letting your readers explore everything a destination has to offer. Check out this [city widget](https://widget.getyourguide.com/default/city.frame?id=city-example&partner_id=8OXMHTJ&widget=city&locale_code=en-US&iata=SXF). + +TIP: Alter the size of your browser window to see the widgets adapt. + +#### Partnering with GetYourGuide + +Looking for the best ways to monetize your passion for travel? Discover how GetYourGuide can help you turn your clicks into cash. + +https://www.youtube.com/watch?v=oPAOG6U7V_M + +## Frequently Asked Questions + +Check out [our article on how to get started](https://partner.getyourguide.com/en-us/c/best-practices/new-and-improved-the-getyourguide-wordpress-plugin) with our Wordpress plugin. + +If you have any urgent issues please reach out to our dedicated support team through our [contact form](https://partner.getyourguide.com/en-us/contact). + +## Screenshots + +1. Activities widget +2. City widget +3. Activities widget admin +4. City widget admin +5. Search box +6. A listing of activities in Paris + +## Changelog + +### 1.0.0 + +- Basic setup of the plugin +- Search query and amount can be set on the widget +- Currency, locale, and partner ID can be set on the configuration page +- Search query can be overridden when editing posts and pages +- Wordpress UI available in English and German + +### 1.1.0 + +- Added optional campaign parameter + +### 1.1.1 + +- Code maintenance & cleanup + +### 1.2.0 + +- Added support for Gutenberg blocks +- Security improvements + +## 1.2.1 + +- README fixes + +## 1.2.2 + +- More README fixes + +## 1.2.3 + +- Fix author name + +## 1.2.4 + +- Update registration page link + +## 1.2.5 + +- Security improvements +- Code maintenance + +## 1.2.6 + +- README updates +- Image updates + +## 1.2.7 + +- Added analyser script +- Fixed bug regarding iframe hights + +## 1.2.8 + +- Removed deprecated features +- Code maintenance + +## 1.2.9 + +- Bug Fix + +## 1.3.0 + +- Clean up codebase +- Update cache after editing post + +## 1.3.1 + +- Giving verbose output that the plugin is not meant to be used via the WordPress appearance menu + +## 1.3.10 + +- Bug fix campaign parameter + +## 1.3.11 + +- Compatible with PHP 8 and WP 6.1.1 \ No newline at end of file diff --git a/README.txt b/README.txt index c5c836a..98ca776 100755 --- a/README.txt +++ b/README.txt @@ -1,56 +1,143 @@ -=== GetYourGuide Widget === - -Contributors: nicolaszanotti, fechu0307, gygoliver -Tags: widget, affiliate, travel, travel widget, activities, activity, tour, tours, booking, attractions, attraction, city -Requires at least: 4.4.0 -Tested up to: 4.7.0 -Stable tag: 1.1.0 +=== GetYourGuide WordPress plugin === +Contributors: nicolaszanotti, fechu0307, janhrubes, zachgreen, hamid.kamalpour +Tags: plugin, Gutenberg, widget, affiliate, travel, travel widget, activities, activity, tour, tours, booking, attractions, attraction, city +Requires at least: 5.0 +Tested up to: 6.1.1 +Stable tag: 1.3.11 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html -List tours and activities from all over the world! +Get paid to travel. Make money by sharing activities with your readers. Share GetYourGuide's incredible selection of attractions, tours and activities with your readers. -== Description == +== Installation == -The GetYourGuide Widget allows you to easily list tours and activities from the GetYourGuide marketplace. Simply activate the plugin, and drag the widget into place. +This plugin either be installed from the WordPress dashboard, or manually. -The widget has a default configuration to get started, but can be changed in the widget options. += FROM THE WORDPRESS DASHBOARD = -There is an additional box that allows you to specify a specific search query while editing posts and pages. The box resides in the sidebar of the "Edit Post" and -"Edit Page" views. Its display can also be toggled by clicking "Screen Options" at the top. +1. Visit Dashboard > Plugins > Add New > Search "GetYourGuide" +2. Install Now +3. Visit Dashboard > Plugins +4. Activate the plugin. -== Installation == += MANUALLY = -1. Upload the folder `getyourguide-widget` to the `/wp-content/plugins/` directory -2. Activate the plugin through the "Plugins" menu in WordPress -3. Drag the GetYourGuide Widget to the position of your choosing on the "Widgets" page in WordPress +1. [Download](https://downloads.wordpress.org/plugin/getyourguide-widget.1.3.0.zip) this plugin. +2. Upload the plugin folder to the /wp-content/plugins/ directory. +3. Visit Dashboard > Plugins +4. Activate the plugin. -== Frequently Asked Questions == += Important! Add your GetYourGuide partner ID by navigating to Dashboard > Settings > GetYourGuide. = + +== Description == + +Easily promote top-rated tours and activities in your content with [GetYourGuide](https://www.getyourguide.com/). + +All of our widgets are fully responsive, and our high-quality, conversion-driven content options can be configured directly within the editor. -= How do you fetch the tours and activities? = +Find the right integration type to fit your audience, whether it’s showcasing multiple products directly within your blog post. Check out this [activity widget example](https://widget.getyourguide.com/default/activites.frame?id=code-example&partner_id=8OXMHTJ&widget=activities&number_of_items=3&locale_code=en-us&q=berlin). -In order to provide the latest available tours and activities, the content is loaded in real-time from the GetYourGuide marketplace using JavaScript and AJAX. +Or letting your readers explore everything a destination has to offer. Check out this [city widget](https://widget.getyourguide.com/default/city.frame?id=city-example&partner_id=8OXMHTJ&widget=city&locale_code=en-US&iata=SXF). -= How can I change the look? = +TIP: Alter the size of your browser window to see the widgets adapt. -You can change the look by positioning, embedding and extending the widget. The content within, such as the pictures and ratings, is styled neutrally by GetYourGuide. += Partnering with GetYourGuide = -= Where can I set my Partner ID? = +Looking for the best ways to monetize your passion for travel? Discover how GetYourGuide can help you turn your clicks into cash. + +https://www.youtube.com/watch?v=oPAOG6U7V_M + +== Frequently Asked Questions == -Your GetYourGuide partner ID can be set on the configuration page of the GetYourGuide Widget. +Check out [our article on how to get started](https://partner.getyourguide.com/en-us/c/best-practices/new-and-improved-the-getyourguide-wordpress-plugin) with our Wordpress plugin. + +If you have any urgent issues please reach out to our dedicated support team through our [contact form](https://partner.getyourguide.com/en-us/contact). == Screenshots == -1. A listing of activities in Paris +1. Activities widget +2. City widget +3. Activities widget admin +4. City widget admin +5. Search box +6. A listing of activities in Paris == Changelog == -= 1.0 = -* Basic setup of the plugin -* Search query and amount can be set on the widget -* Currency, locale, and partner ID can be set on the configuration page -* Search query can be overridden when editing posts and pages -* Wordpress UI available in English and German += 1.0.0 = + +- Basic setup of the plugin +- Search query and amount can be set on the widget +- Currency, locale, and partner ID can be set on the configuration page +- Search query can be overridden when editing posts and pages +- Wordpress UI available in English and German + += 1.1.0 = + +- Added optional campaign parameter + += 1.1.1 = + +- Code maintenance & cleanup + += 1.2.0 = + +- Added support for Gutenberg blocks +- Security improvements + += 1.2.1 = + +- README fixes + += 1.2.1 = + +- More README fixes + += 1.2.3 = + +- Fix author name + += 1.2.4 = + +- Update registration page link + += 1.2.5 = + +- Security improvements +- Code maintenance + += 1.2.6 = + +- README updates +- Image updates + += 1.2.7 = + +- Added analyser script +- Fixed bug regarding iframe hights + += 1.2.8 = + +- Removed deprecated features +- Code maintenance + += 1.2.9 = + +- Bug Fix + += 1.3.0 = + +- Clean up codebase +- Update cache after editing post + += 1.3.1 = + +- Giving verbose output that the plugin is not meant to be used via the WordPress appearance menu + += 1.3.10 = + +- Bug fix campaign parameter + += 1.3.11 = -= 1.1 = -* Added optional campaign parameter +- Compatible with PHP 8 and WP 6.1.1 diff --git a/dist/main.js b/dist/main.js new file mode 100644 index 0000000..7c77c0c --- /dev/null +++ b/dist/main.js @@ -0,0 +1 @@ +!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=21)}([function(e,t){e.exports=React},function(e,t,r){"use strict";(function(e){var o;function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function a(e){for(var t=1;t0?_objectSpread(_defineProperty({},t,i[t]),e):e}),{}))},title=function(e){return"GetYourGuide ".concat(e," widget")},url="https://widget.getyourguide.com/default/",Iframe=function(_React$Component){_inherits(Iframe,_React$Component);var _super=_createSuper(Iframe);function Iframe(){var e;_classCallCheck(this,Iframe);for(var t=arguments.length,r=new Array(t),o=0;o@font-face {\n font-family: "GT Eesti";\n font-style: normal;\n font-display:fallback;\n font-weight: 400;\n src: url("https://cdn.getyourguide.com/static/49829f4a1f87/customer/desktop/cached/fonts/GT-Eesti/GT-Eesti-Pro-Display-Regular.woff2");\n }'))},Search=function(_Component){_inherits(Search,_Component);var _super=_createSuper(Search);function Search(e){var t;return _classCallCheck(this,Search),_defineProperty(_assertThisInitialized(t=_super.call(this,e)),"state",{q:""}),_defineProperty(_assertThisInitialized(t),"handleSubmit",(function(e){e.preventDefault(),t.setState({q:lodash_escape__WEBPACK_IMPORTED_MODULE_1___default()(e.target.value)}),t.formRef.current.submit()})),t.formRef=react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(),t.id="gyg-search-input-".concat(lodash_uniqueid__WEBPACK_IMPORTED_MODULE_2___default()()),t}return _createClass(Search,[{key:"componentDidMount",value:function(){addSearchStyle()}},{key:"render",value:function(){var e=this.formRef,t=this.handleSubmit,r=this.id,o=_config__WEBPACK_IMPORTED_MODULE_3__.d.partnerID,n=this.state.q,a=""!==n;return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("form",{ref:e,action:"https://www.getyourguide.com/s",className:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchForm,onSubmit:t,style:{backgroundColor:"#1a2b49",borderRadius:"2px",fontFamily:'"GT Eesti",Arial,sans-serif',marginBottom:_config__WEBPACK_IMPORTED_MODULE_3__.f.standard,padding:"24px"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{className:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchQueryInput,type:"hidden",name:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchQueryInput,value:n}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{className:_config__WEBPACK_IMPORTED_MODULE_3__.c.partnerId,type:"hidden",name:_config__WEBPACK_IMPORTED_MODULE_3__.c.partnerId,value:o}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label",{htmlFor:r,style:{flex:"1 0 auto"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2",{style:{color:"#fff",fontSize:"24px",margin:"0 0 12px",padding:0}},"Search GetYourGuide")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{style:{display:"flex",maxHeight:"48px"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{id:r,placeholder:"Where are you going?",style:{border:0,borderRadius:"2px",fontSize:"16px",marginRight:"16px",padding:"8px",width:"100%"},className:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchInput}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{style:{appearance:"none",backgroundColor:a?"#0079e1":"#1593ff",color:"#fff",border:0,borderRadius:"5rem",fontSize:"16px",padding:0,textTransform:"none"},type:"submit"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{style:{display:"flex",alignItems:"center",padding:"8px"}},!a&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{style:{fill:"#fff",marginRight:"8px",maxHeight:"16px",maxWidth:"16px"},width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"})),a?"Loading...":"Search"))))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Search}(react__WEBPACK_IMPORTED_MODULE_0__.Component),reactHotLoader,leaveModule;reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(addSearchStyle,"addSearchStyle","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/Search/Search.js"),reactHotLoader.register(Search,"Search","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/Search/Search.js")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(2)(module))},function(e,t,r){"use strict";const o=r(12),n=r(13),a=r(14),i=r(15);function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?o(e):encodeURIComponent(e):e}function u(e,t){return t.decode?n(e):e}function s(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function _(e){const t=(e=s(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function d(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,o)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===o[e]&&(o[e]={}),o[e][t[1]]=r):o[e]=r};case"bracket":return(e,r,o)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==o[e]?o[e]=[].concat(o[e],r):o[e]=[r]:o[e]=r};case"comma":case"separator":return(t,r,o)=>{const n="string"==typeof r&&r.includes(e.arrayFormatSeparator),a="string"==typeof r&&!n&&u(r,e).includes(e.arrayFormatSeparator);r=a?u(r,e):r;const i=n||a?r.split(e.arrayFormatSeparator).map(t=>u(t,e)):null===r?r:u(r,e);o[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),o=Object.create(null);if("string"!=typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;for(const n of e.split("&")){if(""===n)continue;let[e,i]=a(t.decode?n.replace(/\+/g," "):n,"=");i=void 0===i?null:["comma","separator"].includes(t.arrayFormat)?i:u(i,t),r(u(e,t),i,o)}for(const e of Object.keys(o)){const r=o[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=f(r[e],t);else o[e]=f(r,t)}return!1===t.sort?o:(!0===t.sort?Object.keys(o).sort():Object.keys(o).sort(t.sort)).reduce((e,t)=>{const r=o[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=_,t.parse=d,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],o=function(e){switch(e.arrayFormat){case"index":return t=>(r,o)=>{const n=r.length;return void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:null===o?[...r,[l(t,e),"[",n,"]"].join("")]:[...r,[l(t,e),"[",l(n,e),"]=",l(o,e)].join("")]};case"bracket":return t=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:null===o?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(o,e)].join("")];case"comma":case"separator":return t=>(r,o)=>null==o||0===o.length?r:0===r.length?[[l(t,e),"=",l(o,e)].join("")]:[[r,l(o,e)].join(e.arrayFormatSeparator)];default:return t=>(r,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?r:null===o?[...r,l(t,e)]:[...r,[l(t,e),"=",l(o,e)].join("")]}}(t),n={};for(const t of Object.keys(e))r(t)||(n[t]=e[t]);const a=Object.keys(n);return!1!==t.sort&&a.sort(t.sort),a.map(r=>{const n=e[r];return void 0===n?"":null===n?l(r,t):Array.isArray(n)?n.reduce(o(r),[]).join("&"):l(r,t)+"="+l(n,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,o]=a(e,"#");return Object.assign({url:r.split("?")[0]||"",query:d(_(e),t)},t&&t.parseFragmentIdentifier&&o?{fragmentIdentifier:u(o,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const o=s(e.url).split("?")[0]||"",n=t.extract(e.url),a=t.parse(n,{sort:!1}),i=Object.assign(a,e.query);let c=t.stringify(i,r);c&&(c="?"+c);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#"+l(e.fragmentIdentifier,r)),`${o}${c}${u}`},t.pick=(e,r,o)=>{o=Object.assign({parseFragmentIdentifier:!0},o);const{url:n,query:a,fragmentIdentifier:c}=t.parseUrl(e,o);return t.stringifyUrl({url:n,query:i(a,r),fragmentIdentifier:c},o)},t.exclude=(e,r,o)=>{const n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,o)}},function(e,t,r){(function(t){var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,u=c||l||Function("return this")(),s=Object.prototype.toString,_=Math.max,f=Math.min,d=function(){return u.Date.now()};function p(e,t,r){var o,n,a,i,c,l,u=0,s=!1,p=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var r=o,a=n;return o=n=void 0,u=t,i=e.apply(a,r)}function O(e){return u=e,c=setTimeout(v,t),s?m(e):i}function h(e){var r=e-l;return void 0===l||r>=t||r<0||p&&e-u>=a}function v(){var e=d();if(h(e))return E(e);c=setTimeout(v,function(e){var r=t-(e-l);return p?f(r,a-(e-u)):r}(e))}function E(e){return c=void 0,g&&o?m(e):(o=n=void 0,i)}function w(){var e=d(),r=h(e);if(o=arguments,n=this,l=e,r){if(void 0===c)return O(l);if(p)return c=setTimeout(v,t),m(l)}return void 0===c&&(c=setTimeout(v,t)),i}return t=y(t)||0,b(r)&&(s=!!r.leading,a=(p="maxWait"in r)?_(y(r.maxWait)||0,t):a,g="trailing"in r?!!r.trailing:g),w.cancel=function(){void 0!==c&&clearTimeout(c),u=0,o=l=n=c=void 0},w.flush=function(){return void 0===c?i:E(d())},w}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(e))return NaN;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var c=n.test(e);return c||a.test(e)?i(e.slice(2),c?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,r){var o=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return b(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),p(e,t,{leading:o,maxWait:t,trailing:n})}}).call(this,r(4))},function(e,t,r){(function(t){var r=/[&<>"'`]/g,o=RegExp(r.source),n="object"==typeof t&&t&&t.Object===Object&&t,a="object"==typeof self&&self&&self.Object===Object&&self,i=n||a||Function("return this")();var c,l=(c={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==c?void 0:c[e]}),u=Object.prototype.toString,s=i.Symbol,_=s?s.prototype:void 0,f=_?_.toString:void 0;function d(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return f?f.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t;return(e=null==(t=e)?"":d(t))&&o.test(e)?e.replace(r,l):e}}).call(this,r(4))},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,n=r||o||Function("return this")(),a=Object.prototype,i=0,c=a.toString,l=n.Symbol,u=l?l.prototype:void 0,s=u?u.toString:void 0;function _(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return s?s.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t,r=++i;return(null==(t=e)?"":_(t))+r}}).call(this,r(4))},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return p}));var o,n=r(0),a=r.n(n),i=["label","value","onChange"];function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&o(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var s,_,f=function(e){var t=e.label,r=e.value,o=e.onChange,n=u(e,i);return a.a.createElement("div",null,a.a.createElement("label",null,t,a.a.createElement("input",function(e){for(var t=1;tencodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,r){"use strict";var o=new RegExp("%[a-f0-9]{2}","gi"),n=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),o=e.slice(t);return Array.prototype.concat.call([],a(r),a(o))}function i(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(o),r=1;r{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){"use strict";e.exports=function(e,t){for(var r={},o=Object.keys(e),n=Array.isArray(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{preventDefault:function(){return null},target:{value:""}};r.preventDefault(),t.setState(_defineProperty({},e,r.target.value))}));var r=t.props.defaultAttributes;return t.labels=Object.keys(r).reduce((function(e,t){switch(t){case"cmp":return _objectSpread(_objectSpread({},e),{},{cmp:"Track your widget's performance with a campaign name (optional)"});case"iata":return _objectSpread(_objectSpread({},e),{},{iata:"IATA Airport Code"});case"currency":return _objectSpread(_objectSpread({},e),{},{currency:"Currency"});case"locale_code":return _objectSpread(_objectSpread({},e),{},{locale_code:"Language"});case"number_of_items":return _objectSpread(_objectSpread({},e),{},{number_of_items:"Number of items"});case"q":return _objectSpread(_objectSpread({},e),{},{q:"Search query"});default:return e}}),{}),t.state=r,t}return _createClass(WordPress,[{key:"componentDidUpdate",value:function(e,t){var r=this,o=this.props,n=o.attributes,a=o.defaultAttributes;(0,o.setAttributes)(Object.keys(_objectSpread(_objectSpread({},a),n)).reduce((function(e,o){var n=r.state[o];return t[o]!==n?_objectSpread(_objectSpread({},e),{},_defineProperty({},o,n)):e}),{}))}},{key:"render",value:function(){var e=this.labels,t=this.handleChange,r=this.state,o=this.props,n=o.attributes;return(0,o.children)({labels:e,state:r,attributes:n,defaultAttributes:o.defaultAttributes,handleChange:t})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),WordPress}(react__WEBPACK_IMPORTED_MODULE_0__.Component),reactHotLoader,leaveModule;reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&reactHotLoader.register(WordPress,"WordPress","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/common/WPAttributes.js"),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(2)(module))},function(module,__webpack_exports__,__webpack_require__){"use strict";(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_common_Edit__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(11),_common_util__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(10),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"primary",r=["currency","locale_code","number_of_items","q"];return"primary"===t?r:e.filter((function(e){return!r.includes(e)}))},t.wpClassNames={button:"components-button is-button is-default is-large"},t.toggleAdditionalOptions=t.toggleAdditionalOptions.bind(_assertThisInitialized(t)),t.state={showAdditionalOptions:!1},t}return _createClass(ActivitiesEdit,[{key:"toggleAdditionalOptions",value:function(e){e.preventDefault(),this.setState((function(e){return{showAdditionalOptions:!e.showAdditionalOptions}}))}},{key:"render",value:function(){var e=this.filterKeys,t=this.toggleAdditionalOptions,r=this.wpClassNames,o=this.state.showAdditionalOptions;return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_common_Edit__WEBPACK_IMPORTED_MODULE_1__.a,this.props,(function(n){var a=n.data,i=n.keys,c=n.labels,l=n.handleChange,u=n.state;return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_common_util__WEBPACK_IMPORTED_MODULE_2__.a,{keys:e(i),data:a,labels:c,onChange:l,values:u,selects:["currency","locale_code"]}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{style:{alignSelf:"flex-start"},className:r.button,onClick:t,type:"button"},"Show additional options"),o&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_common_util__WEBPACK_IMPORTED_MODULE_2__.a,{keys:e(i,"secondary"),data:a,labels:c,onChange:l,values:u}))}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ActivitiesEdit}(react__WEBPACK_IMPORTED_MODULE_0__.Component),_default=ActivitiesEdit,reactHotLoader,leaveModule;__webpack_exports__.a=_default,reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(ActivitiesEdit,"ActivitiesEdit","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/activities/Edit.js"),reactHotLoader.register(_default,"default","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/activities/Edit.js")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(2)(module))},function(e,t,r){"use strict";(function(e){var o,n=r(0);(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&o(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var a,i,c=Object(n.createContext)({currency:{USD:{value:"USD",label:"US$ US Dollar"},EUR:{value:"EUR",label:"€ Euro"},AUD:{value:"AUD",label:"AU$ Australian Dollar"},GBP:{value:"GBP",label:"£ British Pound"},CAD:{value:"CAD",label:"C$ Canadian Dollar"},CSK:{value:"CSK",label:"Kč Czech koruna"},DKK:{value:"DKK",label:"DKK Danish Krone"},HKD:{value:"HKD",label:"HK$ Hong Kong Dollar"},JPY:{value:"JPY",label:"¥ Japanese Yen"},NZD:{value:"NZD",label:"NZ$ New Zealand Dollar"},NOK:{value:"NOK",label:"NOK Norwegian krone"},PLN:{value:"PLN",label:"zł Polish Złoty"},SGD:{value:"SGD",label:"S$ Singapore Dollar"},SEK:{value:"SEK",label:"SEK Swedish Krona"},CHF:{value:"CHF",label:"CHF Swiss Franc"},AED:{value:"AED",label:"د.إ UAE Dirham"}},locale_code:{"da-DK":{value:"da-DK",label:"Dansk"},"de-DE":{value:"de-DE",label:"Deutsch"},"de-AT":{value:"de-AT",label:"Deutsch (Österreich)"},"de-CH":{value:"de-CH",label:"Deutsch (Schweiz)"},"en-US":{value:"en-US",label:"English"},"en-GB":{value:"en-GB",label:"English (United Kingdom)"},"es-ES":{value:"es-ES",label:"Español"},"es-MX":{value:"es-MX",label:"Español (México)"},"fr-FR":{value:"fr-FR",label:"Français"},"it-IT":{value:"it-IT",label:"Italiano"},"nl-NL":{value:"nl-NL",label:"Nederlands"},"no-NO":{value:"no-NO",label:"Norsk"},"pl-PL":{value:"pl-PL",label:"Polski"},"pt-PT":{value:"pt-PT",label:"Português"},"pt-BR":{value:"pt-BR",label:"Português (Brasil)"},"fi-FI":{value:"fi-FI",label:"Suomen kieli"},"sv-SE":{value:"sv-SE",label:"Svenska"},"tr-TR":{value:"tr-TR",label:"Türkçe"},"ru-RU":{value:"ru-RU",label:"Русский"},"ja-JP":{value:"ja-JP",label:"日本語"},"zh-CN":{value:"zh-CN",label:"简体中文"},"zh-TW":{value:"zh-TW",label:"繁體中文"}}});t.a=c,(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&a.register(c,"default","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/common/DataContext.js"),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&i(e)}).call(this,r(2)(e))},function(e,t,r){"use strict";(function(e){var o,n=r(0),a=r.n(n);(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&o(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i,c,l=function(){return a.a.createElement("strong",{className:"notice notice-error",style:{display:"block"}},"You haven't entered your GetYourGuide partner ID."," ",a.a.createElement("a",{href:"".concat(window.location.origin,"/wp-admin/options-general.php?page=getyourguide")},"Enter it here."))},u=l;t.a=u,(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(l,"Warning","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/common/Warning.js"),i.register(u,"default","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/common/Warning.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)}).call(this,r(2)(e))},function(e,t,r){"use strict";(function(e){var o,n=r(0),a=r.n(n),i=r(10),c=r(11);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function u(e){for(var t=1;t0?_objectSpread(_defineProperty({},r,i[r]),e):e}),{}))},title=function(e){return"GetYourGuide ".concat(e," widget")},url="https://widget.getyourguide.com/default/",Iframe=function(_React$Component){_inherits(Iframe,_React$Component);var _super=_createSuper(Iframe);function Iframe(){var e;_classCallCheck(this,Iframe);for(var r=arguments.length,t=new Array(r),n=0;n@font-face {\n font-family: "GT Eesti";\n font-style: normal;\n font-display:fallback;\n font-weight: 400;\n src: url("https://cdn.getyourguide.com/static/49829f4a1f87/customer/desktop/cached/fonts/GT-Eesti/GT-Eesti-Pro-Display-Regular.woff2");\n }'))},Search=function(_Component){_inherits(Search,_Component);var _super=_createSuper(Search);function Search(e){var r;return _classCallCheck(this,Search),_defineProperty(_assertThisInitialized(r=_super.call(this,e)),"state",{q:""}),_defineProperty(_assertThisInitialized(r),"handleSubmit",(function(e){e.preventDefault(),r.setState({q:lodash_escape__WEBPACK_IMPORTED_MODULE_1___default()(e.target.value)}),r.formRef.current.submit()})),r.formRef=react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(),r.id="gyg-search-input-".concat(lodash_uniqueid__WEBPACK_IMPORTED_MODULE_2___default()()),r}return _createClass(Search,[{key:"componentDidMount",value:function(){addSearchStyle()}},{key:"render",value:function(){var e=this.formRef,r=this.handleSubmit,t=this.id,n=_config__WEBPACK_IMPORTED_MODULE_3__.d.partnerID,o=this.state.q,a=""!==o;return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("form",{ref:e,action:"https://www.getyourguide.com/s",className:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchForm,onSubmit:r,style:{backgroundColor:"#1a2b49",borderRadius:"2px",fontFamily:'"GT Eesti",Arial,sans-serif',marginBottom:_config__WEBPACK_IMPORTED_MODULE_3__.f.standard,padding:"24px"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{className:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchQueryInput,type:"hidden",name:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchQueryInput,value:o}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{className:_config__WEBPACK_IMPORTED_MODULE_3__.c.partnerId,type:"hidden",name:_config__WEBPACK_IMPORTED_MODULE_3__.c.partnerId,value:n}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label",{htmlFor:t,style:{flex:"1 0 auto"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2",{style:{color:"#fff",fontSize:"24px",margin:"0 0 12px",padding:0}},"Search GetYourGuide")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{style:{display:"flex",maxHeight:"48px"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input",{id:t,placeholder:"Where are you going?",style:{border:0,borderRadius:"2px",fontSize:"16px",marginRight:"16px",padding:"8px",width:"100%"},className:_config__WEBPACK_IMPORTED_MODULE_3__.c.searchInput}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{style:{appearance:"none",backgroundColor:a?"#0079e1":"#1593ff",color:"#fff",border:0,borderRadius:"5rem",fontSize:"16px",padding:0,textTransform:"none"},type:"submit"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{style:{display:"flex",alignItems:"center",padding:"8px"}},!a&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{style:{fill:"#fff",marginRight:"8px",maxHeight:"16px",maxWidth:"16px"},width:"1792",height:"1792",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"})),a?"Loading...":"Search"))))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Search}(react__WEBPACK_IMPORTED_MODULE_0__.Component),reactHotLoader,leaveModule;reactHotLoader="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0,reactHotLoader&&(reactHotLoader.register(addSearchStyle,"addSearchStyle","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/Search/Search.js"),reactHotLoader.register(Search,"Search","/home/runner/work/wordpress-plugin/wordpress-plugin/src/block/Search/Search.js")),leaveModule="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(2)(module))},function(e,r,t){"use strict";const n=t(12),o=t(13),a=t(14),i=t(15);function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(e,r){return r.encode?r.strict?n(e):encodeURIComponent(e):e}function s(e,r){return r.decode?o(e):e}function l(e){const r=e.indexOf("#");return-1!==r&&(e=e.slice(0,r)),e}function _(e){const r=(e=l(e)).indexOf("?");return-1===r?"":e.slice(r+1)}function f(e,r){return r.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!r.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,r){c((r=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},r)).arrayFormatSeparator);const t=function(e){let r;switch(e.arrayFormat){case"index":return(e,t,n)=>{r=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),r?(void 0===n[e]&&(n[e]={}),n[e][r[1]]=t):n[e]=t};case"bracket":return(e,t,n)=>{r=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),r?void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=[t]:n[e]=t};case"comma":case"separator":return(r,t,n)=>{const o="string"==typeof t&&t.includes(e.arrayFormatSeparator),a="string"==typeof t&&!o&&s(t,e).includes(e.arrayFormatSeparator);t=a?s(t,e):t;const i=o||a?t.split(e.arrayFormatSeparator).map(r=>s(r,e)):null===t?t:s(t,e);n[r]=i};default:return(e,r,t)=>{void 0!==t[e]?t[e]=[].concat(t[e],r):t[e]=r}}}(r),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const o of e.split("&")){if(""===o)continue;let[e,i]=a(r.decode?o.replace(/\+/g," "):o,"=");i=void 0===i?null:["comma","separator"].includes(r.arrayFormat)?i:s(i,r),t(s(e,r),i,n)}for(const e of Object.keys(n)){const t=n[e];if("object"==typeof t&&null!==t)for(const e of Object.keys(t))t[e]=f(t[e],r);else n[e]=f(t,r)}return!1===r.sort?n:(!0===r.sort?Object.keys(n).sort():Object.keys(n).sort(r.sort)).reduce((e,r)=>{const t=n[r];return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)?e[r]=function e(r){return Array.isArray(r)?r.sort():"object"==typeof r?e(Object.keys(r)).sort((e,r)=>Number(e)-Number(r)).map(e=>r[e]):r}(t):e[r]=t,e},Object.create(null))}r.extract=_,r.parse=p,r.stringify=(e,r)=>{if(!e)return"";c((r=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},r)).arrayFormatSeparator);const t=t=>r.skipNull&&null==e[t]||r.skipEmptyString&&""===e[t],n=function(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{const o=t.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,[u(r,e),"[",o,"]"].join("")]:[...t,[u(r,e),"[",u(o,e),"]=",u(n,e)].join("")]};case"bracket":return r=>(t,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,[u(r,e),"[]"].join("")]:[...t,[u(r,e),"[]=",u(n,e)].join("")];case"comma":case"separator":return r=>(t,n)=>null==n||0===n.length?t:0===t.length?[[u(r,e),"=",u(n,e)].join("")]:[[t,u(n,e)].join(e.arrayFormatSeparator)];default:return r=>(t,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,u(r,e)]:[...t,[u(r,e),"=",u(n,e)].join("")]}}(r),o={};for(const r of Object.keys(e))t(r)||(o[r]=e[r]);const a=Object.keys(o);return!1!==r.sort&&a.sort(r.sort),a.map(t=>{const o=e[t];return void 0===o?"":null===o?u(t,r):Array.isArray(o)?o.reduce(n(t),[]).join("&"):u(t,r)+"="+u(o,r)}).filter(e=>e.length>0).join("&")},r.parseUrl=(e,r)=>{r=Object.assign({decode:!0},r);const[t,n]=a(e,"#");return Object.assign({url:t.split("?")[0]||"",query:p(_(e),r)},r&&r.parseFragmentIdentifier&&n?{fragmentIdentifier:s(n,r)}:{})},r.stringifyUrl=(e,t)=>{t=Object.assign({encode:!0,strict:!0},t);const n=l(e.url).split("?")[0]||"",o=r.extract(e.url),a=r.parse(o,{sort:!1}),i=Object.assign(a,e.query);let c=r.stringify(i,t);c&&(c="?"+c);let s=function(e){let r="";const t=e.indexOf("#");return-1!==t&&(r=e.slice(t)),r}(e.url);return e.fragmentIdentifier&&(s="#"+u(e.fragmentIdentifier,t)),`${n}${c}${s}`},r.pick=(e,t,n)=>{n=Object.assign({parseFragmentIdentifier:!0},n);const{url:o,query:a,fragmentIdentifier:c}=r.parseUrl(e,n);return r.stringifyUrl({url:o,query:i(a,t),fragmentIdentifier:c},n)},r.exclude=(e,t,n)=>{const o=Array.isArray(t)?e=>!t.includes(e):(e,r)=>!t(e,r);return r.pick(e,o,n)}},function(e,r,t){(function(r){var t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof r&&r&&r.Object===Object&&r,u="object"==typeof self&&self&&self.Object===Object&&self,s=c||u||Function("return this")(),l=Object.prototype.toString,_=Math.max,f=Math.min,p=function(){return s.Date.now()};function d(e,r,t){var n,o,a,i,c,u,s=0,l=!1,d=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(r){var t=n,a=o;return n=o=void 0,s=r,i=e.apply(a,t)}function h(e){return s=e,c=setTimeout(E,r),l?m(e):i}function O(e){var t=e-u;return void 0===u||t>=r||t<0||d&&e-s>=a}function E(){var e=p();if(O(e))return w(e);c=setTimeout(E,function(e){var t=r-(e-u);return d?f(t,a-(e-s)):t}(e))}function w(e){return c=void 0,b&&n?m(e):(n=o=void 0,i)}function v(){var e=p(),t=O(e);if(n=arguments,o=this,u=e,t){if(void 0===c)return h(u);if(d)return c=setTimeout(E,r),m(u)}return void 0===c&&(c=setTimeout(E,r)),i}return r=g(r)||0,y(t)&&(l=!!t.leading,a=(d="maxWait"in t)?_(g(t.maxWait)||0,r):a,b="trailing"in t?!!t.trailing:b),v.cancel=function(){void 0!==c&&clearTimeout(c),s=0,n=u=o=c=void 0},v.flush=function(){return void 0===c?i:w(p())},v}function y(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(y(e)){var r="function"==typeof e.valueOf?e.valueOf():e;e=y(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var c=o.test(e);return c||a.test(e)?i(e.slice(2),c?2:8):n.test(e)?NaN:+e}e.exports=function(e,r,t){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return y(t)&&(n="leading"in t?!!t.leading:n,o="trailing"in t?!!t.trailing:o),d(e,r,{leading:n,maxWait:r,trailing:o})}}).call(this,t(4))},function(e,r,t){(function(r){var t=/[&<>"'`]/g,n=RegExp(t.source),o="object"==typeof r&&r&&r.Object===Object&&r,a="object"==typeof self&&self&&self.Object===Object&&self,i=o||a||Function("return this")();var c,u=(c={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==c?void 0:c[e]}),s=Object.prototype.toString,l=i.Symbol,_=l?l.prototype:void 0,f=_?_.toString:void 0;function p(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(e))return f?f.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}e.exports=function(e){var r;return(e=null==(r=e)?"":p(r))&&n.test(e)?e.replace(t,u):e}}).call(this,t(4))},function(e,r,t){(function(r){var t="object"==typeof r&&r&&r.Object===Object&&r,n="object"==typeof self&&self&&self.Object===Object&&self,o=t||n||Function("return this")(),a=Object.prototype,i=0,c=a.toString,u=o.Symbol,s=u?u.prototype:void 0,l=s?s.toString:void 0;function _(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return l?l.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}e.exports=function(e){var r,t=++i;return(null==(r=e)?"":_(r))+t}}).call(this,t(4))},,,function(e,r,t){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,r,t){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,r){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;r=r||1;var t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],a(t),a(n))}function i(e){try{return decodeURIComponent(e)}catch(o){for(var r=e.match(n),t=1;t{if("string"!=typeof e||"string"!=typeof r)throw new TypeError("Expected the arguments to be of type `string`");if(""===r)return[e];const t=e.indexOf(r);return-1===t?[e]:[e.slice(0,t),e.slice(t+r.length)]}},function(e,r,t){"use strict";e.exports=function(e,r){for(var t={},n=Object.keys(e),o=Array.isArray(r),a=0;a -