ably-ui 7.10.0.dev.e5f4e78 → 7.10.0.dev.e980a00

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfec790b10d1be8954b1ae30f0e60190953563a8c181bd70c8884e5f45d74d9d
4
- data.tar.gz: 9fb63e03c33c3f955c960527dea6a1e1763613e192f8d83f0b0388bfcb2f3d66
3
+ metadata.gz: 99c75ca1bafb815c15c8db8f4160f9a50e4ca3910c3565749de535903c06f903
4
+ data.tar.gz: 6ae4674ab44ea48364d72783e3b0a78de1e95b427fe454aac288abb3fef85157
5
5
  SHA512:
6
- metadata.gz: cd8440044e3563930cd621bfee959f3a368bfb38bf849330e9d0ae5fbda94d8edbd79e4d0fb2077a177e563c4525c6406ec02af46dad4ec324a36355b4122c7d
7
- data.tar.gz: 3029e5ad3a4b7189e378592b304afb1cd70f6de50596f372d2837d6fe5b208b73c0e2fc72232159e94ffdfbc6a1f215e4e5f87eb0398d50252d289588fdee8c6
6
+ metadata.gz: eaafb0dcba1394d1f26a48cb6b45ef0843be149748440a725e41a1e65c24964aaac9e6a1a5f94278a571878877989166a82df60e62e978220c6ecb1d6265a9f5
7
+ data.tar.gz: ca1882f8dbe1c56a073899028145155e6a4429e949b4cbf3979eb2834b5a941c1aa77025b8b741ccbb19677284ae96156ea163e96813ce6bd32a3b2425e024e3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ably-ui (7.10.0.dev.45e131a)
4
+ ably-ui (7.10.0.dev.e5f4e78)
5
5
  view_component (>= 2.33, < 2.50)
6
6
 
7
7
  GEM
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see component.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.Meganav=e())}(this,(function(){return(()=>{var t={727:(t,e,n)=>{"use strict";t.exports=n(5647)},493:(t,e,n)=>{"use strict";n(2702).polyfill(),n(4301);var r=function(t,e,n,i,o,s,a){var c=function(t,e){return t||!1===t?"&"+e+"="+t:""};if("search"===n||"suggest"===n||"autocomplete"===n){var l="",u="",f=null;if("search"===n){f=n,l=i.keyword,l=i.enableLogicalOperators?l.replace(/ and /g," AND ").replace(/ or /g," OR ").replace(/ not /g," NOT "):l.replace(/ AND /g," and ").replace(/ OR /g," or ").replace(/ NOT /g," not "),l=encodeURIComponent(l);var d=i.fuzzy;if("retry"===d&&(d=!0===s),"search"===n){if(u=c(i.lang,"lang")+c(d,"fuzzy")+c(i.collectAnalytics,"collectAnalytics")+c(i.postfixWildcard,"postfixWildcard")+c(i.categories,"categories")+c(i.priceFromCents,"priceFromCents")+c(i.priceToCents,"priceToCents")+c(i.dateFrom,"dateFrom")+c(i.dateTo,"dateTo")+c(i.paging.page,"page")+c(i.paging.pageSize,"limit")+c(i.paging.sortBy,"sort")+c(i.paging.sortOrder,"order")+c(i.shuffleAndLimitTo,"shuffleAndLimitTo")+c(i.jwt,"jwt")+c(i.resultType,"resultType")+c(i.userToken,"userToken")+c(i.numFacets,"numFacets")+c(i.cacheResponseTime,"cacheResponseWithTtlSeconds")+c(i.searchOperator,"defaultOperator")+c(i.analyticsTag,"analyticsTag")+c(i.hierarchicalFacetSetting,"hierarchicalFacets"),i.customFieldFilters)for(var h=0;h<i.customFieldFilters.length;h++)u=u+"&customField="+i.customFieldFilters[h];if(i.facetFields)for(h=0;h<i.facetFields.length;h++)u=u+"&facet="+i.facetFields[h];if(i.rangeFacets&&(u=u+"&rangeFacets="+JSON.stringify(i.rangeFacets)),i.statsFields)for(h=0;h<i.statsFields.length;h++)u=u+"&fieldStat="+i.statsFields[h];if(i.personalizationEvents&&Array.isArray(i.personalizationEvents))for(h=0;h<i.personalizationEvents.length;h++){var p=i.personalizationEvents[h],g=Object.keys(p);u=u+"&personalizationEvent="+encodeURIComponent(g+"="+p[g])}a?u=u+"&filter="+encodeURIComponent(JSON.stringify(a)):i.filterObject&&(u=u+"&filter="+encodeURIComponent(JSON.stringify(i.filterObject)))}}else"suggest"===n?(f=n,u=c(i.suggestionsSize,"size")+c(i.lang,"lang"),l=i.suggestionsPrefix):"autocomplete"===n&&(f="autocomplete/document-field",u=c(i.autocomplete.field,"source")+c(i.autocomplete.size,"size"),l=i.autocomplete.prefix);fetch("https://"+t+"/v1/"+f+"/"+e+"?term="+l+u).then((function(t){return t.json()})).then((function(a){if("search"===n&&"retry"===i.fuzzy&&0===a.total_hits&&!0!==s)r(t,e,n,i,o,!0);else{if(!0===s){var c=i.paging.pageSize;a.total_hits>=c&&(a.total_hits=c)}o(a)}})).catch((function(t){console.log(t),o({error:{response:500,message:"invalid server response"}})}))}else o({error:{response:400,message:"invalid query type"}})};t.exports=r},5647:(t,e,n)=>{"use strict";var r=n(493),i=n(9610),o=n(3716),s=n(7585),a=n(5159),c=n(4508);t.exports=function(t,e){this.sitekey=t,this.privatekey=e,this.apiHostname="api.addsearch.com",this.settings=new s,this.sessionId=("a-"+1e8*Math.random()).substring(0,10),this.search=function(t,e){var n=null,i=null;if(t&&a.isFunction(e))n=t,i=e;else if(!e&&a.isFunction(t))n=this.settings.getSettings().keyword,i=t;else{if(!this.settings.getSettings().callback)throw"Illegal search parameters. Should be (keyword, callbackFunction) or (callbackFunction)";n=this.settings.getSettings().keyword,i=this.settings.getSettings().callback}this.settings.setCallback(i),this.settings.setKeyword(n),this.throttledSearchFetch||(this.throttledSearchFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledSearchFetch(this.apiHostname,this.sitekey,"search",this.settings.getSettings(),i)},this.suggestions=function(t,e){if(!t||!e||!a.isFunction(e))throw"Illegal suggestions parameters. Should be (prefix, callbackFunction)";this.settings.setSuggestionsPrefix(t),this.throttledSuggestionsFetch||(this.throttledSuggestionsFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledSuggestionsFetch(this.apiHostname,this.sitekey,"suggest",this.settings.getSettings(),e)},this.autocomplete=function(t,e,n){if(!(t&&e&&n&&a.isFunction(n)))throw"Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)";this.settings.setAutocompleteParams(t,e),this.throttledAutocompleteFetch||(this.throttledAutocompleteFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledAutocompleteFetch(this.apiHostname,this.sitekey,"autocomplete",this.settings.getSettings(),n)},this.fetchCustomApi=function(t,e,n){var i=Object.assign({},this.settings.getSettings());i.facetFields=i.facetFields.filter((e=>t===e)),r(this.apiHostname,this.sitekey,"search",i,n,null,e)},this.fetchRangeFacets=function(t,e,n){var i=Object.assign({},this.settings.getSettings());i.rangeFacets||(i.rangeFacets=[]),i.rangeFacets.push({field:t.field,ranges:t.ranges}),r(this.apiHostname,this.sitekey,"search",i,n,null,e)},this.getDocument=function(t){return i.getDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocument=function(t){return i.saveDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of documents: {documents: []}";return i.saveDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocument=function(t){return i.deleteDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of document ids: {documents: []}";return i.deleteDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.setApiHostname=function(t){this.apiHostname=t},this.getSettings=function(){return this.settings.getSettings()},this.setLanguage=function(t){this.settings.setLanguage(t)},this.setCategoryFilters=function(t){this.settings.setCategoryFilters(t)},this.addCustomFieldFilter=function(t,e){this.settings.addCustomFieldFilter(t,e)},this.removeCustomFieldFilter=function(t,e){this.settings.removeCustomFieldFilter(t,e)},this.setPriceRangeFilter=function(t,e){this.settings.setPriceRangeFilter(t,e)},this.setDateFilter=function(t,e){this.settings.setDateFilter(t,e)},this.setJWT=function(t){this.settings.setJWT(t)},this.setUserToken=function(t){this.settings.setUserToken(t)},this.setPaging=function(t,e,n,r){this.settings.setPaging(t,e,n,r)},this.nextPage=function(){this.settings.nextPage()},this.previousPage=function(){this.settings.previousPage()},this.setSuggestionsSize=function(t){this.settings.setSuggestionsSize(t)},this.setAutocompleteSize=function(t){this.settings.setAutocompleteSize(t)},this.addFacetField=function(t){this.settings.addFacetField(t)},this.addHierarchicalFacetSetting=function(t){this.settings.addHierarchicalFacetSetting(t)},this.addRangeFacet=function(t,e){this.settings.addRangeFacet(t,e)},this.addStatsField=function(t){this.settings.addStatsField(t)},this.setNumberOfFacets=function(t){this.settings.setNumberOfFacets(t)},this.setResultType=function(t){this.settings.setResultType(t)},this.setPersonalizationEvents=function(t){this.settings.setPersonalizationEvents(t)},this.setFilterObject=function(t){this.settings.setFilterObject(t)},this.setShuffleAndLimitTo=function(t){this.settings.setShuffleAndLimitTo(t)},this.setFuzzyMatch=function(t){this.settings.setFuzzyMatch(t)},this.setPostfixWildcard=function(t){this.settings.setPostfixWildcard(t)},this.setCacheResponseTime=function(t){this.settings.setCacheResponseTime(t)},this.setCollectAnalytics=function(t){this.settings.setCollectAnalytics(t)},this.setAnalyticsTag=function(t){this.settings.setAnalyticsTag(t)},this.setThrottleTime=function(t){this.settings.setThrottleTime(t)},this.setStatsSessionId=function(t){this.sessionId=t},this.getStatsSessionId=function(){return this.sessionId},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators(t)},this.setSearchOperator=function(t){this.settings.setSearchOperator(t)},this.sendStatsEvent=function(t,e,n){if("search"===t)n={action:"search",session:this.sessionId,keyword:e,numberOfResults:n.numberOfResults,analyticsTag:this.getSettings().analyticsTag},o(this.apiHostname,this.sitekey,n);else{if("click"!==t)throw"Illegal sendStatsEvent type parameters. Should be search or click)";n={action:"click",session:this.sessionId,keyword:e,docid:n.documentId,position:n.position,analyticsTag:this.getSettings().analyticsTag},o(this.apiHostname,this.sitekey,n)}},this.searchResultClicked=function(t,e){this.sendStatsEvent("click",this.settings.getSettings().keyword,{documentId:t,position:e})}}},9610:(t,e,n)=>{"use strict";n(4301);const r=n(5159),i=n(2702).Promise,o=function(t,e){return{Authorization:"Basic "+r.base64(t+":"+e),"Content-Type":"application/json"}};t.exports={getDocument:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+r,{method:"GET",headers:o(e,n)}).then((t=>{200==t.status?i(t.json()):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},saveDocument:function(t,e,n,r){const s=r.id||r.url;return new i(((i,a)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/",{method:s?"PUT":"POST",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):a({status:t.status,text:t.statusText})})).catch((t=>{a({status:400,text:t})}))}))},saveDocumentsBatch:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"PUT",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},deleteDocument:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+r,{method:"DELETE",headers:o(e,n)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},deleteDocumentsBatch:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"DELETE",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))}}},7585:t=>{"use strict";t.exports=function(){this.settings={keyword:"*",callback:null,throttleTimeMs:200,fuzzy:"auto",paging:{page:1,pageSize:10,sortBy:"relevance",sortOrder:"desc"},customFieldFilters:[],userToken:null,suggestionsSize:10,facetFields:[],autocomplete:{size:10},searchOperator:null,enableLogicalOperators:!1,cacheResponseTime:null},this.getSettings=function(){return this.settings},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setCallback=function(t){this.settings.callback=t},this.setThrottleTime=function(t){this.settings.throttleTimeMs=t},this.setSuggestionsPrefix=function(t){this.settings.suggestionsPrefix=t},this.setSuggestionsSize=function(t){this.settings.suggestionsSize=t},this.setAutocompleteSize=function(t){this.settings.autocomplete.size=t},this.setAutocompleteParams=function(t,e){this.settings.autocomplete.field=t,this.settings.autocomplete.prefix=e},this.setLanguage=function(t){if(t&&2!==t.length)throw'use 2-char language code (e.g. "en")';this.settings.lang=t},this.setFuzzyMatch=function(t){if(!0!==t&&!1!==t&&"auto"!==t&&"retry"!==t)throw"fuzzy matching can be true, false, 'auto', or 'retry'";this.settings.fuzzy=t},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators=t},this.setCacheResponseTime=function(t){this.settings.cacheResponseTime=t},this.setPostfixWildcard=function(t){this.settings.postfixWildcard=t},this.setCollectAnalytics=function(t){this.settings.collectAnalytics=t},this.setAnalyticsTag=function(t){this.settings.analyticsTag=t},this.setCategoryFilters=function(t){this.settings.categories=t},this.setFilterObject=function(t){this.settings.filterObject=t},this.setPriceRangeFilter=function(t,e){this.settings.priceFromCents=t,this.settings.priceToCents=e},this.addCustomFieldFilter=function(t,e){var n=encodeURIComponent(t+"="+e);-1===this.settings.customFieldFilters.indexOf(n)&&this.settings.customFieldFilters.push(n)},this.removeCustomFieldFilter=function(t,e){var n=!1,r=encodeURIComponent(t+"="+e);e||(n=!0,r=encodeURIComponent(t+"="));for(var i=this.settings.customFieldFilters.length;i>0;i--){var o=this.settings.customFieldFilters[i-1];(n&&0===o.indexOf(r)||o===r)&&this.settings.customFieldFilters.splice(i-1,1)}},this.setDateFilter=function(t,e){this.settings.dateFrom=t,this.settings.dateTo=e},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setJWT=function(t){this.settings.jwt=t},this.setUserToken=function(t){this.settings.userToken=t},this.setPersonalizationEvents=function(t){this.settings.personalizationEvents=t},this.setResultType=function(t){this.settings.resultType=t},this.addFacetField=function(t){-1===this.settings.facetFields.indexOf(t)&&this.settings.facetFields.push(t)},this.addHierarchicalFacetSetting=function(t){this.settings.hierarchicalFacetSetting=JSON.stringify(t)},this.addRangeFacet=function(t,e){this.settings.rangeFacets||(this.settings.rangeFacets=[]),this.settings.rangeFacets.push({field:t,ranges:e})},this.addStatsField=function(t){this.settings.statsFields||(this.settings.statsFields=[]),-1===this.settings.statsFields.indexOf(t)&&this.settings.statsFields.push(t)},this.setNumberOfFacets=function(t){this.settings.numFacets=t},this.setPaging=function(t,e,n,r){if(t<1)throw"page must be 1 or bigger";if(e<1||e>300)throw"pageSize must be 1-300";if("asc"!==r&&"desc"!==r)throw"sortOrder must be asc or desc";this.settings.paging.page=t,this.settings.paging.pageSize=e,this.settings.paging.sortBy=n,this.settings.paging.sortOrder=r},this.setShuffleAndLimitTo=function(t){this.settings.shuffleAndLimitTo=t},this.nextPage=function(){this.settings.paging.page=this.settings.paging.page+1},this.previousPage=function(){this.settings.paging.page>0&&(this.settings.paging.page=this.settings.paging.page-1)},this.setSearchOperator=function(t){if("and"!==t&&"or"!==t)throw"operator must be 'and' || 'or'";this.settings.searchOperator=t}}},3716:(t,e,n)=>{"use strict";n(2702).polyfill(),n(4301),t.exports=function(t,e,n){"undefined"!=typeof window&&window.navigator&&window.navigator.sendBeacon?navigator.sendBeacon("https://"+t+"/v1/stats/"+e+"/",JSON.stringify(n)):fetch("https://"+t+"/v1/stats/"+e+"/",{method:"POST",headers:{"Content-Type":"text/plain"},body:JSON.stringify(n)})}},4508:t=>{t.exports=function(t,e){var n,r=0;function i(){n&&clearTimeout(n)}return function(){var o=this,s=Date.now()-r,a=arguments;function c(){r=Date.now(),e.apply(o,a)}i(),s>t?c():n=setTimeout(c,t-s)}}},5159:(t,e,n)=>{t.exports={isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},base64:function(t){return n.g.window={},window&&window.btoa?window.btoa(t):Buffer?Buffer.from(t).toString("base64"):void 0}}},2498:(t,e,n)=>{"use strict";n.d(e,{default:()=>o});var r=n(9581);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}const o=function(){var t=Array.from((0,r.n)("meganav-control")),e=Array.from((0,r.n)("meganav-panel")),n=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(e,r,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(n,")")).matches&&!t.some((function(t){return t===document.activeElement}))){var s,a=["invisible","visible"];(s=r.classList).replace.apply(s,function(t){if(Array.isArray(t))return i(t)}(c=o?a:a.reverse())||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),e.setAttribute("aria-expanded",o)}var c};return t.map((function(n){var r=n.parentNode,i=document.querySelector("#".concat(n.getAttribute("aria-controls"))),s=function(n,r){return function(){t.forEach((function(t){return t!==n&&t.setAttribute("aria-expanded",!1)})),e.forEach((function(t){return t!==r&&t.classList.replace("visible","invisible")})),n.getAttribute("aria-expanded")?(n.setAttribute("aria-expanded",!0),r.classList.replace("invisible","visible")):(n.setAttribute("aria-expanded",!1),r.classList.replace("visible","invisible"))}}(n,i),a=function(t,e){return function(){return o(t,e,!0)}}(n,i),c=function(t,e){return function(){return o(t,e,!1)}}(n,i);return r.addEventListener("mouseenter",a),r.addEventListener("mouseleave",c),n.addEventListener("click",s),[{teardown:function(){r.removeEventListener("mouseenter",a),r.removeEventListener("mouseleave",c),n.removeEventListener("click",s)},clear:function(){n.setAttribute("aria-expanded",!1),i.classList.replace("visible","invisible")}}]})).flat()}},1792:(t,e,n)=>{"use strict";n.d(e,{default:()=>s});var r=n(6265),i=n.n(r),o=n(9581);const s=function(t){var e=t.clearPanels,n=(0,o.A)("meganav-control-mobile-dropdown"),r=(0,o.A)("meganav-mobile-dropdown"),s=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),c=(0,o.A)("meganav-mobile-search-input"),l=(0,o.A)("meganav-mobile-search-suggestions"),u=function(){"false"===n.getAttribute("aria-expanded")?(r.classList.replace("invisible","visible"),n.setAttribute("aria-expanded",!0),i().disablePageScroll()):(r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),i().enablePageScroll(),e()),s.classList.toggle("hidden"),a.classList.toggle("hidden")},f=function(){l.classList.add("max-h-96")},d=function(t){t.relatedTarget!==l.querySelectorAll("a")[0]&&l.classList.remove("max-h-96")};return n.addEventListener("click",u),c.addEventListener("focus",f),c.addEventListener("blur",d),{teardown:function(){n.removeEventListener("click",u),i().enablePageScroll(),c.removeEventListener("focus",f),c.removeEventListener("blur",d)},clear:function(){r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),s.classList.remove("hidden"),a.classList.add("hidden"),i().enablePageScroll(),l.classList.remove("max-h-96")}}}},7359:(t,e,n)=>{"use strict";n.d(e,{default:()=>i});var r=n(9581);const i=function(){var t=Array.from((0,r.n)("meganav-control-mobile-panel-close")),e=Array.from((0,r.n)("meganav-control-mobile-panel-open"));return t.map((function(t){var n=e.find((function(e){return e.getAttribute("aria-controls")===t.getAttribute("aria-controls")})),r=document.querySelector("#".concat(t.getAttribute("aria-controls"))),i=function(t,e,n){return function(){t.setAttribute("aria-expanded",!1),e.setAttribute("aria-expanded",!1),n.classList.replace("block","hidden"),n.style.height=null}}(t,n,r);return t.addEventListener("click",i),{teardown:function(){return t.removeEventListener("click",i)},clear:function(){return t.setAttribute("aria-expanded",!1)}}}))}},9552:(t,e,n)=>{"use strict";n.d(e,{default:()=>i});var r=n(9581);const i=function(){var t,e=Array.from((0,r.n)("meganav-control-mobile-panel-close")),n=Array.from((0,r.n)("meganav-control-mobile-panel-open")),i=(0,r.A)("meganav-mobile-dropdown"),o=(t=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(t)*parseFloat(getComputedStyle(document.documentElement).fontSize));return n.map((function(t){var n=e.find((function(e){return e.getAttribute("aria-controls")===t.getAttribute("aria-controls")})),r=document.querySelector("#".concat(t.getAttribute("aria-controls"))),s=function(t,e,n){return function(){t.setAttribute("aria-expanded",!0),e.setAttribute("aria-expanded",!0),n.classList.replace("hidden","block"),n.style.height="".concat(window.innerHeight-o>n.offsetHeight?n.offsetHeight:window.innerHeight-o,"px")}}(t,n,r);return t.addEventListener("click",s),{teardown:function(){return t.removeEventListener("click",s)},clear:function(){r.classList.replace("block","hidden"),i.classList.remove("ui-meganav-mobile-dropdown-expand"),t.setAttribute("aria-expanded",!1),r.style.height=null}}}))}},6364:(t,e,n)=>{"use strict";n.d(e,{default:()=>s});var r=n(9581),i=n(727),o=n.n(i);const s=function(){var t=document.body.dataset.addSearchApiKey;if(!t)return console.log("No AddSearch API key provided, skipping search suggestions."),[];var e=new(o())(t);return[(0,r.A)("meganav-search-input"),(0,r.A)("meganav-mobile-search-input")].filter((function(t){return t})).map((function(t){var n=t.parentNode;return function(t){var e=t.input,n=t.container,r=t.listContainer,i=t.client;i.setAnalyticsTag("Meganav autocomplete"),i.setThrottleTime(400);var o=function(){n.classList.add("hidden"),r.innerHTML=""},s=function(t){var e=t.target.value;e?i.suggestions(e,function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suggestions:[]};if(0!==e.suggestions.length){var i=e.suggestions.map((function(e){var n=document.createElement("li"),r=document.createElement("button");return r.classList.add("ui-text-menu2","font-medium","p-8","w-full","text-left","rounded","hover:text-gui-hover","hover:bg-light-grey"),r.innerHTML=e.value.replace(t,'<span class="font-light">'.concat(t,"</span>")),r.addEventListener("click",(function(){window.location="/search?q=".concat(e)})),n.appendChild(r),n}));r.innerHTML="",i.forEach((function(t){return r.appendChild(t)})),n.classList.remove("hidden")}else o()}}(e)):o()};return e.addEventListener("keyup",s),{teardown:function(){return e.removeEventListener("keyup",s)},clear:function(){return o()}}}({input:t,container:(0,r.A)("meganav-search-autocomplete-container",n),listContainer:(0,r.A)("meganav-search-autocomplete-list",n),client:e})}))}},9581:(t,e,n)=>{"use strict";n.d(e,{A:()=>r,n:()=>i});var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))}},2702:function(t,e,n){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,i=void 0,o=void 0,s=function(t,e){h[r]=t,h[r+1]=e,2===(r+=2)&&(o?o(p):b())};var a="undefined"!=typeof window?window:void 0,c=a||{},l=c.MutationObserver||c.WebKitMutationObserver,u="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(p,1)}}var h=new Array(1e3);function p(){for(var t=0;t<r;t+=2)(0,h[t])(h[t+1]),h[t]=void 0,h[t+1]=void 0;r=0}var g,m,y,v,b=void 0;function w(t,e){var n=this,r=new this.constructor(T);void 0===r[A]&&B(r);var i=n._state;if(i){var o=arguments[i-1];s((function(){return j(i,r,o,n._result)}))}else L(n,r,t,e);return r}function S(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(T);return k(e,t),e}b=u?function(){return process.nextTick(p)}:l?(m=0,y=new l(p),v=document.createTextNode(""),y.observe(v,{characterData:!0}),function(){v.data=m=++m%2}):f?((g=new MessageChannel).port1.onmessage=p,function(){return g.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(p)}:d()}catch(t){return d()}}():d();var A=Math.random().toString(36).substring(2);function T(){}var F=void 0;function x(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===S?function(t,e){1===e._state?_(t,e._result):2===e._state?O(t,e._result):L(e,void 0,(function(e){return k(t,e)}),(function(e){return O(t,e)}))}(e,n):void 0===r?_(e,n):t(r)?function(t,e,n){s((function(t){var r=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,(function(n){r||(r=!0,e!==n?k(t,n):_(t,n))}),(function(e){r||(r=!0,O(t,e))}),t._label);!r&&i&&(r=!0,O(t,i))}),t)}(e,n,r):_(e,n)}function k(t,e){if(t===e)O(t,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=e),null===r||"object"!==i&&"function"!==i)_(t,e);else{var n=void 0;try{n=e.then}catch(e){return void O(t,e)}x(t,e,n)}var r,i}function E(t){t._onerror&&t._onerror(t._result),P(t)}function _(t,e){t._state===F&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(P,t))}function O(t,e){t._state===F&&(t._state=2,t._result=e,s(E,t))}function L(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+1]=n,i[o+2]=r,0===o&&t._state&&s(P,t)}function P(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?j(n,r,i,o):i(o);t._subscribers.length=0}}function j(e,n,r,i){var o=t(r),s=void 0,a=void 0,c=!0;if(o){try{s=r(i)}catch(t){c=!1,a=t}if(n===s)return void O(n,new TypeError("A promises callback cannot return that same promise."))}else s=i;n._state!==F||(o&&c?k(n,s):!1===c?O(n,a):1===e?_(n,s):2===e&&O(n,s))}var C=0;function B(t){t[A]=C++,t._state=void 0,t._result=void 0,t._subscribers=[]}var R=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(T),this.promise[A]||B(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?_(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&_(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===F&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===S){var i=void 0,o=void 0,s=!1;try{i=t.then}catch(t){s=!0,o=t}if(i===w&&t._state!==F)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===U){var a=new n(T);s?O(a,o):x(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===F&&(this._remaining--,2===t?O(r,n):this._result[e]=n),0===this._remaining&&_(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;L(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}();var U=function(){function e(t){this[A]=C++,this._result=this._state=void 0,this._subscribers=[],T!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){k(t,e)}),(function(e){O(t,e)}))}catch(e){O(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();return U.prototype.then=w,U.all=function(t){return new R(this,t).promise},U.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)})):new n((function(t,e){return e(new TypeError("You must pass an array to race."))}))},U.resolve=S,U.reject=function(t){var e=new this(T);return O(e,t),e},U._setScheduler=function(t){o=t},U._setAsap=function(t){s=t},U._asap=s,U.polyfill=function(){var t=void 0;if(void 0!==n.g)t=n.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=U},U.Promise=U,U}()},4301:(t,e,n)=>{n(7147),t.exports=self.fetch.bind(self)},3096:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,f=l||u||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,g=function(){return f.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(m(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=m(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=s.test(t);return n||a.test(t)?c(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return m(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,s,a,c,l,u=0,f=!1,d=!1,v=!0;if("function"!=typeof t)throw new TypeError(r);function b(e){var n=i,r=o;return i=o=void 0,u=e,a=t.apply(r,n)}function w(t){return u=t,c=setTimeout(A,e),f?b(t):a}function S(t){var n=t-l;return void 0===l||n>=e||n<0||d&&t-u>=s}function A(){var t=g();if(S(t))return T(t);c=setTimeout(A,function(t){var n=e-(t-l);return d?p(n,s-(t-u)):n}(t))}function T(t){return c=void 0,v&&i?b(t):(i=o=void 0,a)}function F(){var t=g(),n=S(t);if(i=arguments,o=this,l=t,n){if(void 0===c)return w(l);if(d)return c=setTimeout(A,e),b(l)}return void 0===c&&(c=setTimeout(A,e)),a}return e=y(e)||0,m(n)&&(f=!!n.leading,s=(d="maxWait"in n)?h(y(n.maxWait)||0,e):s,v="trailing"in n?!!n.trailing:v),F.cancel=function(){void 0!==c&&clearTimeout(c),u=0,i=l=o=c=void 0},F.flush=function(){return void 0===c?a:T(g())},F}(t,e,{leading:i,maxWait:e,trailing:o})}},6265:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r=function(t){return Array.isArray(t)?t:[t]},i=function(t){return t instanceof Node},o=function(t,e){if(t&&e){t=function(t){return t instanceof NodeList}(t)?t:[t];for(var n=0;n<t.length&&!0!==e(t[n],n,t.length);n++);}},s=function(t){return console.error("[scroll-lock] ".concat(t))},a=function(t){if(Array.isArray(t))return t.join(", ")},c=function(t){var e=[];return o(t,(function(t){return e.push(t)})),e},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(n&&-1!==c(r.querySelectorAll(e)).indexOf(t))return t;for(;(t=t.parentElement)&&-1===c(r.querySelectorAll(e)).indexOf(t););return t},u=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r=-1!==c(n.querySelectorAll(e)).indexOf(t);return r},f=function(t){if(t)return"hidden"===getComputedStyle(t).overflow},d=function(t){if(t)return!!f(t)||t.scrollTop<=0},h=function(t){if(t){if(f(t))return!0;var e=t.scrollTop,n=t.scrollHeight;return e+t.offsetHeight>=n}},p=function(t){if(t)return!!f(t)||t.scrollLeft<=0},g=function(t){if(t){if(f(t))return!0;var e=t.scrollLeft,n=t.scrollWidth;return e+t.offsetWidth>=n}},m=function(t){return u(t,'textarea, [contenteditable="true"]')},y=function(t){return u(t,'input[type="range"]')};function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"disablePageScroll",(function(){return S})),n.d(e,"enablePageScroll",(function(){return A})),n.d(e,"getScrollState",(function(){return T})),n.d(e,"clearQueueScrollLocks",(function(){return F})),n.d(e,"getTargetScrollBarWidth",(function(){return x})),n.d(e,"getCurrentTargetScrollBarWidth",(function(){return k})),n.d(e,"getPageScrollBarWidth",(function(){return E})),n.d(e,"getCurrentPageScrollBarWidth",(function(){return _})),n.d(e,"addScrollableTarget",(function(){return O})),n.d(e,"removeScrollableTarget",(function(){return L})),n.d(e,"addScrollableSelector",(function(){return P})),n.d(e,"removeScrollableSelector",(function(){return j})),n.d(e,"addLockableTarget",(function(){return C})),n.d(e,"addLockableSelector",(function(){return B})),n.d(e,"setFillGapMethod",(function(){return R})),n.d(e,"addFillGapTarget",(function(){return U})),n.d(e,"removeFillGapTarget",(function(){return D})),n.d(e,"addFillGapSelector",(function(){return z})),n.d(e,"removeFillGapSelector",(function(){return M})),n.d(e,"refillGaps",(function(){return I}));var b=["padding","margin","width","max-width","none"],w={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:b[0],startTouchY:0,startTouchX:0},S=function(t){w.queue<=0&&(w.scroll=!1,N(),K()),O(t),w.queue++},A=function(t){w.queue>0&&w.queue--,w.queue<=0&&(w.scroll=!0,W(),J()),L(t)},T=function(){return w.scroll},F=function(){w.queue=0},x=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i(t)){var n=t.style.overflowY;e?T()||(t.style.overflowY=t.getAttribute("data-scroll-lock-saved-overflow-y-property")):t.style.overflowY="scroll";var r=k(t);return t.style.overflowY=n,r}return 0},k=function(t){if(i(t)){if(t===document.body){var e=document.documentElement.clientWidth;return window.innerWidth-e}var n=t.style.borderLeftWidth,r=t.style.borderRightWidth;t.style.borderLeftWidth="0px",t.style.borderRightWidth="0px";var o=t.offsetWidth-t.clientWidth;return t.style.borderLeftWidth=n,t.style.borderRightWidth=r,o}return 0},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return x(document.body,t)},_=function(){return k(document.body)},O=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?t.setAttribute("data-scroll-lock-scrollable",""):s('"'.concat(t,'" is not a Element.'))}))}))},L=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?t.removeAttribute("data-scroll-lock-scrollable"):s('"'.concat(t,'" is not a Element.'))}))}))},P=function(t){t&&r(t).map((function(t){w.scrollableSelectors.push(t)}))},j=function(t){t&&r(t).map((function(t){w.scrollableSelectors=w.scrollableSelectors.filter((function(e){return e!==t}))}))},C=function(t){t&&(r(t).map((function(t){o(t,(function(t){i(t)?t.setAttribute("data-scroll-lock-lockable",""):s('"'.concat(t,'" is not a Element.'))}))})),T()||N())},B=function(t){t&&(r(t).map((function(t){w.lockableSelectors.push(t)})),T()||N(),z(t))},R=function(t){if(t)if(-1!==b.indexOf(t))w.fillGapMethod=t,I();else{var e=b.join(", ");s('"'.concat(t,'" method is not available!\nAvailable fill gap methods: ').concat(e,"."))}},U=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?(t.setAttribute("data-scroll-lock-fill-gap",""),w.scroll||$(t)):s('"'.concat(t,'" is not a Element.'))}))}))},D=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?(t.removeAttribute("data-scroll-lock-fill-gap"),w.scroll||V(t)):s('"'.concat(t,'" is not a Element.'))}))}))},z=function(t){t&&r(t).map((function(t){-1===w.fillGapSelectors.indexOf(t)&&(w.fillGapSelectors.push(t),w.scroll||X(t))}))},M=function(t){t&&r(t).map((function(t){w.fillGapSelectors=w.fillGapSelectors.filter((function(e){return e!==t})),w.scroll||Q(t)}))},I=function(){w.scroll||K()},N=function(){var t=a(w.lockableSelectors);G(t)},W=function(){var t=a(w.lockableSelectors);H(t)},G=function(t){var e=document.querySelectorAll(t);o(e,(function(t){q(t)}))},H=function(t){var e=document.querySelectorAll(t);o(e,(function(t){Y(t)}))},q=function(t){if(i(t)&&"true"!==t.getAttribute("data-scroll-lock-locked")){var e=window.getComputedStyle(t);t.setAttribute("data-scroll-lock-saved-overflow-y-property",e.overflowY),t.setAttribute("data-scroll-lock-saved-inline-overflow-property",t.style.overflow),t.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",t.style.overflowY),t.style.overflow="hidden",t.setAttribute("data-scroll-lock-locked","true")}},Y=function(t){i(t)&&"true"===t.getAttribute("data-scroll-lock-locked")&&(t.style.overflow=t.getAttribute("data-scroll-lock-saved-inline-overflow-property"),t.style.overflowY=t.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),t.removeAttribute("data-scroll-lock-saved-overflow-property"),t.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),t.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),t.removeAttribute("data-scroll-lock-locked"))},K=function(){w.fillGapSelectors.map((function(t){X(t)}))},J=function(){w.fillGapSelectors.map((function(t){Q(t)}))},X=function(t){var e=document.querySelectorAll(t),n=-1!==w.lockableSelectors.indexOf(t);o(e,(function(t){$(t,n)}))},$=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i(t)){var n;if(""===t.getAttribute("data-scroll-lock-lockable")||e)n=x(t,!0);else{var r=l(t,a(w.lockableSelectors));n=x(r,!0)}"true"===t.getAttribute("data-scroll-lock-filled-gap")&&V(t);var o=window.getComputedStyle(t);if(t.setAttribute("data-scroll-lock-filled-gap","true"),t.setAttribute("data-scroll-lock-current-fill-gap-method",w.fillGapMethod),"margin"===w.fillGapMethod){var s=parseFloat(o.marginRight);t.style.marginRight="".concat(s+n,"px")}else if("width"===w.fillGapMethod)t.style.width="calc(100% - ".concat(n,"px)");else if("max-width"===w.fillGapMethod)t.style.maxWidth="calc(100% - ".concat(n,"px)");else if("padding"===w.fillGapMethod){var c=parseFloat(o.paddingRight);t.style.paddingRight="".concat(c+n,"px")}}},Q=function(t){var e=document.querySelectorAll(t);o(e,(function(t){V(t)}))},V=function(t){if(i(t)&&"true"===t.getAttribute("data-scroll-lock-filled-gap")){var e=t.getAttribute("data-scroll-lock-current-fill-gap-method");t.removeAttribute("data-scroll-lock-filled-gap"),t.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===e?t.style.marginRight="":"width"===e?t.style.width="":"max-width"===e?t.style.maxWidth="":"padding"===e&&(t.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(t){I()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(t){w.scroll||(w.startTouchY=t.touches[0].clientY,w.startTouchX=t.touches[0].clientX)})),document.addEventListener("touchmove",(function(t){if(!w.scroll){var e=w.startTouchY,n=w.startTouchX,r=t.touches[0].clientY,i=t.touches[0].clientX;if(t.touches.length<2){var o=a(w.scrollableSelectors),s={up:e<r,down:e>r,left:n<i,right:n>i},c={up:e+3<r,down:e-3>r,left:n+3<i,right:n-3>i};!function e(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n){var i=l(n,o,!1);if(y(n))return!1;if(r||m(n)&&l(n,o)||u(n,o)){var a=!1;p(n)&&g(n)?(s.up&&d(n)||s.down&&h(n))&&(a=!0):d(n)&&h(n)?(s.left&&p(n)||s.right&&g(n))&&(a=!0):(c.up&&d(n)||c.down&&h(n)||c.left&&p(n)||c.right&&g(n))&&(a=!0),a&&(i?e(i,!0):t.cancelable&&t.preventDefault())}else e(i)}else t.cancelable&&t.preventDefault()}(t.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(t){w.scroll||(w.startTouchY=0,w.startTouchX=0)})));var Z={hide:function(t){s('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),S(t)},show:function(t){s('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),A(t)},toggle:function(t){s('"toggle" is deprecated! Do not use it.'),T()?S():A(t)},getState:function(){return s('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),T()},getWidth:function(){return s('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),E()},getCurrentWidth:function(){return s('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),_()},setScrollableTargets:function(t){s('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),O(t)},setFillGapSelectors:function(t){s('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),z(t)},setFillGapTargets:function(t){s('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),U(t)},clearQueue:function(){s('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),F()}},tt=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){v(t,e,n[e])}))}return t}({disablePageScroll:S,enablePageScroll:A,getScrollState:T,clearQueueScrollLocks:F,getTargetScrollBarWidth:x,getCurrentTargetScrollBarWidth:k,getPageScrollBarWidth:E,getCurrentPageScrollBarWidth:_,addScrollableSelector:P,removeScrollableSelector:j,addScrollableTarget:O,removeScrollableTarget:L,addLockableSelector:B,addLockableTarget:C,addFillGapSelector:z,removeFillGapSelector:M,addFillGapTarget:U,removeFillGapTarget:D,setFillGapMethod:R,refillGaps:I,_state:w},Z);e.default=tt}]).default},t.exports=e()},7147:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Headers:()=>p,Request:()=>S,Response:()=>T,DOMException:()=>x,fetch:()=>k});var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,s="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in r,c="ArrayBuffer"in r;if(c)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&l.indexOf(Object.prototype.toString.call(t))>-1};function f(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function d(t){return"string"!=typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function g(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function m(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function y(t){var e=new FileReader,n=m(e);return e.readAsArrayBuffer(t),n}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&s&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=g(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(y)}),this.text=function(){var t,e,n,r=g(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,n=m(e=new FileReader),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=f(t),e=d(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},p.prototype.delete=function(t){delete this.map[f(t)]},p.prototype.get=function(t){return t=f(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(f(t))},p.prototype.set=function(t,e){this.map[f(t)]=d(e)},p.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),h(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),h(t)},o&&(p.prototype[Symbol.iterator]=p.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(e=e||{}).body;if(t instanceof S){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=(n=e.method||this.method||"GET").toUpperCase(),w.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function A(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})},b.call(S.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var t=new T(null,{status:0,statusText:""});return t.type="error",t};var F=[301,302,303,307,308];T.redirect=function(t,e){if(-1===F.indexOf(e))throw new RangeError("Invalid status code");return new T(null,{status:e,headers:{location:t}})};var x=r.DOMException;try{new x}catch(t){(x=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),x.prototype.constructor=x}function k(t,e){return new Promise((function(n,i){var o=new S(t,e);if(o.signal&&o.signal.aborted)return i(new x("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new T(i,r))}),0)},a.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){i(new x("Aborted","AbortError"))}),0)},a.open(o.method,function(t){try{return""===t&&r.location.href?r.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&(s?a.responseType="blob":c&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof p?o.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,d(e.headers[t]))})),o.signal&&(o.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",l)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}k.polyfill=!0,r.fetch||(r.fetch=k,r.Headers=p,r.Request=S,r.Response=T)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.d(r,{default:()=>g});var t=n(3096),e=n.n(t),i=n(9581),o=n(2498),s=n(1792),a=n(9552),c=n(7359),l=n(6364);function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d=function(t){return window.onblur=function(){return t()},{teardown:function(){return window.onblur=null}}},h=function(t){var e=(0,i.A)("meganav"),n=function(n){e.contains(n.target)||t()};return document.addEventListener("click",n),{teardown:function(){return document.removeEventListener("click",n)}}},p=function(t){if("transparentToWhite"!==t)return{teardown:function(){}};var n=(0,i.A)("meganav"),r=(0,i.n)("meganav-link"),o=(0,i.A)("meganav-control-mobile-dropdown-menu"),s=(0,i.A)("meganav-control-mobile-dropdown-close"),a=(0,i.n)("meganav-control"),c=(0,i.A)("meganav-sign-up-btn"),l=[].concat(u(Array.from(a)),u(Array.from(r)),[(0,i.A)("meganav-logo")]),f=function(t){var e,n,r,i,a=["ui-icon-white","ui-icon-cool-black"],c=[].concat(a).reverse();t?(null==o||(e=o.classList).replace.apply(e,a),null==s||(n=s.classList).replace.apply(n,a)):(null==o||(r=o.classList).replace.apply(r,u(c)),null==s||(i=s.classList).replace.apply(i,u(c)))},d=function(t){t?(null==c||c.classList.replace("bg-white","bg-cool-black"),null==c||c.classList.replace("text-cool-black","text-white")):(null==c||c.classList.replace("bg-cool-black","bg-white"),null==c||c.classList.replace("text-white","text-cool-black"))},h=e()((function(){window.scrollY>5?(n.classList.replace("bg-transparent","bg-white"),d(!0),f(!0),l.forEach((function(t){return t.classList.replace("text-white","text-cool-black")}))):(n.classList.replace("bg-white","bg-transparent"),d(!1),f(!1),l.forEach((function(t){return t.classList.replace("text-cool-black","text-white")})))}),150);return document.addEventListener("scroll",h),{teardown:function(){return document.removeEventListener("scroll",h)}}};function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeName:null},e=t.themeName,n=(0,o.default)(),r=(0,a.default)(),i=(0,c.default)(),f=(0,l.default)(),g=(0,s.default)({clearPanels:function(){return[].concat(u(r),u(i)).forEach((function(t){return t.clear()}))}}),m=function(){return[g].concat(u(r),u(i),u(n),u(f)).forEach((function(t){return t.clear()}))},y=[p(e),h(m),d(m),g].concat(u(n),u(r),u(i),u(f)).map((function(t){return t.teardown}));return function(){return y.forEach((function(t){return t()}))}}})(),r.default})()}));
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.Meganav=e())}(this,(function(){return(()=>{var t={727:(t,e,n)=>{"use strict";t.exports=n(5647)},493:(t,e,n)=>{"use strict";n(2702).polyfill(),n(4301);var r=function(t,e,n,i,o,s,a){var c=function(t,e){return t||!1===t?"&"+e+"="+t:""};if("search"===n||"suggest"===n||"autocomplete"===n){var l="",u="",f=null;if("search"===n){f=n,l=i.keyword,l=i.enableLogicalOperators?l.replace(/ and /g," AND ").replace(/ or /g," OR ").replace(/ not /g," NOT "):l.replace(/ AND /g," and ").replace(/ OR /g," or ").replace(/ NOT /g," not "),l=encodeURIComponent(l);var d=i.fuzzy;if("retry"===d&&(d=!0===s),"search"===n){if(u=c(i.lang,"lang")+c(d,"fuzzy")+c(i.collectAnalytics,"collectAnalytics")+c(i.postfixWildcard,"postfixWildcard")+c(i.categories,"categories")+c(i.priceFromCents,"priceFromCents")+c(i.priceToCents,"priceToCents")+c(i.dateFrom,"dateFrom")+c(i.dateTo,"dateTo")+c(i.paging.page,"page")+c(i.paging.pageSize,"limit")+c(i.paging.sortBy,"sort")+c(i.paging.sortOrder,"order")+c(i.shuffleAndLimitTo,"shuffleAndLimitTo")+c(i.jwt,"jwt")+c(i.resultType,"resultType")+c(i.userToken,"userToken")+c(i.numFacets,"numFacets")+c(i.cacheResponseTime,"cacheResponseWithTtlSeconds")+c(i.searchOperator,"defaultOperator")+c(i.analyticsTag,"analyticsTag")+c(i.hierarchicalFacetSetting,"hierarchicalFacets"),i.customFieldFilters)for(var h=0;h<i.customFieldFilters.length;h++)u=u+"&customField="+i.customFieldFilters[h];if(i.facetFields)for(h=0;h<i.facetFields.length;h++)u=u+"&facet="+i.facetFields[h];if(i.rangeFacets&&(u=u+"&rangeFacets="+JSON.stringify(i.rangeFacets)),i.statsFields)for(h=0;h<i.statsFields.length;h++)u=u+"&fieldStat="+i.statsFields[h];if(i.personalizationEvents&&Array.isArray(i.personalizationEvents))for(h=0;h<i.personalizationEvents.length;h++){var p=i.personalizationEvents[h],g=Object.keys(p);u=u+"&personalizationEvent="+encodeURIComponent(g+"="+p[g])}a?u=u+"&filter="+encodeURIComponent(JSON.stringify(a)):i.filterObject&&(u=u+"&filter="+encodeURIComponent(JSON.stringify(i.filterObject)))}}else"suggest"===n?(f=n,u=c(i.suggestionsSize,"size")+c(i.lang,"lang"),l=i.suggestionsPrefix):"autocomplete"===n&&(f="autocomplete/document-field",u=c(i.autocomplete.field,"source")+c(i.autocomplete.size,"size"),l=i.autocomplete.prefix);fetch("https://"+t+"/v1/"+f+"/"+e+"?term="+l+u).then((function(t){return t.json()})).then((function(a){if("search"===n&&"retry"===i.fuzzy&&0===a.total_hits&&!0!==s)r(t,e,n,i,o,!0);else{if(!0===s){var c=i.paging.pageSize;a.total_hits>=c&&(a.total_hits=c)}o(a)}})).catch((function(t){console.log(t),o({error:{response:500,message:"invalid server response"}})}))}else o({error:{response:400,message:"invalid query type"}})};t.exports=r},5647:(t,e,n)=>{"use strict";var r=n(493),i=n(9610),o=n(3716),s=n(7585),a=n(5159),c=n(4508);t.exports=function(t,e){this.sitekey=t,this.privatekey=e,this.apiHostname="api.addsearch.com",this.settings=new s,this.sessionId=("a-"+1e8*Math.random()).substring(0,10),this.search=function(t,e){var n=null,i=null;if(t&&a.isFunction(e))n=t,i=e;else if(!e&&a.isFunction(t))n=this.settings.getSettings().keyword,i=t;else{if(!this.settings.getSettings().callback)throw"Illegal search parameters. Should be (keyword, callbackFunction) or (callbackFunction)";n=this.settings.getSettings().keyword,i=this.settings.getSettings().callback}this.settings.setCallback(i),this.settings.setKeyword(n),this.throttledSearchFetch||(this.throttledSearchFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledSearchFetch(this.apiHostname,this.sitekey,"search",this.settings.getSettings(),i)},this.suggestions=function(t,e){if(!t||!e||!a.isFunction(e))throw"Illegal suggestions parameters. Should be (prefix, callbackFunction)";this.settings.setSuggestionsPrefix(t),this.throttledSuggestionsFetch||(this.throttledSuggestionsFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledSuggestionsFetch(this.apiHostname,this.sitekey,"suggest",this.settings.getSettings(),e)},this.autocomplete=function(t,e,n){if(!(t&&e&&n&&a.isFunction(n)))throw"Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)";this.settings.setAutocompleteParams(t,e),this.throttledAutocompleteFetch||(this.throttledAutocompleteFetch=c(this.settings.getSettings().throttleTimeMs,r)),this.throttledAutocompleteFetch(this.apiHostname,this.sitekey,"autocomplete",this.settings.getSettings(),n)},this.fetchCustomApi=function(t,e,n){var i=Object.assign({},this.settings.getSettings());i.facetFields=i.facetFields.filter((e=>t===e)),r(this.apiHostname,this.sitekey,"search",i,n,null,e)},this.fetchRangeFacets=function(t,e,n){var i=Object.assign({},this.settings.getSettings());i.rangeFacets||(i.rangeFacets=[]),i.rangeFacets.push({field:t.field,ranges:t.ranges}),r(this.apiHostname,this.sitekey,"search",i,n,null,e)},this.getDocument=function(t){return i.getDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocument=function(t){return i.saveDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of documents: {documents: []}";return i.saveDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocument=function(t){return i.deleteDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of document ids: {documents: []}";return i.deleteDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.setApiHostname=function(t){this.apiHostname=t},this.getSettings=function(){return this.settings.getSettings()},this.setLanguage=function(t){this.settings.setLanguage(t)},this.setCategoryFilters=function(t){this.settings.setCategoryFilters(t)},this.addCustomFieldFilter=function(t,e){this.settings.addCustomFieldFilter(t,e)},this.removeCustomFieldFilter=function(t,e){this.settings.removeCustomFieldFilter(t,e)},this.setPriceRangeFilter=function(t,e){this.settings.setPriceRangeFilter(t,e)},this.setDateFilter=function(t,e){this.settings.setDateFilter(t,e)},this.setJWT=function(t){this.settings.setJWT(t)},this.setUserToken=function(t){this.settings.setUserToken(t)},this.setPaging=function(t,e,n,r){this.settings.setPaging(t,e,n,r)},this.nextPage=function(){this.settings.nextPage()},this.previousPage=function(){this.settings.previousPage()},this.setSuggestionsSize=function(t){this.settings.setSuggestionsSize(t)},this.setAutocompleteSize=function(t){this.settings.setAutocompleteSize(t)},this.addFacetField=function(t){this.settings.addFacetField(t)},this.addHierarchicalFacetSetting=function(t){this.settings.addHierarchicalFacetSetting(t)},this.addRangeFacet=function(t,e){this.settings.addRangeFacet(t,e)},this.addStatsField=function(t){this.settings.addStatsField(t)},this.setNumberOfFacets=function(t){this.settings.setNumberOfFacets(t)},this.setResultType=function(t){this.settings.setResultType(t)},this.setPersonalizationEvents=function(t){this.settings.setPersonalizationEvents(t)},this.setFilterObject=function(t){this.settings.setFilterObject(t)},this.setShuffleAndLimitTo=function(t){this.settings.setShuffleAndLimitTo(t)},this.setFuzzyMatch=function(t){this.settings.setFuzzyMatch(t)},this.setPostfixWildcard=function(t){this.settings.setPostfixWildcard(t)},this.setCacheResponseTime=function(t){this.settings.setCacheResponseTime(t)},this.setCollectAnalytics=function(t){this.settings.setCollectAnalytics(t)},this.setAnalyticsTag=function(t){this.settings.setAnalyticsTag(t)},this.setThrottleTime=function(t){this.settings.setThrottleTime(t)},this.setStatsSessionId=function(t){this.sessionId=t},this.getStatsSessionId=function(){return this.sessionId},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators(t)},this.setSearchOperator=function(t){this.settings.setSearchOperator(t)},this.sendStatsEvent=function(t,e,n){if("search"===t)n={action:"search",session:this.sessionId,keyword:e,numberOfResults:n.numberOfResults,analyticsTag:this.getSettings().analyticsTag},o(this.apiHostname,this.sitekey,n);else{if("click"!==t)throw"Illegal sendStatsEvent type parameters. Should be search or click)";n={action:"click",session:this.sessionId,keyword:e,docid:n.documentId,position:n.position,analyticsTag:this.getSettings().analyticsTag},o(this.apiHostname,this.sitekey,n)}},this.searchResultClicked=function(t,e){this.sendStatsEvent("click",this.settings.getSettings().keyword,{documentId:t,position:e})}}},9610:(t,e,n)=>{"use strict";n(4301);const r=n(5159),i=n(2702).Promise,o=function(t,e){return{Authorization:"Basic "+r.base64(t+":"+e),"Content-Type":"application/json"}};t.exports={getDocument:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+r,{method:"GET",headers:o(e,n)}).then((t=>{200==t.status?i(t.json()):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},saveDocument:function(t,e,n,r){const s=r.id||r.url;return new i(((i,a)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/",{method:s?"PUT":"POST",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):a({status:t.status,text:t.statusText})})).catch((t=>{a({status:400,text:t})}))}))},saveDocumentsBatch:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"PUT",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},deleteDocument:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+r,{method:"DELETE",headers:o(e,n)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))},deleteDocumentsBatch:function(t,e,n,r){return new i(((i,s)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"DELETE",headers:o(e,n),body:JSON.stringify(r)}).then((t=>{202==t.status?i({status:t.status,text:t.statusText}):s({status:t.status,text:t.statusText})})).catch((t=>{s({status:400,text:t})}))}))}}},7585:t=>{"use strict";t.exports=function(){this.settings={keyword:"*",callback:null,throttleTimeMs:200,fuzzy:"auto",paging:{page:1,pageSize:10,sortBy:"relevance",sortOrder:"desc"},customFieldFilters:[],userToken:null,suggestionsSize:10,facetFields:[],autocomplete:{size:10},searchOperator:null,enableLogicalOperators:!1,cacheResponseTime:null},this.getSettings=function(){return this.settings},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setCallback=function(t){this.settings.callback=t},this.setThrottleTime=function(t){this.settings.throttleTimeMs=t},this.setSuggestionsPrefix=function(t){this.settings.suggestionsPrefix=t},this.setSuggestionsSize=function(t){this.settings.suggestionsSize=t},this.setAutocompleteSize=function(t){this.settings.autocomplete.size=t},this.setAutocompleteParams=function(t,e){this.settings.autocomplete.field=t,this.settings.autocomplete.prefix=e},this.setLanguage=function(t){if(t&&2!==t.length)throw'use 2-char language code (e.g. "en")';this.settings.lang=t},this.setFuzzyMatch=function(t){if(!0!==t&&!1!==t&&"auto"!==t&&"retry"!==t)throw"fuzzy matching can be true, false, 'auto', or 'retry'";this.settings.fuzzy=t},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators=t},this.setCacheResponseTime=function(t){this.settings.cacheResponseTime=t},this.setPostfixWildcard=function(t){this.settings.postfixWildcard=t},this.setCollectAnalytics=function(t){this.settings.collectAnalytics=t},this.setAnalyticsTag=function(t){this.settings.analyticsTag=t},this.setCategoryFilters=function(t){this.settings.categories=t},this.setFilterObject=function(t){this.settings.filterObject=t},this.setPriceRangeFilter=function(t,e){this.settings.priceFromCents=t,this.settings.priceToCents=e},this.addCustomFieldFilter=function(t,e){var n=encodeURIComponent(t+"="+e);-1===this.settings.customFieldFilters.indexOf(n)&&this.settings.customFieldFilters.push(n)},this.removeCustomFieldFilter=function(t,e){var n=!1,r=encodeURIComponent(t+"="+e);e||(n=!0,r=encodeURIComponent(t+"="));for(var i=this.settings.customFieldFilters.length;i>0;i--){var o=this.settings.customFieldFilters[i-1];(n&&0===o.indexOf(r)||o===r)&&this.settings.customFieldFilters.splice(i-1,1)}},this.setDateFilter=function(t,e){this.settings.dateFrom=t,this.settings.dateTo=e},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setJWT=function(t){this.settings.jwt=t},this.setUserToken=function(t){this.settings.userToken=t},this.setPersonalizationEvents=function(t){this.settings.personalizationEvents=t},this.setResultType=function(t){this.settings.resultType=t},this.addFacetField=function(t){-1===this.settings.facetFields.indexOf(t)&&this.settings.facetFields.push(t)},this.addHierarchicalFacetSetting=function(t){this.settings.hierarchicalFacetSetting=JSON.stringify(t)},this.addRangeFacet=function(t,e){this.settings.rangeFacets||(this.settings.rangeFacets=[]),this.settings.rangeFacets.push({field:t,ranges:e})},this.addStatsField=function(t){this.settings.statsFields||(this.settings.statsFields=[]),-1===this.settings.statsFields.indexOf(t)&&this.settings.statsFields.push(t)},this.setNumberOfFacets=function(t){this.settings.numFacets=t},this.setPaging=function(t,e,n,r){if(t<1)throw"page must be 1 or bigger";if(e<1||e>300)throw"pageSize must be 1-300";if("asc"!==r&&"desc"!==r)throw"sortOrder must be asc or desc";this.settings.paging.page=t,this.settings.paging.pageSize=e,this.settings.paging.sortBy=n,this.settings.paging.sortOrder=r},this.setShuffleAndLimitTo=function(t){this.settings.shuffleAndLimitTo=t},this.nextPage=function(){this.settings.paging.page=this.settings.paging.page+1},this.previousPage=function(){this.settings.paging.page>0&&(this.settings.paging.page=this.settings.paging.page-1)},this.setSearchOperator=function(t){if("and"!==t&&"or"!==t)throw"operator must be 'and' || 'or'";this.settings.searchOperator=t}}},3716:(t,e,n)=>{"use strict";n(2702).polyfill(),n(4301),t.exports=function(t,e,n){"undefined"!=typeof window&&window.navigator&&window.navigator.sendBeacon?navigator.sendBeacon("https://"+t+"/v1/stats/"+e+"/",JSON.stringify(n)):fetch("https://"+t+"/v1/stats/"+e+"/",{method:"POST",headers:{"Content-Type":"text/plain"},body:JSON.stringify(n)})}},4508:t=>{t.exports=function(t,e){var n,r=0;function i(){n&&clearTimeout(n)}return function(){var o=this,s=Date.now()-r,a=arguments;function c(){r=Date.now(),e.apply(o,a)}i(),s>t?c():n=setTimeout(c,t-s)}}},5159:(t,e,n)=>{t.exports={isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},base64:function(t){return n.g.window={},window&&window.btoa?window.btoa(t):Buffer?Buffer.from(t).toString("base64"):void 0}}},2498:(t,e,n)=>{"use strict";n.d(e,{default:()=>o});var r=n(9581);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}const o=function(){var t=Array.from((0,r.n)("meganav-control")),e=Array.from((0,r.n)("meganav-panel")),n=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(t){return"search"===t.dataset.control},s=function(e,r,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(n,")")).matches&&!t.some((function(t){return t===document.activeElement}))&&!function(){var t=document.querySelector('[data-id="meganav-panel"]#panel-search');if(t)return!t.classList.contains("invisible")}()){var s,a=["invisible","visible"];(s=r.classList).replace.apply(s,function(t){if(Array.isArray(t))return i(t)}(c=o?a:a.reverse())||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),e.setAttribute("aria-expanded",o)}var c};return t.map((function(n){var i,a,c=n.parentNode,l=document.querySelector("#".concat(n.getAttribute("aria-controls"))),u=function(n,i){return function(){if(t.forEach((function(t){return t!==n&&t.setAttribute("aria-expanded",!1)})),e.forEach((function(t){return t!==i&&t.classList.replace("visible","invisible")})),"true"===n.getAttribute("aria-expanded")?(n.setAttribute("aria-expanded",!1),i.classList.replace("visible","invisible")):(n.setAttribute("aria-expanded",!0),i.classList.replace("invisible","visible")),o(n)){var s=(0,r.A)("meganav-search-input",i);if(!s)return;s.focus()}else n.focus()}}(n,l);return n.addEventListener("click",u),o(n)||(i=function(t,e){return function(){return s(t,e,!0)}}(n,l),a=function(t,e){return function(){return s(t,e,!1)}}(n,l),c.addEventListener("mouseenter",i),c.addEventListener("mouseleave",a)),[{teardown:function(){i&&a&&(c.removeEventListener("mouseenter",i),c.removeEventListener("mouseleave",a)),n.removeEventListener("click",u)},clear:function(){n.setAttribute("aria-expanded",!1),l.classList.replace("visible","invisible")}}]})).flat()}},1792:(t,e,n)=>{"use strict";n.d(e,{default:()=>s});var r=n(6265),i=n.n(r),o=n(9581);const s=function(t){var e=t.clearPanels,n=(0,o.A)("meganav-control-mobile-dropdown"),r=(0,o.A)("meganav-mobile-dropdown"),s=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),c=(0,o.A)("meganav-mobile-search-input"),l=(0,o.A)("meganav-mobile-search-suggestions"),u=function(){"false"===n.getAttribute("aria-expanded")?(r.classList.replace("invisible","visible"),n.setAttribute("aria-expanded",!0),i().disablePageScroll()):(r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),i().enablePageScroll(),e()),s.classList.toggle("hidden"),a.classList.toggle("hidden")},f=function(){l.classList.add("max-h-96")},d=function(t){t.relatedTarget!==l.querySelectorAll("a")[0]&&l.classList.remove("max-h-96")};return n.addEventListener("click",u),c.addEventListener("focus",f),c.addEventListener("blur",d),{teardown:function(){n.removeEventListener("click",u),i().enablePageScroll(),c.removeEventListener("focus",f),c.removeEventListener("blur",d)},clear:function(){r.classList.replace("visible","invisible"),n.setAttribute("aria-expanded",!1),s.classList.remove("hidden"),a.classList.add("hidden"),i().enablePageScroll(),l.classList.remove("max-h-96")}}}},7359:(t,e,n)=>{"use strict";n.d(e,{default:()=>i});var r=n(9581);const i=function(){var t=Array.from((0,r.n)("meganav-control-mobile-panel-close")),e=Array.from((0,r.n)("meganav-control-mobile-panel-open"));return t.map((function(t){var n=e.find((function(e){return e.getAttribute("aria-controls")===t.getAttribute("aria-controls")})),r=document.querySelector("#".concat(t.getAttribute("aria-controls"))),i=function(t,e,n){return function(){t.setAttribute("aria-expanded",!1),e.setAttribute("aria-expanded",!1),n.classList.replace("block","hidden"),n.style.height=null}}(t,n,r);return t.addEventListener("click",i),{teardown:function(){return t.removeEventListener("click",i)},clear:function(){return t.setAttribute("aria-expanded",!1)}}}))}},9552:(t,e,n)=>{"use strict";n.d(e,{default:()=>i});var r=n(9581);const i=function(){var t,e=Array.from((0,r.n)("meganav-control-mobile-panel-close")),n=Array.from((0,r.n)("meganav-control-mobile-panel-open")),i=(0,r.A)("meganav-mobile-dropdown"),o=(t=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(t)*parseFloat(getComputedStyle(document.documentElement).fontSize));return n.map((function(t){var n=e.find((function(e){return e.getAttribute("aria-controls")===t.getAttribute("aria-controls")})),r=document.querySelector("#".concat(t.getAttribute("aria-controls"))),s=function(t,e,n){return function(){t.setAttribute("aria-expanded",!0),e.setAttribute("aria-expanded",!0),n.classList.replace("hidden","block"),n.style.height="".concat(window.innerHeight-o>n.offsetHeight?n.offsetHeight:window.innerHeight-o,"px")}}(t,n,r);return t.addEventListener("click",s),{teardown:function(){return t.removeEventListener("click",s)},clear:function(){r.classList.replace("block","hidden"),i.classList.remove("ui-meganav-mobile-dropdown-expand"),t.setAttribute("aria-expanded",!1),r.style.height=null}}}))}},6364:(t,e,n)=>{"use strict";n.d(e,{default:()=>s});var r=n(9581),i=n(727),o=n.n(i);const s=function(){var t=document.body.dataset.addSearchApiKey;if(!t)return console.log("No AddSearch API key provided, skipping search suggestions."),[];var e=new(o())(t);return[(0,r.A)("meganav-search-input"),(0,r.A)("meganav-mobile-search-input")].filter((function(t){return t})).map((function(t){var n=t.parentNode,i=(0,r.A)("meganav-search-autocomplete-container",n),o=(0,r.A)("meganav-search-autocomplete-list",n),s=(0,r.A)("meganav-search-input-clear",n);return function(t){var e=t.input,n=t.container,r=t.listContainer,i=t.clear,o=t.client;o.setAnalyticsTag("Meganav autocomplete"),o.setThrottleTime(400);var s,a=function(){n.classList.add("hidden"),r.innerHTML=""},c=function(t){(t||"").length>0&&i?i.classList.remove("invisible"):i&&i.classList.add("invisible")},l=function(t,e){return t.value.replace(e.toLowerCase(),'<span class="font-light">'.concat(e,"</span>"))},u=function(t){return window.location="/search?q=".concat(t)},f=function(t){var e=r.querySelector('[data-suggestion-index="'.concat(t+1,'"]'));e&&e.focus()},d=function(t){var e=t-1,n=r.querySelector('[data-suggestion-index="'.concat(e,'"]'));n&&n.focus()},h=function(t){var i=t.target.value;"ArrowDown"!==t.key?i?o.suggestions(i,function(t){return function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suggestions:[]};if(c(t),0!==i.suggestions.length){var o=i.suggestions.map((function(n,r){var i=document.createElement("li"),o=document.createElement("button");return o.classList.add("ui-text-menu2","font-medium","p-8","w-full","text-left","rounded","hover:text-gui-hover","focus:outline-gui-focus","hover:bg-light-grey"),o.innerHTML=l(n,t),o.dataset.suggestionIndex=r,o.addEventListener("click",(function(){u(n)})),o.addEventListener("keydown",(function(t){var i=t.key;"ArrowDown"===i?f():"ArrowUp"===i&&r-1<0?e.focus():"ArrowUp"===i&&r-1>=0?d():"Enter"!==i&&"Space"!==i||u(n)})),i.appendChild(o),i}));r.innerHTML="",o.forEach((function(t){return r.appendChild(t)})),n.classList.remove("hidden")}else a()}}(i)):a():f(0)};return i&&(s=function(){e.value="",i.classList.add("invisible"),a()},i.addEventListener("click",s)),e.addEventListener("keyup",h),{teardown:function(){e.removeEventListener("keyup",h),i&&i.removeEventListener("click",s)},clear:function(){e.value="",a()}}}({input:t,container:i,listContainer:o,client:e,clear:s})}))}},9581:(t,e,n)=>{"use strict";n.d(e,{A:()=>r,n:()=>i});var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))}},2702:function(t,e,n){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,i=void 0,o=void 0,s=function(t,e){h[r]=t,h[r+1]=e,2===(r+=2)&&(o?o(p):b())};var a="undefined"!=typeof window?window:void 0,c=a||{},l=c.MutationObserver||c.WebKitMutationObserver,u="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(p,1)}}var h=new Array(1e3);function p(){for(var t=0;t<r;t+=2)(0,h[t])(h[t+1]),h[t]=void 0,h[t+1]=void 0;r=0}var g,m,y,v,b=void 0;function w(t,e){var n=this,r=new this.constructor(T);void 0===r[A]&&B(r);var i=n._state;if(i){var o=arguments[i-1];s((function(){return j(i,r,o,n._result)}))}else O(n,r,t,e);return r}function S(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(T);return k(e,t),e}b=u?function(){return process.nextTick(p)}:l?(m=0,y=new l(p),v=document.createTextNode(""),y.observe(v,{characterData:!0}),function(){v.data=m=++m%2}):f?((g=new MessageChannel).port1.onmessage=p,function(){return g.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(p)}:d()}catch(t){return d()}}():d();var A=Math.random().toString(36).substring(2);function T(){}var F=void 0;function x(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===S?function(t,e){1===e._state?L(t,e._result):2===e._state?_(t,e._result):O(e,void 0,(function(e){return k(t,e)}),(function(e){return _(t,e)}))}(e,n):void 0===r?L(e,n):t(r)?function(t,e,n){s((function(t){var r=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,(function(n){r||(r=!0,e!==n?k(t,n):L(t,n))}),(function(e){r||(r=!0,_(t,e))}),t._label);!r&&i&&(r=!0,_(t,i))}),t)}(e,n,r):L(e,n)}function k(t,e){if(t===e)_(t,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=e),null===r||"object"!==i&&"function"!==i)L(t,e);else{var n=void 0;try{n=e.then}catch(e){return void _(t,e)}x(t,e,n)}var r,i}function E(t){t._onerror&&t._onerror(t._result),P(t)}function L(t,e){t._state===F&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(P,t))}function _(t,e){t._state===F&&(t._state=2,t._result=e,s(E,t))}function O(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+1]=n,i[o+2]=r,0===o&&t._state&&s(P,t)}function P(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?j(n,r,i,o):i(o);t._subscribers.length=0}}function j(e,n,r,i){var o=t(r),s=void 0,a=void 0,c=!0;if(o){try{s=r(i)}catch(t){c=!1,a=t}if(n===s)return void _(n,new TypeError("A promises callback cannot return that same promise."))}else s=i;n._state!==F||(o&&c?k(n,s):!1===c?_(n,a):1===e?L(n,s):2===e&&_(n,s))}var C=0;function B(t){t[A]=C++,t._state=void 0,t._result=void 0,t._subscribers=[]}var R=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(T),this.promise[A]||B(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&L(this.promise,this._result))):_(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===F&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===S){var i=void 0,o=void 0,s=!1;try{i=t.then}catch(t){s=!0,o=t}if(i===w&&t._state!==F)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===U){var a=new n(T);s?_(a,o):x(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===F&&(this._remaining--,2===t?_(r,n):this._result[e]=n),0===this._remaining&&L(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;O(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}();var U=function(){function e(t){this[A]=C++,this._result=this._state=void 0,this._subscribers=[],T!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){k(t,e)}),(function(e){_(t,e)}))}catch(e){_(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();return U.prototype.then=w,U.all=function(t){return new R(this,t).promise},U.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)})):new n((function(t,e){return e(new TypeError("You must pass an array to race."))}))},U.resolve=S,U.reject=function(t){var e=new this(T);return _(e,t),e},U._setScheduler=function(t){o=t},U._setAsap=function(t){s=t},U._asap=s,U.polyfill=function(){var t=void 0;if(void 0!==n.g)t=n.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=U},U.Promise=U,U}()},4301:(t,e,n)=>{n(7147),t.exports=self.fetch.bind(self)},3096:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,f=l||u||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,g=function(){return f.Date.now()};function m(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(m(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=m(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=s.test(t);return n||a.test(t)?c(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return m(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,s,a,c,l,u=0,f=!1,d=!1,v=!0;if("function"!=typeof t)throw new TypeError(r);function b(e){var n=i,r=o;return i=o=void 0,u=e,a=t.apply(r,n)}function w(t){return u=t,c=setTimeout(A,e),f?b(t):a}function S(t){var n=t-l;return void 0===l||n>=e||n<0||d&&t-u>=s}function A(){var t=g();if(S(t))return T(t);c=setTimeout(A,function(t){var n=e-(t-l);return d?p(n,s-(t-u)):n}(t))}function T(t){return c=void 0,v&&i?b(t):(i=o=void 0,a)}function F(){var t=g(),n=S(t);if(i=arguments,o=this,l=t,n){if(void 0===c)return w(l);if(d)return c=setTimeout(A,e),b(l)}return void 0===c&&(c=setTimeout(A,e)),a}return e=y(e)||0,m(n)&&(f=!!n.leading,s=(d="maxWait"in n)?h(y(n.maxWait)||0,e):s,v="trailing"in n?!!n.trailing:v),F.cancel=function(){void 0!==c&&clearTimeout(c),u=0,i=l=o=c=void 0},F.flush=function(){return void 0===c?a:T(g())},F}(t,e,{leading:i,maxWait:e,trailing:o})}},6265:function(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r=function(t){return Array.isArray(t)?t:[t]},i=function(t){return t instanceof Node},o=function(t,e){if(t&&e){t=function(t){return t instanceof NodeList}(t)?t:[t];for(var n=0;n<t.length&&!0!==e(t[n],n,t.length);n++);}},s=function(t){return console.error("[scroll-lock] ".concat(t))},a=function(t){if(Array.isArray(t))return t.join(", ")},c=function(t){var e=[];return o(t,(function(t){return e.push(t)})),e},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(n&&-1!==c(r.querySelectorAll(e)).indexOf(t))return t;for(;(t=t.parentElement)&&-1===c(r.querySelectorAll(e)).indexOf(t););return t},u=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r=-1!==c(n.querySelectorAll(e)).indexOf(t);return r},f=function(t){if(t)return"hidden"===getComputedStyle(t).overflow},d=function(t){if(t)return!!f(t)||t.scrollTop<=0},h=function(t){if(t){if(f(t))return!0;var e=t.scrollTop,n=t.scrollHeight;return e+t.offsetHeight>=n}},p=function(t){if(t)return!!f(t)||t.scrollLeft<=0},g=function(t){if(t){if(f(t))return!0;var e=t.scrollLeft,n=t.scrollWidth;return e+t.offsetWidth>=n}},m=function(t){return u(t,'textarea, [contenteditable="true"]')},y=function(t){return u(t,'input[type="range"]')};function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"disablePageScroll",(function(){return S})),n.d(e,"enablePageScroll",(function(){return A})),n.d(e,"getScrollState",(function(){return T})),n.d(e,"clearQueueScrollLocks",(function(){return F})),n.d(e,"getTargetScrollBarWidth",(function(){return x})),n.d(e,"getCurrentTargetScrollBarWidth",(function(){return k})),n.d(e,"getPageScrollBarWidth",(function(){return E})),n.d(e,"getCurrentPageScrollBarWidth",(function(){return L})),n.d(e,"addScrollableTarget",(function(){return _})),n.d(e,"removeScrollableTarget",(function(){return O})),n.d(e,"addScrollableSelector",(function(){return P})),n.d(e,"removeScrollableSelector",(function(){return j})),n.d(e,"addLockableTarget",(function(){return C})),n.d(e,"addLockableSelector",(function(){return B})),n.d(e,"setFillGapMethod",(function(){return R})),n.d(e,"addFillGapTarget",(function(){return U})),n.d(e,"removeFillGapTarget",(function(){return D})),n.d(e,"addFillGapSelector",(function(){return z})),n.d(e,"removeFillGapSelector",(function(){return M})),n.d(e,"refillGaps",(function(){return I}));var b=["padding","margin","width","max-width","none"],w={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:b[0],startTouchY:0,startTouchX:0},S=function(t){w.queue<=0&&(w.scroll=!1,N(),K()),_(t),w.queue++},A=function(t){w.queue>0&&w.queue--,w.queue<=0&&(w.scroll=!0,W(),J()),O(t)},T=function(){return w.scroll},F=function(){w.queue=0},x=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i(t)){var n=t.style.overflowY;e?T()||(t.style.overflowY=t.getAttribute("data-scroll-lock-saved-overflow-y-property")):t.style.overflowY="scroll";var r=k(t);return t.style.overflowY=n,r}return 0},k=function(t){if(i(t)){if(t===document.body){var e=document.documentElement.clientWidth;return window.innerWidth-e}var n=t.style.borderLeftWidth,r=t.style.borderRightWidth;t.style.borderLeftWidth="0px",t.style.borderRightWidth="0px";var o=t.offsetWidth-t.clientWidth;return t.style.borderLeftWidth=n,t.style.borderRightWidth=r,o}return 0},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return x(document.body,t)},L=function(){return k(document.body)},_=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?t.setAttribute("data-scroll-lock-scrollable",""):s('"'.concat(t,'" is not a Element.'))}))}))},O=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?t.removeAttribute("data-scroll-lock-scrollable"):s('"'.concat(t,'" is not a Element.'))}))}))},P=function(t){t&&r(t).map((function(t){w.scrollableSelectors.push(t)}))},j=function(t){t&&r(t).map((function(t){w.scrollableSelectors=w.scrollableSelectors.filter((function(e){return e!==t}))}))},C=function(t){t&&(r(t).map((function(t){o(t,(function(t){i(t)?t.setAttribute("data-scroll-lock-lockable",""):s('"'.concat(t,'" is not a Element.'))}))})),T()||N())},B=function(t){t&&(r(t).map((function(t){w.lockableSelectors.push(t)})),T()||N(),z(t))},R=function(t){if(t)if(-1!==b.indexOf(t))w.fillGapMethod=t,I();else{var e=b.join(", ");s('"'.concat(t,'" method is not available!\nAvailable fill gap methods: ').concat(e,"."))}},U=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?(t.setAttribute("data-scroll-lock-fill-gap",""),w.scroll||$(t)):s('"'.concat(t,'" is not a Element.'))}))}))},D=function(t){t&&r(t).map((function(t){o(t,(function(t){i(t)?(t.removeAttribute("data-scroll-lock-fill-gap"),w.scroll||V(t)):s('"'.concat(t,'" is not a Element.'))}))}))},z=function(t){t&&r(t).map((function(t){-1===w.fillGapSelectors.indexOf(t)&&(w.fillGapSelectors.push(t),w.scroll||X(t))}))},M=function(t){t&&r(t).map((function(t){w.fillGapSelectors=w.fillGapSelectors.filter((function(e){return e!==t})),w.scroll||Q(t)}))},I=function(){w.scroll||K()},N=function(){var t=a(w.lockableSelectors);G(t)},W=function(){var t=a(w.lockableSelectors);H(t)},G=function(t){var e=document.querySelectorAll(t);o(e,(function(t){q(t)}))},H=function(t){var e=document.querySelectorAll(t);o(e,(function(t){Y(t)}))},q=function(t){if(i(t)&&"true"!==t.getAttribute("data-scroll-lock-locked")){var e=window.getComputedStyle(t);t.setAttribute("data-scroll-lock-saved-overflow-y-property",e.overflowY),t.setAttribute("data-scroll-lock-saved-inline-overflow-property",t.style.overflow),t.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",t.style.overflowY),t.style.overflow="hidden",t.setAttribute("data-scroll-lock-locked","true")}},Y=function(t){i(t)&&"true"===t.getAttribute("data-scroll-lock-locked")&&(t.style.overflow=t.getAttribute("data-scroll-lock-saved-inline-overflow-property"),t.style.overflowY=t.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),t.removeAttribute("data-scroll-lock-saved-overflow-property"),t.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),t.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),t.removeAttribute("data-scroll-lock-locked"))},K=function(){w.fillGapSelectors.map((function(t){X(t)}))},J=function(){w.fillGapSelectors.map((function(t){Q(t)}))},X=function(t){var e=document.querySelectorAll(t),n=-1!==w.lockableSelectors.indexOf(t);o(e,(function(t){$(t,n)}))},$=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i(t)){var n;if(""===t.getAttribute("data-scroll-lock-lockable")||e)n=x(t,!0);else{var r=l(t,a(w.lockableSelectors));n=x(r,!0)}"true"===t.getAttribute("data-scroll-lock-filled-gap")&&V(t);var o=window.getComputedStyle(t);if(t.setAttribute("data-scroll-lock-filled-gap","true"),t.setAttribute("data-scroll-lock-current-fill-gap-method",w.fillGapMethod),"margin"===w.fillGapMethod){var s=parseFloat(o.marginRight);t.style.marginRight="".concat(s+n,"px")}else if("width"===w.fillGapMethod)t.style.width="calc(100% - ".concat(n,"px)");else if("max-width"===w.fillGapMethod)t.style.maxWidth="calc(100% - ".concat(n,"px)");else if("padding"===w.fillGapMethod){var c=parseFloat(o.paddingRight);t.style.paddingRight="".concat(c+n,"px")}}},Q=function(t){var e=document.querySelectorAll(t);o(e,(function(t){V(t)}))},V=function(t){if(i(t)&&"true"===t.getAttribute("data-scroll-lock-filled-gap")){var e=t.getAttribute("data-scroll-lock-current-fill-gap-method");t.removeAttribute("data-scroll-lock-filled-gap"),t.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===e?t.style.marginRight="":"width"===e?t.style.width="":"max-width"===e?t.style.maxWidth="":"padding"===e&&(t.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(t){I()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(t){w.scroll||(w.startTouchY=t.touches[0].clientY,w.startTouchX=t.touches[0].clientX)})),document.addEventListener("touchmove",(function(t){if(!w.scroll){var e=w.startTouchY,n=w.startTouchX,r=t.touches[0].clientY,i=t.touches[0].clientX;if(t.touches.length<2){var o=a(w.scrollableSelectors),s={up:e<r,down:e>r,left:n<i,right:n>i},c={up:e+3<r,down:e-3>r,left:n+3<i,right:n-3>i};!function e(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n){var i=l(n,o,!1);if(y(n))return!1;if(r||m(n)&&l(n,o)||u(n,o)){var a=!1;p(n)&&g(n)?(s.up&&d(n)||s.down&&h(n))&&(a=!0):d(n)&&h(n)?(s.left&&p(n)||s.right&&g(n))&&(a=!0):(c.up&&d(n)||c.down&&h(n)||c.left&&p(n)||c.right&&g(n))&&(a=!0),a&&(i?e(i,!0):t.cancelable&&t.preventDefault())}else e(i)}else t.cancelable&&t.preventDefault()}(t.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(t){w.scroll||(w.startTouchY=0,w.startTouchX=0)})));var Z={hide:function(t){s('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),S(t)},show:function(t){s('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),A(t)},toggle:function(t){s('"toggle" is deprecated! Do not use it.'),T()?S():A(t)},getState:function(){return s('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),T()},getWidth:function(){return s('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),E()},getCurrentWidth:function(){return s('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),L()},setScrollableTargets:function(t){s('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),_(t)},setFillGapSelectors:function(t){s('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),z(t)},setFillGapTargets:function(t){s('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),U(t)},clearQueue:function(){s('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),F()}},tt=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){v(t,e,n[e])}))}return t}({disablePageScroll:S,enablePageScroll:A,getScrollState:T,clearQueueScrollLocks:F,getTargetScrollBarWidth:x,getCurrentTargetScrollBarWidth:k,getPageScrollBarWidth:E,getCurrentPageScrollBarWidth:L,addScrollableSelector:P,removeScrollableSelector:j,addScrollableTarget:_,removeScrollableTarget:O,addLockableSelector:B,addLockableTarget:C,addFillGapSelector:z,removeFillGapSelector:M,addFillGapTarget:U,removeFillGapTarget:D,setFillGapMethod:R,refillGaps:I,_state:w},Z);e.default=tt}]).default},t.exports=e()},7147:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Headers:()=>p,Request:()=>S,Response:()=>T,DOMException:()=>x,fetch:()=>k});var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,s="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in r,c="ArrayBuffer"in r;if(c)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&l.indexOf(Object.prototype.toString.call(t))>-1};function f(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function d(t){return"string"!=typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function g(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function m(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function y(t){var e=new FileReader,n=m(e);return e.readAsArrayBuffer(t),n}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&s&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=g(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(y)}),this.text=function(){var t,e,n,r=g(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,n=m(e=new FileReader),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=f(t),e=d(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},p.prototype.delete=function(t){delete this.map[f(t)]},p.prototype.get=function(t){return t=f(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(f(t))},p.prototype.set=function(t,e){this.map[f(t)]=d(e)},p.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),h(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),h(t)},o&&(p.prototype[Symbol.iterator]=p.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(e=e||{}).body;if(t instanceof S){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=(n=e.method||this.method||"GET").toUpperCase(),w.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function A(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})},b.call(S.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var t=new T(null,{status:0,statusText:""});return t.type="error",t};var F=[301,302,303,307,308];T.redirect=function(t,e){if(-1===F.indexOf(e))throw new RangeError("Invalid status code");return new T(null,{status:e,headers:{location:t}})};var x=r.DOMException;try{new x}catch(t){(x=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),x.prototype.constructor=x}function k(t,e){return new Promise((function(n,i){var o=new S(t,e);if(o.signal&&o.signal.aborted)return i(new x("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new T(i,r))}),0)},a.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){i(new x("Aborted","AbortError"))}),0)},a.open(o.method,function(t){try{return""===t&&r.location.href?r.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&(s?a.responseType="blob":c&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof p?o.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,d(e.headers[t]))})),o.signal&&(o.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",l)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}k.polyfill=!0,r.fetch||(r.fetch=k,r.Headers=p,r.Request=S,r.Response=T)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.d(r,{default:()=>g});var t=n(3096),e=n.n(t),i=n(9581),o=n(2498),s=n(1792),a=n(9552),c=n(7359),l=n(6364);function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d=function(t){return window.onblur=function(){return t()},{teardown:function(){return window.onblur=null}}},h=function(t){var e=(0,i.A)("meganav"),n=function(n){e.contains(n.target)||t()};return document.addEventListener("click",n),{teardown:function(){return document.removeEventListener("click",n)}}},p=function(t){if("transparentToWhite"!==t)return{teardown:function(){}};var n=(0,i.A)("meganav"),r=(0,i.n)("meganav-link"),o=(0,i.A)("meganav-control-mobile-dropdown-menu"),s=(0,i.A)("meganav-control-mobile-dropdown-close"),a=(0,i.n)("meganav-control"),c=(0,i.A)("meganav-sign-up-btn"),l=[].concat(u(Array.from(a)),u(Array.from(r)),[(0,i.A)("meganav-logo")]),f=function(t){var e,n,r,i,a=["ui-icon-white","ui-icon-cool-black"],c=[].concat(a).reverse();t?(null==o||(e=o.classList).replace.apply(e,a),null==s||(n=s.classList).replace.apply(n,a)):(null==o||(r=o.classList).replace.apply(r,u(c)),null==s||(i=s.classList).replace.apply(i,u(c)))},d=function(t){t?(null==c||c.classList.replace("bg-white","bg-cool-black"),null==c||c.classList.replace("text-cool-black","text-white")):(null==c||c.classList.replace("bg-cool-black","bg-white"),null==c||c.classList.replace("text-white","text-cool-black"))},h=e()((function(){window.scrollY>5?(n.classList.replace("bg-transparent","bg-white"),d(!0),f(!0),l.forEach((function(t){return t.classList.replace("text-white","text-cool-black")}))):(n.classList.replace("bg-white","bg-transparent"),d(!1),f(!1),l.forEach((function(t){return t.classList.replace("text-cool-black","text-white")})))}),150);return document.addEventListener("scroll",h),{teardown:function(){return document.removeEventListener("scroll",h)}}};function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeName:null},e=t.themeName,n=(0,o.default)(),r=(0,a.default)(),i=(0,c.default)(),f=(0,l.default)(),g=(0,s.default)({clearPanels:function(){return[].concat(u(r),u(i)).forEach((function(t){return t.clear()}))}}),m=function(){return[g].concat(u(r),u(i),u(n),u(f)).forEach((function(t){return t.clear()}))},y=[p(e),h(m),d(m),g].concat(u(n),u(r),u(i),u(f)).map((function(t){return t.teardown}));return function(){return y.forEach((function(t){return t()}))}}})(),r.default})()}));
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControl=t())}(this,(function(){return(()=>{"use strict";var e={9581:(e,t,r)=>{r.d(t,{n:()=>n});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{r.d(n,{default:()=>i});var e=r(9581);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const i=function(){var r=Array.from((0,e.n)("meganav-control")),n=Array.from((0,e.n)("meganav-panel")),i=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(e,n,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(i,")")).matches&&!r.some((function(e){return e===document.activeElement}))){var a,u=["invisible","visible"];(a=n.classList).replace.apply(a,function(e){if(Array.isArray(e))return t(e)}(c=o?u:u.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),e.setAttribute("aria-expanded",o)}var c};return r.map((function(e){var t=e.parentNode,i=document.querySelector("#".concat(e.getAttribute("aria-controls"))),a=function(e,t){return function(){r.forEach((function(t){return t!==e&&t.setAttribute("aria-expanded",!1)})),n.forEach((function(e){return e!==t&&e.classList.replace("visible","invisible")})),e.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded",!0),t.classList.replace("invisible","visible")):(e.setAttribute("aria-expanded",!1),t.classList.replace("visible","invisible"))}}(e,i),u=function(e,t){return function(){return o(e,t,!0)}}(e,i),c=function(e,t){return function(){return o(e,t,!1)}}(e,i);return t.addEventListener("mouseenter",u),t.addEventListener("mouseleave",c),e.addEventListener("click",a),[{teardown:function(){t.removeEventListener("mouseenter",u),t.removeEventListener("mouseleave",c),e.removeEventListener("click",a)},clear:function(){e.setAttribute("aria-expanded",!1),i.classList.replace("visible","invisible")}}]})).flat()}})(),n.default})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControl=t())}(this,(function(){return(()=>{"use strict";var e={9581:(e,t,r)=>{r.d(t,{A:()=>n,n:()=>i});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{r.d(n,{default:()=>i});var e=r(9581);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const i=function(){var r=Array.from((0,e.n)("meganav-control")),n=Array.from((0,e.n)("meganav-panel")),i=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),o=function(e){return"search"===e.dataset.control},a=function(e,n,o){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(i,")")).matches&&!r.some((function(e){return e===document.activeElement}))&&!function(){var e=document.querySelector('[data-id="meganav-panel"]#panel-search');if(e)return!e.classList.contains("invisible")}()){var a,c=["invisible","visible"];(a=n.classList).replace.apply(a,function(e){if(Array.isArray(e))return t(e)}(u=o?c:c.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),e.setAttribute("aria-expanded",o)}var u};return r.map((function(t){var i,c,u=t.parentNode,l=document.querySelector("#".concat(t.getAttribute("aria-controls"))),s=function(t,i){return function(){if(r.forEach((function(e){return e!==t&&e.setAttribute("aria-expanded",!1)})),n.forEach((function(e){return e!==i&&e.classList.replace("visible","invisible")})),"true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded",!1),i.classList.replace("visible","invisible")):(t.setAttribute("aria-expanded",!0),i.classList.replace("invisible","visible")),o(t)){var a=(0,e.A)("meganav-search-input",i);if(!a)return;a.focus()}else t.focus()}}(t,l);return t.addEventListener("click",s),o(t)||(i=function(e,t){return function(){return a(e,t,!0)}}(t,l),c=function(e,t){return function(){return a(e,t,!1)}}(t,l),u.addEventListener("mouseenter",i),u.addEventListener("mouseleave",c)),[{teardown:function(){i&&c&&(u.removeEventListener("mouseenter",i),u.removeEventListener("mouseleave",c)),t.removeEventListener("click",s)},clear:function(){t.setAttribute("aria-expanded",!1),l.classList.replace("visible","invisible")}}]})).flat()}})(),n.default})()}));
@@ -15,7 +15,21 @@
15
15
  <%= tag.form class: "mb-16", action: abs_url("/search"), method: "get" do %>
16
16
  <div class="relative w-full">
17
17
  <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black", additional_css: "absolute top-12 left-16 hover:text-gui-hover")) %>
18
- <input type="search" name="q" class="ui-input pl-48 h-48" placeholder="Search" data-id="meganav-mobile-search-input" />
18
+ <button
19
+ type="button"
20
+ class="absolute top-12 right-16 p-0 focus:outline-gui-focus m-0 md:hidden invisible"
21
+ data-id="meganav-search-input-clear"
22
+ >
23
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-cross-circled-fill", size: "1.5rem", color: "text-dark-grey")) %>
24
+ </button>
25
+ <input
26
+ type="search"
27
+ name="q"
28
+ class="ui-input px-48 h-48"
29
+ style={{ maxWidth: "none" }}
30
+ placeholder="Search"
31
+ data-id="meganav-mobile-search-input"
32
+ />
19
33
 
20
34
  <%= render(AblyUi::Core::MeganavSearchAutocomplete.new) %>
21
35
  </div>
@@ -25,7 +39,7 @@
25
39
  <%= render(AblyUi::Core::MeganavSearchSuggestions.new(url_base: url_base, display_support_link: false)) %>
26
40
  </div>
27
41
 
28
- <ul class="mb-16">
42
+ <ul class="mb-16" data-id="meganav-mobile-panel-controls">
29
43
  <% panels.each do |panel| %>
30
44
  <li class="ui-meganav-mobile-item">
31
45
  <%= render(AblyUi::Core::MeganavControlMobilePanelOpen.new(aria_controls: "#{panel[:id]}-mobile")) do %>
@@ -1,6 +1,7 @@
1
1
  <button
2
2
  type="button"
3
3
  data-id="meganav-control"
4
+ data-control="search"
4
5
  class="h-64 w-24 px-24 pr-48 py-20"
5
6
  aria-expanded="false"
6
7
  aria-controls="panel-search"
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see component.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.MeganavSearchAutocomplete=e())}(this,(function(){return(()=>{var t={727:(t,e,s)=>{"use strict";t.exports=s(5647)},493:(t,e,s)=>{"use strict";s(2702).polyfill(),s(4301);var i=function(t,e,s,n,r,o,a){var c=function(t,e){return t||!1===t?"&"+e+"="+t:""};if("search"===s||"suggest"===s||"autocomplete"===s){var u="",h="",l=null;if("search"===s){l=s,u=n.keyword,u=n.enableLogicalOperators?u.replace(/ and /g," AND ").replace(/ or /g," OR ").replace(/ not /g," NOT "):u.replace(/ AND /g," and ").replace(/ OR /g," or ").replace(/ NOT /g," not "),u=encodeURIComponent(u);var f=n.fuzzy;if("retry"===f&&(f=!0===o),"search"===s){if(h=c(n.lang,"lang")+c(f,"fuzzy")+c(n.collectAnalytics,"collectAnalytics")+c(n.postfixWildcard,"postfixWildcard")+c(n.categories,"categories")+c(n.priceFromCents,"priceFromCents")+c(n.priceToCents,"priceToCents")+c(n.dateFrom,"dateFrom")+c(n.dateTo,"dateTo")+c(n.paging.page,"page")+c(n.paging.pageSize,"limit")+c(n.paging.sortBy,"sort")+c(n.paging.sortOrder,"order")+c(n.shuffleAndLimitTo,"shuffleAndLimitTo")+c(n.jwt,"jwt")+c(n.resultType,"resultType")+c(n.userToken,"userToken")+c(n.numFacets,"numFacets")+c(n.cacheResponseTime,"cacheResponseWithTtlSeconds")+c(n.searchOperator,"defaultOperator")+c(n.analyticsTag,"analyticsTag")+c(n.hierarchicalFacetSetting,"hierarchicalFacets"),n.customFieldFilters)for(var d=0;d<n.customFieldFilters.length;d++)h=h+"&customField="+n.customFieldFilters[d];if(n.facetFields)for(d=0;d<n.facetFields.length;d++)h=h+"&facet="+n.facetFields[d];if(n.rangeFacets&&(h=h+"&rangeFacets="+JSON.stringify(n.rangeFacets)),n.statsFields)for(d=0;d<n.statsFields.length;d++)h=h+"&fieldStat="+n.statsFields[d];if(n.personalizationEvents&&Array.isArray(n.personalizationEvents))for(d=0;d<n.personalizationEvents.length;d++){var g=n.personalizationEvents[d],p=Object.keys(g);h=h+"&personalizationEvent="+encodeURIComponent(p+"="+g[p])}a?h=h+"&filter="+encodeURIComponent(JSON.stringify(a)):n.filterObject&&(h=h+"&filter="+encodeURIComponent(JSON.stringify(n.filterObject)))}}else"suggest"===s?(l=s,h=c(n.suggestionsSize,"size")+c(n.lang,"lang"),u=n.suggestionsPrefix):"autocomplete"===s&&(l="autocomplete/document-field",h=c(n.autocomplete.field,"source")+c(n.autocomplete.size,"size"),u=n.autocomplete.prefix);fetch("https://"+t+"/v1/"+l+"/"+e+"?term="+u+h).then((function(t){return t.json()})).then((function(a){if("search"===s&&"retry"===n.fuzzy&&0===a.total_hits&&!0!==o)i(t,e,s,n,r,!0);else{if(!0===o){var c=n.paging.pageSize;a.total_hits>=c&&(a.total_hits=c)}r(a)}})).catch((function(t){console.log(t),r({error:{response:500,message:"invalid server response"}})}))}else r({error:{response:400,message:"invalid query type"}})};t.exports=i},5647:(t,e,s)=>{"use strict";var i=s(493),n=s(9610),r=s(3716),o=s(7585),a=s(5159),c=s(4508);t.exports=function(t,e){this.sitekey=t,this.privatekey=e,this.apiHostname="api.addsearch.com",this.settings=new o,this.sessionId=("a-"+1e8*Math.random()).substring(0,10),this.search=function(t,e){var s=null,n=null;if(t&&a.isFunction(e))s=t,n=e;else if(!e&&a.isFunction(t))s=this.settings.getSettings().keyword,n=t;else{if(!this.settings.getSettings().callback)throw"Illegal search parameters. Should be (keyword, callbackFunction) or (callbackFunction)";s=this.settings.getSettings().keyword,n=this.settings.getSettings().callback}this.settings.setCallback(n),this.settings.setKeyword(s),this.throttledSearchFetch||(this.throttledSearchFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledSearchFetch(this.apiHostname,this.sitekey,"search",this.settings.getSettings(),n)},this.suggestions=function(t,e){if(!t||!e||!a.isFunction(e))throw"Illegal suggestions parameters. Should be (prefix, callbackFunction)";this.settings.setSuggestionsPrefix(t),this.throttledSuggestionsFetch||(this.throttledSuggestionsFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledSuggestionsFetch(this.apiHostname,this.sitekey,"suggest",this.settings.getSettings(),e)},this.autocomplete=function(t,e,s){if(!(t&&e&&s&&a.isFunction(s)))throw"Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)";this.settings.setAutocompleteParams(t,e),this.throttledAutocompleteFetch||(this.throttledAutocompleteFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledAutocompleteFetch(this.apiHostname,this.sitekey,"autocomplete",this.settings.getSettings(),s)},this.fetchCustomApi=function(t,e,s){var n=Object.assign({},this.settings.getSettings());n.facetFields=n.facetFields.filter((e=>t===e)),i(this.apiHostname,this.sitekey,"search",n,s,null,e)},this.fetchRangeFacets=function(t,e,s){var n=Object.assign({},this.settings.getSettings());n.rangeFacets||(n.rangeFacets=[]),n.rangeFacets.push({field:t.field,ranges:t.ranges}),i(this.apiHostname,this.sitekey,"search",n,s,null,e)},this.getDocument=function(t){return n.getDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocument=function(t){return n.saveDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of documents: {documents: []}";return n.saveDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocument=function(t){return n.deleteDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of document ids: {documents: []}";return n.deleteDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.setApiHostname=function(t){this.apiHostname=t},this.getSettings=function(){return this.settings.getSettings()},this.setLanguage=function(t){this.settings.setLanguage(t)},this.setCategoryFilters=function(t){this.settings.setCategoryFilters(t)},this.addCustomFieldFilter=function(t,e){this.settings.addCustomFieldFilter(t,e)},this.removeCustomFieldFilter=function(t,e){this.settings.removeCustomFieldFilter(t,e)},this.setPriceRangeFilter=function(t,e){this.settings.setPriceRangeFilter(t,e)},this.setDateFilter=function(t,e){this.settings.setDateFilter(t,e)},this.setJWT=function(t){this.settings.setJWT(t)},this.setUserToken=function(t){this.settings.setUserToken(t)},this.setPaging=function(t,e,s,i){this.settings.setPaging(t,e,s,i)},this.nextPage=function(){this.settings.nextPage()},this.previousPage=function(){this.settings.previousPage()},this.setSuggestionsSize=function(t){this.settings.setSuggestionsSize(t)},this.setAutocompleteSize=function(t){this.settings.setAutocompleteSize(t)},this.addFacetField=function(t){this.settings.addFacetField(t)},this.addHierarchicalFacetSetting=function(t){this.settings.addHierarchicalFacetSetting(t)},this.addRangeFacet=function(t,e){this.settings.addRangeFacet(t,e)},this.addStatsField=function(t){this.settings.addStatsField(t)},this.setNumberOfFacets=function(t){this.settings.setNumberOfFacets(t)},this.setResultType=function(t){this.settings.setResultType(t)},this.setPersonalizationEvents=function(t){this.settings.setPersonalizationEvents(t)},this.setFilterObject=function(t){this.settings.setFilterObject(t)},this.setShuffleAndLimitTo=function(t){this.settings.setShuffleAndLimitTo(t)},this.setFuzzyMatch=function(t){this.settings.setFuzzyMatch(t)},this.setPostfixWildcard=function(t){this.settings.setPostfixWildcard(t)},this.setCacheResponseTime=function(t){this.settings.setCacheResponseTime(t)},this.setCollectAnalytics=function(t){this.settings.setCollectAnalytics(t)},this.setAnalyticsTag=function(t){this.settings.setAnalyticsTag(t)},this.setThrottleTime=function(t){this.settings.setThrottleTime(t)},this.setStatsSessionId=function(t){this.sessionId=t},this.getStatsSessionId=function(){return this.sessionId},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators(t)},this.setSearchOperator=function(t){this.settings.setSearchOperator(t)},this.sendStatsEvent=function(t,e,s){if("search"===t)s={action:"search",session:this.sessionId,keyword:e,numberOfResults:s.numberOfResults,analyticsTag:this.getSettings().analyticsTag},r(this.apiHostname,this.sitekey,s);else{if("click"!==t)throw"Illegal sendStatsEvent type parameters. Should be search or click)";s={action:"click",session:this.sessionId,keyword:e,docid:s.documentId,position:s.position,analyticsTag:this.getSettings().analyticsTag},r(this.apiHostname,this.sitekey,s)}},this.searchResultClicked=function(t,e){this.sendStatsEvent("click",this.settings.getSettings().keyword,{documentId:t,position:e})}}},9610:(t,e,s)=>{"use strict";s(4301);const i=s(5159),n=s(2702).Promise,r=function(t,e){return{Authorization:"Basic "+i.base64(t+":"+e),"Content-Type":"application/json"}};t.exports={getDocument:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+i,{method:"GET",headers:r(e,s)}).then((t=>{200==t.status?n(t.json()):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},saveDocument:function(t,e,s,i){const o=i.id||i.url;return new n(((n,a)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/",{method:o?"PUT":"POST",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):a({status:t.status,text:t.statusText})})).catch((t=>{a({status:400,text:t})}))}))},saveDocumentsBatch:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"PUT",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},deleteDocument:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+i,{method:"DELETE",headers:r(e,s)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},deleteDocumentsBatch:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"DELETE",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))}}},7585:t=>{"use strict";t.exports=function(){this.settings={keyword:"*",callback:null,throttleTimeMs:200,fuzzy:"auto",paging:{page:1,pageSize:10,sortBy:"relevance",sortOrder:"desc"},customFieldFilters:[],userToken:null,suggestionsSize:10,facetFields:[],autocomplete:{size:10},searchOperator:null,enableLogicalOperators:!1,cacheResponseTime:null},this.getSettings=function(){return this.settings},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setCallback=function(t){this.settings.callback=t},this.setThrottleTime=function(t){this.settings.throttleTimeMs=t},this.setSuggestionsPrefix=function(t){this.settings.suggestionsPrefix=t},this.setSuggestionsSize=function(t){this.settings.suggestionsSize=t},this.setAutocompleteSize=function(t){this.settings.autocomplete.size=t},this.setAutocompleteParams=function(t,e){this.settings.autocomplete.field=t,this.settings.autocomplete.prefix=e},this.setLanguage=function(t){if(t&&2!==t.length)throw'use 2-char language code (e.g. "en")';this.settings.lang=t},this.setFuzzyMatch=function(t){if(!0!==t&&!1!==t&&"auto"!==t&&"retry"!==t)throw"fuzzy matching can be true, false, 'auto', or 'retry'";this.settings.fuzzy=t},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators=t},this.setCacheResponseTime=function(t){this.settings.cacheResponseTime=t},this.setPostfixWildcard=function(t){this.settings.postfixWildcard=t},this.setCollectAnalytics=function(t){this.settings.collectAnalytics=t},this.setAnalyticsTag=function(t){this.settings.analyticsTag=t},this.setCategoryFilters=function(t){this.settings.categories=t},this.setFilterObject=function(t){this.settings.filterObject=t},this.setPriceRangeFilter=function(t,e){this.settings.priceFromCents=t,this.settings.priceToCents=e},this.addCustomFieldFilter=function(t,e){var s=encodeURIComponent(t+"="+e);-1===this.settings.customFieldFilters.indexOf(s)&&this.settings.customFieldFilters.push(s)},this.removeCustomFieldFilter=function(t,e){var s=!1,i=encodeURIComponent(t+"="+e);e||(s=!0,i=encodeURIComponent(t+"="));for(var n=this.settings.customFieldFilters.length;n>0;n--){var r=this.settings.customFieldFilters[n-1];(s&&0===r.indexOf(i)||r===i)&&this.settings.customFieldFilters.splice(n-1,1)}},this.setDateFilter=function(t,e){this.settings.dateFrom=t,this.settings.dateTo=e},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setJWT=function(t){this.settings.jwt=t},this.setUserToken=function(t){this.settings.userToken=t},this.setPersonalizationEvents=function(t){this.settings.personalizationEvents=t},this.setResultType=function(t){this.settings.resultType=t},this.addFacetField=function(t){-1===this.settings.facetFields.indexOf(t)&&this.settings.facetFields.push(t)},this.addHierarchicalFacetSetting=function(t){this.settings.hierarchicalFacetSetting=JSON.stringify(t)},this.addRangeFacet=function(t,e){this.settings.rangeFacets||(this.settings.rangeFacets=[]),this.settings.rangeFacets.push({field:t,ranges:e})},this.addStatsField=function(t){this.settings.statsFields||(this.settings.statsFields=[]),-1===this.settings.statsFields.indexOf(t)&&this.settings.statsFields.push(t)},this.setNumberOfFacets=function(t){this.settings.numFacets=t},this.setPaging=function(t,e,s,i){if(t<1)throw"page must be 1 or bigger";if(e<1||e>300)throw"pageSize must be 1-300";if("asc"!==i&&"desc"!==i)throw"sortOrder must be asc or desc";this.settings.paging.page=t,this.settings.paging.pageSize=e,this.settings.paging.sortBy=s,this.settings.paging.sortOrder=i},this.setShuffleAndLimitTo=function(t){this.settings.shuffleAndLimitTo=t},this.nextPage=function(){this.settings.paging.page=this.settings.paging.page+1},this.previousPage=function(){this.settings.paging.page>0&&(this.settings.paging.page=this.settings.paging.page-1)},this.setSearchOperator=function(t){if("and"!==t&&"or"!==t)throw"operator must be 'and' || 'or'";this.settings.searchOperator=t}}},3716:(t,e,s)=>{"use strict";s(2702).polyfill(),s(4301),t.exports=function(t,e,s){"undefined"!=typeof window&&window.navigator&&window.navigator.sendBeacon?navigator.sendBeacon("https://"+t+"/v1/stats/"+e+"/",JSON.stringify(s)):fetch("https://"+t+"/v1/stats/"+e+"/",{method:"POST",headers:{"Content-Type":"text/plain"},body:JSON.stringify(s)})}},4508:t=>{t.exports=function(t,e){var s,i=0;function n(){s&&clearTimeout(s)}return function(){var r=this,o=Date.now()-i,a=arguments;function c(){i=Date.now(),e.apply(r,a)}n(),o>t?c():s=setTimeout(c,t-o)}}},5159:(t,e,s)=>{t.exports={isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},base64:function(t){return s.g.window={},window&&window.btoa?window.btoa(t):Buffer?Buffer.from(t).toString("base64"):void 0}}},9581:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))}},2702:function(t,e,s){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,n=void 0,r=void 0,o=function(t,e){d[i]=t,d[i+1]=e,2===(i+=2)&&(r?r(g):b())};var a="undefined"!=typeof window?window:void 0,c=a||{},u=c.MutationObserver||c.WebKitMutationObserver,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var t=setTimeout;return function(){return t(g,1)}}var d=new Array(1e3);function g(){for(var t=0;t<i;t+=2)(0,d[t])(d[t+1]),d[t]=void 0,d[t+1]=void 0;i=0}var p,y,m,v,b=void 0;function w(t,e){var s=this,i=new this.constructor(S);void 0===i[F]&&R(i);var n=s._state;if(n){var r=arguments[n-1];o((function(){return j(n,i,r,s._result)}))}else k(s,i,t,e);return i}function T(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(S);return x(e,t),e}b=h?function(){return process.nextTick(g)}:u?(y=0,m=new u(g),v=document.createTextNode(""),m.observe(v,{characterData:!0}),function(){v.data=y=++y%2}):l?((p=new MessageChannel).port1.onmessage=g,function(){return p.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(n=t.runOnLoop||t.runOnContext)?function(){n(g)}:f()}catch(t){return f()}}():f();var F=Math.random().toString(36).substring(2);function S(){}var A=void 0;function _(e,s,i){s.constructor===e.constructor&&i===w&&s.constructor.resolve===T?function(t,e){1===e._state?E(t,e._result):2===e._state?P(t,e._result):k(e,void 0,(function(e){return x(t,e)}),(function(e){return P(t,e)}))}(e,s):void 0===i?E(e,s):t(i)?function(t,e,s){o((function(t){var i=!1,n=function(t,e,s,i){try{t.call(e,s,i)}catch(t){return t}}(s,e,(function(s){i||(i=!0,e!==s?x(t,s):E(t,s))}),(function(e){i||(i=!0,P(t,e))}),t._label);!i&&n&&(i=!0,P(t,n))}),t)}(e,s,i):E(e,s)}function x(t,e){if(t===e)P(t,new TypeError("You cannot resolve a promise with itself"));else if(n=typeof(i=e),null===i||"object"!==n&&"function"!==n)E(t,e);else{var s=void 0;try{s=e.then}catch(e){return void P(t,e)}_(t,e,s)}var i,n}function O(t){t._onerror&&t._onerror(t._result),C(t)}function E(t,e){t._state===A&&(t._result=e,t._state=1,0!==t._subscribers.length&&o(C,t))}function P(t,e){t._state===A&&(t._state=2,t._result=e,o(O,t))}function k(t,e,s,i){var n=t._subscribers,r=n.length;t._onerror=null,n[r]=e,n[r+1]=s,n[r+2]=i,0===r&&t._state&&o(C,t)}function C(t){var e=t._subscribers,s=t._state;if(0!==e.length){for(var i=void 0,n=void 0,r=t._result,o=0;o<e.length;o+=3)i=e[o],n=e[o+s],i?j(s,i,n,r):n(r);t._subscribers.length=0}}function j(e,s,i,n){var r=t(i),o=void 0,a=void 0,c=!0;if(r){try{o=i(n)}catch(t){c=!1,a=t}if(s===o)return void P(s,new TypeError("A promises callback cannot return that same promise."))}else o=n;s._state!==A||(r&&c?x(s,o):!1===c?P(s,a):1===e?E(s,o):2===e&&P(s,o))}var B=0;function R(t){t[F]=B++,t._state=void 0,t._result=void 0,t._subscribers=[]}var z=function(){function t(t,s){this._instanceConstructor=t,this.promise=new t(S),this.promise[F]||R(this.promise),e(s)?(this.length=s.length,this._remaining=s.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(s),0===this._remaining&&E(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===A&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var s=this._instanceConstructor,i=s.resolve;if(i===T){var n=void 0,r=void 0,o=!1;try{n=t.then}catch(t){o=!0,r=t}if(n===w&&t._state!==A)this._settledAt(t._state,e,t._result);else if("function"!=typeof n)this._remaining--,this._result[e]=t;else if(s===D){var a=new s(S);o?P(a,r):_(a,t,n),this._willSettleAt(a,e)}else this._willSettleAt(new s((function(e){return e(t)})),e)}else this._willSettleAt(i(t),e)},t.prototype._settledAt=function(t,e,s){var i=this.promise;i._state===A&&(this._remaining--,2===t?P(i,s):this._result[e]=s),0===this._remaining&&E(i,this._result)},t.prototype._willSettleAt=function(t,e){var s=this;k(t,void 0,(function(t){return s._settledAt(1,e,t)}),(function(t){return s._settledAt(2,e,t)}))},t}();var D=function(){function e(t){this[F]=B++,this._result=this._state=void 0,this._subscribers=[],S!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){x(t,e)}),(function(e){P(t,e)}))}catch(e){P(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var s=this,i=s.constructor;return t(e)?s.then((function(t){return i.resolve(e()).then((function(){return t}))}),(function(t){return i.resolve(e()).then((function(){throw t}))})):s.then(e,e)},e}();return D.prototype.then=w,D.all=function(t){return new z(this,t).promise},D.race=function(t){var s=this;return e(t)?new s((function(e,i){for(var n=t.length,r=0;r<n;r++)s.resolve(t[r]).then(e,i)})):new s((function(t,e){return e(new TypeError("You must pass an array to race."))}))},D.resolve=T,D.reject=function(t){var e=new this(S);return P(e,t),e},D._setScheduler=function(t){r=t},D._setAsap=function(t){o=t},D._asap=o,D.polyfill=function(){var t=void 0;if(void 0!==s.g)t=s.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===i&&!e.cast)return}t.Promise=D},D.Promise=D,D}()},4301:(t,e,s)=>{s(7147),t.exports=self.fetch.bind(self)},7147:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Headers:()=>g,Request:()=>T,Response:()=>S,DOMException:()=>_,fetch:()=>x});var i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i&&i,n="URLSearchParams"in i,r="Symbol"in i&&"iterator"in Symbol,o="FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in i,c="ArrayBuffer"in i;if(c)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function g(t){this.map={},t instanceof g?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function y(t){return new Promise((function(e,s){t.onload=function(){e(t.result)},t.onerror=function(){s(t.error)}}))}function m(t){var e=new FileReader,s=y(e);return e.readAsArrayBuffer(t),s}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&o&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(m)}),this.text=function(){var t,e,s,i=p(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,s=y(e=new FileReader),e.readAsText(t),s;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),s=new Array(e.length),i=0;i<e.length;i++)s[i]=String.fromCharCode(e[i]);return s.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(F)}),this.json=function(){return this.text().then(JSON.parse)},this}g.prototype.append=function(t,e){t=l(t),e=f(e);var s=this.map[t];this.map[t]=s?s+", "+e:e},g.prototype.delete=function(t){delete this.map[l(t)]},g.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},g.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},g.prototype.set=function(t,e){this.map[l(t)]=f(e)},g.prototype.forEach=function(t,e){for(var s in this.map)this.map.hasOwnProperty(s)&&t.call(e,this.map[s],s,this)},g.prototype.keys=function(){var t=[];return this.forEach((function(e,s){t.push(s)})),d(t)},g.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},g.prototype.entries=function(){var t=[];return this.forEach((function(e,s){t.push([s,e])})),d(t)},r&&(g.prototype[Symbol.iterator]=g.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var s,i,n=(e=e||{}).body;if(t instanceof T){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new g(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new g(e.headers)),this.method=(i=(s=e.method||this.method||"GET").toUpperCase(),w.indexOf(i)>-1?i:s),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function F(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var s=t.split("="),i=s.shift().replace(/\+/g," "),n=s.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(n))}})),e}function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new g(e.headers),this.url=e.url||"",this._initBody(t)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})},b.call(T.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},S.error=function(){var t=new S(null,{status:0,statusText:""});return t.type="error",t};var A=[301,302,303,307,308];S.redirect=function(t,e){if(-1===A.indexOf(e))throw new RangeError("Invalid status code");return new S(null,{status:e,headers:{location:t}})};var _=i.DOMException;try{new _}catch(t){(_=function(t,e){this.message=t,this.name=e;var s=Error(t);this.stack=s.stack}).prototype=Object.create(Error.prototype),_.prototype.constructor=_}function x(t,e){return new Promise((function(s,n){var r=new T(t,e);if(r.signal&&r.signal.aborted)return n(new _("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,i={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new g,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var s=t.split(":"),i=s.shift().trim();if(i){var n=s.join(":").trim();e.append(i,n)}})),e)};i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;setTimeout((function(){s(new S(n,i))}),0)},a.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){n(new _("Aborted","AbortError"))}),0)},a.open(r.method,function(t){try{return""===t&&i.location.href?i.location.href:t}catch(e){return t}}(r.url),!0),"include"===r.credentials?a.withCredentials=!0:"omit"===r.credentials&&(a.withCredentials=!1),"responseType"in a&&(o?a.responseType="blob":c&&r.headers.get("Content-Type")&&-1!==r.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof g?r.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,f(e.headers[t]))})),r.signal&&(r.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&r.signal.removeEventListener("abort",u)}),a.send(void 0===r._bodyInit?null:r._bodyInit)}))}x.polyfill=!0,i.fetch||(i.fetch=x,i.Headers=g,i.Request=T,i.Response=S)}},e={};function s(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,s),r.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";s.d(i,{default:()=>r});var t=s(9581),e=s(727),n=s.n(e);const r=function(){var e=document.body.dataset.addSearchApiKey;if(!e)return console.log("No AddSearch API key provided, skipping search suggestions."),[];var s=new(n())(e);return[(0,t.A)("meganav-search-input"),(0,t.A)("meganav-mobile-search-input")].filter((function(t){return t})).map((function(e){var i=e.parentNode;return function(t){var e=t.input,s=t.container,i=t.listContainer,n=t.client;n.setAnalyticsTag("Meganav autocomplete"),n.setThrottleTime(400);var r=function(){s.classList.add("hidden"),i.innerHTML=""},o=function(t){var e=t.target.value;e?n.suggestions(e,function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suggestions:[]};if(0!==e.suggestions.length){var n=e.suggestions.map((function(e){var s=document.createElement("li"),i=document.createElement("button");return i.classList.add("ui-text-menu2","font-medium","p-8","w-full","text-left","rounded","hover:text-gui-hover","hover:bg-light-grey"),i.innerHTML=e.value.replace(t,'<span class="font-light">'.concat(t,"</span>")),i.addEventListener("click",(function(){window.location="/search?q=".concat(e)})),s.appendChild(i),s}));i.innerHTML="",n.forEach((function(t){return i.appendChild(t)})),s.classList.remove("hidden")}else r()}}(e)):r()};return e.addEventListener("keyup",o),{teardown:function(){return e.removeEventListener("keyup",o)},clear:function(){return r()}}}({input:e,container:(0,t.A)("meganav-search-autocomplete-container",i),listContainer:(0,t.A)("meganav-search-autocomplete-list",i),client:s})}))}})(),i.default})()}));
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.MeganavSearchAutocomplete=e())}(this,(function(){return(()=>{var t={727:(t,e,s)=>{"use strict";t.exports=s(5647)},493:(t,e,s)=>{"use strict";s(2702).polyfill(),s(4301);var i=function(t,e,s,n,r,o,a){var c=function(t,e){return t||!1===t?"&"+e+"="+t:""};if("search"===s||"suggest"===s||"autocomplete"===s){var u="",h="",l=null;if("search"===s){l=s,u=n.keyword,u=n.enableLogicalOperators?u.replace(/ and /g," AND ").replace(/ or /g," OR ").replace(/ not /g," NOT "):u.replace(/ AND /g," and ").replace(/ OR /g," or ").replace(/ NOT /g," not "),u=encodeURIComponent(u);var f=n.fuzzy;if("retry"===f&&(f=!0===o),"search"===s){if(h=c(n.lang,"lang")+c(f,"fuzzy")+c(n.collectAnalytics,"collectAnalytics")+c(n.postfixWildcard,"postfixWildcard")+c(n.categories,"categories")+c(n.priceFromCents,"priceFromCents")+c(n.priceToCents,"priceToCents")+c(n.dateFrom,"dateFrom")+c(n.dateTo,"dateTo")+c(n.paging.page,"page")+c(n.paging.pageSize,"limit")+c(n.paging.sortBy,"sort")+c(n.paging.sortOrder,"order")+c(n.shuffleAndLimitTo,"shuffleAndLimitTo")+c(n.jwt,"jwt")+c(n.resultType,"resultType")+c(n.userToken,"userToken")+c(n.numFacets,"numFacets")+c(n.cacheResponseTime,"cacheResponseWithTtlSeconds")+c(n.searchOperator,"defaultOperator")+c(n.analyticsTag,"analyticsTag")+c(n.hierarchicalFacetSetting,"hierarchicalFacets"),n.customFieldFilters)for(var d=0;d<n.customFieldFilters.length;d++)h=h+"&customField="+n.customFieldFilters[d];if(n.facetFields)for(d=0;d<n.facetFields.length;d++)h=h+"&facet="+n.facetFields[d];if(n.rangeFacets&&(h=h+"&rangeFacets="+JSON.stringify(n.rangeFacets)),n.statsFields)for(d=0;d<n.statsFields.length;d++)h=h+"&fieldStat="+n.statsFields[d];if(n.personalizationEvents&&Array.isArray(n.personalizationEvents))for(d=0;d<n.personalizationEvents.length;d++){var g=n.personalizationEvents[d],p=Object.keys(g);h=h+"&personalizationEvent="+encodeURIComponent(p+"="+g[p])}a?h=h+"&filter="+encodeURIComponent(JSON.stringify(a)):n.filterObject&&(h=h+"&filter="+encodeURIComponent(JSON.stringify(n.filterObject)))}}else"suggest"===s?(l=s,h=c(n.suggestionsSize,"size")+c(n.lang,"lang"),u=n.suggestionsPrefix):"autocomplete"===s&&(l="autocomplete/document-field",h=c(n.autocomplete.field,"source")+c(n.autocomplete.size,"size"),u=n.autocomplete.prefix);fetch("https://"+t+"/v1/"+l+"/"+e+"?term="+u+h).then((function(t){return t.json()})).then((function(a){if("search"===s&&"retry"===n.fuzzy&&0===a.total_hits&&!0!==o)i(t,e,s,n,r,!0);else{if(!0===o){var c=n.paging.pageSize;a.total_hits>=c&&(a.total_hits=c)}r(a)}})).catch((function(t){console.log(t),r({error:{response:500,message:"invalid server response"}})}))}else r({error:{response:400,message:"invalid query type"}})};t.exports=i},5647:(t,e,s)=>{"use strict";var i=s(493),n=s(9610),r=s(3716),o=s(7585),a=s(5159),c=s(4508);t.exports=function(t,e){this.sitekey=t,this.privatekey=e,this.apiHostname="api.addsearch.com",this.settings=new o,this.sessionId=("a-"+1e8*Math.random()).substring(0,10),this.search=function(t,e){var s=null,n=null;if(t&&a.isFunction(e))s=t,n=e;else if(!e&&a.isFunction(t))s=this.settings.getSettings().keyword,n=t;else{if(!this.settings.getSettings().callback)throw"Illegal search parameters. Should be (keyword, callbackFunction) or (callbackFunction)";s=this.settings.getSettings().keyword,n=this.settings.getSettings().callback}this.settings.setCallback(n),this.settings.setKeyword(s),this.throttledSearchFetch||(this.throttledSearchFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledSearchFetch(this.apiHostname,this.sitekey,"search",this.settings.getSettings(),n)},this.suggestions=function(t,e){if(!t||!e||!a.isFunction(e))throw"Illegal suggestions parameters. Should be (prefix, callbackFunction)";this.settings.setSuggestionsPrefix(t),this.throttledSuggestionsFetch||(this.throttledSuggestionsFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledSuggestionsFetch(this.apiHostname,this.sitekey,"suggest",this.settings.getSettings(),e)},this.autocomplete=function(t,e,s){if(!(t&&e&&s&&a.isFunction(s)))throw"Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)";this.settings.setAutocompleteParams(t,e),this.throttledAutocompleteFetch||(this.throttledAutocompleteFetch=c(this.settings.getSettings().throttleTimeMs,i)),this.throttledAutocompleteFetch(this.apiHostname,this.sitekey,"autocomplete",this.settings.getSettings(),s)},this.fetchCustomApi=function(t,e,s){var n=Object.assign({},this.settings.getSettings());n.facetFields=n.facetFields.filter((e=>t===e)),i(this.apiHostname,this.sitekey,"search",n,s,null,e)},this.fetchRangeFacets=function(t,e,s){var n=Object.assign({},this.settings.getSettings());n.rangeFacets||(n.rangeFacets=[]),n.rangeFacets.push({field:t.field,ranges:t.ranges}),i(this.apiHostname,this.sitekey,"search",n,s,null,e)},this.getDocument=function(t){return n.getDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocument=function(t){return n.saveDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.saveDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of documents: {documents: []}";return n.saveDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocument=function(t){return n.deleteDocument(this.apiHostname,this.sitekey,this.privatekey,t)},this.deleteDocumentsBatch=function(t){if(!t||!t.documents||!Array.isArray(t.documents))throw"Please provide an array of document ids: {documents: []}";return n.deleteDocumentsBatch(this.apiHostname,this.sitekey,this.privatekey,t)},this.setApiHostname=function(t){this.apiHostname=t},this.getSettings=function(){return this.settings.getSettings()},this.setLanguage=function(t){this.settings.setLanguage(t)},this.setCategoryFilters=function(t){this.settings.setCategoryFilters(t)},this.addCustomFieldFilter=function(t,e){this.settings.addCustomFieldFilter(t,e)},this.removeCustomFieldFilter=function(t,e){this.settings.removeCustomFieldFilter(t,e)},this.setPriceRangeFilter=function(t,e){this.settings.setPriceRangeFilter(t,e)},this.setDateFilter=function(t,e){this.settings.setDateFilter(t,e)},this.setJWT=function(t){this.settings.setJWT(t)},this.setUserToken=function(t){this.settings.setUserToken(t)},this.setPaging=function(t,e,s,i){this.settings.setPaging(t,e,s,i)},this.nextPage=function(){this.settings.nextPage()},this.previousPage=function(){this.settings.previousPage()},this.setSuggestionsSize=function(t){this.settings.setSuggestionsSize(t)},this.setAutocompleteSize=function(t){this.settings.setAutocompleteSize(t)},this.addFacetField=function(t){this.settings.addFacetField(t)},this.addHierarchicalFacetSetting=function(t){this.settings.addHierarchicalFacetSetting(t)},this.addRangeFacet=function(t,e){this.settings.addRangeFacet(t,e)},this.addStatsField=function(t){this.settings.addStatsField(t)},this.setNumberOfFacets=function(t){this.settings.setNumberOfFacets(t)},this.setResultType=function(t){this.settings.setResultType(t)},this.setPersonalizationEvents=function(t){this.settings.setPersonalizationEvents(t)},this.setFilterObject=function(t){this.settings.setFilterObject(t)},this.setShuffleAndLimitTo=function(t){this.settings.setShuffleAndLimitTo(t)},this.setFuzzyMatch=function(t){this.settings.setFuzzyMatch(t)},this.setPostfixWildcard=function(t){this.settings.setPostfixWildcard(t)},this.setCacheResponseTime=function(t){this.settings.setCacheResponseTime(t)},this.setCollectAnalytics=function(t){this.settings.setCollectAnalytics(t)},this.setAnalyticsTag=function(t){this.settings.setAnalyticsTag(t)},this.setThrottleTime=function(t){this.settings.setThrottleTime(t)},this.setStatsSessionId=function(t){this.sessionId=t},this.getStatsSessionId=function(){return this.sessionId},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators(t)},this.setSearchOperator=function(t){this.settings.setSearchOperator(t)},this.sendStatsEvent=function(t,e,s){if("search"===t)s={action:"search",session:this.sessionId,keyword:e,numberOfResults:s.numberOfResults,analyticsTag:this.getSettings().analyticsTag},r(this.apiHostname,this.sitekey,s);else{if("click"!==t)throw"Illegal sendStatsEvent type parameters. Should be search or click)";s={action:"click",session:this.sessionId,keyword:e,docid:s.documentId,position:s.position,analyticsTag:this.getSettings().analyticsTag},r(this.apiHostname,this.sitekey,s)}},this.searchResultClicked=function(t,e){this.sendStatsEvent("click",this.settings.getSettings().keyword,{documentId:t,position:e})}}},9610:(t,e,s)=>{"use strict";s(4301);const i=s(5159),n=s(2702).Promise,r=function(t,e){return{Authorization:"Basic "+i.base64(t+":"+e),"Content-Type":"application/json"}};t.exports={getDocument:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+i,{method:"GET",headers:r(e,s)}).then((t=>{200==t.status?n(t.json()):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},saveDocument:function(t,e,s,i){const o=i.id||i.url;return new n(((n,a)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/",{method:o?"PUT":"POST",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):a({status:t.status,text:t.statusText})})).catch((t=>{a({status:400,text:t})}))}))},saveDocumentsBatch:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"PUT",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},deleteDocument:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents/"+i,{method:"DELETE",headers:r(e,s)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))},deleteDocumentsBatch:function(t,e,s,i){return new n(((n,o)=>{fetch("https://"+t+"/v2/indices/"+e+"/documents:batch",{method:"DELETE",headers:r(e,s),body:JSON.stringify(i)}).then((t=>{202==t.status?n({status:t.status,text:t.statusText}):o({status:t.status,text:t.statusText})})).catch((t=>{o({status:400,text:t})}))}))}}},7585:t=>{"use strict";t.exports=function(){this.settings={keyword:"*",callback:null,throttleTimeMs:200,fuzzy:"auto",paging:{page:1,pageSize:10,sortBy:"relevance",sortOrder:"desc"},customFieldFilters:[],userToken:null,suggestionsSize:10,facetFields:[],autocomplete:{size:10},searchOperator:null,enableLogicalOperators:!1,cacheResponseTime:null},this.getSettings=function(){return this.settings},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setCallback=function(t){this.settings.callback=t},this.setThrottleTime=function(t){this.settings.throttleTimeMs=t},this.setSuggestionsPrefix=function(t){this.settings.suggestionsPrefix=t},this.setSuggestionsSize=function(t){this.settings.suggestionsSize=t},this.setAutocompleteSize=function(t){this.settings.autocomplete.size=t},this.setAutocompleteParams=function(t,e){this.settings.autocomplete.field=t,this.settings.autocomplete.prefix=e},this.setLanguage=function(t){if(t&&2!==t.length)throw'use 2-char language code (e.g. "en")';this.settings.lang=t},this.setFuzzyMatch=function(t){if(!0!==t&&!1!==t&&"auto"!==t&&"retry"!==t)throw"fuzzy matching can be true, false, 'auto', or 'retry'";this.settings.fuzzy=t},this.enableLogicalOperators=function(t){this.settings.enableLogicalOperators=t},this.setCacheResponseTime=function(t){this.settings.cacheResponseTime=t},this.setPostfixWildcard=function(t){this.settings.postfixWildcard=t},this.setCollectAnalytics=function(t){this.settings.collectAnalytics=t},this.setAnalyticsTag=function(t){this.settings.analyticsTag=t},this.setCategoryFilters=function(t){this.settings.categories=t},this.setFilterObject=function(t){this.settings.filterObject=t},this.setPriceRangeFilter=function(t,e){this.settings.priceFromCents=t,this.settings.priceToCents=e},this.addCustomFieldFilter=function(t,e){var s=encodeURIComponent(t+"="+e);-1===this.settings.customFieldFilters.indexOf(s)&&this.settings.customFieldFilters.push(s)},this.removeCustomFieldFilter=function(t,e){var s=!1,i=encodeURIComponent(t+"="+e);e||(s=!0,i=encodeURIComponent(t+"="));for(var n=this.settings.customFieldFilters.length;n>0;n--){var r=this.settings.customFieldFilters[n-1];(s&&0===r.indexOf(i)||r===i)&&this.settings.customFieldFilters.splice(n-1,1)}},this.setDateFilter=function(t,e){this.settings.dateFrom=t,this.settings.dateTo=e},this.setKeyword=function(t){this.settings.keyword=t||"*"},this.setJWT=function(t){this.settings.jwt=t},this.setUserToken=function(t){this.settings.userToken=t},this.setPersonalizationEvents=function(t){this.settings.personalizationEvents=t},this.setResultType=function(t){this.settings.resultType=t},this.addFacetField=function(t){-1===this.settings.facetFields.indexOf(t)&&this.settings.facetFields.push(t)},this.addHierarchicalFacetSetting=function(t){this.settings.hierarchicalFacetSetting=JSON.stringify(t)},this.addRangeFacet=function(t,e){this.settings.rangeFacets||(this.settings.rangeFacets=[]),this.settings.rangeFacets.push({field:t,ranges:e})},this.addStatsField=function(t){this.settings.statsFields||(this.settings.statsFields=[]),-1===this.settings.statsFields.indexOf(t)&&this.settings.statsFields.push(t)},this.setNumberOfFacets=function(t){this.settings.numFacets=t},this.setPaging=function(t,e,s,i){if(t<1)throw"page must be 1 or bigger";if(e<1||e>300)throw"pageSize must be 1-300";if("asc"!==i&&"desc"!==i)throw"sortOrder must be asc or desc";this.settings.paging.page=t,this.settings.paging.pageSize=e,this.settings.paging.sortBy=s,this.settings.paging.sortOrder=i},this.setShuffleAndLimitTo=function(t){this.settings.shuffleAndLimitTo=t},this.nextPage=function(){this.settings.paging.page=this.settings.paging.page+1},this.previousPage=function(){this.settings.paging.page>0&&(this.settings.paging.page=this.settings.paging.page-1)},this.setSearchOperator=function(t){if("and"!==t&&"or"!==t)throw"operator must be 'and' || 'or'";this.settings.searchOperator=t}}},3716:(t,e,s)=>{"use strict";s(2702).polyfill(),s(4301),t.exports=function(t,e,s){"undefined"!=typeof window&&window.navigator&&window.navigator.sendBeacon?navigator.sendBeacon("https://"+t+"/v1/stats/"+e+"/",JSON.stringify(s)):fetch("https://"+t+"/v1/stats/"+e+"/",{method:"POST",headers:{"Content-Type":"text/plain"},body:JSON.stringify(s)})}},4508:t=>{t.exports=function(t,e){var s,i=0;function n(){s&&clearTimeout(s)}return function(){var r=this,o=Date.now()-i,a=arguments;function c(){i=Date.now(),e.apply(r,a)}n(),o>t?c():s=setTimeout(c,t-o)}}},5159:(t,e,s)=>{t.exports={isFunction:function(t){return t&&"[object Function]"==={}.toString.call(t)},base64:function(t){return s.g.window={},window&&window.btoa?window.btoa(t):Buffer?Buffer.from(t).toString("base64"):void 0}}},9581:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))}},2702:function(t,e,s){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,n=void 0,r=void 0,o=function(t,e){d[i]=t,d[i+1]=e,2===(i+=2)&&(r?r(g):b())};var a="undefined"!=typeof window?window:void 0,c=a||{},u=c.MutationObserver||c.WebKitMutationObserver,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var t=setTimeout;return function(){return t(g,1)}}var d=new Array(1e3);function g(){for(var t=0;t<i;t+=2)(0,d[t])(d[t+1]),d[t]=void 0,d[t+1]=void 0;i=0}var p,y,m,v,b=void 0;function w(t,e){var s=this,i=new this.constructor(S);void 0===i[F]&&R(i);var n=s._state;if(n){var r=arguments[n-1];o((function(){return j(n,i,r,s._result)}))}else P(s,i,t,e);return i}function T(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(S);return x(e,t),e}b=h?function(){return process.nextTick(g)}:u?(y=0,m=new u(g),v=document.createTextNode(""),m.observe(v,{characterData:!0}),function(){v.data=y=++y%2}):l?((p=new MessageChannel).port1.onmessage=g,function(){return p.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(n=t.runOnLoop||t.runOnContext)?function(){n(g)}:f()}catch(t){return f()}}():f();var F=Math.random().toString(36).substring(2);function S(){}var A=void 0;function _(e,s,i){s.constructor===e.constructor&&i===w&&s.constructor.resolve===T?function(t,e){1===e._state?E(t,e._result):2===e._state?k(t,e._result):P(e,void 0,(function(e){return x(t,e)}),(function(e){return k(t,e)}))}(e,s):void 0===i?E(e,s):t(i)?function(t,e,s){o((function(t){var i=!1,n=function(t,e,s,i){try{t.call(e,s,i)}catch(t){return t}}(s,e,(function(s){i||(i=!0,e!==s?x(t,s):E(t,s))}),(function(e){i||(i=!0,k(t,e))}),t._label);!i&&n&&(i=!0,k(t,n))}),t)}(e,s,i):E(e,s)}function x(t,e){if(t===e)k(t,new TypeError("You cannot resolve a promise with itself"));else if(n=typeof(i=e),null===i||"object"!==n&&"function"!==n)E(t,e);else{var s=void 0;try{s=e.then}catch(e){return void k(t,e)}_(t,e,s)}var i,n}function O(t){t._onerror&&t._onerror(t._result),C(t)}function E(t,e){t._state===A&&(t._result=e,t._state=1,0!==t._subscribers.length&&o(C,t))}function k(t,e){t._state===A&&(t._state=2,t._result=e,o(O,t))}function P(t,e,s,i){var n=t._subscribers,r=n.length;t._onerror=null,n[r]=e,n[r+1]=s,n[r+2]=i,0===r&&t._state&&o(C,t)}function C(t){var e=t._subscribers,s=t._state;if(0!==e.length){for(var i=void 0,n=void 0,r=t._result,o=0;o<e.length;o+=3)i=e[o],n=e[o+s],i?j(s,i,n,r):n(r);t._subscribers.length=0}}function j(e,s,i,n){var r=t(i),o=void 0,a=void 0,c=!0;if(r){try{o=i(n)}catch(t){c=!1,a=t}if(s===o)return void k(s,new TypeError("A promises callback cannot return that same promise."))}else o=n;s._state!==A||(r&&c?x(s,o):!1===c?k(s,a):1===e?E(s,o):2===e&&k(s,o))}var B=0;function R(t){t[F]=B++,t._state=void 0,t._result=void 0,t._subscribers=[]}var z=function(){function t(t,s){this._instanceConstructor=t,this.promise=new t(S),this.promise[F]||R(this.promise),e(s)?(this.length=s.length,this._remaining=s.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(s),0===this._remaining&&E(this.promise,this._result))):k(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===A&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var s=this._instanceConstructor,i=s.resolve;if(i===T){var n=void 0,r=void 0,o=!1;try{n=t.then}catch(t){o=!0,r=t}if(n===w&&t._state!==A)this._settledAt(t._state,e,t._result);else if("function"!=typeof n)this._remaining--,this._result[e]=t;else if(s===D){var a=new s(S);o?k(a,r):_(a,t,n),this._willSettleAt(a,e)}else this._willSettleAt(new s((function(e){return e(t)})),e)}else this._willSettleAt(i(t),e)},t.prototype._settledAt=function(t,e,s){var i=this.promise;i._state===A&&(this._remaining--,2===t?k(i,s):this._result[e]=s),0===this._remaining&&E(i,this._result)},t.prototype._willSettleAt=function(t,e){var s=this;P(t,void 0,(function(t){return s._settledAt(1,e,t)}),(function(t){return s._settledAt(2,e,t)}))},t}();var D=function(){function e(t){this[F]=B++,this._result=this._state=void 0,this._subscribers=[],S!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){x(t,e)}),(function(e){k(t,e)}))}catch(e){k(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var s=this,i=s.constructor;return t(e)?s.then((function(t){return i.resolve(e()).then((function(){return t}))}),(function(t){return i.resolve(e()).then((function(){throw t}))})):s.then(e,e)},e}();return D.prototype.then=w,D.all=function(t){return new z(this,t).promise},D.race=function(t){var s=this;return e(t)?new s((function(e,i){for(var n=t.length,r=0;r<n;r++)s.resolve(t[r]).then(e,i)})):new s((function(t,e){return e(new TypeError("You must pass an array to race."))}))},D.resolve=T,D.reject=function(t){var e=new this(S);return k(e,t),e},D._setScheduler=function(t){r=t},D._setAsap=function(t){o=t},D._asap=o,D.polyfill=function(){var t=void 0;if(void 0!==s.g)t=s.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===i&&!e.cast)return}t.Promise=D},D.Promise=D,D}()},4301:(t,e,s)=>{s(7147),t.exports=self.fetch.bind(self)},7147:(t,e,s)=>{"use strict";s.r(e),s.d(e,{Headers:()=>g,Request:()=>T,Response:()=>S,DOMException:()=>_,fetch:()=>x});var i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i&&i,n="URLSearchParams"in i,r="Symbol"in i&&"iterator"in Symbol,o="FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in i,c="ArrayBuffer"in i;if(c)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function g(t){this.map={},t instanceof g?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function y(t){return new Promise((function(e,s){t.onload=function(){e(t.result)},t.onerror=function(){s(t.error)}}))}function m(t){var e=new FileReader,s=y(e);return e.readAsArrayBuffer(t),s}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():c&&o&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(m)}),this.text=function(){var t,e,s,i=p(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,s=y(e=new FileReader),e.readAsText(t),s;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),s=new Array(e.length),i=0;i<e.length;i++)s[i]=String.fromCharCode(e[i]);return s.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(F)}),this.json=function(){return this.text().then(JSON.parse)},this}g.prototype.append=function(t,e){t=l(t),e=f(e);var s=this.map[t];this.map[t]=s?s+", "+e:e},g.prototype.delete=function(t){delete this.map[l(t)]},g.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},g.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},g.prototype.set=function(t,e){this.map[l(t)]=f(e)},g.prototype.forEach=function(t,e){for(var s in this.map)this.map.hasOwnProperty(s)&&t.call(e,this.map[s],s,this)},g.prototype.keys=function(){var t=[];return this.forEach((function(e,s){t.push(s)})),d(t)},g.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},g.prototype.entries=function(){var t=[];return this.forEach((function(e,s){t.push([s,e])})),d(t)},r&&(g.prototype[Symbol.iterator]=g.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var s,i,n=(e=e||{}).body;if(t instanceof T){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new g(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new g(e.headers)),this.method=(i=(s=e.method||this.method||"GET").toUpperCase(),w.indexOf(i)>-1?i:s),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function F(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var s=t.split("="),i=s.shift().replace(/\+/g," "),n=s.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(n))}})),e}function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new g(e.headers),this.url=e.url||"",this._initBody(t)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})},b.call(T.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},S.error=function(){var t=new S(null,{status:0,statusText:""});return t.type="error",t};var A=[301,302,303,307,308];S.redirect=function(t,e){if(-1===A.indexOf(e))throw new RangeError("Invalid status code");return new S(null,{status:e,headers:{location:t}})};var _=i.DOMException;try{new _}catch(t){(_=function(t,e){this.message=t,this.name=e;var s=Error(t);this.stack=s.stack}).prototype=Object.create(Error.prototype),_.prototype.constructor=_}function x(t,e){return new Promise((function(s,n){var r=new T(t,e);if(r.signal&&r.signal.aborted)return n(new _("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,i={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new g,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var s=t.split(":"),i=s.shift().trim();if(i){var n=s.join(":").trim();e.append(i,n)}})),e)};i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;setTimeout((function(){s(new S(n,i))}),0)},a.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){n(new _("Aborted","AbortError"))}),0)},a.open(r.method,function(t){try{return""===t&&i.location.href?i.location.href:t}catch(e){return t}}(r.url),!0),"include"===r.credentials?a.withCredentials=!0:"omit"===r.credentials&&(a.withCredentials=!1),"responseType"in a&&(o?a.responseType="blob":c&&r.headers.get("Content-Type")&&-1!==r.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof g?r.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,f(e.headers[t]))})),r.signal&&(r.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&r.signal.removeEventListener("abort",u)}),a.send(void 0===r._bodyInit?null:r._bodyInit)}))}x.polyfill=!0,i.fetch||(i.fetch=x,i.Headers=g,i.Request=T,i.Response=S)}},e={};function s(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,s),r.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";s.d(i,{default:()=>r});var t=s(9581),e=s(727),n=s.n(e);const r=function(){var e=document.body.dataset.addSearchApiKey;if(!e)return console.log("No AddSearch API key provided, skipping search suggestions."),[];var s=new(n())(e);return[(0,t.A)("meganav-search-input"),(0,t.A)("meganav-mobile-search-input")].filter((function(t){return t})).map((function(e){var i=e.parentNode,n=(0,t.A)("meganav-search-autocomplete-container",i),r=(0,t.A)("meganav-search-autocomplete-list",i),o=(0,t.A)("meganav-search-input-clear",i);return function(t){var e=t.input,s=t.container,i=t.listContainer,n=t.clear,r=t.client;r.setAnalyticsTag("Meganav autocomplete"),r.setThrottleTime(400);var o,a=function(){s.classList.add("hidden"),i.innerHTML=""},c=function(t){(t||"").length>0&&n?n.classList.remove("invisible"):n&&n.classList.add("invisible")},u=function(t,e){return t.value.replace(e.toLowerCase(),'<span class="font-light">'.concat(e,"</span>"))},h=function(t){return window.location="/search?q=".concat(t)},l=function(t){var e=i.querySelector('[data-suggestion-index="'.concat(t+1,'"]'));e&&e.focus()},f=function(t){var e=t-1,s=i.querySelector('[data-suggestion-index="'.concat(e,'"]'));s&&s.focus()},d=function(t){var n=t.target.value;"ArrowDown"!==t.key?n?r.suggestions(n,function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suggestions:[]};if(c(t),0!==n.suggestions.length){var r=n.suggestions.map((function(s,i){var n=document.createElement("li"),r=document.createElement("button");return r.classList.add("ui-text-menu2","font-medium","p-8","w-full","text-left","rounded","hover:text-gui-hover","focus:outline-gui-focus","hover:bg-light-grey"),r.innerHTML=u(s,t),r.dataset.suggestionIndex=i,r.addEventListener("click",(function(){h(s)})),r.addEventListener("keydown",(function(t){var n=t.key;"ArrowDown"===n?l():"ArrowUp"===n&&i-1<0?e.focus():"ArrowUp"===n&&i-1>=0?f():"Enter"!==n&&"Space"!==n||h(s)})),n.appendChild(r),n}));i.innerHTML="",r.forEach((function(t){return i.appendChild(t)})),s.classList.remove("hidden")}else a()}}(n)):a():l(0)};return n&&(o=function(){e.value="",n.classList.add("invisible"),a()},n.addEventListener("click",o)),e.addEventListener("keyup",d),{teardown:function(){e.removeEventListener("keyup",d),n&&n.removeEventListener("click",o)},clear:function(){e.value="",a()}}}({input:e,container:n,listContainer:r,client:s,clear:o})}))}})(),i.default})()}));
@@ -1,18 +1,18 @@
1
1
  <p class="ui-text-overline2 text-cool-black py-12">Popular pages</p>
2
2
 
3
- <div class="flex justify-between items-center overflow-x-scroll">
3
+ <div class="flex justify-between items-center overflow-x-scroll md:overflow-auto">
4
4
  <ul class="flex">
5
5
  <li class="py-12 pr-8 flex-shrink-0">
6
- <%= link_to 'How does Ably work?', abs_url("/docs/how-ably-works"), class: "ui-text-p2 ui-link" %>
6
+ <%= link_to 'How does Ably work?', abs_url("/docs/how-ably-works"), class: "ui-text-p2" %>
7
7
  </li>
8
8
  <li class="py-12 px-8 flex-shrink-0">
9
- <%= link_to 'Quickstart guide', abs_url("/docs/quick-start-guide"), class: "ui-text-p2 ui-link" %>
9
+ <%= link_to 'Quickstart guide', abs_url("/docs/quick-start-guide"), class: "ui-text-p2" %>
10
10
  </li>
11
11
  <li class="py-12 px-8 flex-shrink-0">
12
- <%= link_to 'Publish/Subscribe Messaging', abs_url("/docs/core-features/pubsub"), class: "ui-text-p2 ui-link" %>
12
+ <%= link_to 'Publish/Subscribe Messaging', abs_url("/docs/core-features/pubsub"), class: "ui-text-p2" %>
13
13
  </li>
14
14
  <li class="py-12 pl-8 flex-shrink-0">
15
- <%= link_to 'Platform', abs_url("/docs/how-ably-works"), class: "ui-text-p2 ui-link" %>
15
+ <%= link_to 'Platform', abs_url("/docs/how-ably-works"), class: "ui-text-p2" %>
16
16
  </li>
17
17
  </ul>
18
18
 
@@ -1,3 +1,3 @@
1
1
  module AblyUi
2
- VERSION = '7.10.0.dev.e5f4e78'
2
+ VERSION = '7.10.0.dev.e980a00'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.10.0.dev.e5f4e78
4
+ version: 7.10.0.dev.e980a00
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Piatek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-07-29 00:00:00.000000000 Z
13
+ date: 2022-08-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: view_component