@omnic/widget-locations 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/components/AsyncSelect/AsyncSelect.d.ts +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/lib/components/DeliveryDetailsView/DeliveryDetailsView.utils.d.ts +1 -1
- package/dist/lib/components/Radio/Radio.d.ts +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/lib/services/points.d.ts +1 -1
- package/dist/lib/widget.cjs.js +23 -23
- package/dist/lib/widget.esm.js +2438 -2438
- package/package.json +13 -12
- package/dist/lib/components/LocationSelector/SelfPickupSelectorContainer.d.ts +0 -9
package/dist/lib/widget.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),u=require("react"),dr=require("react-dom"),$i=require("react-dom/server");function ou(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ce=ou(u),su=ou(dr);function Mo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xd=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Qd=Xd;const mn=Mo(Qd);let vi;const eh=new Uint8Array(16);function th(){if(!vi&&(vi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vi(eh)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function nh(t,e=0){return it[t[e+0]]+it[t[e+1]]+it[t[e+2]]+it[t[e+3]]+"-"+it[t[e+4]]+it[t[e+5]]+"-"+it[t[e+6]]+it[t[e+7]]+"-"+it[t[e+8]]+it[t[e+9]]+"-"+it[t[e+10]]+it[t[e+11]]+it[t[e+12]]+it[t[e+13]]+it[t[e+14]]+it[t[e+15]]}const rh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),u=require("react"),dr=require("react-dom"),$i=require("react-dom/server");function ou(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ce=ou(u),su=ou(dr);function Mo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xd=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Qd=Xd;const mn=Mo(Qd);let vi;const eh=new Uint8Array(16);function th(){if(!vi&&(vi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vi(eh)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function nh(t,e=0){return it[t[e+0]]+it[t[e+1]]+it[t[e+2]]+it[t[e+3]]+"-"+it[t[e+4]]+it[t[e+5]]+"-"+it[t[e+6]]+it[t[e+7]]+"-"+it[t[e+8]]+it[t[e+9]]+"-"+it[t[e+10]]+it[t[e+11]]+it[t[e+12]]+it[t[e+13]]+it[t[e+14]]+it[t[e+15]]}const rh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ba={randomUUID:rh};function au(t,e,n){if(Ba.randomUUID&&!e&&!t)return Ba.randomUUID();t=t||{};const r=t.random||(t.rng||th)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return nh(r)}const bs=au(),lo=au(),Xt=[48,66],Yn=[58,80],oa=6,co=[49.3478969,14.0983344],lu="en",ih=["places","geocoding"],Mn={logo:"default",locale:lu,map:{provider:"google",center:co,initialZoom:oa}},cu=u.createContext(Mn),st=()=>u.useContext(cu);var Kt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(Kt||{}),Dt=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(Dt||{}),It=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(It||{}),oh={VITE_API_BASE_URL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/",VITE_GEO_API_BASE_URL:"https://api.geo-data.omnic.solutions/api/1.0/",VITE_YMAP_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ua=t=>{let e;const n=new Set,r=(l,c)=>{const f=typeof l=="function"?l(e):l;if(!Object.is(f,e)){const d=e;e=c??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(h=>h(e,d))}},i=()=>e,a={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(oh?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return e=t(r,i,a),a},sh=t=>t?Ua(t):Ua;var uu={exports:{}},fu={},du={exports:{}},hu={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.min.js
|
|
4
4
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ko=u,mh=vh;function yh(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var bh=typeof Object.is=="function"?Object.is:yh,wh=mh.useSyncExternalStore,Sh=ko.useRef,Lh=ko.useEffect,Eh=ko.useMemo,xh=ko.useDebugValue;fu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Sh(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Eh(function(){function l(v){if(!c){if(c=!0,f=v,v=r(v),i!==void 0&&s.hasValue){var y=s.value;if(i(y,v))return d=y}return d=v}if(y=d,bh(f,v))return y;var p=r(v);return i!==void 0&&i(y,p)?y:(f=v,d=p)}var c=!1,f,d,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=wh(t,o[0],o[1]);return Lh(function(){s.hasValue=!0,s.value=a},[a]),xh(a),a};uu.exports=fu;var Ch=uu.exports;const _h=Mo(Ch);var pu={VITE_API_BASE_URL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/",VITE_GEO_API_BASE_URL:"https://api.geo-data.omnic.solutions/api/1.0/",VITE_YMAP_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwi2dimy3domrsnezham3ugbvw24tfm5vwk3bqgntxa",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Oh}=u,{useSyncExternalStoreWithSelector:Mh}=_h;let Fa=!1;function kh(t,e=t.getState,n){(pu?"production":void 0)!=="production"&&n&&!Fa&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Fa=!0);const r=Mh(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return Oh(r),r}const za=t=>{(pu?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?sh(t):t,n=(r,i)=>kh(e,r,i);return Object.assign(n,e),n},bn=t=>t?za(t):za,Ph={location:null},Po=t=>t.location,We=bn()(t=>({...Ph,setDeliverPoint(e){t({location:e})}})),Rh={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},gu=t=>t.map,Th=t=>t.mode,Ah=t=>t.bounds,Dh=t=>t.blurred,Ih=t=>t.loaded,jh=t=>t.loading,aa=t=>t.detailsOpen,ye=bn()(t=>({...Rh,setLoaded(){t({loaded:!0,loading:!1})},setMode(e){t({mode:e})},setBounds(e){t({bounds:e})},setDetailsOpen(e){t({detailsOpen:e})},setBlurred(e){t({blurred:e})},setMap(e){t({map:e})}})),Nh={location:null},Bh=t=>t.location,bt=bn()(t=>({...Nh,setSelectedLocation(e){t({location:e})}})),Uh={query:"",type:Kt.All,hours:["08:00","22:00"],send:{[It.Return]:!1,[It.Payment]:!1,[It.Shipping]:!1},receive:{[Dt.PayByCash]:!1,[Dt.CheckOrder]:!1,[Dt.DressingRoom]:!1}},Vh=t=>t.type,Fh=t=>t.send,zh=t=>t.receive,Qt=bn(t=>({...Uh,setFilter(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(e)}})),$h=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Hh=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},Gh=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function vu(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zh}=Object.prototype,{getPrototypeOf:la}=Object,Ro=(t=>e=>{const n=Zh.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=t=>(t=t.toLowerCase(),e=>Ro(e)===t),To=t=>e=>typeof e===t,{isArray:hr}=Array,ti=To("undefined");function Wh(t){return t!==null&&!ti(t)&&t.constructor!==null&&!ti(t.constructor)&&_t(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const mu=Ht("ArrayBuffer");function qh(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&mu(t.buffer),e}const Kh=To("string"),_t=To("function"),yu=To("number"),Ao=t=>t!==null&&typeof t=="object",Jh=t=>t===!0||t===!1,Hi=t=>{if(Ro(t)!=="object")return!1;const e=la(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Yh=Ht("Date"),Xh=Ht("File"),Qh=Ht("Blob"),ep=Ht("FileList"),tp=t=>Ao(t)&&_t(t.pipe),np=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_t(t.append)&&((e=Ro(t))==="formdata"||e==="object"&&_t(t.toString)&&t.toString()==="[object FormData]"))},rp=Ht("URLSearchParams"),ip=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function li(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),hr(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function bu(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const wu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Su=t=>!ti(t)&&t!==wu;function Ss(){const{caseless:t}=Su(this)&&this||{},e={},n=(r,i)=>{const o=t&&bu(e,i)||i;Hi(e[o])&&Hi(r)?e[o]=Ss(e[o],r):Hi(r)?e[o]=Ss({},r):hr(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&li(arguments[r],n);return e}const op=(t,e,n,{allOwnKeys:r}={})=>(li(e,(i,o)=>{n&&_t(i)?t[o]=vu(i,n):t[o]=i},{allOwnKeys:r}),t),sp=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ap=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},lp=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&la(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},cp=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},up=t=>{if(!t)return null;if(hr(t))return t;let e=t.length;if(!yu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},fp=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&la(Uint8Array)),dp=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},hp=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},pp=Ht("HTMLFormElement"),gp=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),$a=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),vp=Ht("RegExp"),Lu=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};li(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},mp=t=>{Lu(t,(e,n)=>{if(_t(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(_t(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yp=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return hr(t)?r(t):r(String(t).split(e)),n},bp=()=>{},wp=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Zo="abcdefghijklmnopqrstuvwxyz",Ha="0123456789",Eu={DIGIT:Ha,ALPHA:Zo,ALPHA_DIGIT:Zo+Zo.toUpperCase()+Ha},Sp=(t=16,e=Eu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Lp(t){return!!(t&&_t(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Ep=t=>{const e=new Array(10),n=(r,i)=>{if(Ao(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=hr(r)?[]:{};return li(r,(s,a)=>{const l=n(s,i+1);!ti(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},xp=Ht("AsyncFunction"),Cp=t=>t&&(Ao(t)||_t(t))&&_t(t.then)&&_t(t.catch),B={isArray:hr,isArrayBuffer:mu,isBuffer:Wh,isFormData:np,isArrayBufferView:qh,isString:Kh,isNumber:yu,isBoolean:Jh,isObject:Ao,isPlainObject:Hi,isUndefined:ti,isDate:Yh,isFile:Xh,isBlob:Qh,isRegExp:vp,isFunction:_t,isStream:tp,isURLSearchParams:rp,isTypedArray:fp,isFileList:ep,forEach:li,merge:Ss,extend:op,trim:ip,stripBOM:sp,inherits:ap,toFlatObject:lp,kindOf:Ro,kindOfTest:Ht,endsWith:cp,toArray:up,forEachEntry:dp,matchAll:hp,isHTMLForm:pp,hasOwnProperty:$a,hasOwnProp:$a,reduceDescriptors:Lu,freezeMethods:mp,toObjectSet:yp,toCamelCase:gp,noop:bp,toFiniteNumber:wp,findKey:bu,global:wu,isContextDefined:Su,ALPHABET:Eu,generateString:Sp,isSpecCompliantForm:Lp,toJSONObject:Ep,isAsyncFn:xp,isThenable:Cp};function Se(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}B.inherits(Se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xu=Se.prototype,Cu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Cu[t]={value:t}});Object.defineProperties(Se,Cu);Object.defineProperty(xu,"isAxiosError",{value:!0});Se.from=(t,e,n,r,i,o)=>{const s=Object.create(xu);return B.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Se.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const _p=null;function Ls(t){return B.isPlainObject(t)||B.isArray(t)}function _u(t){return B.endsWith(t,"[]")?t.slice(0,-2):t}function Ga(t,e,n){return t?t.concat(e).map(function(i,o){return i=_u(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Op(t){return B.isArray(t)&&!t.some(Ls)}const Mp=B.toFlatObject(B,{},null,function(e){return/^is[A-Z]/.test(e)});function Do(t,e,n){if(!B.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=B.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,L){return!B.isUndefined(L[p])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(e);if(!B.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(B.isDate(y))return y.toISOString();if(!l&&B.isBlob(y))throw new Se("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(y)||B.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,p,L){let w=y;if(y&&!L&&typeof y=="object"){if(B.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(B.isArray(y)&&Op(y)||(B.isFileList(y)||B.endsWith(p,"[]"))&&(w=B.toArray(y)))return p=_u(p),w.forEach(function(b,_){!(B.isUndefined(b)||b===null)&&e.append(s===!0?Ga([p],_,o):s===null?p:p+"[]",c(b))}),!1}return Ls(y)?!0:(e.append(Ga(L,p,o),c(y)),!1)}const d=[],h=Object.assign(Mp,{defaultVisitor:f,convertValue:c,isVisitable:Ls});function v(y,p){if(!B.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(y),B.forEach(y,function(w,m){(!(B.isUndefined(w)||w===null)&&i.call(e,w,B.isString(m)?m.trim():m,p,h))===!0&&v(w,p?p.concat(m):[m])}),d.pop()}}if(!B.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Za(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ca(t,e){this._pairs=[],t&&Do(t,this,e)}const Ou=ca.prototype;Ou.append=function(e,n){this._pairs.push([e,n])};Ou.toString=function(e){const n=e?function(r){return e.call(this,r,Za)}:Za;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function kp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mu(t,e,n){if(!e)return t;const r=n&&n.encode||kp,i=n&&n.serialize;let o;if(i?o=i(e,n):o=B.isURLSearchParams(e)?e.toString():new ca(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Pp{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Wa=Pp,ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rp=typeof URLSearchParams<"u"?URLSearchParams:ca,Tp=typeof FormData<"u"?FormData:null,Ap=typeof Blob<"u"?Blob:null,Dp={isBrowser:!0,classes:{URLSearchParams:Rp,FormData:Tp,Blob:Ap},protocols:["http","https","file","blob","url","data"]},Pu=typeof window<"u"&&typeof document<"u",Ip=(t=>Pu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),jp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Np=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:Ip,hasStandardBrowserWebWorkerEnv:jp},Symbol.toStringTag,{value:"Module"})),Vt={...Np,...Dp};function Bp(t,e){return Do(t,new Vt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Vt.isNode&&B.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Up(t){return B.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Vp(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Ru(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&B.isArray(i)?i.length:s,l?(B.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!B.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&B.isArray(i[s])&&(i[s]=Vp(i[s])),!a)}if(B.isFormData(t)&&B.isFunction(t.entries)){const n={};return B.forEachEntry(t,(r,i)=>{e(Up(r),i,n,0)}),n}return null}function Fp(t,e,n){if(B.isString(t))try{return(e||JSON.parse)(t),B.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ua={transitional:ku,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=B.isObject(e);if(o&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return i&&i?JSON.stringify(Ru(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Bp(e,this.formSerializer).toString();if((a=B.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Do(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Fp(e)):e}],transformResponse:[function(e){const n=this.transitional||ua.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&B.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Se.from(a,Se.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],t=>{ua.headers[t]={}});const fa=ua,zp=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$p=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
18
|
-
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&zp[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},
|
|
19
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[
|
|
20
|
-
`+o.map(
|
|
21
|
-
`):" "+Ja(o[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Es};function Ko(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ci(null,t)}function Ya(t){return Ko(t),t.headers=en.from(t.headers),t.data=qo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Du.getAdapter(t.adapter||fa.adapter)(t).then(function(r){return Ko(t),r.data=qo.call(t,t.transformResponse,r),r.headers=en.from(r.headers),r},function(r){return Tu(r)||(Ko(t),r&&r.response&&(r.response.data=qo.call(t,t.transformResponse,r.response),r.response.headers=en.from(r.response.headers))),Promise.reject(r)})}const Xa=t=>t instanceof en?t.toJSON():t;function or(t,e){e=e||{};const n={};function r(c,f,d){return B.isPlainObject(c)&&B.isPlainObject(f)?B.merge.call({caseless:d},c,f):B.isPlainObject(f)?B.merge({},f):B.isArray(f)?f.slice():f}function i(c,f,d){if(B.isUndefined(f)){if(!B.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function o(c,f){if(!B.isUndefined(f))return r(void 0,f)}function s(c,f){if(B.isUndefined(f)){if(!B.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,d){if(d in e)return r(c,f);if(d in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,f)=>i(Xa(c),Xa(f),!0)};return B.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,h=d(t[f],e[f],f);B.isUndefined(h)&&d!==a||(n[f]=h)}),n}const Iu="1.6.2",da={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{da[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Qa={};da.transitional=function(e,n,r){function i(o,s){return"[Axios v"+Iu+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Se(i(s," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!Qa[s]&&(Qa[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function ig(t,e,n){if(typeof t!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Se("option "+o+" must be "+l,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+o,Se.ERR_BAD_OPTION)}}const xs={assertOptions:ig,validators:da},on=xs.validators;class uo{constructor(e){this.defaults=e,this.interceptors={request:new Wa,response:new Wa}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=or(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&xs.assertOptions(r,{silentJSONParsing:on.transitional(on.boolean),forcedJSONParsing:on.transitional(on.boolean),clarifyTimeoutError:on.transitional(on.boolean)},!1),i!=null&&(B.isFunction(i)?n.paramsSerializer={serialize:i}:xs.assertOptions(i,{encode:on.function,serialize:on.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&B.merge(o.common,o[n.method]);o&&B.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=en.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let f,d=0,h;if(!l){const y=[Ya.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),h=y.length,f=Promise.resolve(n);d<h;)f=f.then(y[d++],y[d++]);return f}h=a.length;let v=n;for(d=0;d<h;){const y=a[d++],p=a[d++];try{v=y(v)}catch(L){p.call(this,L);break}}try{f=Ya.call(this,v)}catch(y){return Promise.reject(y)}for(d=0,h=c.length;d<h;)f=f.then(c[d++],c[d++]);return f}getUri(e){e=or(this.defaults,e);const n=Au(e.baseURL,e.url);return Mu(n,e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],function(e){uo.prototype[e]=function(n,r){return this.request(or(r||{},{method:e,url:n,data:(r||{}).data}))}});B.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(or(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}uo.prototype[e]=n(),uo.prototype[e+"Form"]=n(!0)});const Zi=uo;class ha{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new ci(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ha(function(i){e=i}),cancel:e}}}const og=ha;function sg(t){return function(n){return t.apply(null,n)}}function ag(t){return B.isObject(t)&&t.isAxiosError===!0}const Cs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Cs).forEach(([t,e])=>{Cs[e]=t});const lg=Cs;function ju(t){const e=new Zi(t),n=vu(Zi.prototype.request,e);return B.extend(n,Zi.prototype,e,{allOwnKeys:!0}),B.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return ju(or(t,i))},n}const Je=ju(fa);Je.Axios=Zi;Je.CanceledError=ci;Je.CancelToken=og;Je.isCancel=Tu;Je.VERSION=Iu;Je.toFormData=Do;Je.AxiosError=Se;Je.Cancel=Je.CanceledError;Je.all=function(e){return Promise.all(e)};Je.spread=sg;Je.isAxiosError=ag;Je.mergeConfig=or;Je.AxiosHeaders=en;Je.formToJSON=t=>Ru(B.isHTMLForm(t)?new FormData(t):t);Je.getAdapter=Du.getAdapter;Je.HttpStatusCode=lg;Je.default=Je;const cg=Je,ni=cg.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),ug=512,fg={[Dt.CheckOrder]:["is_check_order","is_delivery"],[Dt.DressingRoom]:["is_dressing_room","is_delivery"],[Dt.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},dg={[It.Return]:["is_pickup"],[It.Shipping]:["is_pickup"],[It.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*_s({q:t,filter:e,bounds:n}={},{controller:r}={}){const i={status:30,page_size:ug};if(t&&(i.q=t),e!=null&&e.type&&(i.type=e.type),e!=null&&e.receive)for(const[l,c]of Object.entries(e==null?void 0:e.receive)){if(!c)continue;const f=fg[l];for(const d of f)i[d]=!0}if(e!=null&&e.send)for(const[l,c]of Object.entries(e==null?void 0:e.send)){if(!c)continue;const f=dg[l];for(const d of f)i[d]=!0}n&&(i.start_latitude=n[0][0],i.end_latitude=n[0][1],i.start_longitude=n[1][0],i.end_longitude=n[1][1]);let o=await ni.get("/locations/points",{params:i,signal:r==null?void 0:r.signal}),s=o.data.data.num_pages,a=o.data.data.current_page;for(;a<s;){yield o,i.page=a+1;const l=await ni.get("/locations/points",{params:i,signal:r==null?void 0:r.signal});o.data.data.results=[...o.data.data.results,...l.data.data.results],o=l,a=l.data.data.current_page,s=l.data.data.num_pages}return yield o,o}const el=[],Os=(t,e,n)=>{var i;const r=new AbortController;return t&&((i=el.pop())==null||i.abort()),el.push(r),async o=>{const s={controller:r};if(!n){const l=await _s({filter:e},s).next();o(l.value.data);return}for await(const a of _s({filter:e,bounds:n},s))o(a.data)}},Nu=":root",jo=(t,e)=>{var n;(n=document.querySelector(Nu))==null||n.style.setProperty(t,e)},Ms=t=>{t.stopImmediatePropagation()};var Bu={},Uu={exports:{}};(function(t){var e=function(n){var r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(D,R,A){D[R]=A.value},s,a=typeof Symbol=="function"?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function d(D,R,A){return Object.defineProperty(D,R,{value:A,enumerable:!0,configurable:!0,writable:!0}),D[R]}try{d({},"")}catch{d=function(R,A,T){return R[A]=T}}function h(D,R,A,T){var N=R&&R.prototype instanceof b?R:b,V=Object.create(N.prototype),W=new G(T||[]);return o(V,"_invoke",{value:k(D,A,W)}),V}n.wrap=h;function v(D,R,A){try{return{type:"normal",arg:D.call(R,A)}}catch(T){return{type:"throw",arg:T}}}var y="suspendedStart",p="suspendedYield",L="executing",w="completed",m={};function b(){}function _(){}function E(){}var g={};d(g,l,function(){return this});var S=Object.getPrototypeOf,C=S&&S(S(z([])));C&&C!==r&&i.call(C,l)&&(g=C);var P=E.prototype=b.prototype=Object.create(g);_.prototype=E,o(P,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:_,configurable:!0}),_.displayName=d(E,f,"GeneratorFunction");function M(D){["next","throw","return"].forEach(function(R){d(D,R,function(A){return this._invoke(R,A)})})}n.isGeneratorFunction=function(D){var R=typeof D=="function"&&D.constructor;return R?R===_||(R.displayName||R.name)==="GeneratorFunction":!1},n.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,E):(D.__proto__=E,d(D,f,"GeneratorFunction")),D.prototype=Object.create(P),D},n.awrap=function(D){return{__await:D}};function O(D,R){function A(V,W,I,K){var ee=v(D[V],D,W);if(ee.type==="throw")K(ee.arg);else{var q=ee.arg,se=q.value;return se&&typeof se=="object"&&i.call(se,"__await")?R.resolve(se.__await).then(function(de){A("next",de,I,K)},function(de){A("throw",de,I,K)}):R.resolve(se).then(function(de){q.value=de,I(q)},function(de){return A("throw",de,I,K)})}}var T;function N(V,W){function I(){return new R(function(K,ee){A(V,W,K,ee)})}return T=T?T.then(I,I):I()}o(this,"_invoke",{value:N})}M(O.prototype),d(O.prototype,c,function(){return this}),n.AsyncIterator=O,n.async=function(D,R,A,T,N){N===void 0&&(N=Promise);var V=new O(h(D,R,A,T),N);return n.isGeneratorFunction(R)?V:V.next().then(function(W){return W.done?W.value:V.next()})};function k(D,R,A){var T=y;return function(V,W){if(T===L)throw new Error("Generator is already running");if(T===w){if(V==="throw")throw W;return Z()}for(A.method=V,A.arg=W;;){var I=A.delegate;if(I){var K=j(I,A);if(K){if(K===m)continue;return K}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(T===y)throw T=w,A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);T=L;var ee=v(D,R,A);if(ee.type==="normal"){if(T=A.done?w:p,ee.arg===m)continue;return{value:ee.arg,done:A.done}}else ee.type==="throw"&&(T=w,A.method="throw",A.arg=ee.arg)}}}function j(D,R){var A=R.method,T=D.iterator[A];if(T===s)return R.delegate=null,A==="throw"&&D.iterator.return&&(R.method="return",R.arg=s,j(D,R),R.method==="throw")||A!=="return"&&(R.method="throw",R.arg=new TypeError("The iterator does not provide a '"+A+"' method")),m;var N=v(T,D.iterator,R.arg);if(N.type==="throw")return R.method="throw",R.arg=N.arg,R.delegate=null,m;var V=N.arg;if(!V)return R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,m;if(V.done)R[D.resultName]=V.value,R.next=D.nextLoc,R.method!=="return"&&(R.method="next",R.arg=s);else return V;return R.delegate=null,m}M(P),d(P,f,"Generator"),d(P,l,function(){return this}),d(P,"toString",function(){return"[object Generator]"});function U(D){var R={tryLoc:D[0]};1 in D&&(R.catchLoc=D[1]),2 in D&&(R.finallyLoc=D[2],R.afterLoc=D[3]),this.tryEntries.push(R)}function $(D){var R=D.completion||{};R.type="normal",delete R.arg,D.completion=R}function G(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(U,this),this.reset(!0)}n.keys=function(D){var R=Object(D),A=[];for(var T in R)A.push(T);return A.reverse(),function N(){for(;A.length;){var V=A.pop();if(V in R)return N.value=V,N.done=!1,N}return N.done=!0,N}};function z(D){if(D){var R=D[l];if(R)return R.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var A=-1,T=function N(){for(;++A<D.length;)if(i.call(D,A))return N.value=D[A],N.done=!1,N;return N.value=s,N.done=!0,N};return T.next=T}}return{next:Z}}n.values=z;function Z(){return{value:s,done:!0}}return G.prototype={constructor:G,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach($),!D)for(var R in this)R.charAt(0)==="t"&&i.call(this,R)&&!isNaN(+R.slice(1))&&(this[R]=s)},stop:function(){this.done=!0;var D=this.tryEntries[0],R=D.completion;if(R.type==="throw")throw R.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var R=this;function A(K,ee){return V.type="throw",V.arg=D,R.next=K,ee&&(R.method="next",R.arg=s),!!ee}for(var T=this.tryEntries.length-1;T>=0;--T){var N=this.tryEntries[T],V=N.completion;if(N.tryLoc==="root")return A("end");if(N.tryLoc<=this.prev){var W=i.call(N,"catchLoc"),I=i.call(N,"finallyLoc");if(W&&I){if(this.prev<N.catchLoc)return A(N.catchLoc,!0);if(this.prev<N.finallyLoc)return A(N.finallyLoc)}else if(W){if(this.prev<N.catchLoc)return A(N.catchLoc,!0)}else if(I){if(this.prev<N.finallyLoc)return A(N.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(D,R){for(var A=this.tryEntries.length-1;A>=0;--A){var T=this.tryEntries[A];if(T.tryLoc<=this.prev&&i.call(T,"finallyLoc")&&this.prev<T.finallyLoc){var N=T;break}}N&&(D==="break"||D==="continue")&&N.tryLoc<=R&&R<=N.finallyLoc&&(N=null);var V=N?N.completion:{};return V.type=D,V.arg=R,N?(this.method="next",this.next=N.finallyLoc,m):this.complete(V)},complete:function(D,R){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&R&&(this.next=R),m},finish:function(D){for(var R=this.tryEntries.length-1;R>=0;--R){var A=this.tryEntries[R];if(A.finallyLoc===D)return this.complete(A.completion,A.afterLoc),$(A),m}},catch:function(D){for(var R=this.tryEntries.length-1;R>=0;--R){var A=this.tryEntries[R];if(A.tryLoc===D){var T=A.completion;if(T.type==="throw"){var N=T.arg;$(A)}return N}}throw new Error("illegal catch attempt")},delegateYield:function(D,R,A){return this.delegate={iterator:z(D),resultName:R,nextLoc:A},this.method==="next"&&(this.arg=s),m}},n}(t.exports);try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})(Uu);var hg=Uu.exports;(function(t){var e=hg;function n(y,p,L,w,m,b,_){try{var E=y[b](_),g=E.value}catch(S){return void L(S)}E.done?p(g):Promise.resolve(g).then(w,m)}function r(y){return function(){var p=this,L=arguments;return new Promise(function(w,m){var b=y.apply(p,L);function _(g){n(b,w,m,_,E,"next",g)}function E(g){n(b,w,m,_,E,"throw",g)}_(void 0)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=!1,o=null,s="en",a=null,l=null,c="https://maps.googleapis.com/maps/api/geocode/json";function f(y){var p=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i&&(p?console.warn(y):console.log(y))}function d(y){return h.apply(this,arguments)}function h(){return(h=r(e.mark(function y(p){var L,w;return e.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,fetch(p).catch(function(){return Promise.reject(new Error("Error fetching data"))});case 2:return L=m.sent,m.next=5,L.json().catch(function(){return f("Error parsing server response"),Promise.reject(new Error("Error parsing server response"))});case 5:if((w=m.sent).status!=="OK"){m.next=9;break}return f(w),m.abrupt("return",w);case 9:return f("".concat(w.error_message,`.
|
|
22
|
-
Server returned status code `).concat(w.status),!0),
|
|
23
|
-
Server returned status code `).concat(w.status))));case 11:case"end":return m.stop()}},y)}))).apply(this,arguments)}var v={setApiKey:function(y){o=y},setLanguage:function(y){s=y},setRegion:function(y){a=y},setLocationType:function(y){l=y},enableDebug:function(){var y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];i=y},fromLatLng:function(y,p,L,w,m,b){return r(e.mark(function _(){var E,g;return e.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(y&&p){S.next=3;break}return f("Provided coordinates are invalid",!0),S.abrupt("return",Promise.reject(new Error("Provided coordinates are invalid")));case 3:return E="".concat(y,",").concat(p),g="".concat(c,"?latlng=").concat(encodeURIComponent(E)),(L||o)&&(g+="&key=".concat(o=L||o)),(w||s)&&(g+="&language=".concat(s=w||s)),(m||a)&&(a=m||a,g+="®ion=".concat(encodeURIComponent(a))),(b||l)&&(l=b||l,g+="&location_type=".concat(encodeURIComponent(l))),S.abrupt("return",d(g));case 9:case"end":return S.stop()}},_)}))()},fromAddress:function(y,p,L,w){return r(e.mark(function m(){var b;return e.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(y){_.next=3;break}return f("Provided address is invalid",!0),_.abrupt("return",Promise.reject(new Error("Provided address is invalid")));case 3:return b="".concat(c,"?address=").concat(encodeURIComponent(y)),(p||o)&&(b+="&key=".concat(o=p||o)),(L||s)&&(b+="&language=".concat(s=L||s)),(w||a)&&(a=w||a,b+="®ion=".concat(encodeURIComponent(a))),_.abrupt("return",d(b));case 8:case"end":return _.stop()}},m)}))()}};t.default=v})(Bu);const fo=Mo(Bu),sr=async(t,e="ROOFTOP")=>{var i;fo.setLocationType(e);const n=await fo.fromLatLng(t[0].toString(),t[1].toString()),r=(i=n.results)==null?void 0:i.map(o=>{var l,c;const s=(l=o.geometry)==null?void 0:l.viewport,a=(c=o.geometry)==null?void 0:c.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(s.southwest,s.northeast),location:new google.maps.LatLng(a)}}});return{...n,results:r}},pa=(t,e)=>{if(!navigator.geolocation){e==null||e(new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t,e,{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},Vu=t=>t.status===200,ga=t=>{const e=document.querySelector(Nu);return e?getComputedStyle(e).getPropertyValue(t):null},Jt=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},xt=(t,e)=>t.replaceAll("currentColor",ga(e)||""),pg=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,gg={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},Fu=t=>t.points,vg=t=>t.loaded,va=t=>t.loading,zt=bn()((t,e)=>({...gg,async loadNext(n,r){const{reloading:i}=e();t({error:!1,reloading:!0}),ye.getState().setBounds(n);let o=0;try{await Os(i,r,n)(a=>{t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++})}catch{t({error:!0})}finally{t({reloading:!1})}},async loadFirst(n){const{loading:r}=e(),i=Ah(ye.getState());t({error:!1,loading:!0});let o=0;try{await Os(r,n,i)(a=>{o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++}),t({loading:!1,loaded:!0})}catch{t({error:!0,loading:!1})}finally{t({loading:!1})}}})),mg=()=>{u.useEffect(()=>{zt.getState().loadFirst();const t=Qt.subscribe(e=>{zt.getState().loadFirst(e)});return()=>{t()}},[])},Er=".",ma=Symbol("target"),zu=Symbol("unsubscribe");function ks(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function yg(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Ut=Array.isArray;function ya(t){return typeof t=="symbol"}const Lt={after:(t,e)=>Ut(t)?t.slice(e.length):e===""?t:t.slice(e.length+1),concat:(t,e)=>Ut(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=Er),ya(e)?t+e.toString():t+e):t,initial:t=>{if(Ut(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(Er);return e===-1?"":t.slice(0,e)},last:t=>{if(Ut(t))return t[t.length-1]||"";if(t==="")return t;const e=t.lastIndexOf(Er);return e===-1?t:t.slice(e+1)},walk:(t,e)=>{if(Ut(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(Er);if(r===-1)e(t);else for(;n<t.length;)r===-1&&(r=t.length),e(t.slice(n,r)),n=r+1,r=t.indexOf(Er,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t}};function bg(t){return typeof t=="object"&&typeof t.next=="function"}function wg(t,e,n,r,i){const o=t.next;if(e.name==="entries")t.next=function(){const s=o.call(this);return s.done===!1&&(s.value[0]=i(s.value[0],e,s.value[0],r),s.value[1]=i(s.value[1],e,s.value[0],r)),s};else if(e.name==="values"){const s=n[ma].keys();t.next=function(){const a=o.call(this);return a.done===!1&&(a.value=i(a.value,e,s.next().value,r)),a}}else t.next=function(){const s=o.call(this);return s.done===!1&&(s.value=i(s.value,e,s.value,r)),s};return t}function tl(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&ya(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let Sg=class{constructor(e){this._equals=e,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){return this._descriptorCache===void 0&&(this._descriptorCache=new WeakMap),this._descriptorCache}_getProperties(e){const n=this._getDescriptorCache();let r=n.get(e);return r===void 0&&(r={},n.set(e,r)),r}_getOwnPropertyDescriptor(e,n){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor(e,n);const r=this._getProperties(e);let i=r[n];return i===void 0&&(i=Reflect.getOwnPropertyDescriptor(e,n),r[n]=i),i}getProxy(e,n,r,i){if(this.isUnsubscribed)return e;const o=e[i],s=o||e;this._pathCache.set(s,n);let a=this._proxyCache.get(s);return a===void 0&&(a=o===void 0?new Proxy(e,r):e,this._proxyCache.set(s,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,Lt.get(n,this.getPath(e)))}defineProperty(e,n,r){return Reflect.defineProperty(e,n,r)?(this.isUnsubscribed||(this._getProperties(e)[n]=r),!0):!1}setProperty(e,n,r,i,o){if(!this._equals(o,r)||!(n in e)){const s=this._getOwnPropertyDescriptor(e,n);return s!==void 0&&"set"in s?Reflect.set(e,n,r,i):Reflect.set(e,n,r)}return!0}deleteProperty(e,n,r){if(Reflect.deleteProperty(e,n)){if(!this.isUnsubscribed){const i=this._getDescriptorCache().get(e);i&&(delete i[n],this._pathCache.delete(r))}return!0}return!1}isSameDescriptor(e,n,r){const i=this._getOwnPropertyDescriptor(n,r);return e!==void 0&&i!==void 0&&Object.is(e.value,i.value)&&(e.writable||!1)===(i.writable||!1)&&(e.enumerable||!1)===(i.enumerable||!1)&&(e.configurable||!1)===(i.configurable||!1)&&e.get===i.get&&e.set===i.set}isGetInvariant(e,n){const r=this._getOwnPropertyDescriptor(e,n);return r!==void 0&&r.configurable!==!0&&r.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}};function Ps(t){return toString.call(t)==="[object Object]"}function mi(){return!0}function $n(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const $u=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Lg=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),Hu={push:mi,pop:mi,shift:mi,unshift:mi,copyWithin:$n,reverse:$n,sort:$n,splice:$n,flat:$n,fill:$n},Eg=new Set([...$u,...Lg,...Object.keys(Hu)]);function yi(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const Gu=["keys","values","entries"],Zu=new Set(["has","toString"]),Wu={add:yi,clear:yi,delete:yi,forEach:yi},xg=new Set([...Zu,...Object.keys(Wu),...Gu]);function bi(t,e){if(t.size!==e.size)return!0;let n;for(const[r,i]of t)if(n=e.get(r),n!==i||n===void 0&&!e.has(r))return!0;return!1}const Cg=new Set([...Zu,"get"]),qu={set:bi,clear:bi,delete:bi,forEach:bi},_g=new Set([...Cg,...Object.keys(qu),...Gu]);class yn{constructor(e,n,r,i){this._path=n,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=i,this._changes=i?[]:null,this.clone=n===void 0?e:this._shallowClone(e)}static isHandledMethod(e){return $u.has(e)}_shallowClone(e){let n=e;if(Ps(e))n={...e};else if(Ut(e)||ArrayBuffer.isView(e))n=[...e];else if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set([...e].map(r=>this._shallowClone(r)));else if(e instanceof Map){n=new Map;for(const[r,i]of e.entries())n.set(r,this._shallowClone(i))}return this._clonedCache.add(n),n}preferredThisArg(e,n,r,i){return e?(Ut(i)?this._onIsChanged=Hu[n]:i instanceof Set?this._onIsChanged=Wu[n]:i instanceof Map&&(this._onIsChanged=qu[n]),i):r}update(e,n,r){const i=Lt.after(e,this._path);if(n!=="length"){let o=this.clone;Lt.walk(i,s=>{o&&o[s]&&(this._clonedCache.has(o[s])||(o[s]=this._shallowClone(o[s])),o=o[s])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),o&&o[n]&&(o[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],Lt.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}}class nl extends yn{static isHandledMethod(e){return Eg.has(e)}}class Og extends yn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class rl extends yn{static isHandledMethod(e){return xg.has(e)}undo(e){for(const n of this.clone)e.add(n);for(const n of e)this.clone.has(n)||e.delete(n)}}class il extends yn{static isHandledMethod(e){return _g.has(e)}undo(e){for(const[n,r]of this.clone.entries())e.set(n,r);for(const n of e.keys())this.clone.has(n)||e.delete(n)}}class Mg extends yn{constructor(e,n,r,i){super(void 0,n,r,i),this._arg1=r[0],this._weakValue=e.has(this._arg1)}isChanged(e){return this._weakValue!==e.has(this._arg1)}undo(e){this._weakValue&&!e.has(this._arg1)?e.add(this._arg1):e.delete(this._arg1)}}class kg extends yn{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class Pn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return Ps(e)||Ut(e)||ks(e)}static isHandledMethod(e,n){return Ps(e)?yn.isHandledMethod(n):Ut(e)?nl.isHandledMethod(n):e instanceof Set?rl.isHandledMethod(n):e instanceof Map?il.isHandledMethod(n):ks(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=yn;Ut(e)?i=nl:e instanceof Date?i=Og:e instanceof Set?i=rl:e instanceof Map?i=il:e instanceof WeakSet?i=Mg:e instanceof WeakMap&&(i=kg),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack[this._stack.length-1].update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,o=Pn.isHandledMethod(r,i);return this._stack[this._stack.length-1].preferredThisArg(o,i,n,r)}isChanged(e,n,r){return this._stack[this._stack.length-1].isChanged(e,n,r)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const Pg={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Vr=(t,e,n={})=>{n={...Pg,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new Sg(i),c=typeof n.onValidate=="function",f=new Pn(c),d=(m,b,_,E,g)=>!c||f.isCloning||n.onValidate(Lt.concat(l.getPath(m),b),_,E,g)===!0,h=(m,b,_,E)=>{!tl(l,n,b)&&!(s&&l.isDetached(m,t))&&v(l.getPath(m),b,_,E)},v=(m,b,_,E,g)=>{f.isCloning?f.update(m,b,E):e(Lt.concat(m,b),_,E,g)},y=m=>m&&(m[r]||m),p=(m,b,_,E)=>yg(m)||_==="constructor"||o&&!Pn.isHandledMethod(b,_)||tl(l,n,_)||l.isGetInvariant(b,_)||s&&l.isDetached(b,t)?m:(E===void 0&&(E=l.getPath(b)),l.getProxy(m,Lt.concat(E,_),L,r)),L={get(m,b,_){if(ya(b)){if(b===r||b===ma)return m;if(b===zu&&!l.isUnsubscribed&&l.getPath(m).length===0)return l.unsubscribe(),m}const E=ks(m)?Reflect.get(m,b):Reflect.get(m,b,_);return p(E,m,b)},set(m,b,_,E){_=y(_);const g=m[r]||m,S=g[b];if(i(S,_)&&b in m)return!0;const C=d(m,b,_,S);return C&&l.setProperty(g,b,_,E,S)?(h(m,b,m[b],S),!0):!C},defineProperty(m,b,_){if(!l.isSameDescriptor(_,m,b)){const E=m[b];d(m,b,_.value,E)&&l.defineProperty(m,b,_,E)&&h(m,b,_.value,E)}return!0},deleteProperty(m,b){if(!Reflect.has(m,b))return!0;const _=Reflect.get(m,b),E=d(m,b,void 0,_);return E&&l.deleteProperty(m,b,_)?(h(m,b,void 0,_),!0):!E},apply(m,b,_){const E=b[r]||b;if(l.isUnsubscribed)return Reflect.apply(m,E,_);if((a===!1||a!==!0&&!a.includes(m.name))&&Pn.isHandledType(E)){let g=Lt.initial(l.getPath(m));const S=Pn.isHandledMethod(E,m.name);f.start(E,g,_);let C=Reflect.apply(m,f.preferredThisArg(m,b,E),S?_.map(O=>y(O)):_);const P=f.isChanged(E,i),M=f.stop();if(Pn.isHandledType(C)&&S&&(b instanceof Map&&m.name==="get"&&(g=Lt.concat(g,_[0])),C=l.getProxy(C,g,L)),P){const O={name:m.name,args:_,result:C},k=f.isCloning?Lt.initial(g):g,j=f.isCloning?Lt.last(g):"";d(Lt.get(t,k),j,E,M,O)?v(k,j,E,M,O):f.undo(E)}return(b instanceof Map||b instanceof Set)&&bg(C)?wg(C,m,b,g,p):C}return Reflect.apply(m,b,_)}},w=l.getProxy(t,n.pathAsArray?[]:"",L);return e=e.bind(w),c&&(n.onValidate=n.onValidate.bind(w)),w};Vr.target=t=>t&&t[ma]||t;Vr.unsubscribe=t=>t[zu]||t;const Rg=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...Mn,...e,map:{...Mn.map,...e==null?void 0:e.map},palette:{...Mn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{i&&r({...Mn,...t,map:{...Mn.map,...t.map},palette:{...Mn.palette,...t.palette}})},[t,i]),u.useEffect(()=>{if(o)return window.OMNIC_WIDGET_LOCATIONS_CONFIG=Vr(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s=Vr.target(this);s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Vr.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[o]),n},Tg=(t,e)=>{ni.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(ni.defaults.baseURL=e.baseURL)};var Ku={exports:{}};/*!
|
|
17
|
+
*/var ko=u,mh=vh;function yh(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var bh=typeof Object.is=="function"?Object.is:yh,wh=mh.useSyncExternalStore,Sh=ko.useRef,Lh=ko.useEffect,Eh=ko.useMemo,xh=ko.useDebugValue;fu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Sh(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Eh(function(){function l(v){if(!c){if(c=!0,f=v,v=r(v),i!==void 0&&s.hasValue){var y=s.value;if(i(y,v))return d=y}return d=v}if(y=d,bh(f,v))return y;var p=r(v);return i!==void 0&&i(y,p)?y:(f=v,d=p)}var c=!1,f,d,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=wh(t,o[0],o[1]);return Lh(function(){s.hasValue=!0,s.value=a},[a]),xh(a),a};uu.exports=fu;var Ch=uu.exports;const _h=Mo(Ch);var pu={VITE_API_BASE_URL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/",VITE_GEO_API_BASE_URL:"https://api.geo-data.omnic.solutions/api/1.0/",VITE_YMAP_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_GMAP_KEY:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",VITE_TOLGEE_API_URL:"https://tms.omnic.solutions",VITE_TOLGEE_API_KEY:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc",VITE_YMAPS_KEY:"5298a725-4baa-457a-a2a7-c3abac81db20",VITE_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Oh}=u,{useSyncExternalStoreWithSelector:Mh}=_h;let Va=!1;function kh(t,e=t.getState,n){(pu?"production":void 0)!=="production"&&n&&!Va&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Va=!0);const r=Mh(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return Oh(r),r}const Fa=t=>{(pu?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?sh(t):t,n=(r,i)=>kh(e,r,i);return Object.assign(n,e),n},bn=t=>t?Fa(t):Fa,Ph={location:null},Po=t=>t.location,We=bn()(t=>({...Ph,setDeliverPoint(e){t({location:e})}})),Rh={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},gu=t=>t.map,Th=t=>t.mode,Ah=t=>t.bounds,Dh=t=>t.blurred,Ih=t=>t.loaded,jh=t=>t.loading,sa=t=>t.detailsOpen,ye=bn()(t=>({...Rh,setLoaded(){t({loaded:!0,loading:!1})},setMode(e){t({mode:e})},setBounds(e){t({bounds:e})},setDetailsOpen(e){t({detailsOpen:e})},setBlurred(e){t({blurred:e})},setMap(e){t({map:e})}})),Nh={location:null},Bh=t=>t.location,bt=bn()(t=>({...Nh,setSelectedLocation(e){t({location:e})}})),Uh={query:"",type:Kt.All,hours:["08:00","22:00"],send:{[It.Return]:!1,[It.Payment]:!1,[It.Shipping]:!1},receive:{[Dt.PayByCash]:!1,[Dt.CheckOrder]:!1,[Dt.DressingRoom]:!1}},Vh=t=>t.type,Fh=t=>t.send,zh=t=>t.receive,Qt=bn(t=>({...Uh,setFilter(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(e)}})),$h=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},Hh=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},Gh=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function vu(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zh}=Object.prototype,{getPrototypeOf:aa}=Object,Ro=(t=>e=>{const n=Zh.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=t=>(t=t.toLowerCase(),e=>Ro(e)===t),To=t=>e=>typeof e===t,{isArray:hr}=Array,ti=To("undefined");function Wh(t){return t!==null&&!ti(t)&&t.constructor!==null&&!ti(t.constructor)&&_t(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const mu=Ht("ArrayBuffer");function qh(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&mu(t.buffer),e}const Kh=To("string"),_t=To("function"),yu=To("number"),Ao=t=>t!==null&&typeof t=="object",Jh=t=>t===!0||t===!1,Hi=t=>{if(Ro(t)!=="object")return!1;const e=aa(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Yh=Ht("Date"),Xh=Ht("File"),Qh=Ht("Blob"),ep=Ht("FileList"),tp=t=>Ao(t)&&_t(t.pipe),np=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_t(t.append)&&((e=Ro(t))==="formdata"||e==="object"&&_t(t.toString)&&t.toString()==="[object FormData]"))},rp=Ht("URLSearchParams"),ip=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function li(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),hr(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function bu(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const wu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Su=t=>!ti(t)&&t!==wu;function ws(){const{caseless:t}=Su(this)&&this||{},e={},n=(r,i)=>{const o=t&&bu(e,i)||i;Hi(e[o])&&Hi(r)?e[o]=ws(e[o],r):Hi(r)?e[o]=ws({},r):hr(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&li(arguments[r],n);return e}const op=(t,e,n,{allOwnKeys:r}={})=>(li(e,(i,o)=>{n&&_t(i)?t[o]=vu(i,n):t[o]=i},{allOwnKeys:r}),t),sp=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ap=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},lp=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&aa(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},cp=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},up=t=>{if(!t)return null;if(hr(t))return t;let e=t.length;if(!yu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},fp=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&aa(Uint8Array)),dp=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},hp=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},pp=Ht("HTMLFormElement"),gp=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),za=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),vp=Ht("RegExp"),Lu=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};li(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},mp=t=>{Lu(t,(e,n)=>{if(_t(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(_t(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yp=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return hr(t)?r(t):r(String(t).split(e)),n},bp=()=>{},wp=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Zo="abcdefghijklmnopqrstuvwxyz",$a="0123456789",Eu={DIGIT:$a,ALPHA:Zo,ALPHA_DIGIT:Zo+Zo.toUpperCase()+$a},Sp=(t=16,e=Eu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Lp(t){return!!(t&&_t(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Ep=t=>{const e=new Array(10),n=(r,i)=>{if(Ao(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=hr(r)?[]:{};return li(r,(s,a)=>{const l=n(s,i+1);!ti(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},xp=Ht("AsyncFunction"),Cp=t=>t&&(Ao(t)||_t(t))&&_t(t.then)&&_t(t.catch),N={isArray:hr,isArrayBuffer:mu,isBuffer:Wh,isFormData:np,isArrayBufferView:qh,isString:Kh,isNumber:yu,isBoolean:Jh,isObject:Ao,isPlainObject:Hi,isUndefined:ti,isDate:Yh,isFile:Xh,isBlob:Qh,isRegExp:vp,isFunction:_t,isStream:tp,isURLSearchParams:rp,isTypedArray:fp,isFileList:ep,forEach:li,merge:ws,extend:op,trim:ip,stripBOM:sp,inherits:ap,toFlatObject:lp,kindOf:Ro,kindOfTest:Ht,endsWith:cp,toArray:up,forEachEntry:dp,matchAll:hp,isHTMLForm:pp,hasOwnProperty:za,hasOwnProp:za,reduceDescriptors:Lu,freezeMethods:mp,toObjectSet:yp,toCamelCase:gp,noop:bp,toFiniteNumber:wp,findKey:bu,global:wu,isContextDefined:Su,ALPHABET:Eu,generateString:Sp,isSpecCompliantForm:Lp,toJSONObject:Ep,isAsyncFn:xp,isThenable:Cp};function Se(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}N.inherits(Se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xu=Se.prototype,Cu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Cu[t]={value:t}});Object.defineProperties(Se,Cu);Object.defineProperty(xu,"isAxiosError",{value:!0});Se.from=(t,e,n,r,i,o)=>{const s=Object.create(xu);return N.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Se.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const _p=null;function Ss(t){return N.isPlainObject(t)||N.isArray(t)}function _u(t){return N.endsWith(t,"[]")?t.slice(0,-2):t}function Ha(t,e,n){return t?t.concat(e).map(function(i,o){return i=_u(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Op(t){return N.isArray(t)&&!t.some(Ss)}const Mp=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function Do(t,e,n){if(!N.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,L){return!N.isUndefined(L[p])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(N.isDate(y))return y.toISOString();if(!l&&N.isBlob(y))throw new Se("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(y)||N.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,p,L){let w=y;if(y&&!L&&typeof y=="object"){if(N.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(N.isArray(y)&&Op(y)||(N.isFileList(y)||N.endsWith(p,"[]"))&&(w=N.toArray(y)))return p=_u(p),w.forEach(function(b,_){!(N.isUndefined(b)||b===null)&&e.append(s===!0?Ha([p],_,o):s===null?p:p+"[]",c(b))}),!1}return Ss(y)?!0:(e.append(Ha(L,p,o),c(y)),!1)}const d=[],h=Object.assign(Mp,{defaultVisitor:f,convertValue:c,isVisitable:Ss});function v(y,p){if(!N.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(y),N.forEach(y,function(w,g){(!(N.isUndefined(w)||w===null)&&i.call(e,w,N.isString(g)?g.trim():g,p,h))===!0&&v(w,p?p.concat(g):[g])}),d.pop()}}if(!N.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Ga(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function la(t,e){this._pairs=[],t&&Do(t,this,e)}const Ou=la.prototype;Ou.append=function(e,n){this._pairs.push([e,n])};Ou.toString=function(e){const n=e?function(r){return e.call(this,r,Ga)}:Ga;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function kp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mu(t,e,n){if(!e)return t;const r=n&&n.encode||kp,i=n&&n.serialize;let o;if(i?o=i(e,n):o=N.isURLSearchParams(e)?e.toString():new la(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Pp{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){N.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Za=Pp,ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rp=typeof URLSearchParams<"u"?URLSearchParams:la,Tp=typeof FormData<"u"?FormData:null,Ap=typeof Blob<"u"?Blob:null,Dp={isBrowser:!0,classes:{URLSearchParams:Rp,FormData:Tp,Blob:Ap},protocols:["http","https","file","blob","url","data"]},Pu=typeof window<"u"&&typeof document<"u",Ip=(t=>Pu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),jp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Np=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pu,hasStandardBrowserEnv:Ip,hasStandardBrowserWebWorkerEnv:jp},Symbol.toStringTag,{value:"Module"})),Vt={...Np,...Dp};function Bp(t,e){return Do(t,new Vt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Vt.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Up(t){return N.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Vp(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Ru(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&N.isArray(i)?i.length:s,l?(N.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!N.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&N.isArray(i[s])&&(i[s]=Vp(i[s])),!a)}if(N.isFormData(t)&&N.isFunction(t.entries)){const n={};return N.forEachEntry(t,(r,i)=>{e(Up(r),i,n,0)}),n}return null}function Fp(t,e,n){if(N.isString(t))try{return(e||JSON.parse)(t),N.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ca={transitional:ku,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=N.isObject(e);if(o&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i&&i?JSON.stringify(Ru(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Bp(e,this.formSerializer).toString();if((a=N.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Do(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Fp(e)):e}],transformResponse:[function(e){const n=this.transitional||ca.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&N.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Se.from(a,Se.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],t=>{ca.headers[t]={}});const ua=ca,zp=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$p=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
18
|
+
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&zp[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Wa=Symbol("internals");function Lr(t){return t&&String(t).trim().toLowerCase()}function Gi(t){return t===!1||t==null?t:N.isArray(t)?t.map(Gi):String(t)}function Hp(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Gp=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Wo(t,e,n,r,i){if(N.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!N.isString(e)){if(N.isString(r))return e.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(e)}}function Zp(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Wp(t,e){const n=N.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class Io{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const f=Lr(l);if(!f)throw new Error("header name must be a non-empty string");const d=N.findKey(i,f);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Gi(a))}const s=(a,l)=>N.forEach(a,(c,f)=>o(c,f,l));return N.isPlainObject(e)||e instanceof this.constructor?s(e,n):N.isString(e)&&(e=e.trim())&&!Gp(e)?s($p(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=Lr(e),e){const r=N.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Hp(i);if(N.isFunction(n))return n.call(this,i,r);if(N.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Lr(e),e){const r=N.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Wo(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=Lr(s),s){const a=N.findKey(r,s);a&&(!n||Wo(r,r[a],a,n))&&(delete r[a],i=!0)}}return N.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||Wo(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return N.forEach(this,(i,o)=>{const s=N.findKey(r,o);if(s){n[s]=Gi(i),delete n[o];return}const a=e?Zp(o):String(o).trim();a!==o&&delete n[o],n[a]=Gi(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return N.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&N.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
19
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Wa]=this[Wa]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Lr(s);r[a]||(Wp(i,s),r[a]=!0)}return N.isArray(e)?e.forEach(o):o(e),this}}Io.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(Io.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});N.freezeMethods(Io);const en=Io;function qo(t,e){const n=this||ua,r=e||n,i=en.from(r.headers);let o=r.data;return N.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Tu(t){return!!(t&&t.__CANCEL__)}function ci(t,e,n){Se.call(this,t??"canceled",Se.ERR_CANCELED,e,n),this.name="CanceledError"}N.inherits(ci,Se,{__CANCEL__:!0});function qp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Se("Request failed with status code "+n.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Kp=Vt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];N.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),N.isString(r)&&s.push("path="+r),N.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Jp(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Yp(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Au(t,e){return t&&!Jp(e)?Yp(t,e):e}const Xp=Vt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=N.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function Qp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function eg(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),f=r[o];s||(s=c),n[i]=l,r[i]=c;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;const v=f&&c-f;return v?Math.round(h*1e3/v):void 0}}function qa(t,e){let n=0;const r=eg(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),c=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:i};f[e?"download":"upload"]=!0,t(f)}}const tg=typeof XMLHttpRequest<"u",ng=tg&&function(t){return new Promise(function(n,r){let i=t.data;const o=en.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let f;if(N.isFormData(i)){if(Vt.hasStandardBrowserEnv||Vt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[p,...L]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];o.setContentType([p||"multipart/form-data",...L].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const p=t.auth.username||"",L=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+L))}const h=Au(t.baseURL,t.url);d.open(t.method.toUpperCase(),Mu(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const p=en.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:p,config:t,request:d};qp(function(b){n(b),c()},function(b){r(b),c()},w),d=null}if("onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(v)},d.onabort=function(){d&&(r(new Se("Request aborted",Se.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new Se("Network Error",Se.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let L=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const w=t.transitional||ku;t.timeoutErrorMessage&&(L=t.timeoutErrorMessage),r(new Se(L,w.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,t,d)),d=null},Vt.hasStandardBrowserEnv&&(a&&N.isFunction(a)&&(a=a(t)),a||a!==!1&&Xp(h))){const p=t.xsrfHeaderName&&t.xsrfCookieName&&Kp.read(t.xsrfCookieName);p&&o.set(t.xsrfHeaderName,p)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&N.forEach(o.toJSON(),function(L,w){d.setRequestHeader(w,L)}),N.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",qa(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",qa(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=p=>{d&&(r(!p||p.type?new ci(null,t,d):p),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const y=Qp(h);if(y&&Vt.protocols.indexOf(y)===-1){r(new Se("Unsupported protocol "+y+":",Se.ERR_BAD_REQUEST,t));return}d.send(i||null)})},Ls={http:_p,xhr:ng};N.forEach(Ls,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ka=t=>`- ${t}`,rg=t=>N.isFunction(t)||t===null||t===!1,Du={getAdapter:t=>{t=N.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let s;if(r=n,!rg(n)&&(r=Ls[(s=String(n)).toLowerCase()],r===void 0))throw new Se(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
|
|
20
|
+
`+o.map(Ka).join(`
|
|
21
|
+
`):" "+Ka(o[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ls};function Ko(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ci(null,t)}function Ja(t){return Ko(t),t.headers=en.from(t.headers),t.data=qo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Du.getAdapter(t.adapter||ua.adapter)(t).then(function(r){return Ko(t),r.data=qo.call(t,t.transformResponse,r),r.headers=en.from(r.headers),r},function(r){return Tu(r)||(Ko(t),r&&r.response&&(r.response.data=qo.call(t,t.transformResponse,r.response),r.response.headers=en.from(r.response.headers))),Promise.reject(r)})}const Ya=t=>t instanceof en?t.toJSON():t;function or(t,e){e=e||{};const n={};function r(c,f,d){return N.isPlainObject(c)&&N.isPlainObject(f)?N.merge.call({caseless:d},c,f):N.isPlainObject(f)?N.merge({},f):N.isArray(f)?f.slice():f}function i(c,f,d){if(N.isUndefined(f)){if(!N.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function o(c,f){if(!N.isUndefined(f))return r(void 0,f)}function s(c,f){if(N.isUndefined(f)){if(!N.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,d){if(d in e)return r(c,f);if(d in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,f)=>i(Ya(c),Ya(f),!0)};return N.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,h=d(t[f],e[f],f);N.isUndefined(h)&&d!==a||(n[f]=h)}),n}const Iu="1.6.2",fa={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{fa[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Xa={};fa.transitional=function(e,n,r){function i(o,s){return"[Axios v"+Iu+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Se(i(s," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!Xa[s]&&(Xa[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function ig(t,e,n){if(typeof t!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Se("option "+o+" must be "+l,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+o,Se.ERR_BAD_OPTION)}}const Es={assertOptions:ig,validators:fa},on=Es.validators;class uo{constructor(e){this.defaults=e,this.interceptors={request:new Za,response:new Za}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=or(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Es.assertOptions(r,{silentJSONParsing:on.transitional(on.boolean),forcedJSONParsing:on.transitional(on.boolean),clarifyTimeoutError:on.transitional(on.boolean)},!1),i!=null&&(N.isFunction(i)?n.paramsSerializer={serialize:i}:Es.assertOptions(i,{encode:on.function,serialize:on.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&N.merge(o.common,o[n.method]);o&&N.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=en.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let f,d=0,h;if(!l){const y=[Ja.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),h=y.length,f=Promise.resolve(n);d<h;)f=f.then(y[d++],y[d++]);return f}h=a.length;let v=n;for(d=0;d<h;){const y=a[d++],p=a[d++];try{v=y(v)}catch(L){p.call(this,L);break}}try{f=Ja.call(this,v)}catch(y){return Promise.reject(y)}for(d=0,h=c.length;d<h;)f=f.then(c[d++],c[d++]);return f}getUri(e){e=or(this.defaults,e);const n=Au(e.baseURL,e.url);return Mu(n,e.params,e.paramsSerializer)}}N.forEach(["delete","get","head","options"],function(e){uo.prototype[e]=function(n,r){return this.request(or(r||{},{method:e,url:n,data:(r||{}).data}))}});N.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(or(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}uo.prototype[e]=n(),uo.prototype[e+"Form"]=n(!0)});const Zi=uo;class da{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new ci(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new da(function(i){e=i}),cancel:e}}}const og=da;function sg(t){return function(n){return t.apply(null,n)}}function ag(t){return N.isObject(t)&&t.isAxiosError===!0}const xs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xs).forEach(([t,e])=>{xs[e]=t});const lg=xs;function ju(t){const e=new Zi(t),n=vu(Zi.prototype.request,e);return N.extend(n,Zi.prototype,e,{allOwnKeys:!0}),N.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return ju(or(t,i))},n}const Je=ju(ua);Je.Axios=Zi;Je.CanceledError=ci;Je.CancelToken=og;Je.isCancel=Tu;Je.VERSION=Iu;Je.toFormData=Do;Je.AxiosError=Se;Je.Cancel=Je.CanceledError;Je.all=function(e){return Promise.all(e)};Je.spread=sg;Je.isAxiosError=ag;Je.mergeConfig=or;Je.AxiosHeaders=en;Je.formToJSON=t=>Ru(N.isHTMLForm(t)?new FormData(t):t);Je.getAdapter=Du.getAdapter;Je.HttpStatusCode=lg;Je.default=Je;const cg=Je,ni=cg.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),ug=512,fg={[Dt.CheckOrder]:["is_check_order","is_delivery"],[Dt.DressingRoom]:["is_dressing_room","is_delivery"],[Dt.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},dg={[It.Return]:["is_pickup"],[It.Shipping]:["is_pickup"],[It.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*Cs({bounds:t,filter:e,q:n}={},{controller:r}={}){const i={status:30,page_size:ug};if(n&&(i.q=n),e!=null&&e.type&&(i.type=e.type),e!=null&&e.receive)for(const[l,c]of Object.entries(e==null?void 0:e.receive)){if(!c)continue;const f=fg[l];for(const d of f)i[d]=!0}if(e!=null&&e.send)for(const[l,c]of Object.entries(e==null?void 0:e.send)){if(!c)continue;const f=dg[l];for(const d of f)i[d]=!0}t&&(i.start_latitude=t[0][0],i.end_latitude=t[0][1],i.start_longitude=t[1][0],i.end_longitude=t[1][1]);let o=await ni.get("/locations/points",{params:i,signal:r==null?void 0:r.signal}),s=o.data.data.num_pages,a=o.data.data.current_page;for(;a<s;){yield o,i.page=a+1;const l=await ni.get("/locations/points",{params:i,signal:r==null?void 0:r.signal});o.data.data.results=[...o.data.data.results,...l.data.data.results],o=l,a=l.data.data.current_page,s=l.data.data.num_pages}return yield o,o}const Qa=[],_s=(t,e,n)=>{var i;const r=new AbortController;return t&&((i=Qa.pop())==null||i.abort()),Qa.push(r),async o=>{const s={controller:r};if(!n){const l=await Cs({filter:e},s).next();o(l.value.data);return}for await(const a of Cs({filter:e,bounds:n},s))o(a.data)}},Nu=":root",jo=(t,e)=>{var n;(n=document.querySelector(Nu))==null||n.style.setProperty(t,e)},Os=t=>{t.stopImmediatePropagation()};var Bu={},Uu={exports:{}};(function(t){var e=function(n){var r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(A,T,k){A[T]=k.value},s,a=typeof Symbol=="function"?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function d(A,T,k){return Object.defineProperty(A,T,{value:k,enumerable:!0,configurable:!0,writable:!0}),A[T]}try{d({},"")}catch{d=function(T,k,D){return T[k]=D}}function h(A,T,k,D){var U=T&&T.prototype instanceof b?T:b,V=Object.create(U.prototype),W=new G(D||[]);return o(V,"_invoke",{value:P(A,k,W)}),V}n.wrap=h;function v(A,T,k){try{return{type:"normal",arg:A.call(T,k)}}catch(D){return{type:"throw",arg:D}}}var y="suspendedStart",p="suspendedYield",L="executing",w="completed",g={};function b(){}function _(){}function E(){}var m={};d(m,l,function(){return this});var S=Object.getPrototypeOf,C=S&&S(S(z([])));C&&C!==r&&i.call(C,l)&&(m=C);var R=E.prototype=b.prototype=Object.create(m);_.prototype=E,o(R,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:_,configurable:!0}),_.displayName=d(E,f,"GeneratorFunction");function M(A){["next","throw","return"].forEach(function(T){d(A,T,function(k){return this._invoke(T,k)})})}n.isGeneratorFunction=function(A){var T=typeof A=="function"&&A.constructor;return T?T===_||(T.displayName||T.name)==="GeneratorFunction":!1},n.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,E):(A.__proto__=E,d(A,f,"GeneratorFunction")),A.prototype=Object.create(R),A},n.awrap=function(A){return{__await:A}};function O(A,T){function k(V,W,I,X){var ee=v(A[V],A,W);if(ee.type==="throw")X(ee.arg);else{var K=ee.arg,ie=K.value;return ie&&typeof ie=="object"&&i.call(ie,"__await")?T.resolve(ie.__await).then(function(fe){k("next",fe,I,X)},function(fe){k("throw",fe,I,X)}):T.resolve(ie).then(function(fe){K.value=fe,I(K)},function(fe){return k("throw",fe,I,X)})}}var D;function U(V,W){function I(){return new T(function(X,ee){k(V,W,X,ee)})}return D=D?D.then(I,I):I()}o(this,"_invoke",{value:U})}M(O.prototype),d(O.prototype,c,function(){return this}),n.AsyncIterator=O,n.async=function(A,T,k,D,U){U===void 0&&(U=Promise);var V=new O(h(A,T,k,D),U);return n.isGeneratorFunction(T)?V:V.next().then(function(W){return W.done?W.value:V.next()})};function P(A,T,k){var D=y;return function(V,W){if(D===L)throw new Error("Generator is already running");if(D===w){if(V==="throw")throw W;return Z()}for(k.method=V,k.arg=W;;){var I=k.delegate;if(I){var X=j(I,k);if(X){if(X===g)continue;return X}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(D===y)throw D=w,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);D=L;var ee=v(A,T,k);if(ee.type==="normal"){if(D=k.done?w:p,ee.arg===g)continue;return{value:ee.arg,done:k.done}}else ee.type==="throw"&&(D=w,k.method="throw",k.arg=ee.arg)}}}function j(A,T){var k=T.method,D=A.iterator[k];if(D===s)return T.delegate=null,k==="throw"&&A.iterator.return&&(T.method="return",T.arg=s,j(A,T),T.method==="throw")||k!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+k+"' method")),g;var U=v(D,A.iterator,T.arg);if(U.type==="throw")return T.method="throw",T.arg=U.arg,T.delegate=null,g;var V=U.arg;if(!V)return T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,g;if(V.done)T[A.resultName]=V.value,T.next=A.nextLoc,T.method!=="return"&&(T.method="next",T.arg=s);else return V;return T.delegate=null,g}M(R),d(R,f,"Generator"),d(R,l,function(){return this}),d(R,"toString",function(){return"[object Generator]"});function B(A){var T={tryLoc:A[0]};1 in A&&(T.catchLoc=A[1]),2 in A&&(T.finallyLoc=A[2],T.afterLoc=A[3]),this.tryEntries.push(T)}function $(A){var T=A.completion||{};T.type="normal",delete T.arg,A.completion=T}function G(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(B,this),this.reset(!0)}n.keys=function(A){var T=Object(A),k=[];for(var D in T)k.push(D);return k.reverse(),function U(){for(;k.length;){var V=k.pop();if(V in T)return U.value=V,U.done=!1,U}return U.done=!0,U}};function z(A){if(A){var T=A[l];if(T)return T.call(A);if(typeof A.next=="function")return A;if(!isNaN(A.length)){var k=-1,D=function U(){for(;++k<A.length;)if(i.call(A,k))return U.value=A[k],U.done=!1,U;return U.value=s,U.done=!0,U};return D.next=D}}return{next:Z}}n.values=z;function Z(){return{value:s,done:!0}}return G.prototype={constructor:G,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach($),!A)for(var T in this)T.charAt(0)==="t"&&i.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=s)},stop:function(){this.done=!0;var A=this.tryEntries[0],T=A.completion;if(T.type==="throw")throw T.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var T=this;function k(X,ee){return V.type="throw",V.arg=A,T.next=X,ee&&(T.method="next",T.arg=s),!!ee}for(var D=this.tryEntries.length-1;D>=0;--D){var U=this.tryEntries[D],V=U.completion;if(U.tryLoc==="root")return k("end");if(U.tryLoc<=this.prev){var W=i.call(U,"catchLoc"),I=i.call(U,"finallyLoc");if(W&&I){if(this.prev<U.catchLoc)return k(U.catchLoc,!0);if(this.prev<U.finallyLoc)return k(U.finallyLoc)}else if(W){if(this.prev<U.catchLoc)return k(U.catchLoc,!0)}else if(I){if(this.prev<U.finallyLoc)return k(U.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(A,T){for(var k=this.tryEntries.length-1;k>=0;--k){var D=this.tryEntries[k];if(D.tryLoc<=this.prev&&i.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var U=D;break}}U&&(A==="break"||A==="continue")&&U.tryLoc<=T&&T<=U.finallyLoc&&(U=null);var V=U?U.completion:{};return V.type=A,V.arg=T,U?(this.method="next",this.next=U.finallyLoc,g):this.complete(V)},complete:function(A,T){if(A.type==="throw")throw A.arg;return A.type==="break"||A.type==="continue"?this.next=A.arg:A.type==="return"?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):A.type==="normal"&&T&&(this.next=T),g},finish:function(A){for(var T=this.tryEntries.length-1;T>=0;--T){var k=this.tryEntries[T];if(k.finallyLoc===A)return this.complete(k.completion,k.afterLoc),$(k),g}},catch:function(A){for(var T=this.tryEntries.length-1;T>=0;--T){var k=this.tryEntries[T];if(k.tryLoc===A){var D=k.completion;if(D.type==="throw"){var U=D.arg;$(k)}return U}}throw new Error("illegal catch attempt")},delegateYield:function(A,T,k){return this.delegate={iterator:z(A),resultName:T,nextLoc:k},this.method==="next"&&(this.arg=s),g}},n}(t.exports);try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})(Uu);var hg=Uu.exports;(function(t){var e=hg;function n(y,p,L,w,g,b,_){try{var E=y[b](_),m=E.value}catch(S){return void L(S)}E.done?p(m):Promise.resolve(m).then(w,g)}function r(y){return function(){var p=this,L=arguments;return new Promise(function(w,g){var b=y.apply(p,L);function _(m){n(b,w,g,_,E,"next",m)}function E(m){n(b,w,g,_,E,"throw",m)}_(void 0)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=!1,o=null,s="en",a=null,l=null,c="https://maps.googleapis.com/maps/api/geocode/json";function f(y){var p=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i&&(p?console.warn(y):console.log(y))}function d(y){return h.apply(this,arguments)}function h(){return(h=r(e.mark(function y(p){var L,w;return e.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,fetch(p).catch(function(){return Promise.reject(new Error("Error fetching data"))});case 2:return L=g.sent,g.next=5,L.json().catch(function(){return f("Error parsing server response"),Promise.reject(new Error("Error parsing server response"))});case 5:if((w=g.sent).status!=="OK"){g.next=9;break}return f(w),g.abrupt("return",w);case 9:return f("".concat(w.error_message,`.
|
|
22
|
+
Server returned status code `).concat(w.status),!0),g.abrupt("return",Promise.reject(new Error("".concat(w.error_message,`.
|
|
23
|
+
Server returned status code `).concat(w.status))));case 11:case"end":return g.stop()}},y)}))).apply(this,arguments)}var v={setApiKey:function(y){o=y},setLanguage:function(y){s=y},setRegion:function(y){a=y},setLocationType:function(y){l=y},enableDebug:function(){var y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];i=y},fromLatLng:function(y,p,L,w,g,b){return r(e.mark(function _(){var E,m;return e.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(y&&p){S.next=3;break}return f("Provided coordinates are invalid",!0),S.abrupt("return",Promise.reject(new Error("Provided coordinates are invalid")));case 3:return E="".concat(y,",").concat(p),m="".concat(c,"?latlng=").concat(encodeURIComponent(E)),(L||o)&&(m+="&key=".concat(o=L||o)),(w||s)&&(m+="&language=".concat(s=w||s)),(g||a)&&(a=g||a,m+="®ion=".concat(encodeURIComponent(a))),(b||l)&&(l=b||l,m+="&location_type=".concat(encodeURIComponent(l))),S.abrupt("return",d(m));case 9:case"end":return S.stop()}},_)}))()},fromAddress:function(y,p,L,w){return r(e.mark(function g(){var b;return e.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(y){_.next=3;break}return f("Provided address is invalid",!0),_.abrupt("return",Promise.reject(new Error("Provided address is invalid")));case 3:return b="".concat(c,"?address=").concat(encodeURIComponent(y)),(p||o)&&(b+="&key=".concat(o=p||o)),(L||s)&&(b+="&language=".concat(s=L||s)),(w||a)&&(a=w||a,b+="®ion=".concat(encodeURIComponent(a))),_.abrupt("return",d(b));case 8:case"end":return _.stop()}},g)}))()}};t.default=v})(Bu);const fo=Mo(Bu),sr=async(t,e="ROOFTOP")=>{var i;fo.setLocationType(e);const n=await fo.fromLatLng(t[0].toString(),t[1].toString()),r=(i=n.results)==null?void 0:i.map(o=>{var l,c;const s=(l=o.geometry)==null?void 0:l.viewport,a=(c=o.geometry)==null?void 0:c.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(s.southwest,s.northeast),location:new google.maps.LatLng(a)}}});return{...n,results:r}},ha=(t,e)=>{if(!navigator.geolocation){e==null||e(new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t,e,{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},Vu=t=>t.status===200,pa=t=>{const e=document.querySelector(Nu);return e?getComputedStyle(e).getPropertyValue(t):null},Jt=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},xt=(t,e)=>t.replaceAll("currentColor",pa(e)||""),pg=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,gg={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},Fu=t=>t.points,vg=t=>t.loaded,ga=t=>t.loading,zt=bn()((t,e)=>({...gg,async loadNext(n,r){const{reloading:i}=e();t({error:!1,reloading:!0}),ye.getState().setBounds(n);let o=0;try{await _s(i,r,n)(a=>{t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++})}catch{t({error:!0})}finally{t({reloading:!1})}},async loadFirst(n){const{loading:r}=e(),i=Ah(ye.getState());t({error:!1,loading:!0});let o=0;try{await _s(r,n,i)(a=>{o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++}),t({loading:!1,loaded:!0})}catch{t({error:!0,loading:!1})}finally{t({loading:!1})}}})),mg=()=>{u.useEffect(()=>{zt.getState().loadFirst();const t=Qt.subscribe(e=>{zt.getState().loadFirst(e)});return()=>{t()}},[])},Er=".",va=Symbol("target"),zu=Symbol("unsubscribe");function Ms(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function yg(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Ut=Array.isArray;function ma(t){return typeof t=="symbol"}const Lt={after:(t,e)=>Ut(t)?t.slice(e.length):e===""?t:t.slice(e.length+1),concat:(t,e)=>Ut(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=Er),ma(e)?t+e.toString():t+e):t,initial:t=>{if(Ut(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(Er);return e===-1?"":t.slice(0,e)},last:t=>{if(Ut(t))return t[t.length-1]||"";if(t==="")return t;const e=t.lastIndexOf(Er);return e===-1?t:t.slice(e+1)},walk:(t,e)=>{if(Ut(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(Er);if(r===-1)e(t);else for(;n<t.length;)r===-1&&(r=t.length),e(t.slice(n,r)),n=r+1,r=t.indexOf(Er,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t}};function bg(t){return typeof t=="object"&&typeof t.next=="function"}function wg(t,e,n,r,i){const o=t.next;if(e.name==="entries")t.next=function(){const s=o.call(this);return s.done===!1&&(s.value[0]=i(s.value[0],e,s.value[0],r),s.value[1]=i(s.value[1],e,s.value[0],r)),s};else if(e.name==="values"){const s=n[va].keys();t.next=function(){const a=o.call(this);return a.done===!1&&(a.value=i(a.value,e,s.next().value,r)),a}}else t.next=function(){const s=o.call(this);return s.done===!1&&(s.value=i(s.value,e,s.value,r)),s};return t}function el(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&ma(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let Sg=class{constructor(e){this._equals=e,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){return this._descriptorCache===void 0&&(this._descriptorCache=new WeakMap),this._descriptorCache}_getProperties(e){const n=this._getDescriptorCache();let r=n.get(e);return r===void 0&&(r={},n.set(e,r)),r}_getOwnPropertyDescriptor(e,n){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor(e,n);const r=this._getProperties(e);let i=r[n];return i===void 0&&(i=Reflect.getOwnPropertyDescriptor(e,n),r[n]=i),i}getProxy(e,n,r,i){if(this.isUnsubscribed)return e;const o=e[i],s=o||e;this._pathCache.set(s,n);let a=this._proxyCache.get(s);return a===void 0&&(a=o===void 0?new Proxy(e,r):e,this._proxyCache.set(s,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,Lt.get(n,this.getPath(e)))}defineProperty(e,n,r){return Reflect.defineProperty(e,n,r)?(this.isUnsubscribed||(this._getProperties(e)[n]=r),!0):!1}setProperty(e,n,r,i,o){if(!this._equals(o,r)||!(n in e)){const s=this._getOwnPropertyDescriptor(e,n);return s!==void 0&&"set"in s?Reflect.set(e,n,r,i):Reflect.set(e,n,r)}return!0}deleteProperty(e,n,r){if(Reflect.deleteProperty(e,n)){if(!this.isUnsubscribed){const i=this._getDescriptorCache().get(e);i&&(delete i[n],this._pathCache.delete(r))}return!0}return!1}isSameDescriptor(e,n,r){const i=this._getOwnPropertyDescriptor(n,r);return e!==void 0&&i!==void 0&&Object.is(e.value,i.value)&&(e.writable||!1)===(i.writable||!1)&&(e.enumerable||!1)===(i.enumerable||!1)&&(e.configurable||!1)===(i.configurable||!1)&&e.get===i.get&&e.set===i.set}isGetInvariant(e,n){const r=this._getOwnPropertyDescriptor(e,n);return r!==void 0&&r.configurable!==!0&&r.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}};function ks(t){return toString.call(t)==="[object Object]"}function mi(){return!0}function $n(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const $u=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Lg=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),Hu={push:mi,pop:mi,shift:mi,unshift:mi,copyWithin:$n,reverse:$n,sort:$n,splice:$n,flat:$n,fill:$n},Eg=new Set([...$u,...Lg,...Object.keys(Hu)]);function yi(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const Gu=["keys","values","entries"],Zu=new Set(["has","toString"]),Wu={add:yi,clear:yi,delete:yi,forEach:yi},xg=new Set([...Zu,...Object.keys(Wu),...Gu]);function bi(t,e){if(t.size!==e.size)return!0;let n;for(const[r,i]of t)if(n=e.get(r),n!==i||n===void 0&&!e.has(r))return!0;return!1}const Cg=new Set([...Zu,"get"]),qu={set:bi,clear:bi,delete:bi,forEach:bi},_g=new Set([...Cg,...Object.keys(qu),...Gu]);class yn{constructor(e,n,r,i){this._path=n,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=i,this._changes=i?[]:null,this.clone=n===void 0?e:this._shallowClone(e)}static isHandledMethod(e){return $u.has(e)}_shallowClone(e){let n=e;if(ks(e))n={...e};else if(Ut(e)||ArrayBuffer.isView(e))n=[...e];else if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set([...e].map(r=>this._shallowClone(r)));else if(e instanceof Map){n=new Map;for(const[r,i]of e.entries())n.set(r,this._shallowClone(i))}return this._clonedCache.add(n),n}preferredThisArg(e,n,r,i){return e?(Ut(i)?this._onIsChanged=Hu[n]:i instanceof Set?this._onIsChanged=Wu[n]:i instanceof Map&&(this._onIsChanged=qu[n]),i):r}update(e,n,r){const i=Lt.after(e,this._path);if(n!=="length"){let o=this.clone;Lt.walk(i,s=>{o&&o[s]&&(this._clonedCache.has(o[s])||(o[s]=this._shallowClone(o[s])),o=o[s])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),o&&o[n]&&(o[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],Lt.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}}class tl extends yn{static isHandledMethod(e){return Eg.has(e)}}class Og extends yn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class nl extends yn{static isHandledMethod(e){return xg.has(e)}undo(e){for(const n of this.clone)e.add(n);for(const n of e)this.clone.has(n)||e.delete(n)}}class rl extends yn{static isHandledMethod(e){return _g.has(e)}undo(e){for(const[n,r]of this.clone.entries())e.set(n,r);for(const n of e.keys())this.clone.has(n)||e.delete(n)}}class Mg extends yn{constructor(e,n,r,i){super(void 0,n,r,i),this._arg1=r[0],this._weakValue=e.has(this._arg1)}isChanged(e){return this._weakValue!==e.has(this._arg1)}undo(e){this._weakValue&&!e.has(this._arg1)?e.add(this._arg1):e.delete(this._arg1)}}class kg extends yn{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class Pn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ks(e)||Ut(e)||Ms(e)}static isHandledMethod(e,n){return ks(e)?yn.isHandledMethod(n):Ut(e)?tl.isHandledMethod(n):e instanceof Set?nl.isHandledMethod(n):e instanceof Map?rl.isHandledMethod(n):Ms(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=yn;Ut(e)?i=tl:e instanceof Date?i=Og:e instanceof Set?i=nl:e instanceof Map?i=rl:e instanceof WeakSet?i=Mg:e instanceof WeakMap&&(i=kg),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack[this._stack.length-1].update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,o=Pn.isHandledMethod(r,i);return this._stack[this._stack.length-1].preferredThisArg(o,i,n,r)}isChanged(e,n,r){return this._stack[this._stack.length-1].isChanged(e,n,r)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const Pg={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Vr=(t,e,n={})=>{n={...Pg,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new Sg(i),c=typeof n.onValidate=="function",f=new Pn(c),d=(g,b,_,E,m)=>!c||f.isCloning||n.onValidate(Lt.concat(l.getPath(g),b),_,E,m)===!0,h=(g,b,_,E)=>{!el(l,n,b)&&!(s&&l.isDetached(g,t))&&v(l.getPath(g),b,_,E)},v=(g,b,_,E,m)=>{f.isCloning?f.update(g,b,E):e(Lt.concat(g,b),_,E,m)},y=g=>g&&(g[r]||g),p=(g,b,_,E)=>yg(g)||_==="constructor"||o&&!Pn.isHandledMethod(b,_)||el(l,n,_)||l.isGetInvariant(b,_)||s&&l.isDetached(b,t)?g:(E===void 0&&(E=l.getPath(b)),l.getProxy(g,Lt.concat(E,_),L,r)),L={get(g,b,_){if(ma(b)){if(b===r||b===va)return g;if(b===zu&&!l.isUnsubscribed&&l.getPath(g).length===0)return l.unsubscribe(),g}const E=Ms(g)?Reflect.get(g,b):Reflect.get(g,b,_);return p(E,g,b)},set(g,b,_,E){_=y(_);const m=g[r]||g,S=m[b];if(i(S,_)&&b in g)return!0;const C=d(g,b,_,S);return C&&l.setProperty(m,b,_,E,S)?(h(g,b,g[b],S),!0):!C},defineProperty(g,b,_){if(!l.isSameDescriptor(_,g,b)){const E=g[b];d(g,b,_.value,E)&&l.defineProperty(g,b,_,E)&&h(g,b,_.value,E)}return!0},deleteProperty(g,b){if(!Reflect.has(g,b))return!0;const _=Reflect.get(g,b),E=d(g,b,void 0,_);return E&&l.deleteProperty(g,b,_)?(h(g,b,void 0,_),!0):!E},apply(g,b,_){const E=b[r]||b;if(l.isUnsubscribed)return Reflect.apply(g,E,_);if((a===!1||a!==!0&&!a.includes(g.name))&&Pn.isHandledType(E)){let m=Lt.initial(l.getPath(g));const S=Pn.isHandledMethod(E,g.name);f.start(E,m,_);let C=Reflect.apply(g,f.preferredThisArg(g,b,E),S?_.map(O=>y(O)):_);const R=f.isChanged(E,i),M=f.stop();if(Pn.isHandledType(C)&&S&&(b instanceof Map&&g.name==="get"&&(m=Lt.concat(m,_[0])),C=l.getProxy(C,m,L)),R){const O={name:g.name,args:_,result:C},P=f.isCloning?Lt.initial(m):m,j=f.isCloning?Lt.last(m):"";d(Lt.get(t,P),j,E,M,O)?v(P,j,E,M,O):f.undo(E)}return(b instanceof Map||b instanceof Set)&&bg(C)?wg(C,g,b,m,p):C}return Reflect.apply(g,b,_)}},w=l.getProxy(t,n.pathAsArray?[]:"",L);return e=e.bind(w),c&&(n.onValidate=n.onValidate.bind(w)),w};Vr.target=t=>t&&t[va]||t;Vr.unsubscribe=t=>t[zu]||t;const Rg=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...Mn,...e,map:{...Mn.map,...e==null?void 0:e.map},palette:{...Mn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{i&&r({...Mn,...t,map:{...Mn.map,...t.map},palette:{...Mn.palette,...t.palette}})},[t,i]),u.useEffect(()=>{if(o)return window.OMNIC_WIDGET_LOCATIONS_CONFIG=Vr(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s=Vr.target(this);s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Vr.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[o]),n},Tg=(t,e)=>{ni.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(ni.defaults.baseURL=e.baseURL)};var Ku={exports:{}};/*!
|
|
24
24
|
Copyright (c) 2018 Jed Watson.
|
|
25
25
|
Licensed under the MIT License (MIT), see
|
|
26
26
|
http://jedwatson.github.io/classnames
|
|
27
|
-
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&r.push(a)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var l in o)e.call(o,l)&&o[l]&&r.push(l)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Ku);var Ag=Ku.exports;const be=Mo(Ag),Dg={place:null},Ju=t=>t.place,Ig=t=>{var e,n;return(n=(e=t.place)==null?void 0:e.address_components)==null?void 0:n.find(r=>r.types.includes("locality"))},$t=bn(t=>({...Dg,setPlace(e,n){var i,o,s;const{map:r}=ye.getState();t({place:e}),r&&((i=e==null?void 0:e.geometry)!=null&&i.viewport)?r.fitBounds(e.geometry.viewport):(o=e==null?void 0:e.geometry)!=null&&o.location&&(r==null||r.panTo((s=e.geometry)==null?void 0:s.location)),n!=null&&(r==null||r.setZoom(n))}})),jg="Overlay-module__root__3qTsUC",Ng={root:jg},
|
|
27
|
+
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&r.push(a)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var l in o)e.call(o,l)&&o[l]&&r.push(l)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Ku);var Ag=Ku.exports;const be=Mo(Ag),Dg={place:null},Ju=t=>t.place,Ig=t=>{var e,n;return(n=(e=t.place)==null?void 0:e.address_components)==null?void 0:n.find(r=>r.types.includes("locality"))},$t=bn(t=>({...Dg,setPlace(e,n){var i,o,s;const{map:r}=ye.getState();t({place:e}),r&&((i=e==null?void 0:e.geometry)!=null&&i.viewport)?r.fitBounds(e.geometry.viewport):(o=e==null?void 0:e.geometry)!=null&&o.location&&(r==null||r.panTo((s=e.geometry)==null?void 0:s.location)),n!=null&&(r==null||r.setZoom(n))}})),jg="Overlay-module__root__3qTsUC",Ng={root:jg},ya=({children:t,className:e})=>x.jsx("div",{className:be(Ng.root,e),children:t}),Bg="Spinner-module__loader__U4GVhD",Ug={loader:Bg},ri=({className:t})=>x.jsx("div",{className:be(Ug.loader,t),children:"Loading..."});/*! *****************************************************************************
|
|
28
28
|
Copyright (c) Microsoft Corporation.
|
|
29
29
|
|
|
30
30
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -37,15 +37,15 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
37
37
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
38
38
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
39
39
|
PERFORMANCE OF THIS SOFTWARE.
|
|
40
|
-
***************************************************************************** */var
|
|
40
|
+
***************************************************************************** */var Ps=function(t,e){return Ps=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ps(t,e)};function je(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ps(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Q=function(){return Q=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Q.apply(this,arguments)};function ba(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Vg(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{c(r.next(f))}catch(d){s(d)}}function l(f){try{c(r.throw(f))}catch(d){s(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function Fg(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(f){return l([c,f])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Yu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zg=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},$g=zg,qe=Yu($g),le=u.createContext(null);function Hg(){qe(!!u.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=u.useContext(le);return qe(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function Gg(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function Zg(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Wg(t,e,n,r){var i={},o=function(s,a){var l=n[a];l!==e[a]&&(i[a]=l,s(r,l))};return Zg(t,o),i}function qg(t,e,n){var r=Gg(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function Kg(t){google.maps.event.removeListener(t)}function pe(t){t===void 0&&(t=[]),t.forEach(Kg)}function ue(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=qg(i,o,n);return Wg(e,r,i,o),s}var il={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},ol={extraMapTypes:function(t,e){e.forEach(function(r,i){t.mapTypes.set(String(i),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function Jg(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,o=t.mapContainerClassName,s=t.center,a=t.onClick,l=t.onDblClick,c=t.onDrag,f=t.onDragEnd,d=t.onDragStart,h=t.onMouseMove,v=t.onMouseOut,y=t.onMouseOver,p=t.onMouseDown,L=t.onMouseUp,w=t.onRightClick,g=t.onCenterChanged,b=t.onLoad,_=t.onUnmount,E=u.useState(null),m=E[0],S=E[1],C=u.useRef(null),R=u.useState(null),M=R[0],O=R[1],P=u.useState(null),j=P[0],B=P[1],$=u.useState(null),G=$[0],z=$[1],Z=u.useState(null),A=Z[0],T=Z[1],k=u.useState(null),D=k[0],U=k[1],V=u.useState(null),W=V[0],I=V[1],X=u.useState(null),ee=X[0],K=X[1],ie=u.useState(null),fe=ie[0],ge=ie[1],Le=u.useState(null),Fe=Le[0],we=Le[1],Ee=u.useState(null),Ie=Ee[0],Me=Ee[1],Re=u.useState(null),re=Re[0],oe=Re[1],ze=u.useState(null),Ye=ze[0],J=ze[1];return u.useEffect(function(){n&&m!==null&&m.setOptions(n)},[m,n]),u.useEffect(function(){m!==null&&typeof s<"u"&&m.setCenter(s)},[m,s]),u.useEffect(function(){m&&l&&(j!==null&&google.maps.event.removeListener(j),B(google.maps.event.addListener(m,"dblclick",l)))},[l]),u.useEffect(function(){m&&f&&(G!==null&&google.maps.event.removeListener(G),z(google.maps.event.addListener(m,"dragend",f)))},[f]),u.useEffect(function(){m&&d&&(A!==null&&google.maps.event.removeListener(A),T(google.maps.event.addListener(m,"dragstart",d)))},[d]),u.useEffect(function(){m&&p&&(D!==null&&google.maps.event.removeListener(D),U(google.maps.event.addListener(m,"mousedown",p)))},[p]),u.useEffect(function(){m&&h&&(W!==null&&google.maps.event.removeListener(W),I(google.maps.event.addListener(m,"mousemove",h)))},[h]),u.useEffect(function(){m&&v&&(ee!==null&&google.maps.event.removeListener(ee),K(google.maps.event.addListener(m,"mouseout",v)))},[v]),u.useEffect(function(){m&&y&&(fe!==null&&google.maps.event.removeListener(fe),ge(google.maps.event.addListener(m,"mouseover",y)))},[y]),u.useEffect(function(){m&&L&&(Fe!==null&&google.maps.event.removeListener(Fe),we(google.maps.event.addListener(m,"mouseup",L)))},[L]),u.useEffect(function(){m&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),Me(google.maps.event.addListener(m,"rightclick",w)))},[w]),u.useEffect(function(){m&&a&&(re!==null&&google.maps.event.removeListener(re),oe(google.maps.event.addListener(m,"click",a)))},[a]),u.useEffect(function(){m&&c&&(Ye!==null&&google.maps.event.removeListener(Ye),J(google.maps.event.addListener(m,"drag",c)))},[c]),u.useEffect(function(){m&&g&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(m,"center_changed",g)))},[a]),u.useEffect(function(){var $e=C.current===null?null:new google.maps.Map(C.current,n);return S($e),$e!==null&&b&&b($e),function(){$e!==null&&_&&_($e)}},[]),x.jsx("div",{id:r,ref:C,style:i,className:o,children:x.jsx(le.Provider,{value:m,children:m!==null?e:x.jsx(x.Fragment,{})})})}u.memo(Jg);var Yg=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var i=n.getInstance();i&&i.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=ue({updaterMap:ol,eventMap:il,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:ol,eventMap:il,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:x.jsx(le.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:x.jsx(x.Fragment,{})})})},e}(u.PureComponent),gn=typeof document<"u";function Xu(t){var e=t.url,n=t.id,r=t.nonce;return gn?new Promise(function(o,s){var a=document.getElementById(n),l=window;if(a){var c=a.getAttribute("data-state");if(a.src===e&&c!=="error"){if(c==="ready")return o(n);var f=l.initMap,d=a.onerror;l.initMap=function(){f&&f(),o(n)},a.onerror=function(v){d&&d(v),s(v)};return}else a.remove()}var h=document.createElement("script");h.type="text/javascript",h.src=e,h.id=n,h.async=!0,h.nonce=r||"",h.onerror=function(y){h.setAttribute("data-state","error"),s(y)},l.initMap=function(){h.setAttribute("data-state","ready"),o(n)},document.head.appendChild(h)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function sl(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
|
|
41
41
|
`,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
|
|
42
|
-
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function
|
|
42
|
+
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function wa(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return sl(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return sl(i)||Reflect.apply(n,t,[i]),i}}}function Qu(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,o=t.language,s=t.region,a=t.libraries,l=t.channel,c=t.mapIds,f=t.authReferrerPolicy,d=[];return qe(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?d.push("key=".concat(e)):n&&d.push("client=".concat(n)),i&&d.push("v=".concat(i)),o&&d.push("language=".concat(o)),s&&d.push("region=".concat(s)),a&&a.length&&d.push("libraries=".concat(a.sort().join(","))),l&&d.push("channel=".concat(l)),c&&c.length&&d.push("map_ids=".concat(c.join(","))),f&&d.push("auth_referrer_policy=".concat(f)),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(d.join("&"))}var xr=!1;function ef(){return x.jsx("div",{children:"Loading..."})}var ii={id:"script-loader",version:"weekly"};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=u.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return Vg(n,void 0,void 0,function(){function r(i){if(!xr)i();else if(gn)var o=window.setInterval(function(){xr||(window.clearInterval(o),i())},1)}return Fg(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){xr=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(o){return typeof o.src=="string"&&o.src.includes("maps.googleapis")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(o){return o.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(o){return o.innerText!==void 0&&o.innerText.length>0&&o.innerText.includes(".gm-")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&wa(),qe(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:Qu(n.props)};Xu(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
|
|
43
43
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(n.props.googleMapsApiKey||"-",") or Client ID (").concat(n.props.googleMapsClientId||"-",`) to <LoadScript />
|
|
44
44
|
Otherwise it is a Network issue.
|
|
45
|
-
`))})},n}return e.prototype.componentDidMount=function(){if(gn){if(window.google&&window.google.maps&&!xr){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),gn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(gn){this.cleanup();var r=function(){n.check.current||(delete window.google,xr=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||x.jsx(ef,{})]})},e.defaultProps=ii,e})(u.PureComponent);var
|
|
45
|
+
`))})},n}return e.prototype.componentDidMount=function(){if(gn){if(window.google&&window.google.maps&&!xr){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),gn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(gn){this.cleanup();var r=function(){n.check.current||(delete window.google,xr=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||x.jsx(ef,{})]})},e.defaultProps=ii,e})(u.PureComponent);var al;function Xg(t){var e=t.id,n=e===void 0?ii.id:e,r=t.version,i=r===void 0?ii.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.googleMapsClientId,l=t.language,c=t.region,f=t.libraries,d=t.preventGoogleFontsLoading,h=t.channel,v=t.mapIds,y=t.authReferrerPolicy,p=u.useRef(!1),L=u.useState(!1),w=L[0],g=L[1],b=u.useState(void 0),_=b[0],E=b[1];u.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]),u.useEffect(function(){gn&&d&&wa()},[d]),u.useEffect(function(){w&&qe(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[w]);var m=Qu({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:l,region:c,libraries:f,channel:h,mapIds:v,authReferrerPolicy:y});u.useEffect(function(){if(!gn)return;function R(){p.current&&(g(!0),al=m)}if(window.google&&window.google.maps&&al===m){R();return}Xu({id:n,url:m,nonce:o}).then(R).catch(function(O){p.current&&E(O),console.warn(`
|
|
46
46
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(a||"-",`)
|
|
47
47
|
Otherwise it is a Network issue.
|
|
48
|
-
`)),console.error(O)})},[n,
|
|
48
|
+
`)),console.error(O)})},[n,m,o]);var S=u.useRef();return u.useEffect(function(){S.current&&f!==S.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),S.current=f},[f]),{isLoaded:w,loadError:_,url:m}}var Qg=x.jsx(ef,{});function ev(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=ba(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=Xg(s),l=a.isLoaded,c=a.loadError;return u.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),u.useEffect(function(){c&&typeof r=="function"&&r(c)},[c,r]),u.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||Qg}u.memo(ev);/*! *****************************************************************************
|
|
49
49
|
Copyright (c) Microsoft Corporation.
|
|
50
50
|
|
|
51
51
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -58,7 +58,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
58
58
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
59
59
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
60
60
|
PERFORMANCE OF THIS SOFTWARE.
|
|
61
|
-
***************************************************************************** */function tv(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{c(r.next(f))}catch(d){s(d)}}function l(f){try{c(r.throw(f))}catch(d){s(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}var nv=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const cl="__googleMapsScriptId";var Xn;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Xn||(Xn={}));class Rn{constructor({apiKey:e,authReferrerPolicy:n,channel:r,client:i,id:o=cl,language:s,libraries:a=[],mapIds:l,nonce:c,region:f,retries:d=3,url:h="https://maps.googleapis.com/maps/api/js",version:v}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=n,this.channel=r,this.client=i,this.id=o||cl,this.language=s,this.libraries=a,this.mapIds=l,this.nonce=c,this.region=f,this.retries=d,this.url=h,this.version=v,Rn.instance){if(!nv(this.options,Rn.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Rn.instance.options)}`);return Rn.instance}Rn.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Xn.FAILURE:this.done?Xn.SUCCESS:this.loading?Xn.LOADING:Xn.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,n)=>{this.loadCallback(r=>{r?n(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,n;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((n=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||n===void 0)&&n.importLibrary||(o=>{let s,a,l,c="The Google Maps JavaScript API",f="google",d="importLibrary",h="__ib__",v=document,y=window;y=y[f]||(y[f]={});const p=y.maps||(y.maps={}),L=new Set,w=new URLSearchParams,m=()=>s||(s=new Promise((b,_)=>tv(this,void 0,void 0,function*(){var E;yield a=v.createElement("script"),a.id=this.id,w.set("libraries",[...L]+"");for(l in o)w.set(l.replace(/[A-Z]/g,g=>"_"+g[0].toLowerCase()),o[l]);w.set("callback",f+".maps."+h),a.src=this.url+"?"+w,p[h]=b,a.onerror=()=>s=_(Error(c+" could not load.")),a.nonce=this.nonce||((E=v.querySelector("script[nonce]"))===null||E===void 0?void 0:E.nonce)||"",v.head.append(a)})));p[d]?console.warn(c+" only loads once. Ignoring:",o):p[d]=(b,..._)=>L.add(b)&&m().then(()=>p[d](b,..._))})(r);const i=this.libraries.map(o=>this.importLibrary(o));i.length||i.push(this.importLibrary("core")),Promise.all(i).then(()=>this.callback(),o=>{const s=new ErrorEvent("error",{error:o});this.loadErrorCallback(s)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const n=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${n} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},n)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}var rv=["maps"];function iv(t){var e=t.id,n=e===void 0?ii.id:e,r=t.version,i=r===void 0?ii.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.language,l=t.region,c=t.libraries,f=c===void 0?rv:c,d=t.preventGoogleFontsLoading,h=t.mapIds,v=t.authReferrerPolicy,y=u.useRef(!1),p=u.useState(!1),L=p[0],w=p[1],m=u.useState(void 0),b=m[0],_=m[1];u.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var E=u.useMemo(function(){return new Rn({id:n,apiKey:s,version:i,libraries:f,language:a||"en",region:l||"US",mapIds:h||[],nonce:o||"",authReferrerPolicy:v||"origin"})},[n,s,i,f,a,l,h,o,v]);u.useEffect(function(){L||E.load().then(function(){y.current&&w(!0)}).catch(function(C){_(C)})},[]),u.useEffect(function(){gn&&d&&Sa()},[d]);var g=u.useRef();return u.useEffect(function(){g.current&&f!==g.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),g.current=f},[f]),{isLoaded:L,loadError:b}}var ul={},fl={options:function(t,e){t.setOptions(e)}};function ov(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(le),o=u.useState(null),s=o[0],a=o[1];return u.useEffect(function(){s!==null&&s.setMap(i)},[i]),u.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),u.useEffect(function(){var l=new google.maps.TrafficLayer(Q(Q({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(ov);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:fl,eventMap:ul,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:fl,eventMap:ul,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),ge(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);function sv(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(le),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}u.memo(sv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);function av(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(le),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}u.memo(av);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var dl={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},hl={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function lv(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,d=u.useContext(le),h=u.useState(null),v=h[0],y=h[1],p=u.useState(null),L=p[0],w=p[1],m=u.useState(null),b=m[0],_=m[1],E=u.useState(null),g=E[0],S=E[1],C=u.useState(null),P=C[0],M=C[1],O=u.useState(null),k=O[0],j=O[1],U=u.useState(null),$=U[0],G=U[1];return u.useEffect(function(){v!==null&&v.setMap(d)},[d]),u.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),u.useEffect(function(){n&&v!==null&&v.setDrawingMode(n)},[v,n]),u.useEffect(function(){v&&r&&(L!==null&&google.maps.event.removeListener(L),w(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),u.useEffect(function(){v&&i&&(b!==null&&google.maps.event.removeListener(b),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(g!==null&&google.maps.event.removeListener(g),S(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),u.useEffect(function(){v&&s&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),u.useEffect(function(){v&&a&&(k!==null&&google.maps.event.removeListener(k),j(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){qe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var z=new google.maps.drawing.DrawingManager(Q(Q({},e||{}),{map:d}));return n&&z.setDrawingMode(n),r&&w(google.maps.event.addListener(z,"circlecomplete",r)),i&&_(google.maps.event.addListener(z,"markercomplete",i)),o&&S(google.maps.event.addListener(z,"overlaycomplete",o)),s&&M(google.maps.event.addListener(z,"polygoncomplete",s)),a&&j(google.maps.event.addListener(z,"polylinecomplete",a)),l&&G(google.maps.event.addListener(z,"rectanglecomplete",l)),y(z),c&&c(z),function(){v!==null&&(L&&google.maps.event.removeListener(L),b&&google.maps.event.removeListener(b),g&&google.maps.event.removeListener(g),P&&google.maps.event.removeListener(P),k&&google.maps.event.removeListener(k),$&&google.maps.event.removeListener($),f&&f(v),v.setMap(null))}},[]),null}u.memo(lv);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},qe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:hl,eventMap:dl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:hl,eventMap:dl,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),ge(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var pl={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},gl={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ho={};function cv(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,c=t.clickable,f=t.cursor,d=t.icon,h=t.label,v=t.opacity,y=t.shape,p=t.title,L=t.zIndex,w=t.onClick,m=t.onDblClick,b=t.onDrag,_=t.onDragEnd,E=t.onDragStart,g=t.onMouseOut,S=t.onMouseOver,C=t.onMouseUp,P=t.onMouseDown,M=t.onRightClick,O=t.onClickableChanged,k=t.onCursorChanged,j=t.onAnimationChanged,U=t.onDraggableChanged,$=t.onFlatChanged,G=t.onIconChanged,z=t.onPositionChanged,Z=t.onShapeChanged,D=t.onTitleChanged,R=t.onVisibleChanged,A=t.onZindexChanged,T=t.onLoad,N=t.onUnmount,V=u.useContext(le),W=u.useState(null),I=W[0],K=W[1],ee=u.useState(null),q=ee[0],se=ee[1],de=u.useState(null),ue=de[0],Le=de[1],Fe=u.useState(null),we=Fe[0],Ee=Fe[1],Ie=u.useState(null),Me=Ie[0],Re=Ie[1],re=u.useState(null),ie=re[0],ze=re[1],Ye=u.useState(null),Y=Ye[0],$e=Ye[1],Ne=u.useState(null),ht=Ne[0],at=Ne[1],oe=u.useState(null),wn=oe[0],pi=oe[1],Mt=u.useState(null),Gt=Mt[0],gi=Mt[1],F=u.useState(null),te=F[0],J=F[1],he=u.useState(null),Te=he[0],xe=he[1],Ae=u.useState(null),ke=Ae[0],Be=Ae[1],ae=u.useState(null),ve=ae[0],ft=ae[1],Zt=u.useState(null),lt=Zt[0],Ke=Zt[1],pt=u.useState(null),gt=pt[0],Qe=pt[1],Nt=u.useState(null),kt=Nt[0],vt=Nt[1],tn=u.useState(null),Wt=tn[0],vr=tn[1],mr=u.useState(null),Fn=mr[0],yr=mr[1],zn=u.useState(null),Sn=zn[0],br=zn[1],nn=u.useState(null),Ln=nn[0],En=nn[1],xn=u.useState(null),Cn=xn[0],wr=xn[1];u.useEffect(function(){I!==null&&I.setMap(V)},[V]),u.useEffect(function(){typeof n<"u"&&I!==null&&I.setOptions(n)},[I,n]),u.useEffect(function(){typeof s<"u"&&I!==null&&I.setDraggable(s)},[I,s]),u.useEffect(function(){e&&I!==null&&I.setPosition(e)},[I,e]),u.useEffect(function(){typeof a<"u"&&I!==null&&I.setVisible(a)},[I,a]),u.useEffect(function(){I==null||I.setAnimation(l)},[I,l]),u.useEffect(function(){I&&m&&(q!==null&&google.maps.event.removeListener(q),se(google.maps.event.addListener(I,"dblclick",m)))},[m]),u.useEffect(function(){I&&_&&(ue!==null&&google.maps.event.removeListener(ue),Le(google.maps.event.addListener(I,"dragend",_)))},[_]),u.useEffect(function(){I&&E&&(we!==null&&google.maps.event.removeListener(we),Ee(google.maps.event.addListener(I,"dragstart",E)))},[E]),u.useEffect(function(){I&&P&&(Me!==null&&google.maps.event.removeListener(Me),Re(google.maps.event.addListener(I,"mousedown",P)))},[P]),u.useEffect(function(){I&&g&&(ie!==null&&google.maps.event.removeListener(ie),ze(google.maps.event.addListener(I,"mouseout",g)))},[g]),u.useEffect(function(){I&&S&&(Y!==null&&google.maps.event.removeListener(Y),$e(google.maps.event.addListener(I,"mouseover",S)))},[S]),u.useEffect(function(){I&&C&&(ht!==null&&google.maps.event.removeListener(ht),at(google.maps.event.addListener(I,"mouseup",C)))},[C]),u.useEffect(function(){I&&M&&(wn!==null&&google.maps.event.removeListener(wn),pi(google.maps.event.addListener(I,"rightclick",M)))},[M]),u.useEffect(function(){I&&w&&(Gt!==null&&google.maps.event.removeListener(Gt),gi(google.maps.event.addListener(I,"click",w)))},[w]),u.useEffect(function(){I&&b&&(te!==null&&google.maps.event.removeListener(te),J(google.maps.event.addListener(I,"drag",b)))},[b]),u.useEffect(function(){I&&O&&(Te!==null&&google.maps.event.removeListener(Te),xe(google.maps.event.addListener(I,"clickable_changed",O)))},[O]),u.useEffect(function(){I&&k&&(ke!==null&&google.maps.event.removeListener(ke),Be(google.maps.event.addListener(I,"cursor_changed",k)))},[k]),u.useEffect(function(){I&&j&&(ve!==null&&google.maps.event.removeListener(ve),ft(google.maps.event.addListener(I,"animation_changed",j)))},[j]),u.useEffect(function(){I&&U&&(lt!==null&&google.maps.event.removeListener(lt),Ke(google.maps.event.addListener(I,"draggable_changed",U)))},[U]),u.useEffect(function(){I&&$&&(gt!==null&&google.maps.event.removeListener(gt),Qe(google.maps.event.addListener(I,"flat_changed",$)))},[$]),u.useEffect(function(){I&&G&&(kt!==null&&google.maps.event.removeListener(kt),vt(google.maps.event.addListener(I,"icon_changed",G)))},[G]),u.useEffect(function(){I&&z&&(Wt!==null&&google.maps.event.removeListener(Wt),vr(google.maps.event.addListener(I,"position_changed",z)))},[z]),u.useEffect(function(){I&&Z&&(Fn!==null&&google.maps.event.removeListener(Fn),yr(google.maps.event.addListener(I,"shape_changed",Z)))},[Z]),u.useEffect(function(){I&&D&&(Sn!==null&&google.maps.event.removeListener(Sn),br(google.maps.event.addListener(I,"title_changed",D)))},[D]),u.useEffect(function(){I&&R&&(Ln!==null&&google.maps.event.removeListener(Ln),En(google.maps.event.addListener(I,"visible_changed",R)))},[R]),u.useEffect(function(){I&&A&&(Cn!==null&&google.maps.event.removeListener(Cn),wr(google.maps.event.addListener(I,"zindex_changed",A)))},[A]),u.useEffect(function(){var rn=Q(Q(Q({},n||ho),r?ho:{map:V}),{position:e}),ne=new google.maps.Marker(rn);return r?r.addMarker(ne,!!i):ne.setMap(V),e&&ne.setPosition(e),typeof a<"u"&&ne.setVisible(a),typeof s<"u"&&ne.setDraggable(s),typeof c<"u"&&ne.setClickable(c),typeof f=="string"&&ne.setCursor(f),d&&ne.setIcon(d),typeof h<"u"&&ne.setLabel(h),typeof v<"u"&&ne.setOpacity(v),y&&ne.setShape(y),typeof p=="string"&&ne.setTitle(p),typeof L=="number"&&ne.setZIndex(L),m&&se(google.maps.event.addListener(ne,"dblclick",m)),_&&Le(google.maps.event.addListener(ne,"dragend",_)),E&&Ee(google.maps.event.addListener(ne,"dragstart",E)),P&&Re(google.maps.event.addListener(ne,"mousedown",P)),g&&ze(google.maps.event.addListener(ne,"mouseout",g)),S&&$e(google.maps.event.addListener(ne,"mouseover",S)),C&&at(google.maps.event.addListener(ne,"mouseup",C)),M&&pi(google.maps.event.addListener(ne,"rightclick",M)),w&&gi(google.maps.event.addListener(ne,"click",w)),b&&J(google.maps.event.addListener(ne,"drag",b)),O&&xe(google.maps.event.addListener(ne,"clickable_changed",O)),k&&Be(google.maps.event.addListener(ne,"cursor_changed",k)),j&&ft(google.maps.event.addListener(ne,"animation_changed",j)),U&&Ke(google.maps.event.addListener(ne,"draggable_changed",U)),$&&Qe(google.maps.event.addListener(ne,"flat_changed",$)),G&&vt(google.maps.event.addListener(ne,"icon_changed",G)),z&&vr(google.maps.event.addListener(ne,"position_changed",z)),Z&&yr(google.maps.event.addListener(ne,"shape_changed",Z)),D&&br(google.maps.event.addListener(ne,"title_changed",D)),R&&En(google.maps.event.addListener(ne,"visible_changed",R)),A&&wr(google.maps.event.addListener(ne,"zindex_changed",A)),K(ne),T&&T(ne),function(){q!==null&&google.maps.event.removeListener(q),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),Me!==null&&google.maps.event.removeListener(Me),ie!==null&&google.maps.event.removeListener(ie),Y!==null&&google.maps.event.removeListener(Y),ht!==null&&google.maps.event.removeListener(ht),wn!==null&&google.maps.event.removeListener(wn),Gt!==null&&google.maps.event.removeListener(Gt),Te!==null&&google.maps.event.removeListener(Te),ke!==null&&google.maps.event.removeListener(ke),ve!==null&&google.maps.event.removeListener(ve),lt!==null&&google.maps.event.removeListener(lt),gt!==null&&google.maps.event.removeListener(gt),kt!==null&&google.maps.event.removeListener(kt),Wt!==null&&google.maps.event.removeListener(Wt),Sn!==null&&google.maps.event.removeListener(Sn),Ln!==null&&google.maps.event.removeListener(Ln),Cn!==null&&google.maps.event.removeListener(Cn),N&&N(ne),r?r.removeMarker(ne,!!i):ne&&ne.setMap(null)}},[]);var Sr=u.useMemo(function(){return o?u.Children.map(o,function(rn){if(!u.isValidElement(rn))return rn;var ne=rn;return u.cloneElement(ne,{anchor:I})}):null},[o,I]);return x.jsx(x.Fragment,{children:Sr})||null}u.memo(cv);var tf=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=Q(Q(Q({},this.props.options||ho),this.props.clusterer?ho:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=fe({updaterMap:gl,eventMap:pl,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:gl,eventMap:pl,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ge(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=u.Children.map(this.props.children,function(i){if(!u.isValidElement(i))return i;var o=i;return u.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=le,e}(u.PureComponent),uv=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),c=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),fv=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new uv(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,c=this.markers;l<c.length;l++){var f=c[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function dv(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var hv=2e3,pv=500,gv="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",vv="png",mv=[53,56,66,78,90],yv="cluster",nf=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||gv,this.imageExtension=r.imageExtension||vv,this.imageSizes=r.imageSizes||mv,this.calculator=r.calculator||dv,this.batchSize=r.batchSize||hv,this.batchSizeIE=r.batchSizeIE||pv,this.clusterClass=r.clusterClass||yv,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var c=l[a];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),c=e.getPosition();if(l&&c){var f=this.distanceBetweenPoints(l,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new fv(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),c=e;c<l;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),St={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ce={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},bv={};function wv(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,h=t.imageSizes,v=t.maxZoom,y=t.minimumClusterSize,p=t.styles,L=t.title,w=t.zoomOnClick,m=t.onClick,b=t.onClusteringBegin,_=t.onClusteringEnd,E=t.onMouseOver,g=t.onMouseOut,S=t.onLoad,C=t.onUnmount,P=u.useState(null),M=P[0],O=P[1],k=u.useContext(le),j=u.useState(null),U=j[0],$=j[1],G=u.useState(null),z=G[0],Z=G[1],D=u.useState(null),R=D[0],A=D[1],T=u.useState(null),N=T[0],V=T[1],W=u.useState(null),I=W[0],K=W[1];return u.useEffect(function(){M&&g&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(M,St.onMouseOut,g)))},[g]),u.useEffect(function(){M&&E&&(I!==null&&google.maps.event.removeListener(I),K(google.maps.event.addListener(M,St.onMouseOver,E)))},[E]),u.useEffect(function(){M&&m&&(U!==null&&google.maps.event.removeListener(U),$(google.maps.event.addListener(M,St.onClick,m)))},[m]),u.useEffect(function(){M&&b&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(M,St.onClusteringBegin,b)))},[b]),u.useEffect(function(){M&&_&&(R!==null&&google.maps.event.removeListener(R),Z(google.maps.event.addListener(M,St.onClusteringEnd,_)))},[_]),u.useEffect(function(){typeof r<"u"&&M!==null&&Ce.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&Ce.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&Ce.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&Ce.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&Ce.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&Ce.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&Ce.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&Ce.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&Ce.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof h<"u"&&M!==null&&Ce.imageSizes(M,h)},[M,h]),u.useEffect(function(){typeof v<"u"&&M!==null&&Ce.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof y<"u"&&M!==null&&Ce.minimumClusterSize(M,y)},[M,y]),u.useEffect(function(){typeof p<"u"&&M!==null&&Ce.styles(M,p)},[M,p]),u.useEffect(function(){typeof L<"u"&&M!==null&&Ce.title(M,L)},[M,L]),u.useEffect(function(){typeof w<"u"&&M!==null&&Ce.zoomOnClick(M,w)},[M,w]),u.useEffect(function(){if(k){var ee=Q({},n||bv),q=new nf(k,[],ee);return r&&Ce.averageCenter(q,r),i&&Ce.batchSizeIE(q,i),o&&Ce.calculator(q,o),s&&Ce.clusterClass(q,s),a&&Ce.enableRetinaIcons(q,a),l&&Ce.gridSize(q,l),c&&Ce.ignoreHidden(q,c),f&&Ce.imageExtension(q,f),d&&Ce.imagePath(q,d),h&&Ce.imageSizes(q,h),v&&Ce.maxZoom(q,v),y&&Ce.minimumClusterSize(q,y),p&&Ce.styles(q,p),L&&Ce.title(q,L),w&&Ce.zoomOnClick(q,w),g&&V(google.maps.event.addListener(q,St.onMouseOut,g)),E&&K(google.maps.event.addListener(q,St.onMouseOver,E)),m&&$(google.maps.event.addListener(q,St.onClick,m)),b&&Z(google.maps.event.addListener(q,St.onClusteringBegin,b)),_&&A(google.maps.event.addListener(q,St.onClusteringEnd,_)),O(q),S&&S(q),function(){N!==null&&google.maps.event.removeListener(N),I!==null&&google.maps.event.removeListener(I),U!==null&&google.maps.event.removeListener(U),z!==null&&google.maps.event.removeListener(z),R!==null&&google.maps.event.removeListener(R),C&&C(q)}}},[]),M!==null&&e(M)||null}u.memo(wv);var Sv=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new nf(this.context,[],this.props.options);this.registeredEvents=fe({updaterMap:Ce,eventMap:St,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Ce,eventMap:St,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),ge(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=le,e}(u.PureComponent);function vl(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var rf=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||vl(c)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,vl))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,y=this.infoBoxClearance.height,p=this.getProjection(),L=p.fromLatLngToContainerPixel(this.position);L!==null&&(L.x<-c+v?r=L.x+c-v:L.x+d+c+v>a&&(r=L.x+d+c+v-a),this.alignBottom?L.y<-f+y+h?i=L.y+f-y-h:L.y+f+y>l&&(i=L.y+f+y-l):L.y<-f+y?i=L.y+f-y:L.y+h+f+y>l&&(i=L.y+h+f+y-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),ml={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},yl={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Lv={};function Ev(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=u.useContext(le),y=u.useState(null),p=y[0],L=y[1],w=u.useState(null),m=w[0],b=w[1],_=u.useState(null),E=_[0],g=_[1],S=u.useState(null),C=S[0],P=S[1],M=u.useState(null),O=M[0],k=M[1],j=u.useState(null),U=j[0],$=j[1],G=u.useRef(null);return u.useEffect(function(){v&&p!==null&&(p.close(),n?p.open(v,n):p.getPosition()&&p.open(v))},[v,p,n]),u.useEffect(function(){r&&p!==null&&p.setOptions(r)},[p,r]),u.useEffect(function(){if(i&&p!==null){var z=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);p.setPosition(z)}},[i]),u.useEffect(function(){typeof o=="number"&&p!==null&&p.setZIndex(o)},[o]),u.useEffect(function(){p&&s&&(m!==null&&google.maps.event.removeListener(m),b(google.maps.event.addListener(p,"closeclick",s)))},[s]),u.useEffect(function(){p&&a&&(E!==null&&google.maps.event.removeListener(E),g(google.maps.event.addListener(p,"domready",a)))},[a]),u.useEffect(function(){p&&l&&(C!==null&&google.maps.event.removeListener(C),P(google.maps.event.addListener(p,"content_changed",l)))},[l]),u.useEffect(function(){p&&c&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(p,"position_changed",c)))},[c]),u.useEffect(function(){p&&f&&(U!==null&&google.maps.event.removeListener(U),$(google.maps.event.addListener(p,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var z=r||Lv,Z=z.position,D=wa(z,["position"]),R=void 0;Z&&!(Z instanceof google.maps.LatLng)&&(R=new google.maps.LatLng(Z.lat,Z.lng));var A=new rf(Q(Q({},D),R?{position:R}:{}));G.current=document.createElement("div"),L(A),s&&b(google.maps.event.addListener(A,"closeclick",s)),a&&g(google.maps.event.addListener(A,"domready",a)),l&&P(google.maps.event.addListener(A,"content_changed",l)),c&&k(google.maps.event.addListener(A,"position_changed",c)),f&&$(google.maps.event.addListener(A,"zindex_changed",f)),A.setContent(G.current),n?A.open(v,n):A.getPosition()?A.open(v):qe(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(A)}return function(){p!==null&&(m&&google.maps.event.removeListener(m),C&&google.maps.event.removeListener(C),E&&google.maps.event.removeListener(E),O&&google.maps.event.removeListener(O),U&&google.maps.event.removeListener(U),h&&h(p),p.close())}},[]),G.current?dr.createPortal(u.Children.only(e),G.current):null}u.memo(Ev);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):qe(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=wa(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new rf(Q(Q({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:yl,eventMap:ml,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:yl,eventMap:ml,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),ge(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?dr.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e})(u.PureComponent);var xv=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},bl=Yu(xv);const wl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Jo=1,Cr=8;class La{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Jo)throw new Error(`Got v${i} data when expected v${Jo}.`);const o=wl[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new La(a,s,o,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=wl.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Cr,e),this.coords=new this.ArrayType(this.data,Cr+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Cr+s+a+l),this.ids=new this.IndexArrayType(this.data,Cr,e),this.coords=new this.ArrayType(this.data,Cr+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Jo<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ts(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],c=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,h=l.pop()||0;if(d-h<=a){for(let L=h;L<=d;L++){const w=s[2*L],m=s[2*L+1];w>=e&&w<=r&&m>=n&&m<=i&&c.push(o[L])}continue}const v=h+d>>1,y=s[2*v],p=s[2*v+1];y>=e&&y<=r&&p>=n&&p<=i&&c.push(o[v]),(f===0?e<=y:n<=p)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=p)&&(l.push(v+1),l.push(d),l.push(1-f))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],c=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let L=h;L<=d;L++)Sl(o[2*L],o[2*L+1],e,n)<=c&&l.push(i[L]);continue}const v=h+d>>1,y=o[2*v],p=o[2*v+1];Sl(y,p,e,n)<=c&&l.push(i[v]),(f===0?e-r<=y:n-r<=p)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=p)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function Ts(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;of(t,e,s,r,i,o),Ts(t,e,n,r,s-1,1-o),Ts(t,e,n,s+1,i,1-o)}function of(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,d=Math.log(c),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(c-h)/c)*(f-c/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/c+v)),p=Math.min(i,Math.floor(n+(c-f)*h/c+v));of(t,e,n,y,p,o)}const s=e[2*n+o];let a=r,l=i;for(_r(t,e,r,n),e[2*i+o]>s&&_r(t,e,r,i);a<l;){for(_r(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?_r(t,e,r,l):(l++,_r(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function _r(t,e,n,r){Yo(t,n,r),Yo(e,2*n,2*r),Yo(e,2*n+1,2*r+1)}function Yo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Sl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const Cv={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ll=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),_n=2,fn=3,Xo=4,cn=5,sf=6;class _v{constructor(e){this.options=Object.assign(Object.create(Cv),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const c=e[l];if(!c.geometry)continue;const[f,d]=c.geometry.coordinates,h=Ll(wi(f)),v=Ll(Si(d));s.push(h,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const c=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],l=a.range(wi(r),Si(s),wi(o),Si(i)),c=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(c[h+cn]>1?El(c,h,this.clusterProps):this.points[c[h+fn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],c=s[n*this.stride+1],f=o.within(l,c,a),d=[];for(const h of f){const v=h*this.stride;s[v+Xo]===e&&d.push(s[v+cn]>1?El(s,v,this.clusterProps):this.points[s[v+fn]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,c=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,c,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,c,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,c,l/o,f),i.data,-1,r,o,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new La(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,o,s){for(const a of e){const l=a*this.stride,c=n[l+cn]>1;let f,d,h;if(c)f=af(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const p=this.points[n[l+fn]];f=p.properties;const[L,w]=p.geometry.coordinates;d=wi(L),h=Si(w)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:f};let y;c||this.options.generateId?y=n[l+fn]:y=this.points[n[l+fn]].id,y!==void 0&&(v.id=y),s.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,c=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+_n]<=n)continue;l[d+_n]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),p=l[d+cn];let L=p;for(const w of y){const m=w*f;l[m+_n]>n&&(L+=l[m+cn])}if(L>p&&L>=s){let w=h*p,m=v*p,b,_=-1;const E=((d/f|0)<<5)+(n+1)+this.points.length;for(const g of y){const S=g*f;if(l[S+_n]<=n)continue;l[S+_n]=n;const C=l[S+cn];w+=l[S]*C,m+=l[S+1]*C,l[S+Xo]=E,o&&(b||(b=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(b)),o(b,this._map(l,S)))}l[d+Xo]=E,c.push(w/L,m/L,1/0,E,-1,L),o&&c.push(_)}else{for(let w=0;w<f;w++)c.push(l[d+w]);if(L>1)for(const w of y){const m=w*f;if(!(l[m+_n]<=n)){l[m+_n]=n;for(let b=0;b<f;b++)c.push(l[m+b])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+cn]>1){const s=this.clusterProps[e[n+sf]];return r?Object.assign({},s):s}const i=this.points[e[n+fn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function El(t,e,n){return{type:"Feature",id:t[e+fn],properties:af(t,e,n),geometry:{type:"Point",coordinates:[Ov(t[e]),Mv(t[e+1])]}}}function af(t,e,n){const r=t[e+cn],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+sf],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+fn],point_count:r,point_count_abbreviated:i})}function wi(t){return t/360+.5}function Si(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Ov(t){return(t-.5)*360}function Mv(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
61
|
+
***************************************************************************** */function tv(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{c(r.next(f))}catch(d){s(d)}}function l(f){try{c(r.throw(f))}catch(d){s(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}var nv=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const ll="__googleMapsScriptId";var Xn;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Xn||(Xn={}));class Rn{constructor({apiKey:e,authReferrerPolicy:n,channel:r,client:i,id:o=ll,language:s,libraries:a=[],mapIds:l,nonce:c,region:f,retries:d=3,url:h="https://maps.googleapis.com/maps/api/js",version:v}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=n,this.channel=r,this.client=i,this.id=o||ll,this.language=s,this.libraries=a,this.mapIds=l,this.nonce=c,this.region=f,this.retries=d,this.url=h,this.version=v,Rn.instance){if(!nv(this.options,Rn.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Rn.instance.options)}`);return Rn.instance}Rn.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Xn.FAILURE:this.done?Xn.SUCCESS:this.loading?Xn.LOADING:Xn.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,n)=>{this.loadCallback(r=>{r?n(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,n;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((n=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||n===void 0)&&n.importLibrary||(o=>{let s,a,l,c="The Google Maps JavaScript API",f="google",d="importLibrary",h="__ib__",v=document,y=window;y=y[f]||(y[f]={});const p=y.maps||(y.maps={}),L=new Set,w=new URLSearchParams,g=()=>s||(s=new Promise((b,_)=>tv(this,void 0,void 0,function*(){var E;yield a=v.createElement("script"),a.id=this.id,w.set("libraries",[...L]+"");for(l in o)w.set(l.replace(/[A-Z]/g,m=>"_"+m[0].toLowerCase()),o[l]);w.set("callback",f+".maps."+h),a.src=this.url+"?"+w,p[h]=b,a.onerror=()=>s=_(Error(c+" could not load.")),a.nonce=this.nonce||((E=v.querySelector("script[nonce]"))===null||E===void 0?void 0:E.nonce)||"",v.head.append(a)})));p[d]?console.warn(c+" only loads once. Ignoring:",o):p[d]=(b,..._)=>L.add(b)&&g().then(()=>p[d](b,..._))})(r);const i=this.libraries.map(o=>this.importLibrary(o));i.length||i.push(this.importLibrary("core")),Promise.all(i).then(()=>this.callback(),o=>{const s=new ErrorEvent("error",{error:o});this.loadErrorCallback(s)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const n=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${n} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},n)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}var rv=["maps"];function iv(t){var e=t.id,n=e===void 0?ii.id:e,r=t.version,i=r===void 0?ii.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.language,l=t.region,c=t.libraries,f=c===void 0?rv:c,d=t.preventGoogleFontsLoading,h=t.mapIds,v=t.authReferrerPolicy,y=u.useRef(!1),p=u.useState(!1),L=p[0],w=p[1],g=u.useState(void 0),b=g[0],_=g[1];u.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var E=u.useMemo(function(){return new Rn({id:n,apiKey:s,version:i,libraries:f,language:a||"en",region:l||"US",mapIds:h||[],nonce:o||"",authReferrerPolicy:v||"origin"})},[n,s,i,f,a,l,h,o,v]);u.useEffect(function(){L||E.load().then(function(){y.current&&w(!0)}).catch(function(C){_(C)})},[]),u.useEffect(function(){gn&&d&&wa()},[d]);var m=u.useRef();return u.useEffect(function(){m.current&&f!==m.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),m.current=f},[f]),{isLoaded:L,loadError:b}}var cl={},ul={options:function(t,e){t.setOptions(e)}};function ov(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(le),o=u.useState(null),s=o[0],a=o[1];return u.useEffect(function(){s!==null&&s.setMap(i)},[i]),u.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),u.useEffect(function(){var l=new google.maps.TrafficLayer(Q(Q({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(ov);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=ue({updaterMap:ul,eventMap:cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:ul,eventMap:cl,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),pe(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);function sv(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(le),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}u.memo(sv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);function av(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(le),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}u.memo(av);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var fl={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},dl={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function lv(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,d=u.useContext(le),h=u.useState(null),v=h[0],y=h[1],p=u.useState(null),L=p[0],w=p[1],g=u.useState(null),b=g[0],_=g[1],E=u.useState(null),m=E[0],S=E[1],C=u.useState(null),R=C[0],M=C[1],O=u.useState(null),P=O[0],j=O[1],B=u.useState(null),$=B[0],G=B[1];return u.useEffect(function(){v!==null&&v.setMap(d)},[d]),u.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),u.useEffect(function(){n&&v!==null&&v.setDrawingMode(n)},[v,n]),u.useEffect(function(){v&&r&&(L!==null&&google.maps.event.removeListener(L),w(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),u.useEffect(function(){v&&i&&(b!==null&&google.maps.event.removeListener(b),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(m!==null&&google.maps.event.removeListener(m),S(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),u.useEffect(function(){v&&s&&(R!==null&&google.maps.event.removeListener(R),M(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),u.useEffect(function(){v&&a&&(P!==null&&google.maps.event.removeListener(P),j(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){qe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var z=new google.maps.drawing.DrawingManager(Q(Q({},e||{}),{map:d}));return n&&z.setDrawingMode(n),r&&w(google.maps.event.addListener(z,"circlecomplete",r)),i&&_(google.maps.event.addListener(z,"markercomplete",i)),o&&S(google.maps.event.addListener(z,"overlaycomplete",o)),s&&M(google.maps.event.addListener(z,"polygoncomplete",s)),a&&j(google.maps.event.addListener(z,"polylinecomplete",a)),l&&G(google.maps.event.addListener(z,"rectanglecomplete",l)),y(z),c&&c(z),function(){v!==null&&(L&&google.maps.event.removeListener(L),b&&google.maps.event.removeListener(b),m&&google.maps.event.removeListener(m),R&&google.maps.event.removeListener(R),P&&google.maps.event.removeListener(P),$&&google.maps.event.removeListener($),f&&f(v),v.setMap(null))}},[]),null}u.memo(lv);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},qe(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=ue({updaterMap:dl,eventMap:fl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:dl,eventMap:fl,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),pe(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var hl={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},pl={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ho={};function cv(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,c=t.clickable,f=t.cursor,d=t.icon,h=t.label,v=t.opacity,y=t.shape,p=t.title,L=t.zIndex,w=t.onClick,g=t.onDblClick,b=t.onDrag,_=t.onDragEnd,E=t.onDragStart,m=t.onMouseOut,S=t.onMouseOver,C=t.onMouseUp,R=t.onMouseDown,M=t.onRightClick,O=t.onClickableChanged,P=t.onCursorChanged,j=t.onAnimationChanged,B=t.onDraggableChanged,$=t.onFlatChanged,G=t.onIconChanged,z=t.onPositionChanged,Z=t.onShapeChanged,A=t.onTitleChanged,T=t.onVisibleChanged,k=t.onZindexChanged,D=t.onLoad,U=t.onUnmount,V=u.useContext(le),W=u.useState(null),I=W[0],X=W[1],ee=u.useState(null),K=ee[0],ie=ee[1],fe=u.useState(null),ge=fe[0],Le=fe[1],Fe=u.useState(null),we=Fe[0],Ee=Fe[1],Ie=u.useState(null),Me=Ie[0],Re=Ie[1],re=u.useState(null),oe=re[0],ze=re[1],Ye=u.useState(null),J=Ye[0],$e=Ye[1],Ne=u.useState(null),ht=Ne[0],at=Ne[1],se=u.useState(null),wn=se[0],pi=se[1],Mt=u.useState(null),Gt=Mt[0],gi=Mt[1],F=u.useState(null),te=F[0],q=F[1],de=u.useState(null),Te=de[0],xe=de[1],Ae=u.useState(null),ke=Ae[0],Be=Ae[1],ae=u.useState(null),ve=ae[0],ft=ae[1],Zt=u.useState(null),lt=Zt[0],Ke=Zt[1],pt=u.useState(null),gt=pt[0],Qe=pt[1],Nt=u.useState(null),kt=Nt[0],vt=Nt[1],tn=u.useState(null),Wt=tn[0],vr=tn[1],mr=u.useState(null),Fn=mr[0],yr=mr[1],zn=u.useState(null),Sn=zn[0],br=zn[1],nn=u.useState(null),Ln=nn[0],En=nn[1],xn=u.useState(null),Cn=xn[0],wr=xn[1];u.useEffect(function(){I!==null&&I.setMap(V)},[V]),u.useEffect(function(){typeof n<"u"&&I!==null&&I.setOptions(n)},[I,n]),u.useEffect(function(){typeof s<"u"&&I!==null&&I.setDraggable(s)},[I,s]),u.useEffect(function(){e&&I!==null&&I.setPosition(e)},[I,e]),u.useEffect(function(){typeof a<"u"&&I!==null&&I.setVisible(a)},[I,a]),u.useEffect(function(){I==null||I.setAnimation(l)},[I,l]),u.useEffect(function(){I&&g&&(K!==null&&google.maps.event.removeListener(K),ie(google.maps.event.addListener(I,"dblclick",g)))},[g]),u.useEffect(function(){I&&_&&(ge!==null&&google.maps.event.removeListener(ge),Le(google.maps.event.addListener(I,"dragend",_)))},[_]),u.useEffect(function(){I&&E&&(we!==null&&google.maps.event.removeListener(we),Ee(google.maps.event.addListener(I,"dragstart",E)))},[E]),u.useEffect(function(){I&&R&&(Me!==null&&google.maps.event.removeListener(Me),Re(google.maps.event.addListener(I,"mousedown",R)))},[R]),u.useEffect(function(){I&&m&&(oe!==null&&google.maps.event.removeListener(oe),ze(google.maps.event.addListener(I,"mouseout",m)))},[m]),u.useEffect(function(){I&&S&&(J!==null&&google.maps.event.removeListener(J),$e(google.maps.event.addListener(I,"mouseover",S)))},[S]),u.useEffect(function(){I&&C&&(ht!==null&&google.maps.event.removeListener(ht),at(google.maps.event.addListener(I,"mouseup",C)))},[C]),u.useEffect(function(){I&&M&&(wn!==null&&google.maps.event.removeListener(wn),pi(google.maps.event.addListener(I,"rightclick",M)))},[M]),u.useEffect(function(){I&&w&&(Gt!==null&&google.maps.event.removeListener(Gt),gi(google.maps.event.addListener(I,"click",w)))},[w]),u.useEffect(function(){I&&b&&(te!==null&&google.maps.event.removeListener(te),q(google.maps.event.addListener(I,"drag",b)))},[b]),u.useEffect(function(){I&&O&&(Te!==null&&google.maps.event.removeListener(Te),xe(google.maps.event.addListener(I,"clickable_changed",O)))},[O]),u.useEffect(function(){I&&P&&(ke!==null&&google.maps.event.removeListener(ke),Be(google.maps.event.addListener(I,"cursor_changed",P)))},[P]),u.useEffect(function(){I&&j&&(ve!==null&&google.maps.event.removeListener(ve),ft(google.maps.event.addListener(I,"animation_changed",j)))},[j]),u.useEffect(function(){I&&B&&(lt!==null&&google.maps.event.removeListener(lt),Ke(google.maps.event.addListener(I,"draggable_changed",B)))},[B]),u.useEffect(function(){I&&$&&(gt!==null&&google.maps.event.removeListener(gt),Qe(google.maps.event.addListener(I,"flat_changed",$)))},[$]),u.useEffect(function(){I&&G&&(kt!==null&&google.maps.event.removeListener(kt),vt(google.maps.event.addListener(I,"icon_changed",G)))},[G]),u.useEffect(function(){I&&z&&(Wt!==null&&google.maps.event.removeListener(Wt),vr(google.maps.event.addListener(I,"position_changed",z)))},[z]),u.useEffect(function(){I&&Z&&(Fn!==null&&google.maps.event.removeListener(Fn),yr(google.maps.event.addListener(I,"shape_changed",Z)))},[Z]),u.useEffect(function(){I&&A&&(Sn!==null&&google.maps.event.removeListener(Sn),br(google.maps.event.addListener(I,"title_changed",A)))},[A]),u.useEffect(function(){I&&T&&(Ln!==null&&google.maps.event.removeListener(Ln),En(google.maps.event.addListener(I,"visible_changed",T)))},[T]),u.useEffect(function(){I&&k&&(Cn!==null&&google.maps.event.removeListener(Cn),wr(google.maps.event.addListener(I,"zindex_changed",k)))},[k]),u.useEffect(function(){var rn=Q(Q(Q({},n||ho),r?ho:{map:V}),{position:e}),ne=new google.maps.Marker(rn);return r?r.addMarker(ne,!!i):ne.setMap(V),e&&ne.setPosition(e),typeof a<"u"&&ne.setVisible(a),typeof s<"u"&&ne.setDraggable(s),typeof c<"u"&&ne.setClickable(c),typeof f=="string"&&ne.setCursor(f),d&&ne.setIcon(d),typeof h<"u"&&ne.setLabel(h),typeof v<"u"&&ne.setOpacity(v),y&&ne.setShape(y),typeof p=="string"&&ne.setTitle(p),typeof L=="number"&&ne.setZIndex(L),g&&ie(google.maps.event.addListener(ne,"dblclick",g)),_&&Le(google.maps.event.addListener(ne,"dragend",_)),E&&Ee(google.maps.event.addListener(ne,"dragstart",E)),R&&Re(google.maps.event.addListener(ne,"mousedown",R)),m&&ze(google.maps.event.addListener(ne,"mouseout",m)),S&&$e(google.maps.event.addListener(ne,"mouseover",S)),C&&at(google.maps.event.addListener(ne,"mouseup",C)),M&&pi(google.maps.event.addListener(ne,"rightclick",M)),w&&gi(google.maps.event.addListener(ne,"click",w)),b&&q(google.maps.event.addListener(ne,"drag",b)),O&&xe(google.maps.event.addListener(ne,"clickable_changed",O)),P&&Be(google.maps.event.addListener(ne,"cursor_changed",P)),j&&ft(google.maps.event.addListener(ne,"animation_changed",j)),B&&Ke(google.maps.event.addListener(ne,"draggable_changed",B)),$&&Qe(google.maps.event.addListener(ne,"flat_changed",$)),G&&vt(google.maps.event.addListener(ne,"icon_changed",G)),z&&vr(google.maps.event.addListener(ne,"position_changed",z)),Z&&yr(google.maps.event.addListener(ne,"shape_changed",Z)),A&&br(google.maps.event.addListener(ne,"title_changed",A)),T&&En(google.maps.event.addListener(ne,"visible_changed",T)),k&&wr(google.maps.event.addListener(ne,"zindex_changed",k)),X(ne),D&&D(ne),function(){K!==null&&google.maps.event.removeListener(K),ge!==null&&google.maps.event.removeListener(ge),we!==null&&google.maps.event.removeListener(we),Me!==null&&google.maps.event.removeListener(Me),oe!==null&&google.maps.event.removeListener(oe),J!==null&&google.maps.event.removeListener(J),ht!==null&&google.maps.event.removeListener(ht),wn!==null&&google.maps.event.removeListener(wn),Gt!==null&&google.maps.event.removeListener(Gt),Te!==null&&google.maps.event.removeListener(Te),ke!==null&&google.maps.event.removeListener(ke),ve!==null&&google.maps.event.removeListener(ve),lt!==null&&google.maps.event.removeListener(lt),gt!==null&&google.maps.event.removeListener(gt),kt!==null&&google.maps.event.removeListener(kt),Wt!==null&&google.maps.event.removeListener(Wt),Sn!==null&&google.maps.event.removeListener(Sn),Ln!==null&&google.maps.event.removeListener(Ln),Cn!==null&&google.maps.event.removeListener(Cn),U&&U(ne),r?r.removeMarker(ne,!!i):ne&&ne.setMap(null)}},[]);var Sr=u.useMemo(function(){return o?u.Children.map(o,function(rn){if(!u.isValidElement(rn))return rn;var ne=rn;return u.cloneElement(ne,{anchor:I})}):null},[o,I]);return x.jsx(x.Fragment,{children:Sr})||null}u.memo(cv);var tf=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=Q(Q(Q({},this.props.options||ho),this.props.clusterer?ho:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=ue({updaterMap:pl,eventMap:hl,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:pl,eventMap:hl,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),pe(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=u.Children.map(this.props.children,function(i){if(!u.isValidElement(i))return i;var o=i;return u.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=le,e}(u.PureComponent),uv=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),c=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),fv=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new uv(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,c=this.markers;l<c.length;l++){var f=c[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function dv(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var hv=2e3,pv=500,gv="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",vv="png",mv=[53,56,66,78,90],yv="cluster",nf=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||gv,this.imageExtension=r.imageExtension||vv,this.imageSizes=r.imageSizes||mv,this.calculator=r.calculator||dv,this.batchSize=r.batchSize||hv,this.batchSizeIE=r.batchSizeIE||pv,this.clusterClass=r.clusterClass||yv,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var c=l[a];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),c=e.getPosition();if(l&&c){var f=this.distanceBetweenPoints(l,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new fv(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),c=e;c<l;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),St={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ce={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},bv={};function wv(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,h=t.imageSizes,v=t.maxZoom,y=t.minimumClusterSize,p=t.styles,L=t.title,w=t.zoomOnClick,g=t.onClick,b=t.onClusteringBegin,_=t.onClusteringEnd,E=t.onMouseOver,m=t.onMouseOut,S=t.onLoad,C=t.onUnmount,R=u.useState(null),M=R[0],O=R[1],P=u.useContext(le),j=u.useState(null),B=j[0],$=j[1],G=u.useState(null),z=G[0],Z=G[1],A=u.useState(null),T=A[0],k=A[1],D=u.useState(null),U=D[0],V=D[1],W=u.useState(null),I=W[0],X=W[1];return u.useEffect(function(){M&&m&&(U!==null&&google.maps.event.removeListener(U),V(google.maps.event.addListener(M,St.onMouseOut,m)))},[m]),u.useEffect(function(){M&&E&&(I!==null&&google.maps.event.removeListener(I),X(google.maps.event.addListener(M,St.onMouseOver,E)))},[E]),u.useEffect(function(){M&&g&&(B!==null&&google.maps.event.removeListener(B),$(google.maps.event.addListener(M,St.onClick,g)))},[g]),u.useEffect(function(){M&&b&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(M,St.onClusteringBegin,b)))},[b]),u.useEffect(function(){M&&_&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(M,St.onClusteringEnd,_)))},[_]),u.useEffect(function(){typeof r<"u"&&M!==null&&Ce.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&Ce.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&Ce.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&Ce.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&Ce.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&Ce.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&Ce.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&Ce.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&Ce.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof h<"u"&&M!==null&&Ce.imageSizes(M,h)},[M,h]),u.useEffect(function(){typeof v<"u"&&M!==null&&Ce.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof y<"u"&&M!==null&&Ce.minimumClusterSize(M,y)},[M,y]),u.useEffect(function(){typeof p<"u"&&M!==null&&Ce.styles(M,p)},[M,p]),u.useEffect(function(){typeof L<"u"&&M!==null&&Ce.title(M,L)},[M,L]),u.useEffect(function(){typeof w<"u"&&M!==null&&Ce.zoomOnClick(M,w)},[M,w]),u.useEffect(function(){if(P){var ee=Q({},n||bv),K=new nf(P,[],ee);return r&&Ce.averageCenter(K,r),i&&Ce.batchSizeIE(K,i),o&&Ce.calculator(K,o),s&&Ce.clusterClass(K,s),a&&Ce.enableRetinaIcons(K,a),l&&Ce.gridSize(K,l),c&&Ce.ignoreHidden(K,c),f&&Ce.imageExtension(K,f),d&&Ce.imagePath(K,d),h&&Ce.imageSizes(K,h),v&&Ce.maxZoom(K,v),y&&Ce.minimumClusterSize(K,y),p&&Ce.styles(K,p),L&&Ce.title(K,L),w&&Ce.zoomOnClick(K,w),m&&V(google.maps.event.addListener(K,St.onMouseOut,m)),E&&X(google.maps.event.addListener(K,St.onMouseOver,E)),g&&$(google.maps.event.addListener(K,St.onClick,g)),b&&Z(google.maps.event.addListener(K,St.onClusteringBegin,b)),_&&k(google.maps.event.addListener(K,St.onClusteringEnd,_)),O(K),S&&S(K),function(){U!==null&&google.maps.event.removeListener(U),I!==null&&google.maps.event.removeListener(I),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),C&&C(K)}}},[]),M!==null&&e(M)||null}u.memo(wv);var Sv=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new nf(this.context,[],this.props.options);this.registeredEvents=ue({updaterMap:Ce,eventMap:St,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Ce,eventMap:St,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),pe(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=le,e}(u.PureComponent);function gl(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var rf=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||gl(c)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,gl))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,y=this.infoBoxClearance.height,p=this.getProjection(),L=p.fromLatLngToContainerPixel(this.position);L!==null&&(L.x<-c+v?r=L.x+c-v:L.x+d+c+v>a&&(r=L.x+d+c+v-a),this.alignBottom?L.y<-f+y+h?i=L.y+f-y-h:L.y+f+y>l&&(i=L.y+f+y-l):L.y<-f+y?i=L.y+f-y:L.y+h+f+y>l&&(i=L.y+h+f+y-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),vl={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ml={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Lv={};function Ev(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=u.useContext(le),y=u.useState(null),p=y[0],L=y[1],w=u.useState(null),g=w[0],b=w[1],_=u.useState(null),E=_[0],m=_[1],S=u.useState(null),C=S[0],R=S[1],M=u.useState(null),O=M[0],P=M[1],j=u.useState(null),B=j[0],$=j[1],G=u.useRef(null);return u.useEffect(function(){v&&p!==null&&(p.close(),n?p.open(v,n):p.getPosition()&&p.open(v))},[v,p,n]),u.useEffect(function(){r&&p!==null&&p.setOptions(r)},[p,r]),u.useEffect(function(){if(i&&p!==null){var z=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);p.setPosition(z)}},[i]),u.useEffect(function(){typeof o=="number"&&p!==null&&p.setZIndex(o)},[o]),u.useEffect(function(){p&&s&&(g!==null&&google.maps.event.removeListener(g),b(google.maps.event.addListener(p,"closeclick",s)))},[s]),u.useEffect(function(){p&&a&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(p,"domready",a)))},[a]),u.useEffect(function(){p&&l&&(C!==null&&google.maps.event.removeListener(C),R(google.maps.event.addListener(p,"content_changed",l)))},[l]),u.useEffect(function(){p&&c&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(p,"position_changed",c)))},[c]),u.useEffect(function(){p&&f&&(B!==null&&google.maps.event.removeListener(B),$(google.maps.event.addListener(p,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var z=r||Lv,Z=z.position,A=ba(z,["position"]),T=void 0;Z&&!(Z instanceof google.maps.LatLng)&&(T=new google.maps.LatLng(Z.lat,Z.lng));var k=new rf(Q(Q({},A),T?{position:T}:{}));G.current=document.createElement("div"),L(k),s&&b(google.maps.event.addListener(k,"closeclick",s)),a&&m(google.maps.event.addListener(k,"domready",a)),l&&R(google.maps.event.addListener(k,"content_changed",l)),c&&P(google.maps.event.addListener(k,"position_changed",c)),f&&$(google.maps.event.addListener(k,"zindex_changed",f)),k.setContent(G.current),n?k.open(v,n):k.getPosition()?k.open(v):qe(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(k)}return function(){p!==null&&(g&&google.maps.event.removeListener(g),C&&google.maps.event.removeListener(C),E&&google.maps.event.removeListener(E),O&&google.maps.event.removeListener(O),B&&google.maps.event.removeListener(B),h&&h(p),p.close())}},[]),G.current?dr.createPortal(u.Children.only(e),G.current):null}u.memo(Ev);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):qe(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=ba(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new rf(Q(Q({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ue({updaterMap:ml,eventMap:vl,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:ml,eventMap:vl,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),pe(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?dr.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e})(u.PureComponent);var xv=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},yl=Yu(xv);const bl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Jo=1,Cr=8;class Sa{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Jo)throw new Error(`Got v${i} data when expected v${Jo}.`);const o=bl[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Sa(a,s,o,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=bl.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Cr,e),this.coords=new this.ArrayType(this.data,Cr+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Cr+s+a+l),this.ids=new this.IndexArrayType(this.data,Cr,e),this.coords=new this.ArrayType(this.data,Cr+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Jo<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Rs(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],c=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,h=l.pop()||0;if(d-h<=a){for(let L=h;L<=d;L++){const w=s[2*L],g=s[2*L+1];w>=e&&w<=r&&g>=n&&g<=i&&c.push(o[L])}continue}const v=h+d>>1,y=s[2*v],p=s[2*v+1];y>=e&&y<=r&&p>=n&&p<=i&&c.push(o[v]),(f===0?e<=y:n<=p)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=p)&&(l.push(v+1),l.push(d),l.push(1-f))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],c=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let L=h;L<=d;L++)wl(o[2*L],o[2*L+1],e,n)<=c&&l.push(i[L]);continue}const v=h+d>>1,y=o[2*v],p=o[2*v+1];wl(y,p,e,n)<=c&&l.push(i[v]),(f===0?e-r<=y:n-r<=p)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=p)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function Rs(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;of(t,e,s,r,i,o),Rs(t,e,n,r,s-1,1-o),Rs(t,e,n,s+1,i,1-o)}function of(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,d=Math.log(c),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(c-h)/c)*(f-c/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/c+v)),p=Math.min(i,Math.floor(n+(c-f)*h/c+v));of(t,e,n,y,p,o)}const s=e[2*n+o];let a=r,l=i;for(_r(t,e,r,n),e[2*i+o]>s&&_r(t,e,r,i);a<l;){for(_r(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?_r(t,e,r,l):(l++,_r(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function _r(t,e,n,r){Yo(t,n,r),Yo(e,2*n,2*r),Yo(e,2*n+1,2*r+1)}function Yo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function wl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const Cv={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Sl=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),_n=2,fn=3,Xo=4,cn=5,sf=6;class _v{constructor(e){this.options=Object.assign(Object.create(Cv),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const c=e[l];if(!c.geometry)continue;const[f,d]=c.geometry.coordinates,h=Sl(wi(f)),v=Sl(Si(d));s.push(h,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const c=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],l=a.range(wi(r),Si(s),wi(o),Si(i)),c=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(c[h+cn]>1?Ll(c,h,this.clusterProps):this.points[c[h+fn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],c=s[n*this.stride+1],f=o.within(l,c,a),d=[];for(const h of f){const v=h*this.stride;s[v+Xo]===e&&d.push(s[v+cn]>1?Ll(s,v,this.clusterProps):this.points[s[v+fn]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,c=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,c,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,c,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,c,l/o,f),i.data,-1,r,o,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new Sa(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,o,s){for(const a of e){const l=a*this.stride,c=n[l+cn]>1;let f,d,h;if(c)f=af(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const p=this.points[n[l+fn]];f=p.properties;const[L,w]=p.geometry.coordinates;d=wi(L),h=Si(w)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:f};let y;c||this.options.generateId?y=n[l+fn]:y=this.points[n[l+fn]].id,y!==void 0&&(v.id=y),s.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,c=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+_n]<=n)continue;l[d+_n]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),p=l[d+cn];let L=p;for(const w of y){const g=w*f;l[g+_n]>n&&(L+=l[g+cn])}if(L>p&&L>=s){let w=h*p,g=v*p,b,_=-1;const E=((d/f|0)<<5)+(n+1)+this.points.length;for(const m of y){const S=m*f;if(l[S+_n]<=n)continue;l[S+_n]=n;const C=l[S+cn];w+=l[S]*C,g+=l[S+1]*C,l[S+Xo]=E,o&&(b||(b=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(b)),o(b,this._map(l,S)))}l[d+Xo]=E,c.push(w/L,g/L,1/0,E,-1,L),o&&c.push(_)}else{for(let w=0;w<f;w++)c.push(l[d+w]);if(L>1)for(const w of y){const g=w*f;if(!(l[g+_n]<=n)){l[g+_n]=n;for(let b=0;b<f;b++)c.push(l[g+b])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+cn]>1){const s=this.clusterProps[e[n+sf]];return r?Object.assign({},s):s}const i=this.points[e[n+fn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Ll(t,e,n){return{type:"Feature",id:t[e+fn],properties:af(t,e,n),geometry:{type:"Point",coordinates:[Ov(t[e]),Mv(t[e+1])]}}}function af(t,e,n){const r=t[e+cn],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+sf],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+fn],point_count:r,point_count_abbreviated:i})}function wi(t){return t/360+.5}function Si(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Ov(t){return(t-.5)*360}function Mv(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
62
62
|
Copyright (c) Microsoft Corporation.
|
|
63
63
|
|
|
64
64
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -71,12 +71,12 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
71
71
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
72
72
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
73
73
|
PERFORMANCE OF THIS SOFTWARE.
|
|
74
|
-
***************************************************************************** */function kv(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class wt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class
|
|
74
|
+
***************************************************************************** */function kv(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class wt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Ts{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(wt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>wt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(wt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Pv{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Rv(e)}}const Rv=t=>t.map(n=>new Ts({position:wt.getPosition(n),markers:[n]}));class Tv extends Pv{constructor(e){var{maxZoom:n,radius:r=60}=e,i=kv(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new _v(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!yl(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(o=>{const s=wt.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng(),s.lat()]},properties:{marker:o}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!yl(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new Ts({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new Ts({markers:[i],position:wt.getPosition(i)})}}class Av{constructor(e,n){this.markers={sum:e.length};const r=n.map(o=>o.count),i=r.reduce((o,s)=>o+s,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class Dv{render({count:e,position:n},r,i){const s=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
75
75
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
76
76
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
77
77
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
78
78
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
|
|
79
|
-
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(wt.isAdvancedMarkerAvailable(i)){const f=document.createElement("div");f.innerHTML=s;const d=f.firstElementChild;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const c={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function Iv(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Ea{constructor(){Iv(Ea,google.maps.OverlayView)}}var Fr;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Fr||(Fr={}));const jv=(t,e,n)=>{n.fitBounds(e.bounds)};class Nv extends Ea{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Tv(r),renderer:o=new Dv,onClusterClick:s=jv}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(wt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Fr.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||wt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>wt.setMap(s,null)))}google.maps.event.trigger(this,Fr.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>wt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Av(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>wt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Fr.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),wt.setMap(r.marker,n)})}}function Bv(t){var e=Hg(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new Nv(Q(Q({},t),{map:e}));i(o)}},[e]),r}function Uv(t){var e=t.children,n=t.options,r=Bv(n);return r!==null?e(r):null}u.memo(Uv);var xl={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Cl={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Vv(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=u.useContext(le),y=u.useState(null),p=y[0],L=y[1],w=u.useState(null),m=w[0],b=w[1],_=u.useState(null),E=_[0],g=_[1],S=u.useState(null),C=S[0],P=S[1],M=u.useState(null),O=M[0],k=M[1],j=u.useState(null),U=j[0],$=j[1],G=u.useRef(null);return u.useEffect(function(){p!==null&&(p.close(),n?p.open(v,n):p.getPosition()&&p.open(v))},[v,p,n]),u.useEffect(function(){r&&p!==null&&p.setOptions(r)},[p,r]),u.useEffect(function(){i&&p!==null&&p.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&p!==null&&p.setZIndex(o)},[o]),u.useEffect(function(){p&&s&&(m!==null&&google.maps.event.removeListener(m),b(google.maps.event.addListener(p,"closeclick",s)))},[s]),u.useEffect(function(){p&&a&&(E!==null&&google.maps.event.removeListener(E),g(google.maps.event.addListener(p,"domready",a)))},[a]),u.useEffect(function(){p&&l&&(C!==null&&google.maps.event.removeListener(C),P(google.maps.event.addListener(p,"content_changed",l)))},[l]),u.useEffect(function(){p&&c&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(p,"position_changed",c)))},[c]),u.useEffect(function(){p&&f&&(U!==null&&google.maps.event.removeListener(U),$(google.maps.event.addListener(p,"zindex_changed",f)))},[f]),u.useEffect(function(){var z=new google.maps.InfoWindow(Q({},r||{}));return L(z),G.current=document.createElement("div"),s&&b(google.maps.event.addListener(z,"closeclick",s)),a&&g(google.maps.event.addListener(z,"domready",a)),l&&P(google.maps.event.addListener(z,"content_changed",l)),c&&k(google.maps.event.addListener(z,"position_changed",c)),f&&$(google.maps.event.addListener(z,"zindex_changed",f)),z.setContent(G.current),i&&z.setPosition(i),o&&z.setZIndex(o),n?z.open(v,n):z.getPosition()?z.open(v):qe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(z),function(){m&&google.maps.event.removeListener(m),C&&google.maps.event.removeListener(C),E&&google.maps.event.removeListener(E),O&&google.maps.event.removeListener(O),U&&google.maps.event.removeListener(U),h&&h(z),z.close()}},[]),G.current?dr.createPortal(u.Children.only(e),G.current):null}u.memo(Vv);var lf=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):qe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(Q({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:Cl,eventMap:xl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Cl,eventMap:xl,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(ge(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?dr.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(u.PureComponent),_l={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ol={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Fv={};function zv(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,p=t.onClick,L=t.onDrag,w=t.onLoad,m=t.onUnmount,b=u.useContext(le),_=u.useState(null),E=_[0],g=_[1],S=u.useState(null),C=S[0],P=S[1],M=u.useState(null),O=M[0],k=M[1],j=u.useState(null),U=j[0],$=j[1],G=u.useState(null),z=G[0],Z=G[1],D=u.useState(null),R=D[0],A=D[1],T=u.useState(null),N=T[0],V=T[1],W=u.useState(null),I=W[0],K=W[1],ee=u.useState(null),q=ee[0],se=ee[1],de=u.useState(null),ue=de[0],Le=de[1],Fe=u.useState(null),we=Fe[0],Ee=Fe[1],Ie=u.useState(null),Me=Ie[0],Re=Ie[1];return u.useEffect(function(){E!==null&&E.setMap(b)},[b]),u.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),u.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),u.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),u.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),u.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),u.useEffect(function(){E&&s&&(C!==null&&google.maps.event.removeListener(C),P(google.maps.event.addListener(E,"dblclick",s)))},[s]),u.useEffect(function(){E&&a&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(E,"dragend",a)))},[a]),u.useEffect(function(){E&&l&&(U!==null&&google.maps.event.removeListener(U),$(google.maps.event.addListener(E,"dragstart",l)))},[l]),u.useEffect(function(){E&&c&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(E,"mousedown",c)))},[c]),u.useEffect(function(){E&&f&&(R!==null&&google.maps.event.removeListener(R),A(google.maps.event.addListener(E,"mousemove",f)))},[f]),u.useEffect(function(){E&&d&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(E,"mouseout",d)))},[d]),u.useEffect(function(){E&&h&&(I!==null&&google.maps.event.removeListener(I),K(google.maps.event.addListener(E,"mouseover",h)))},[h]),u.useEffect(function(){E&&v&&(q!==null&&google.maps.event.removeListener(q),se(google.maps.event.addListener(E,"mouseup",v)))},[v]),u.useEffect(function(){E&&y&&(ue!==null&&google.maps.event.removeListener(ue),Le(google.maps.event.addListener(E,"rightclick",y)))},[y]),u.useEffect(function(){E&&p&&(we!==null&&google.maps.event.removeListener(we),Ee(google.maps.event.addListener(E,"click",p)))},[p]),u.useEffect(function(){E&&L&&(Me!==null&&google.maps.event.removeListener(Me),Re(google.maps.event.addListener(E,"drag",L)))},[L]),u.useEffect(function(){var re=new google.maps.Polyline(Q(Q({},e||Fv),{map:b}));return o&&re.setPath(o),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),s&&P(google.maps.event.addListener(re,"dblclick",s)),a&&k(google.maps.event.addListener(re,"dragend",a)),l&&$(google.maps.event.addListener(re,"dragstart",l)),c&&Z(google.maps.event.addListener(re,"mousedown",c)),f&&A(google.maps.event.addListener(re,"mousemove",f)),d&&V(google.maps.event.addListener(re,"mouseout",d)),h&&K(google.maps.event.addListener(re,"mouseover",h)),v&&se(google.maps.event.addListener(re,"mouseup",v)),y&&Le(google.maps.event.addListener(re,"rightclick",y)),p&&Ee(google.maps.event.addListener(re,"click",p)),L&&Re(google.maps.event.addListener(re,"drag",L)),g(re),w&&w(re),function(){C!==null&&google.maps.event.removeListener(C),O!==null&&google.maps.event.removeListener(O),U!==null&&google.maps.event.removeListener(U),z!==null&&google.maps.event.removeListener(z),R!==null&&google.maps.event.removeListener(R),N!==null&&google.maps.event.removeListener(N),I!==null&&google.maps.event.removeListener(I),q!==null&&google.maps.event.removeListener(q),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),m&&m(re),re.setMap(null)}},[]),null}u.memo(zv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Ol,eventMap:_l,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Ol,eventMap:_l,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),ge(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Ml={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},kl={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function $v(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,p=t.onRightClick,L=t.onClick,w=t.onDrag,m=t.onLoad,b=t.onUnmount,_=u.useContext(le),E=u.useState(null),g=E[0],S=E[1],C=u.useState(null),P=C[0],M=C[1],O=u.useState(null),k=O[0],j=O[1],U=u.useState(null),$=U[0],G=U[1],z=u.useState(null),Z=z[0],D=z[1],R=u.useState(null),A=R[0],T=R[1],N=u.useState(null),V=N[0],W=N[1],I=u.useState(null),K=I[0],ee=I[1],q=u.useState(null),se=q[0],de=q[1],ue=u.useState(null),Le=ue[0],Fe=ue[1],we=u.useState(null),Ee=we[0],Ie=we[1],Me=u.useState(null),Re=Me[0],re=Me[1];return u.useEffect(function(){g!==null&&g.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&g!==null&&g.setOptions(e)},[g,e]),u.useEffect(function(){typeof n<"u"&&g!==null&&g.setDraggable(n)},[g,n]),u.useEffect(function(){typeof r<"u"&&g!==null&&g.setEditable(r)},[g,r]),u.useEffect(function(){typeof i<"u"&&g!==null&&g.setVisible(i)},[g,i]),u.useEffect(function(){typeof o<"u"&&g!==null&&g.setPath(o)},[g,o]),u.useEffect(function(){typeof s<"u"&&g!==null&&g.setPaths(s)},[g,s]),u.useEffect(function(){g&&a&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(g,"dblclick",a)))},[a]),u.useEffect(function(){g&&l&&(k!==null&&google.maps.event.removeListener(k),j(google.maps.event.addListener(g,"dragend",l)))},[l]),u.useEffect(function(){g&&c&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(g,"dragstart",c)))},[c]),u.useEffect(function(){g&&f&&(Z!==null&&google.maps.event.removeListener(Z),D(google.maps.event.addListener(g,"mousedown",f)))},[f]),u.useEffect(function(){g&&d&&(A!==null&&google.maps.event.removeListener(A),T(google.maps.event.addListener(g,"mousemove",d)))},[d]),u.useEffect(function(){g&&h&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(g,"mouseout",h)))},[h]),u.useEffect(function(){g&&v&&(K!==null&&google.maps.event.removeListener(K),ee(google.maps.event.addListener(g,"mouseover",v)))},[v]),u.useEffect(function(){g&&y&&(se!==null&&google.maps.event.removeListener(se),de(google.maps.event.addListener(g,"mouseup",y)))},[y]),u.useEffect(function(){g&&p&&(Le!==null&&google.maps.event.removeListener(Le),Fe(google.maps.event.addListener(g,"rightclick",p)))},[p]),u.useEffect(function(){g&&L&&(Ee!==null&&google.maps.event.removeListener(Ee),Ie(google.maps.event.addListener(g,"click",L)))},[L]),u.useEffect(function(){g&&w&&(Re!==null&&google.maps.event.removeListener(Re),re(google.maps.event.addListener(g,"drag",w)))},[w]),u.useEffect(function(){var ie=new google.maps.Polygon(Q(Q({},e||{}),{map:_}));return o&&ie.setPath(o),s&&ie.setPaths(s),typeof i<"u"&&ie.setVisible(i),typeof r<"u"&&ie.setEditable(r),typeof n<"u"&&ie.setDraggable(n),a&&M(google.maps.event.addListener(ie,"dblclick",a)),l&&j(google.maps.event.addListener(ie,"dragend",l)),c&&G(google.maps.event.addListener(ie,"dragstart",c)),f&&D(google.maps.event.addListener(ie,"mousedown",f)),d&&T(google.maps.event.addListener(ie,"mousemove",d)),h&&W(google.maps.event.addListener(ie,"mouseout",h)),v&&ee(google.maps.event.addListener(ie,"mouseover",v)),y&&de(google.maps.event.addListener(ie,"mouseup",y)),p&&Fe(google.maps.event.addListener(ie,"rightclick",p)),L&&Ie(google.maps.event.addListener(ie,"click",L)),w&&re(google.maps.event.addListener(ie,"drag",w)),S(ie),m&&m(ie),function(){P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),Z!==null&&google.maps.event.removeListener(Z),A!==null&&google.maps.event.removeListener(A),V!==null&&google.maps.event.removeListener(V),K!==null&&google.maps.event.removeListener(K),se!==null&&google.maps.event.removeListener(se),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),b&&b(ie),ie.setMap(null)}},[]),null}u.memo($v);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:kl,eventMap:Ml,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:kl,eventMap:Ml,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),ge(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Pl={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Rl={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Hv(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,p=t.onClick,L=t.onDrag,w=t.onBoundsChanged,m=t.onLoad,b=t.onUnmount,_=u.useContext(le),E=u.useState(null),g=E[0],S=E[1],C=u.useState(null),P=C[0],M=C[1],O=u.useState(null),k=O[0],j=O[1],U=u.useState(null),$=U[0],G=U[1],z=u.useState(null),Z=z[0],D=z[1],R=u.useState(null),A=R[0],T=R[1],N=u.useState(null),V=N[0],W=N[1],I=u.useState(null),K=I[0],ee=I[1],q=u.useState(null),se=q[0],de=q[1],ue=u.useState(null),Le=ue[0],Fe=ue[1],we=u.useState(null),Ee=we[0],Ie=we[1],Me=u.useState(null),Re=Me[0],re=Me[1],ie=u.useState(null),ze=ie[0],Ye=ie[1];return u.useEffect(function(){g!==null&&g.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&g!==null&&g.setOptions(e)},[g,e]),u.useEffect(function(){typeof r<"u"&&g!==null&&g.setDraggable(r)},[g,r]),u.useEffect(function(){typeof i<"u"&&g!==null&&g.setEditable(i)},[g,i]),u.useEffect(function(){typeof o<"u"&&g!==null&&g.setVisible(o)},[g,o]),u.useEffect(function(){typeof n<"u"&&g!==null&&g.setBounds(n)},[g,n]),u.useEffect(function(){g&&s&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(g,"dblclick",s)))},[s]),u.useEffect(function(){g&&a&&(k!==null&&google.maps.event.removeListener(k),j(google.maps.event.addListener(g,"dragend",a)))},[a]),u.useEffect(function(){g&&l&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(g,"dragstart",l)))},[l]),u.useEffect(function(){g&&c&&(Z!==null&&google.maps.event.removeListener(Z),D(google.maps.event.addListener(g,"mousedown",c)))},[c]),u.useEffect(function(){g&&f&&(A!==null&&google.maps.event.removeListener(A),T(google.maps.event.addListener(g,"mousemove",f)))},[f]),u.useEffect(function(){g&&d&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(g,"mouseout",d)))},[d]),u.useEffect(function(){g&&h&&(K!==null&&google.maps.event.removeListener(K),ee(google.maps.event.addListener(g,"mouseover",h)))},[h]),u.useEffect(function(){g&&v&&(se!==null&&google.maps.event.removeListener(se),de(google.maps.event.addListener(g,"mouseup",v)))},[v]),u.useEffect(function(){g&&y&&(Le!==null&&google.maps.event.removeListener(Le),Fe(google.maps.event.addListener(g,"rightclick",y)))},[y]),u.useEffect(function(){g&&p&&(Ee!==null&&google.maps.event.removeListener(Ee),Ie(google.maps.event.addListener(g,"click",p)))},[p]),u.useEffect(function(){g&&L&&(Re!==null&&google.maps.event.removeListener(Re),re(google.maps.event.addListener(g,"drag",L)))},[L]),u.useEffect(function(){g&&w&&(ze!==null&&google.maps.event.removeListener(ze),Ye(google.maps.event.addListener(g,"bounds_changed",w)))},[w]),u.useEffect(function(){var Y=new google.maps.Rectangle(Q(Q({},e||{}),{map:_}));return typeof o<"u"&&Y.setVisible(o),typeof i<"u"&&Y.setEditable(i),typeof r<"u"&&Y.setDraggable(r),typeof n<"u"&&Y.setBounds(n),s&&M(google.maps.event.addListener(Y,"dblclick",s)),a&&j(google.maps.event.addListener(Y,"dragend",a)),l&&G(google.maps.event.addListener(Y,"dragstart",l)),c&&D(google.maps.event.addListener(Y,"mousedown",c)),f&&T(google.maps.event.addListener(Y,"mousemove",f)),d&&W(google.maps.event.addListener(Y,"mouseout",d)),h&&ee(google.maps.event.addListener(Y,"mouseover",h)),v&&de(google.maps.event.addListener(Y,"mouseup",v)),y&&Fe(google.maps.event.addListener(Y,"rightclick",y)),p&&Ie(google.maps.event.addListener(Y,"click",p)),L&&re(google.maps.event.addListener(Y,"drag",L)),w&&Ye(google.maps.event.addListener(Y,"bounds_changed",w)),S(Y),m&&m(Y),function(){P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),Z!==null&&google.maps.event.removeListener(Z),A!==null&&google.maps.event.removeListener(A),V!==null&&google.maps.event.removeListener(V),K!==null&&google.maps.event.removeListener(K),se!==null&&google.maps.event.removeListener(se),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),Re!==null&&google.maps.event.removeListener(Re),ze!==null&&google.maps.event.removeListener(ze),b&&b(Y),Y.setMap(null)}},[]),null}u.memo(Hv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Rl,eventMap:Pl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Rl,eventMap:Pl,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),ge(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Tl={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Al={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Gv={};function Zv(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,p=t.onRightClick,L=t.onClick,w=t.onDrag,m=t.onCenterChanged,b=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,g=u.useContext(le),S=u.useState(null),C=S[0],P=S[1],M=u.useState(null),O=M[0],k=M[1],j=u.useState(null),U=j[0],$=j[1],G=u.useState(null),z=G[0],Z=G[1],D=u.useState(null),R=D[0],A=D[1],T=u.useState(null),N=T[0],V=T[1],W=u.useState(null),I=W[0],K=W[1],ee=u.useState(null),q=ee[0],se=ee[1],de=u.useState(null),ue=de[0],Le=de[1],Fe=u.useState(null),we=Fe[0],Ee=Fe[1],Ie=u.useState(null),Me=Ie[0],Re=Ie[1],re=u.useState(null),ie=re[0],ze=re[1],Ye=u.useState(null),Y=Ye[0],$e=Ye[1],Ne=u.useState(null),ht=Ne[0],at=Ne[1];return u.useEffect(function(){C!==null&&C.setMap(g)},[g]),u.useEffect(function(){typeof e<"u"&&C!==null&&C.setOptions(e)},[C,e]),u.useEffect(function(){typeof i<"u"&&C!==null&&C.setDraggable(i)},[C,i]),u.useEffect(function(){typeof o<"u"&&C!==null&&C.setEditable(o)},[C,o]),u.useEffect(function(){typeof s<"u"&&C!==null&&C.setVisible(s)},[C,s]),u.useEffect(function(){typeof r=="number"&&C!==null&&C.setRadius(r)},[C,r]),u.useEffect(function(){typeof n<"u"&&C!==null&&C.setCenter(n)},[C,n]),u.useEffect(function(){C&&a&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(C,"dblclick",a)))},[a]),u.useEffect(function(){C&&l&&(U!==null&&google.maps.event.removeListener(U),$(google.maps.event.addListener(C,"dragend",l)))},[l]),u.useEffect(function(){C&&c&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(C,"dragstart",c)))},[c]),u.useEffect(function(){C&&f&&(R!==null&&google.maps.event.removeListener(R),A(google.maps.event.addListener(C,"mousedown",f)))},[f]),u.useEffect(function(){C&&d&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(C,"mousemove",d)))},[d]),u.useEffect(function(){C&&h&&(I!==null&&google.maps.event.removeListener(I),K(google.maps.event.addListener(C,"mouseout",h)))},[h]),u.useEffect(function(){C&&v&&(q!==null&&google.maps.event.removeListener(q),se(google.maps.event.addListener(C,"mouseover",v)))},[v]),u.useEffect(function(){C&&y&&(ue!==null&&google.maps.event.removeListener(ue),Le(google.maps.event.addListener(C,"mouseup",y)))},[y]),u.useEffect(function(){C&&p&&(we!==null&&google.maps.event.removeListener(we),Ee(google.maps.event.addListener(C,"rightclick",p)))},[p]),u.useEffect(function(){C&&L&&(Me!==null&&google.maps.event.removeListener(Me),Re(google.maps.event.addListener(C,"click",L)))},[L]),u.useEffect(function(){C&&w&&(ie!==null&&google.maps.event.removeListener(ie),ze(google.maps.event.addListener(C,"drag",w)))},[w]),u.useEffect(function(){C&&m&&(Y!==null&&google.maps.event.removeListener(Y),$e(google.maps.event.addListener(C,"center_changed",m)))},[L]),u.useEffect(function(){C&&b&&(ht!==null&&google.maps.event.removeListener(ht),at(google.maps.event.addListener(C,"radius_changed",b)))},[b]),u.useEffect(function(){var oe=new google.maps.Circle(Q(Q({},e||Gv),{map:g}));return typeof r=="number"&&oe.setRadius(r),typeof n<"u"&&oe.setCenter(n),typeof r=="number"&&oe.setRadius(r),typeof s<"u"&&oe.setVisible(s),typeof o<"u"&&oe.setEditable(o),typeof i<"u"&&oe.setDraggable(i),a&&k(google.maps.event.addListener(oe,"dblclick",a)),l&&$(google.maps.event.addListener(oe,"dragend",l)),c&&Z(google.maps.event.addListener(oe,"dragstart",c)),f&&A(google.maps.event.addListener(oe,"mousedown",f)),d&&V(google.maps.event.addListener(oe,"mousemove",d)),h&&K(google.maps.event.addListener(oe,"mouseout",h)),v&&se(google.maps.event.addListener(oe,"mouseover",v)),y&&Le(google.maps.event.addListener(oe,"mouseup",y)),p&&Ee(google.maps.event.addListener(oe,"rightclick",p)),L&&Re(google.maps.event.addListener(oe,"click",L)),w&&ze(google.maps.event.addListener(oe,"drag",w)),m&&$e(google.maps.event.addListener(oe,"center_changed",m)),b&&at(google.maps.event.addListener(oe,"radius_changed",b)),P(oe),_&&_(oe),function(){O!==null&&google.maps.event.removeListener(O),U!==null&&google.maps.event.removeListener(U),z!==null&&google.maps.event.removeListener(z),R!==null&&google.maps.event.removeListener(R),N!==null&&google.maps.event.removeListener(N),I!==null&&google.maps.event.removeListener(I),q!==null&&google.maps.event.removeListener(q),ue!==null&&google.maps.event.removeListener(ue),we!==null&&google.maps.event.removeListener(we),Me!==null&&google.maps.event.removeListener(Me),Y!==null&&google.maps.event.removeListener(Y),ht!==null&&google.maps.event.removeListener(ht),E&&E(oe),oe.setMap(null)}},[]),null}u.memo(Zv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Al,eventMap:Tl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Al,eventMap:Tl,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),ge(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Dl={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Il={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Wv(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,p=t.onLoad,L=t.onUnmount,w=u.useContext(le),m=u.useState(null),b=m[0],_=m[1],E=u.useState(null),g=E[0],S=E[1],C=u.useState(null),P=C[0],M=C[1],O=u.useState(null),k=O[0],j=O[1],U=u.useState(null),$=U[0],G=U[1],z=u.useState(null),Z=z[0],D=z[1],R=u.useState(null),A=R[0],T=R[1],N=u.useState(null),V=N[0],W=N[1],I=u.useState(null),K=I[0],ee=I[1],q=u.useState(null),se=q[0],de=q[1],ue=u.useState(null),Le=ue[0],Fe=ue[1],we=u.useState(null),Ee=we[0],Ie=we[1],Me=u.useState(null),Re=Me[0],re=Me[1],ie=u.useState(null),ze=ie[0],Ye=ie[1];return u.useEffect(function(){b!==null&&b.setMap(w)},[w]),u.useEffect(function(){b&&r&&(g!==null&&google.maps.event.removeListener(g),S(google.maps.event.addListener(b,"dblclick",r)))},[r]),u.useEffect(function(){b&&i&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(b,"mousedown",i)))},[i]),u.useEffect(function(){b&&o&&(k!==null&&google.maps.event.removeListener(k),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),u.useEffect(function(){b&&s&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(b,"mouseout",s)))},[s]),u.useEffect(function(){b&&a&&(Z!==null&&google.maps.event.removeListener(Z),D(google.maps.event.addListener(b,"mouseover",a)))},[a]),u.useEffect(function(){b&&l&&(A!==null&&google.maps.event.removeListener(A),T(google.maps.event.addListener(b,"mouseup",l)))},[l]),u.useEffect(function(){b&&c&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(b,"rightclick",c)))},[c]),u.useEffect(function(){b&&n&&(K!==null&&google.maps.event.removeListener(K),ee(google.maps.event.addListener(b,"click",n)))},[n]),u.useEffect(function(){b&&f&&(se!==null&&google.maps.event.removeListener(se),de(google.maps.event.addListener(b,"addfeature",f)))},[f]),u.useEffect(function(){b&&d&&(Le!==null&&google.maps.event.removeListener(Le),Fe(google.maps.event.addListener(b,"removefeature",d)))},[d]),u.useEffect(function(){b&&h&&(Ee!==null&&google.maps.event.removeListener(Ee),Ie(google.maps.event.addListener(b,"removeproperty",h)))},[h]),u.useEffect(function(){b&&v&&(Re!==null&&google.maps.event.removeListener(Re),re(google.maps.event.addListener(b,"setgeometry",v)))},[v]),u.useEffect(function(){b&&y&&(ze!==null&&google.maps.event.removeListener(ze),Ye(google.maps.event.addListener(b,"setproperty",y)))},[y]),u.useEffect(function(){if(w!==null){var Y=new google.maps.Data(Q(Q({},e||{}),{map:w}));r&&S(google.maps.event.addListener(Y,"dblclick",r)),i&&M(google.maps.event.addListener(Y,"mousedown",i)),o&&j(google.maps.event.addListener(Y,"mousemove",o)),s&&G(google.maps.event.addListener(Y,"mouseout",s)),a&&D(google.maps.event.addListener(Y,"mouseover",a)),l&&T(google.maps.event.addListener(Y,"mouseup",l)),c&&W(google.maps.event.addListener(Y,"rightclick",c)),n&&ee(google.maps.event.addListener(Y,"click",n)),f&&de(google.maps.event.addListener(Y,"addfeature",f)),d&&Fe(google.maps.event.addListener(Y,"removefeature",d)),h&&Ie(google.maps.event.addListener(Y,"removeproperty",h)),v&&re(google.maps.event.addListener(Y,"setgeometry",v)),y&&Ye(google.maps.event.addListener(Y,"setproperty",y)),_(Y),p&&p(Y)}return function(){b&&(g!==null&&google.maps.event.removeListener(g),P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),Z!==null&&google.maps.event.removeListener(Z),A!==null&&google.maps.event.removeListener(A),V!==null&&google.maps.event.removeListener(V),K!==null&&google.maps.event.removeListener(K),se!==null&&google.maps.event.removeListener(se),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),Re!==null&&google.maps.event.removeListener(Re),ze!==null&&google.maps.event.removeListener(ze),L&&L(b),b.setMap(null))}},[]),null}u.memo(Wv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Il,eventMap:Dl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Il,eventMap:Dl,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),ge(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var jl={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Nl={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(Q(Q({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:Nl,eventMap:jl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Nl,eventMap:jl,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),ge(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);function cf(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function qv(t,e){return new e(t.lat,t.lng)}function Kv(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Jv(t,e,n){return t instanceof e?t:n(t,e)}function Yv(t,e,n){return t instanceof e?t:n(t,e)}function Xv(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function Qv(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function uf(t,e,n,r){return n!==void 0?Xv(t,e,Yv(n,google.maps.LatLngBounds,Kv)):Qv(t,e,Jv(r,google.maps.LatLng,qv))}function em(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function tm(t,e,n,r,i){var o=function(s){je(a,s);function a(l,c,f,d){var h=s.call(this)||this;return h.container=l,h.pane=c,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,c=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];c==null||c.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),c=Q({},this.container?cf(this.container,i):{x:0,y:0}),f=uf(l,c,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],p=v[1];this.container.style[y]=p}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function Bl(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Ul(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function nm(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,c=u.useContext(le),f=u.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=u.useMemo(function(){return tm(f,r,e,n,a)},[f,r,e,n]);return u.useEffect(function(){return o==null||o(d),d==null||d.setMap(c),function(){s==null||s(d),d==null||d.setMap(null)}},[c,d]),u.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),su.createPortal(l,f)}u.memo(nm);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();qe(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o,s=r.overlayView.getProjection(),a=Q({x:0,y:0},r.containerRef.current?cf(r.containerRef.current,r.props.getPixelPositionOffset):{}),l=uf(s,a,r.props.bounds,r.props.position),c=(o=r.state.containerStyle,o.left),f=o.top,d=o.width,h=o.height;em(l,{left:c,top:f,width:d,height:h})||r.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=u.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=Bl(n.position),i=Bl(this.props.position),o=Ul(n.bounds),s=Ul(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?su.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(u.PureComponent);function rm(){}var Vl={onDblClick:"dblclick",onClick:"click"},Fl={opacity:function(t,e){t.setOpacity(e)}};function im(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=u.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,Q({},r));return l},[]);return u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),u.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),u.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}u.memo(im);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){qe(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Q(Q({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:Fl,eventMap:Vl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Fl,eventMap:Vl,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:rm},e.contextType=le,e})(u.PureComponent);var zl={},$l={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function om(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(le),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||qe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){qe(!!e,"data property is required in HeatmapLayer %s",e)},[e]),u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),u.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(Q(Q({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(om);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){qe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),qe(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(Q(Q({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=fe({updaterMap:$l,eventMap:zl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:$l,eventMap:zl,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),ge(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Hl={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Gl={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=fe({updaterMap:Gl,eventMap:Hl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Gl,eventMap:Hl,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),ge(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){qe(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(u.PureComponent);var Zl={onDirectionsChanged:"directions_changed"},Wl={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=fe({updaterMap:Wl,eventMap:Zl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Wl,eventMap:Zl,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),ge(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=le,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){qe(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(u.PureComponent);var ql={onPlacesChanged:"places_changed"},Kl={bounds:function(t,e){t.setBounds(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(qe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=fe({updaterMap:Kl,eventMap:ql,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Kl,eventMap:ql,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),ge(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=le,e})(u.PureComponent);var Jl={onPlaceChanged:"place_changed"},Yl={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;qe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=fe({updaterMap:Yl,eventMap:Jl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){ge(this.registeredEvents),this.registeredEvents=fe({updaterMap:Yl,eventMap:Jl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&ge(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(u.PureComponent);const sm='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-opacity=".8" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><path fill="#fff" fill-rule="evenodd" d="M36.503 33.501V19.625a3 3 0 0 0-1.583-2.645l-9.502-5.091a3 3 0 0 0-2.834 0l-9.501 5.091a3 3 0 0 0-1.583 2.645V33.5a3 3 0 0 0 3 3h19.003a3 3 0 0 0 3-3Zm-7.752 1h4.752a1 1 0 0 0 1-1V19.625a1 1 0 0 0-.528-.882l-9.501-5.091a1 1 0 0 0-.945 0l-9.501 5.091a1 1 0 0 0-.528.882V33.5a1 1 0 0 0 1 1h4.75a2.516 2.516 0 0 1-.05-.5V23.747a2.5 2.5 0 0 1 2.5-2.5h4.602a2.5 2.5 0 0 1 2.5 2.5V34c0 .172-.018.339-.05.5Zm-2.434 0a.5.5 0 0 0 .485-.5V23.747a.5.5 0 0 0-.5-.5H21.7a.5.5 0 0 0-.5.5V34a.5.5 0 0 0 .484.5h4.632Z" clip-rule="evenodd"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1068_16960"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_1068_16960" result="shape"/></filter></defs></svg>',am='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#b)"><path fill="currentColor" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z"/><path fill="#fff" d="M33.913 12H14.087A2.087 2.087 0 0 0 12 14.087v19.826c0 1.153.934 2.087 2.087 2.087h19.826A2.087 2.087 0 0 0 36 33.913V14.087A2.087 2.087 0 0 0 33.913 12Zm-20.348 2.087c0-.288.234-.522.522-.522h7.826v4.07h-8.348v-3.548Zm9.913 9.13v-9.652h4.696v9.652h-4.696Zm4.696 1.566h-4.696v9.652h4.696v-9.652Zm1.565 9.652h4.174a.523.523 0 0 0 .522-.522v-9.13h-4.696v9.652Zm0-11.218v-9.652h4.174c.288 0 .522.234.522.522v9.13h-4.696ZM21.913 19.2v4.017h-8.348V19.2h8.348Zm0 9.6v-4.017h-8.348V28.8h8.348Zm-8.348 1.565h8.348v4.07h-7.826a.522.522 0 0 1-.522-.522v-3.548Z"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop stop-color="#1D3665"/><stop offset="1" stop-color="#1D3665" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_2412_6054"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_2412_6054" result="shape"/></filter></defs></svg>',lm='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><g fill="#fff"><path fill-rule="evenodd" d="M15.878 16.411c0-.34.273-.617.61-.617h15.024c.337 0 .61.276.61.617v10.103H15.878V16.41Zm1.22.617v8.253h13.803v-8.253H17.1Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M15.878 25.28h16.244v9.155c0 .864-.694 1.565-1.55 1.565H17.428c-.855 0-1.55-.7-1.55-1.565V25.28Zm1.22 1.234v7.92a.33.33 0 0 0 .33.333h13.145a.33.33 0 0 0 .328-.332v-7.921H17.1ZM14 13.565c0-.864.694-1.565 1.55-1.565h16.9c.856 0 1.55.7 1.55 1.565v1.898c0 .864-.694 1.565-1.55 1.565h-16.9c-.856 0-1.55-.701-1.55-1.565v-1.898Zm1.55-.332a.33.33 0 0 0-.33.332v1.898a.33.33 0 0 0 .33.332h16.9a.33.33 0 0 0 .33-.332v-1.898a.33.33 0 0 0-.33-.332h-16.9Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20.573 24c0-1.912 1.535-3.462 3.427-3.462 1.893 0 3.428 1.55 3.428 3.462v1.872a.639.639 0 0 1-.636.642H21.21a.639.639 0 0 1-.636-.642V24ZM24 21.77A2.218 2.218 0 0 0 21.794 24v1.28h4.413V24c0-1.231-.988-2.23-2.207-2.23Z" clip-rule="evenodd"/><path d="m26.765 29.18-2.724-1.376a.093.093 0 0 0-.083 0l-2.724 1.376a.094.094 0 0 0-.051.084v2.752c0 .036.02.069.05.084l2.725 1.376a.09.09 0 0 0 .042.01.09.09 0 0 0 .041-.01l2.724-1.376a.094.094 0 0 0 .051-.084v-2.751a.095.095 0 0 0-.05-.085ZM24 27.994l2.624 1.326-1.26.637-2.525-1.378 1.16-.585Zm0 2.651-2.625-1.325 1.261-.637 2.524 1.377-1.16.585Zm-2.631-1.118 2.538 1.282v2.431l-2.538-1.282v-2.431Zm2.723 3.713V30.81l2.538-1.282v2.432l-2.538 1.281Z"/><path fill-rule="evenodd" d="M26.892 28.926a.38.38 0 0 1 .206.339v2.751a.379.379 0 0 1-.207.339l-2.723 1.375a.369.369 0 0 1-.338 0l-2.722-1.375a.379.379 0 0 1-.208-.339v-2.752c0-.142.079-.274.207-.339l2.727-1.377a.373.373 0 0 1 .33 0l.002.002 2.726 1.376ZM21.233 32.1a.094.094 0 0 1-.05-.084v-2.752c0-.035.019-.068.05-.084l2.724-1.376a.093.093 0 0 1 .084 0l2.724 1.376a.095.095 0 0 1 .05.085v2.751c0 .035-.019.068-.05.084l-2.724 1.376a.09.09 0 0 1-.042.01.09.09 0 0 1-.042-.01L21.233 32.1Zm5.397-.141v-2.432l-2.538 1.282v2.431l2.538-1.281Zm-.282-.176v-1.796l-1.974.998v1.795l1.974-.997Zm-2.442-.974-2.538-1.282v2.431l2.538 1.282V30.81Zm-2.256-.822 1.974.998v1.795l-1.974-.998v-1.795Zm2.349.658 1.16-.585-2.524-1.377-1.26.637 2.624 1.325Zm.55-.595-.55.277-1.995-1.008.626-.316 1.918 1.047Zm.814-.094 1.26-.636L24 27.994l-1.16.585 2.524 1.377Zm.005-.32-1.918-1.047.549-.277 1.995 1.008-.627.316Z" clip-rule="evenodd"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_958_9661"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape"/></filter></defs></svg>',Rt={PinPvz:lm,PinHome:sm,PinLocker:am},cm=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},ce.createElement("path",{fill:"currentcolor",d:"M12.5 8c0 .287-.108.573-.324.792l-6.789 6.88a1.095 1.095 0 0 1-1.563 0 1.131 1.131 0 0 1 0-1.585L9.83 8 3.824 1.913a1.131 1.131 0 0 1 0-1.585 1.095 1.095 0 0 1 1.564 0l6.789 6.88c.215.219.323.505.323.792Z"})),ff=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},ce.createElement("g",{fill:"#000"},ce.createElement("path",{d:"M0 13.252V8.346h1.053v3.844h3.08v1.062H0ZM4.535 13.252V8.346h1.053v3.844h3.08v1.062H4.535ZM9.126 13.252V9.36a1.02 1.02 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .502.136c.154.09.277.213.367.367.095.15.143.318.143.504v3.892H12.95v-1.58H10.18v1.58H9.126Zm1.053-2.64h2.772V9.413H10.18v1.197ZM14.792 13.252v-4.9h1.087l1.658 1.98 1.65-1.98h1.094v4.9h-1.06V9.965l-1.684 2.014-1.692-2.007v3.28h-1.053ZM21.108 13.252V9.36a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .503.136c.153.09.276.213.366.367A.92.92 0 0 1 26 9.36v3.892h-1.067v-1.58h-2.771v1.58h-1.054Zm1.053-2.64h2.772V9.413h-2.771v1.197ZM1.005 5.648a.973.973 0 0 1-.502-.137A1.018 1.018 0 0 1 0 4.641V1.756a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .502-.137h2.881c.181 0 .347.045.496.136.154.09.276.213.367.367a.92.92 0 0 1 .143.504V4.64c0 .181-.048.349-.143.503-.09.154-.213.277-.367.367a.937.937 0 0 1-.496.137h-2.88Zm.048-1.062h2.772V1.81H1.053v2.776ZM5.64 5.648v-4.9h1.087l1.657 1.98 1.651-1.98h1.094v4.9h-1.06V2.36L8.384 4.375 6.693 2.368v3.28H5.64ZM11.943 5.648v-4.9h1.087l2.738 3.267V.749h1.066v4.899h-1.087l-2.751-3.28v3.28h-1.053ZM17.425 5.648v-4.9h1.04v4.9h-1.04Z"}))),df=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},ce.createElement("g",{fill:"#000"},ce.createElement("path",{d:"M1.416 7.5c-.255 0-.491-.065-.708-.194A1.445 1.445 0 0 1 0 6.06V1.94A1.445 1.445 0 0 1 .708.695C.925.564 1.16.5 1.416.5h4.056c.255 0 .488.065.698.194.217.13.39.305.517.525.134.214.2.454.2.72V6.06c0 .26-.066.5-.2.72-.128.22-.3.395-.517.525-.21.13-.443.194-.698.194H1.416Zm.067-1.517h3.903V2.017H1.483v3.966ZM7.941 7.5v-7h1.53l2.335 2.83L14.13.5h1.54v7h-1.493V2.804l-2.372 2.878-2.382-2.868V7.5H7.94ZM16.816 7.5v-7h1.53l3.856 4.667V.5h1.502v7h-1.53l-3.875-4.686V7.5h-1.483ZM24.536 7.5v-7H26v7h-1.464Z"})));function um(t,e){return e.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in t)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(t)}function xa(t){return!!(t&&typeof t.then=="function")}function Wi(t,e){return xa(t)?Promise.resolve(t).then(e):e(t)}function Xl(t){const e=(Array.isArray(t)?t:[t]).map(o=>`'${o}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function fm(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function hf(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function Ct(t){return hf(t)||[]}function dm(t,e){return fm(e)?Ct(e==null?void 0:e[t]):Ct(e)}function Ds(t){return Array.from(new Set(t))}function pf(t){return t&&t.replace(/\/+$/,"")}function hm(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const pm=(t,e)=>fetch(t,e),gf=(t=pm)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.16.2"},n==null?void 0:n.headers)}));function sn(t){let e=[];return Object.freeze({listen(n){const r=i=>{n(i)};return e.push(r),{unsubscribe(){e=e.filter(i=>r!==i)}}},emit(n){t()&&e.forEach(r=>r({value:n}))}})}function gm(t,e,n){const r=new Set,i=new Set;function o(l){const c=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(h=>c.has(h)||f.namespaces.has(h)))!==-1)&&f.fn({value:void 0})})}let s=[];function a(){if(s.length===0)return;const l=s;s=[],r.forEach(d=>{d({value:void 0})});let c=new Set;l.forEach(d=>{d===void 0?c=void 0:c!==void 0&&d.forEach(h=>c.add(h))});const f=c?Array.from(c.keys()):void 0;o(f)}return Object.freeze({emit(l,c){t()&&(s.push(l),c?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const c={fn:d=>{l(d)},namespaces:new Set};i.add(c);const f={unsubscribe:()=>{i.delete(c)},subscribeNs:d=>(Ct(d).forEach(h=>c.namespaces.add(h)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function vm(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:sn(r),onLanguageChange:sn(r),onLoadingChange:sn(r),onFetchingChange:sn(r),onInitialLoaded:sn(r),onRunningChange:sn(r),onCacheChange:sn(r),onUpdate:gm(r,t,e),onPermanentChange:sn(r),setEmitterActive(o){n=o},on:(o,s)=>{switch(o){case"pendingLanguage":return i.onPendingLanguageChange.listen(s);case"language":return i.onLanguageChange.listen(s);case"loading":return i.onLoadingChange.listen(s);case"fetching":return i.onFetchingChange.listen(s);case"initialLoad":return i.onInitialLoaded.listen(s);case"running":return i.onRunningChange.listen(s);case"cache":return i.onCacheChange.listen(s);case"update":return i.onUpdate.listen(s);case"permanentChange":return i.onPermanentChange.listen(s)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:o})=>i.onUpdate.emit([o.namespace],!0)),i}const vf=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){vf(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},Ar=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},qt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function mm(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(p,L,w){const m=qt(p);l.set(m,{data:vf(L),version:w}),t.emit(p)}function h(p){let L;if(!L){const w=c[qt(p)];typeof w=="function"&&(L=w())}return L||(L=e(p)),L}function v(p,L){var w;let m;return L&&(m=(w=n(p))===null||w===void 0?void 0:w.catch(()=>(console.warn("Tolgee: Failed to fetch data from dev backend"),h(p)))),m||(m=h(p)),m}const y=Object.freeze({addStaticData(p){p&&(c=Object.assign(Object.assign({},c),p),Object.entries(p).forEach(([L,w])=>{if(typeof w!="function"){const m=Ar(L),b=l.get(L);(!b||b.version===0)&&d(m,w,0)}}))},invalidate(){a.clear(),f+=1},addRecord(p,L){d(p,L,f)},exists(p,L=!1){const w=l.get(qt(p));return w&&L?w.version===f:!!w},getRecord(p){var L;return(L=l.get(qt(r(p))))===null||L===void 0?void 0:L.data},getTranslation(p,L){var w;return(w=l.get(qt(p)))===null||w===void 0?void 0:w.data.get(L)},getTranslationNs(p,L,w){var m;for(const b of p)for(const _ of L){const E=(m=l.get(qt({language:_,namespace:b})))===null||m===void 0?void 0:m.data.get(w);if(E!=null)return[b]}return Ds(p)},getTranslationFallback(p,L,w){var m;for(const b of p)for(const _ of L){const E=(m=l.get(qt({language:_,namespace:b})))===null||m===void 0?void 0:m.data.get(w);if(E!=null)return E}},changeTranslation(p,L,w){var m;const b=(m=l.get(qt(p)))===null||m===void 0?void 0:m.data;b==null||b.set(L,w),t.emit(Object.assign(Object.assign({},p),{key:L}))},isFetching(p){if(i())return!0;if(p===void 0)return a.size>0;const L=Ct(p);return!!Array.from(a.keys()).find(w=>L.includes(Ar(w).namespace))},isLoading(p,L){const w=Ct(L);return!!(i()||Array.from(a.keys()).find(m=>{const b=Ar(m);return(!w.length||w.includes(b.namespace))&&!y.exists({namespace:b.namespace,language:p})}))},async loadRecords(p,L){const w=p.map(b=>{const _=r(b),E=qt(_),g=a.get(E);if(g)return{new:!1,promise:g,keyObject:_,cacheKey:E};const S=v(_,L)||Promise.resolve(void 0);return a.set(E,S),{new:!0,promise:S,keyObject:_,cacheKey:E}});o.notify(),s.notify();const m=await Promise.all(w.map(b=>b.promise));return w.forEach((b,_)=>{const E=a.get(b.cacheKey)!==b.promise;if(b.new&&!E){a.delete(b.cacheKey);const g=m[_];g?y.addRecord(b.keyObject,g):y.getRecord(b.keyObject)||y.addRecord(b.keyObject,{})}}),o.notify(),s.notify(),w.map(b=>y.getRecord(b.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([L,w])=>Object.assign(Object.assign({},Ar(L)),{data:w.data}))}});return y}function mf(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const ym={tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%tolgee:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},Is="invalid",bm="https://app.tolgee.io",wm=({key:t})=>t,Sm={defaultNs:"",observerOptions:ym,observerType:"invisible",onFormatError:Is,apiUrl:bm,fetch:gf(),onTranslationMissing:wm},js=(...t)=>{let e={};return t.forEach(n=>{e=Object.assign(Object.assign(Object.assign({},e),n),{observerOptions:Object.assign(Object.assign({},e.observerOptions),n==null?void 0:n.observerOptions)})}),e};function Ql(t,e){const n=js(Sm,e==null?void 0:e.initialOptions,t);return n.apiUrl=pf(n.apiUrl),t!=null&&t.fetch&&(n.fetch=gf(t.fetch)),{initialOptions:n,activeNamespaces:(e==null?void 0:e.activeNamespaces)||new Map,language:e==null?void 0:e.language,pendingLanguage:e==null?void 0:e.language,isInitialLoading:!1,isRunning:!1}}function Lm(t,e,n,r,i,o,s,a){const l={ui:void 0},c={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:O,event:k})=>{var j;const U=O.map(({key:$,ns:G,defaultValue:z})=>({key:$,defaultValue:z,fallbackNamespaces:r(G),namespace:i({key:$,ns:G})[0],translation:o({key:$,ns:G})}));(j=c.ui)===null||j===void 0||j.handleElementClick(U,k)},d=(O,k)=>{var j;return((j=c.observer)===null||j===void 0?void 0:j.findPositions(O,k))||[]};function h(O){const k=o({key:O.key,ns:O.ns});return M.formatTranslation(Object.assign(Object.assign({},O),{translation:k,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function y(O){c.observer=O==null?void 0:O()}function p(){return!!c.observer}function L(O){O&&c.formatters.push(O)}function w(O){c.finalFormatter=O}function m(O){l.ui=O}function b(){return!!l.ui}function _(O){c.languageStorage=O}function E(O){c.languageDetector=O}function g(){if(!c.languageDetector)return;const O=n();return c.languageDetector.getLanguage(Object.assign({availableLanguages:O},v()))}function S(O){O&&c.backends.push(O)}function C(O){c.devBackend=O}function P(O,k){const j=Object.freeze({setFinalFormatter:w,addFormatter:L,setObserver:y,hasObserver:p,setUi:m,hasUi:b,setDevBackend:C,addBackend:S,setLanguageDetector:E,setLanguageStorage:_});k(O,j)}const M=Object.freeze({addPlugin:P,run(){var O,k;const{apiKey:j,apiUrl:U,projectId:$,observerOptions:G}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:j,apiUrl:U,projectId:$,highlight:M.highlight,changeTranslation:s,findPositions:d,onPermanentChange:a}),(k=c.observer)===null||k===void 0||k.run({mouseHighlight:!0,options:G,translate:h,onClick:f})},stop(){var O;c.ui=void 0,(O=c.observer)===null||O===void 0||O.stop()},getLanguageStorage(){return c.languageStorage},getInitialLanguage(){var O;const k=n(),j=(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v());return Wi(j,U=>(!k||k.includes(U))&&U?U:g())},setStoredLanguage(O){var k;(k=c.languageStorage)===null||k===void 0||k.setLanguage(O,v())},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:k})=>{for(const j of c.backends){const U=j.getRecord(Object.assign({language:O,namespace:k},v()));if(xa(U))return U==null?void 0:U.catch($=>(console.error($),{}));if(U!==void 0)return U}},getBackendDevRecord:({language:O,namespace:k})=>{var j;const{apiKey:U,apiUrl:$,projectId:G}=e();return(j=c.devBackend)===null||j===void 0?void 0:j.getRecord(Object.assign({apiKey:U,apiUrl:$,projectId:G,language:O,namespace:k},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,k)=>{var j,U;return((U=(j=c.observer)===null||j===void 0?void 0:j.highlight)===null||U===void 0?void 0:U.call(j,O,k))||{unhighlight(){}}},unwrap(O){var k;return c.observer?(k=c.observer)===null||k===void 0?void 0:k.unwrap(O):{text:O,keys:[]}},wrap(O){var k;return c.observer?(k=c.observer)===null||k===void 0?void 0:k.wrap(O):O.translation},hasDevBackend(){return!!M.getDevBackend()},formatTranslation(O){var k,{formatEnabled:j}=O,U=mf(O,["formatEnabled"]);const{key:$,translation:G,defaultValue:z,noWrap:Z,params:D,ns:R,orEmpty:A}=U,T=G??z;let N="";G==null&&(N=e().onTranslationMissing(U));let V=T??(A?"":N);const W=t(),I=j||!(!((k=c.observer)===null||k===void 0)&&k.outputNotFormattable),K=ee=>c.observer&&!Z?c.observer.wrap({key:$,translation:ee,defaultValue:z,params:D,ns:R}):ee;V=K(V);try{if(T&&W&&I)for(const ee of c.formatters)V=ee.format({translation:V,language:W,params:D});c.finalFormatter&&T&&W&&I&&(V=c.finalFormatter.format({translation:V,language:W,params:D}))}catch(ee){console.error(ee);const q=hm(ee)||Is,se=e().onFormatError,de=typeof se;de==="string"?V=se:de==="function"?V=se(q,U):V=Is,V=K(V)}return V}});return M}const ec=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Em(t,e,n){let r=Ql(),i;const o=Object.freeze({init(s){r=Ql(s,r)},isRunning(){return r.isRunning},setRunning(s){r.isRunning!==s&&(r.isRunning=s,n.emit(s))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(s){r.isInitialLoading=s},getLanguage(){return r.language||r.initialOptions.language},setLanguage(s){r.language!==s&&(r.language=s,t.emit(s))},getPendingLanguage(){return r.pendingLanguage||o.getLanguage()},setPendingLanguage(s){r.pendingLanguage!==s&&(r.pendingLanguage=s,e.emit(s))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(s){Ct(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0?r.activeNamespaces.set(l,c+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){Ct(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0&&c>1?r.activeNamespaces.set(l,c-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return Ds([...r.initialOptions.ns||[r.initialOptions.defaultNs],...Ct(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?Ds([a,...dm(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return Ct(r.initialOptions.fallbackNs)},getDefaultNs(s){return s===void 0?r.initialOptions.defaultNs:s},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const s=Object.keys(r.initialOptions.staticData).map(a=>Ar(a).language);return Array.from(new Set(s))}},withDefaultNs(s){return{namespace:s.namespace===void 0?o.getInitialOptions().defaultNs:s.namespace,language:s.language}},overrideCredentials(s){s?i=Object.assign(Object.assign({},s),{apiUrl:pf(s.apiUrl)}):i=void 0}});return o}function xm(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=mf(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const yf=(t,...e)=>{let n={},r;return typeof t=="object"?n=t:(n.key=t,typeof e[0]=="string"?(n.defaultValue=e[0],r=e[1]):typeof e[0]=="object"&&(r=e[0])),r&&(n=Object.assign(Object.assign({},xm(r)),n)),n};function Cm({options:t}){const e=vm(l,c),n=ec(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=ec(!1,()=>g.isLoading(),e.onLoadingChange.emit),i=Em(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Lm(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,w,m,h,v),s=mm(e.onCacheChange,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&y(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function c(S){return i.getDefaultNs(S)}function f(S){return[...Ct(c(S)),...l()]}function d(S){return[...Ct(S??c()),...i.getRequiredNamespaces()]}function h(S,C,P){const M=i.withDefaultNs(S),O=s.getTranslation(M,C);return s.changeTranslation(M,C,P),{revert(){s.changeTranslation(M,C,O)}}}function v(S){e.onPermanentChange.emit({key:S.key,namespace:S.namespace})}function y(S){i.init(S),s.addStaticData(i.getInitialOptions().staticData)}function p(S,C){const P=i.getFallbackLangs(S),M=d(C),O=[];return P.forEach(k=>{M.forEach(j=>{s.exists({language:k,namespace:j},!0)||O.push({language:k,namespace:j})})}),O}function L(S,C){const P=p(S,C);if(P.length)return Wi(g.loadRecords(P),()=>{})}function w({key:S,ns:C}){const P=i.getFallbackLangs(),M=f(C??void 0);return s.getTranslationNs(M,P,S)}function m({key:S,ns:C,language:P}){const M=f(C??void 0),O=i.getFallbackLangs(P);return s.getTranslationFallback(M,O,S)}function b(){const S=Wi(_(),()=>L());if(xa(S))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(S).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function _(){if(i.getLanguage())return;const C=o.getInitialLanguage();return Wi(C,P=>{const M=P||i.getInitialOptions().defaultLanguage;M&&i.setLanguage(M)})}function E(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Xl("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Xl(["defaultLanguage","language"]))}const g=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:y,getTranslation:m,changeTranslation:h,getTranslationNs:w,getDefaultAndFallbackNs:f,async changeLanguage(S){i.getPendingLanguage()===S&&i.getLanguage()===S||(i.setPendingLanguage(S),i.isRunning()&&await L(S),S===i.getPendingLanguage()&&(i.setLanguage(S),o.setStoredLanguage(S)))},async addActiveNs(S,C){C||i.addActiveNs(S),i.isRunning()&&await L(void 0,S)},loadRecords(S){return s.loadRecords(S,g.isDev())},async loadRecord(S){return(await g.loadRecords([S]))[0]},isLoading(S){return s.isLoading(i.getLanguage(),S)},isLoaded(S){const C=i.getLanguage();if(!C)return!1;const P=i.getFallbackLangs(C),M=d(S),O=[];return P.forEach(k=>{M.forEach(j=>{s.exists({language:k,namespace:j})||O.push({language:k,namespace:j})})}),O.length===0},t:(...S)=>{const C=yf(...S),P=m(C);return o.formatTranslation(Object.assign(Object.assign({},C),{translation:P}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return E(),i.isRunning()||(i.setRunning(!0),o.run(),a=b()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return g}function _m(t){const e=Cm({options:t});e.isDev()&&e.invalidate();function n(i){const o=e.isRunning();o&&e.stop(),i(),e.isDev()&&e.invalidate(),o&&e.run()}const r=Object.freeze({on:e.on,onNsUpdate:e.onUpdate.listenSome,setEmitterActive:e.setEmitterActive,getLanguage:e.getLanguage,getPendingLanguage:e.getPendingLanguage,changeLanguage:e.changeLanguage,changeTranslation:e.changeTranslation,addActiveNs:e.addActiveNs,removeActiveNs:e.removeActiveNs,loadRecords:e.loadRecords,loadRecord:e.loadRecord,addStaticData:e.addStaticData,getRecord:e.getRecord,getAllRecords:e.getAllRecords,isLoaded:e.isLoaded,isInitialLoading:e.isInitialLoading,isLoading:e.isLoading,isFetching:e.isFetching,isRunning:e.isRunning,run:e.run,stop:e.stop,t:e.t,highlight:e.highlight,getInitialOptions:e.getInitialOptions,isDev:e.isDev,wrap:e.wrap,unwrap:e.unwrap,overrideCredentials(i){n(()=>e.overrideCredentials(i))},addPlugin(i){i&&n(()=>e.addPlugin(r,i))},updateOptions(i){i&&n(()=>e.init(i))}});return r}const Om=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=js(t.options,n),e},init(n){const r=_m(js(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},bf=0,Ns=1,Mm=2;class km extends Error{constructor(e,n,r){let i;e===bf?i="Empty parameter":e===Ns?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function tc(t){return/\s/.test(t)}const un=0,Bs=1,qi=2,Qo=3,es=4,Pm=new Set([qi,Bs,un]),Us="'",Rm=new Set(["{","}",Us]),Tm=t=>/[0-9a-zA-Z_]/.test(t);function Am(t){let e=un,n="",r="",i="";const o=[],s=[];let a=0;function l(h){throw new km(h,a,t)}const c=()=>{o.push(n),n=""},f=()=>{Tm(i)||l(Ns),r+=i},d=()=>{r===""&&l(bf),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case un:i===Us?(n+=i,e=Bs):i==="{"?(c(),e=Qo):(n+=i,e=un);break;case Bs:Rm.has(i)?(n=n.slice(0,-1)+i,e=qi):(n+=i,e=un);break;case qi:i===Us?e=un:(n+=i,e=qi);break;case Qo:i==="}"?(d(),e=un):tc(i)?r!==""&&(d(),e=es):(f(),e=Qo);break;case es:i=="}"?e=un:tc(i)?e=es:l(Ns)}return Pm.has(e)||l(Mm),c(),[o,s]}function Dm(t,e){const[n,r]=Am(t),i=[n[0]];for(let o=1;o<n.length;o++){const s=e==null?void 0:e[r[o-1]];if(s===void 0)throw new Error(`Missing parameter "${r[o-1]}" in "${t}"`);i.push(String(s)),i.push(n[o])}return i.join("")}function Im(){return{format:({translation:t,params:e})=>Dm(t,e)}}const jm=()=>(t,e)=>(e.setFinalFormatter(Im()),t);var ts=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},nc={};(function(t){function e(w,m){var b;return w instanceof Buffer?b=w:b=Buffer.from(w.buffer,w.byteOffset,w.byteLength),b.toString(m)}var n=function(w){return Buffer.from(w)};function r(w){for(var m=0,b=Math.min(256*256,w.length+1),_=new Uint16Array(b),E=[],g=0;;){var S=m<w.length;if(!S||g>=b-1){var C=_.subarray(0,g),P=C;if(E.push(String.fromCharCode.apply(null,P)),!S)return E.join("");w=w.subarray(m),m=0,g=0}var M=w[m++];if(!(M&128))_[g++]=M;else if((M&224)===192){var O=w[m++]&63;_[g++]=(M&31)<<6|O}else if((M&240)===224){var O=w[m++]&63,k=w[m++]&63;_[g++]=(M&31)<<12|O<<6|k}else if((M&248)===240){var O=w[m++]&63,k=w[m++]&63,j=w[m++]&63,U=(M&7)<<18|O<<12|k<<6|j;U>65535&&(U-=65536,_[g++]=U>>>10&1023|55296,U=56320|U&1023),_[g++]=U}}}function i(w){for(var m=0,b=w.length,_=0,E=Math.max(32,b+(b>>>1)+7),g=new Uint8Array(E>>>3<<3);m<b;){var S=w.charCodeAt(m++);if(S>=55296&&S<=56319){if(m<b){var C=w.charCodeAt(m);(C&64512)===56320&&(++m,S=((S&1023)<<10)+(C&1023)+65536)}if(S>=55296&&S<=56319)continue}if(_+4>g.length){E+=8,E*=1+m/w.length*2,E=E>>>3<<3;var P=new Uint8Array(E);P.set(g),g=P}if(S&4294967168)if(!(S&4294965248))g[_++]=S>>>6&31|192;else if(!(S&4294901760))g[_++]=S>>>12&15|224,g[_++]=S>>>6&63|128;else if(!(S&4292870144))g[_++]=S>>>18&7|240,g[_++]=S>>>12&63|128,g[_++]=S>>>6&63|128;else continue;else{g[_++]=S;continue}g[_++]=S&63|128}return g.slice?g.slice(0,_):g.subarray(0,_)}var o="Failed to ",s=function(w,m,b){if(w)throw new Error("".concat(o).concat(m,": the '").concat(b,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function c(){this.encoding="utf-8"}c.prototype.encode=function(w,m){return s(m&&m.stream,"encode","stream"),l(w)};function f(w){var m;try{var b=new Blob([w],{type:"text/plain;charset=UTF-8"});m=URL.createObjectURL(b);var _=new XMLHttpRequest;return _.open("GET",m,!1),_.send(),_.responseText}finally{m&&URL.revokeObjectURL(m)}}var d=!a&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",h=["utf-8","utf8","unicode-1-1-utf-8"],v=r;a?v=e:d&&(v=function(w){try{return f(w)}catch{return r(w)}});var y="construct 'TextDecoder'",p="".concat(o," ").concat(y,": the ");function L(w,m){s(m&&m.fatal,y,"fatal"),w=w||"utf-8";var b;if(a?b=Buffer.isEncoding(w):b=h.indexOf(w.toLowerCase())!==-1,!b)throw new RangeError("".concat(p," encoding label provided ('").concat(w,"') is invalid."));this.encoding=w,this.fatal=!1,this.ignoreBOM=!1}L.prototype.decode=function(w,m){s(m&&m.stream,"decode","stream");var b;return w instanceof Uint8Array?b=w:w.buffer instanceof ArrayBuffer?b=new Uint8Array(w.buffer):b=new Uint8Array(w),v(b,this.encoding)},t.TextEncoder=t.TextEncoder||c,t.TextDecoder=t.TextDecoder||L})(typeof window<"u"?window:ts);var Nm=um({__proto__:null,default:nc},[nc]),ns;(ns=console.assert)===null||ns===void 0||ns.call(console,Nm);const Bm="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function Um(t){const e=Bm.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function Vm(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let o=0;o<n;o+=i)o+i>n&&(i=n-o),r+=String.fromCharCode.apply(null,e.subarray(o,o+i));return r}function Fm(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const o=new Uint8Array(e*5/8|0);for(let s=0;s<e;s++)r=r<<5|Um(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return Vm(o.buffer)}function zm(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=Fm(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function $m(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function Hm(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=zm(e))!==null&&s!==void 0?s:i;let l=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(l+=`?ns=${r}`),$m(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return o(l,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(c=>{if(c.ok)return c.json().then(f=>f[n]);throw new Error(c.statusText)})}}}const Gm=()=>(t,e)=>(e.setDevBackend(Hm()),t);function Zm(t,e){const n=r=>{var i,o;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((o=r.data)===null||o===void 0?void 0:o.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function Wm({message:t,recievingMessage:e,data:n,attempts:r=1}){let i=!1;const o=()=>new Promise((a,l)=>{const c=Zm(e,d);window.postMessage({type:t,data:n},window.origin);const f=setTimeout(v,300);function d(y){clearTimeout(f),h(),a(y)}function h(){c.unsubscribe()}function v(){h(),l()}});return{cancel(){i=!0},promise:(async()=>{for(let a=0;a<r;a++){if(i)return new Promise(()=>{});try{return await o()}catch{continue}}if(!i)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function qm(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=Wm({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const Km="tolgee-in-context-tools.umd.min.js",Jm="@tolgee/in-context-tools",Ym="InContextTools",Xm="https://cdn.jsdelivr.net/npm";function Qm(t){return new Promise((e,n)=>{const r=document.createElement("script");r.src=t,r.addEventListener("load",()=>e()),r.addEventListener("error",i=>n(i.error)),document.body.appendChild(r)})}let rs=null;function ey(t){return rs||(rs=Qm(`${Xm}/@tolgee/web@${t}/dist/${Km}`).then(()=>window[Jm][Ym])),rs}const wf="__tolgee_apiKey",Sf="__tolgee_apiUrl";function rc(){const t=sessionStorage.getItem(wf)||void 0,e=sessionStorage.getItem(Sf)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function ty(){sessionStorage.removeItem(wf),sessionStorage.removeItem(Sf)}function ny(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Lf=()=>t=>t;const ry=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};ry()&&(Lf=()=>t=>{const e=qm(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const o=await ey("5.16.2");return s=>{const a=rc();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&ny(()=>{e.update(n()).catch(ty)})}),rc()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function iy(){return Om().use(Lf())}const oy={useSuspense:!0};let is;const Ef=()=>(is||(is=u.createContext(void 0)),is),sy=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=u.useState(!t.isLoaded());u.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},oy),e),a=Ef();return s.useSuspense?u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:u.createElement(u.Suspense,{fallback:r||null},n)):u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let ay;function ly(){return ay}const cy=()=>{const t=Ef(),e=u.useContext(t)||ly();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},uy=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},xf=(t,e)=>{const{tolgee:n,options:r}=cy(),i=hf(t),o=Ct(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=uy(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=y=>{var p;f.current.push(y),(p=c.current)===null||p===void 0||p.subscribeNs(y)},h=n.isLoaded(i);u.useEffect(()=>{const y=n.onNsUpdate(a);return c.current=y,y.subscribeNs(i),f.current.forEach(p=>{y.subscribeNs(p)}),()=>{y.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(y=>{var p;const L=(p=y.ns)!==null&&p!==void 0?p:i==null?void 0:i[0];return d(L),n.t(Object.assign(Object.assign({},y),{ns:L}))},[n,l]);if(s.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},jt=(t,e)=>{const{t:n,isLoading:r}=xf(t,e);return{t:u.useCallback((...o)=>{const s=yf(...o);return n(s)},[n]),isLoading:r}},fy=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(Vs(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},Vs(o)):u.cloneElement(i)}else e[n]=r}),e},Vs=t=>Array.isArray(t)?u.Children.toArray(t):t,dy=t=>{const e=t.keyName||t.children;e===void 0&&console.error("T component: keyName not defined");const n=t.defaultValue||(t.keyName?t.children:void 0),r=Vs(t.t({key:e,params:fy(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},An=t=>{const{t:e}=xf();return u.createElement(dy,Object.assign({t:e},t))},hy="Button-module__root__8RX49h",py="Button-module__primary__st6yY9",gy="Button-module__secondary__j-3rjz",vy="Button-module__loading__QfItr2",my="Button-module__spinner__kVZYqS",Or={root:hy,primary:py,secondary:gy,loading:vy,spinner:my},Ot=({className:t,variant:e="primary",loading:n,children:r,...i})=>{const o=[Or.root,t,Or[e],{[Or.loading]:n}];if(i.as==="link"){const{as:s,...a}=i;return x.jsxs("a",{className:be(o),...a,children:[!n&&r,n&&x.jsx(ri,{className:Or.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return x.jsxs("button",{type:"button",className:be(o),...a,children:[!n&&r,n&&x.jsx(ri,{className:Or.spinner})]})}mn(!1,"Invalid button type")};Ot.defaultProps={as:"button"};const yy="LocationBalloon-module__root__GtUl6q",by="LocationBalloon-module__submit__lNcF4k",wy="LocationBalloon-module__details__--VOKk",Sy="LocationBalloon-module__icon__X7DOVA",Ly="LocationBalloon-module__header__5VQJDW",Ey="LocationBalloon-module__title__bX9pf8",xy="LocationBalloon-module__description__htav7b",Cy="LocationBalloon-module__actions__c8dlOR",an={root:yy,submit:by,details:wy,icon:Sy,header:Ly,title:Ey,description:xy,actions:Cy},_y={default:df,llama:ff},Cf=({SSR:t,name:e,location:n,onSubmit:r,className:i,onDetails:o,hideDetails:s,location_name:a})=>{const{logo:l="default"}=st(),c=_y[l];return x.jsxs("div",{className:be(an.root,i),children:[x.jsxs("div",{className:an.header,children:[x.jsx("div",{className:an.icon,children:x.jsx(c,{})}),x.jsx("span",{className:an.title,children:e||"{{ properties.point.name }}"})]}),x.jsxs("div",{className:an.description,children:[(n==null?void 0:n.full_address)||"{{ properties.point.location.full_address }}",","," ",a||"{{ properties.point.location_name }}"]}),x.jsxs("div",{className:an.actions,children:[x.jsx(Ot,{id:ws,variant:"primary",className:an.submit,onClick:r,children:t?"{ choose }":x.jsx(An,{keyName:"choose",ns:"common"})}),!s&&x.jsxs(Ot,{id:lo,as:"link",variant:"primary",className:an.details,onClick:o,children:[t?"{ details }":x.jsx(An,{keyName:"details",ns:"common"}),x.jsx(cm,{})]})]})]})},Oy=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("g",{clipPath:"url(#a)"},ce.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M17.071 3.071a1.25 1.25 0 0 0-1.768 0L10 8.375 4.697 3.07a1.25 1.25 0 1 0-1.768 1.77l5.303 5.303-5.303 5.303a1.25 1.25 0 0 0 1.768 1.768L10 11.91l5.303 5.303a1.25 1.25 0 1 0 1.768-1.768l-5.303-5.303L17.07 4.84a1.25 1.25 0 0 0 0-1.768Z",clipRule:"evenodd"})),ce.createElement("defs",null,ce.createElement("clipPath",{id:"a"},ce.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),My="CloseButton-module__root__2m1asd",ky="CloseButton-module__absolutePositionVariant__lGX4cQ",Py="CloseButton-module__relativePositionVariant__LqTTWf",ic={root:My,absolutePositionVariant:ky,relativePositionVariant:Py},ui=({position:t="absolute",className:e,...n})=>x.jsx("div",{...n,className:be(ic.root,e,ic[`${t}PositionVariant`]),children:x.jsx(Oy,{})}),Ry="LocationView-module__title__-wT0bl",Ty="LocationView-module__logo__jDjNMt",Ay="LocationView-module__header__K0gBYX",Dy="LocationView-module__content__wtOPjm",Iy="LocationView-module__section__2J1zAJ",jy="LocationView-module__chips__ALwJDx",Ny="LocationView-module__services__IgJ4ba",By="LocationView-module__images__-wKmRM",Uy="LocationView-module__image__T1E-gt",Vy="LocationView-module__actions__NuafMj",Fy="LocationView-module__actionsHidden__-vX5kK",zy="LocationView-module__submit__c-Hc8u",$y="LocationView-module__scheduleItem__RhAgat",rt={title:Ry,logo:Ty,header:Ay,content:Dy,section:Iy,chips:jy,services:Ny,images:By,image:Uy,actions:Vy,actionsHidden:Fy,submit:zy,scheduleItem:$y},Hy={default:df,llama:ff},Gy=({location:t,hideActions:e,classes:n,onClose:r,onSubmit:i})=>{const{t:o}=jt(["details_modal","common"]),{logo:s="default"}=st(),a=Hy[s];return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:be(rt.header,n==null?void 0:n.header),children:[x.jsx(ui,{onClick:r}),x.jsxs("div",{className:rt.title,children:[x.jsx("div",{className:rt.logo,children:x.jsx(a,{})}),x.jsx("span",{children:t.name})]})]}),x.jsxs("div",{className:be(rt.content,n==null?void 0:n.content),children:[x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("address"),":"]}),x.jsx("p",{children:t.location.full_address})]}),t.schedule.length>0&&x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("schedule"),":"]}),t.schedule.map((l,c)=>x.jsx("p",{className:rt.scheduleItem,children:l},c))]}),(t.pay_by_card||t.pay_by_card)&&x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("payment_method"),":"]}),x.jsxs("div",{className:rt.chips,children:[t.pay_by_cash&&o("pay_by_cash"),t.pay_by_card&&t.pay_by_cash&&", ",t.pay_by_card&&o("pay_by_card")]})]}),x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("services"),":"]}),x.jsxs("div",{className:rt.services,children:[t.is_pickup&&x.jsx("span",{children:o("is_pickup")}),t.is_delivery&&x.jsx("span",{children:o("is_delivery")}),t.is_dressing_room&&x.jsx("span",{children:o("is_dressing_room")}),t.is_check_order&&x.jsx("span",{children:o("is_check_order")})]})]}),x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("location"),":"]}),x.jsx("p",{children:t.location_name})]}),t.images.length>0&&x.jsx("section",{className:rt.images,children:t.images.map(l=>x.jsx("img",{src:l,alt:t.name,className:rt.image},l))})]}),x.jsx("div",{className:be(rt.actions,{[rt.actionsHidden]:e}),children:x.jsx(Ot,{variant:"primary",className:rt.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},_f=u.memo(Gy),Zy={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},Of={optimized:!0},Mf=({isSelectedPoint:t})=>{const e=ye(aa),[n,r]=u.useState(!0);return u.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var Wy=qy()?u.useLayoutEffect:u.useEffect;function qy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ky(){var t=u.useState(Object.create(null)),e=t[1];return u.useCallback(function(){e(Object.create(null))},[])}var Jy=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,o=u.useRef(null),s=u.useRef(null),a=Ky();return Wy(function(){if(o.current){var l=o.current.ownerDocument;return s.current=l==null?void 0:l.createElement(i),l.body.appendChild(s.current),a(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}},[i,a]),s.current?dr.createPortal(n,s.current):u.createElement("span",{ref:o})};/*! *****************************************************************************
|
|
79
|
+
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(wt.isAdvancedMarkerAvailable(i)){const f=document.createElement("div");f.innerHTML=s;const d=f.firstElementChild;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const c={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function Iv(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class La{constructor(){Iv(La,google.maps.OverlayView)}}var Fr;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Fr||(Fr={}));const jv=(t,e,n)=>{n.fitBounds(e.bounds)};class Nv extends La{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Tv(r),renderer:o=new Dv,onClusterClick:s=jv}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(wt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Fr.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||wt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>wt.setMap(s,null)))}google.maps.event.trigger(this,Fr.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>wt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Av(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>wt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Fr.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),wt.setMap(r.marker,n)})}}function Bv(t){var e=Hg(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new Nv(Q(Q({},t),{map:e}));i(o)}},[e]),r}function Uv(t){var e=t.children,n=t.options,r=Bv(n);return r!==null?e(r):null}u.memo(Uv);var El={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},xl={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Vv(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=u.useContext(le),y=u.useState(null),p=y[0],L=y[1],w=u.useState(null),g=w[0],b=w[1],_=u.useState(null),E=_[0],m=_[1],S=u.useState(null),C=S[0],R=S[1],M=u.useState(null),O=M[0],P=M[1],j=u.useState(null),B=j[0],$=j[1],G=u.useRef(null);return u.useEffect(function(){p!==null&&(p.close(),n?p.open(v,n):p.getPosition()&&p.open(v))},[v,p,n]),u.useEffect(function(){r&&p!==null&&p.setOptions(r)},[p,r]),u.useEffect(function(){i&&p!==null&&p.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&p!==null&&p.setZIndex(o)},[o]),u.useEffect(function(){p&&s&&(g!==null&&google.maps.event.removeListener(g),b(google.maps.event.addListener(p,"closeclick",s)))},[s]),u.useEffect(function(){p&&a&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(p,"domready",a)))},[a]),u.useEffect(function(){p&&l&&(C!==null&&google.maps.event.removeListener(C),R(google.maps.event.addListener(p,"content_changed",l)))},[l]),u.useEffect(function(){p&&c&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(p,"position_changed",c)))},[c]),u.useEffect(function(){p&&f&&(B!==null&&google.maps.event.removeListener(B),$(google.maps.event.addListener(p,"zindex_changed",f)))},[f]),u.useEffect(function(){var z=new google.maps.InfoWindow(Q({},r||{}));return L(z),G.current=document.createElement("div"),s&&b(google.maps.event.addListener(z,"closeclick",s)),a&&m(google.maps.event.addListener(z,"domready",a)),l&&R(google.maps.event.addListener(z,"content_changed",l)),c&&P(google.maps.event.addListener(z,"position_changed",c)),f&&$(google.maps.event.addListener(z,"zindex_changed",f)),z.setContent(G.current),i&&z.setPosition(i),o&&z.setZIndex(o),n?z.open(v,n):z.getPosition()?z.open(v):qe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(z),function(){g&&google.maps.event.removeListener(g),C&&google.maps.event.removeListener(C),E&&google.maps.event.removeListener(E),O&&google.maps.event.removeListener(O),B&&google.maps.event.removeListener(B),h&&h(z),z.close()}},[]),G.current?dr.createPortal(u.Children.only(e),G.current):null}u.memo(Vv);var lf=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):qe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(Q({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ue({updaterMap:xl,eventMap:El,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:xl,eventMap:El,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?dr.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(u.PureComponent),Cl={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},_l={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Fv={};function zv(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,p=t.onClick,L=t.onDrag,w=t.onLoad,g=t.onUnmount,b=u.useContext(le),_=u.useState(null),E=_[0],m=_[1],S=u.useState(null),C=S[0],R=S[1],M=u.useState(null),O=M[0],P=M[1],j=u.useState(null),B=j[0],$=j[1],G=u.useState(null),z=G[0],Z=G[1],A=u.useState(null),T=A[0],k=A[1],D=u.useState(null),U=D[0],V=D[1],W=u.useState(null),I=W[0],X=W[1],ee=u.useState(null),K=ee[0],ie=ee[1],fe=u.useState(null),ge=fe[0],Le=fe[1],Fe=u.useState(null),we=Fe[0],Ee=Fe[1],Ie=u.useState(null),Me=Ie[0],Re=Ie[1];return u.useEffect(function(){E!==null&&E.setMap(b)},[b]),u.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),u.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),u.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),u.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),u.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),u.useEffect(function(){E&&s&&(C!==null&&google.maps.event.removeListener(C),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),u.useEffect(function(){E&&a&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(E,"dragend",a)))},[a]),u.useEffect(function(){E&&l&&(B!==null&&google.maps.event.removeListener(B),$(google.maps.event.addListener(E,"dragstart",l)))},[l]),u.useEffect(function(){E&&c&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(E,"mousedown",c)))},[c]),u.useEffect(function(){E&&f&&(T!==null&&google.maps.event.removeListener(T),k(google.maps.event.addListener(E,"mousemove",f)))},[f]),u.useEffect(function(){E&&d&&(U!==null&&google.maps.event.removeListener(U),V(google.maps.event.addListener(E,"mouseout",d)))},[d]),u.useEffect(function(){E&&h&&(I!==null&&google.maps.event.removeListener(I),X(google.maps.event.addListener(E,"mouseover",h)))},[h]),u.useEffect(function(){E&&v&&(K!==null&&google.maps.event.removeListener(K),ie(google.maps.event.addListener(E,"mouseup",v)))},[v]),u.useEffect(function(){E&&y&&(ge!==null&&google.maps.event.removeListener(ge),Le(google.maps.event.addListener(E,"rightclick",y)))},[y]),u.useEffect(function(){E&&p&&(we!==null&&google.maps.event.removeListener(we),Ee(google.maps.event.addListener(E,"click",p)))},[p]),u.useEffect(function(){E&&L&&(Me!==null&&google.maps.event.removeListener(Me),Re(google.maps.event.addListener(E,"drag",L)))},[L]),u.useEffect(function(){var re=new google.maps.Polyline(Q(Q({},e||Fv),{map:b}));return o&&re.setPath(o),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),s&&R(google.maps.event.addListener(re,"dblclick",s)),a&&P(google.maps.event.addListener(re,"dragend",a)),l&&$(google.maps.event.addListener(re,"dragstart",l)),c&&Z(google.maps.event.addListener(re,"mousedown",c)),f&&k(google.maps.event.addListener(re,"mousemove",f)),d&&V(google.maps.event.addListener(re,"mouseout",d)),h&&X(google.maps.event.addListener(re,"mouseover",h)),v&&ie(google.maps.event.addListener(re,"mouseup",v)),y&&Le(google.maps.event.addListener(re,"rightclick",y)),p&&Ee(google.maps.event.addListener(re,"click",p)),L&&Re(google.maps.event.addListener(re,"drag",L)),m(re),w&&w(re),function(){C!==null&&google.maps.event.removeListener(C),O!==null&&google.maps.event.removeListener(O),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),U!==null&&google.maps.event.removeListener(U),I!==null&&google.maps.event.removeListener(I),K!==null&&google.maps.event.removeListener(K),ge!==null&&google.maps.event.removeListener(ge),we!==null&&google.maps.event.removeListener(we),g&&g(re),re.setMap(null)}},[]),null}u.memo(zv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=ue({updaterMap:_l,eventMap:Cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:_l,eventMap:Cl,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Ol={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ml={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function $v(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,p=t.onRightClick,L=t.onClick,w=t.onDrag,g=t.onLoad,b=t.onUnmount,_=u.useContext(le),E=u.useState(null),m=E[0],S=E[1],C=u.useState(null),R=C[0],M=C[1],O=u.useState(null),P=O[0],j=O[1],B=u.useState(null),$=B[0],G=B[1],z=u.useState(null),Z=z[0],A=z[1],T=u.useState(null),k=T[0],D=T[1],U=u.useState(null),V=U[0],W=U[1],I=u.useState(null),X=I[0],ee=I[1],K=u.useState(null),ie=K[0],fe=K[1],ge=u.useState(null),Le=ge[0],Fe=ge[1],we=u.useState(null),Ee=we[0],Ie=we[1],Me=u.useState(null),Re=Me[0],re=Me[1];return u.useEffect(function(){m!==null&&m.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&m!==null&&m.setOptions(e)},[m,e]),u.useEffect(function(){typeof n<"u"&&m!==null&&m.setDraggable(n)},[m,n]),u.useEffect(function(){typeof r<"u"&&m!==null&&m.setEditable(r)},[m,r]),u.useEffect(function(){typeof i<"u"&&m!==null&&m.setVisible(i)},[m,i]),u.useEffect(function(){typeof o<"u"&&m!==null&&m.setPath(o)},[m,o]),u.useEffect(function(){typeof s<"u"&&m!==null&&m.setPaths(s)},[m,s]),u.useEffect(function(){m&&a&&(R!==null&&google.maps.event.removeListener(R),M(google.maps.event.addListener(m,"dblclick",a)))},[a]),u.useEffect(function(){m&&l&&(P!==null&&google.maps.event.removeListener(P),j(google.maps.event.addListener(m,"dragend",l)))},[l]),u.useEffect(function(){m&&c&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(m,"dragstart",c)))},[c]),u.useEffect(function(){m&&f&&(Z!==null&&google.maps.event.removeListener(Z),A(google.maps.event.addListener(m,"mousedown",f)))},[f]),u.useEffect(function(){m&&d&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(m,"mousemove",d)))},[d]),u.useEffect(function(){m&&h&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(m,"mouseout",h)))},[h]),u.useEffect(function(){m&&v&&(X!==null&&google.maps.event.removeListener(X),ee(google.maps.event.addListener(m,"mouseover",v)))},[v]),u.useEffect(function(){m&&y&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(m,"mouseup",y)))},[y]),u.useEffect(function(){m&&p&&(Le!==null&&google.maps.event.removeListener(Le),Fe(google.maps.event.addListener(m,"rightclick",p)))},[p]),u.useEffect(function(){m&&L&&(Ee!==null&&google.maps.event.removeListener(Ee),Ie(google.maps.event.addListener(m,"click",L)))},[L]),u.useEffect(function(){m&&w&&(Re!==null&&google.maps.event.removeListener(Re),re(google.maps.event.addListener(m,"drag",w)))},[w]),u.useEffect(function(){var oe=new google.maps.Polygon(Q(Q({},e||{}),{map:_}));return o&&oe.setPath(o),s&&oe.setPaths(s),typeof i<"u"&&oe.setVisible(i),typeof r<"u"&&oe.setEditable(r),typeof n<"u"&&oe.setDraggable(n),a&&M(google.maps.event.addListener(oe,"dblclick",a)),l&&j(google.maps.event.addListener(oe,"dragend",l)),c&&G(google.maps.event.addListener(oe,"dragstart",c)),f&&A(google.maps.event.addListener(oe,"mousedown",f)),d&&D(google.maps.event.addListener(oe,"mousemove",d)),h&&W(google.maps.event.addListener(oe,"mouseout",h)),v&&ee(google.maps.event.addListener(oe,"mouseover",v)),y&&fe(google.maps.event.addListener(oe,"mouseup",y)),p&&Fe(google.maps.event.addListener(oe,"rightclick",p)),L&&Ie(google.maps.event.addListener(oe,"click",L)),w&&re(google.maps.event.addListener(oe,"drag",w)),S(oe),g&&g(oe),function(){R!==null&&google.maps.event.removeListener(R),P!==null&&google.maps.event.removeListener(P),$!==null&&google.maps.event.removeListener($),Z!==null&&google.maps.event.removeListener(Z),k!==null&&google.maps.event.removeListener(k),V!==null&&google.maps.event.removeListener(V),X!==null&&google.maps.event.removeListener(X),ie!==null&&google.maps.event.removeListener(ie),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),b&&b(oe),oe.setMap(null)}},[]),null}u.memo($v);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=ue({updaterMap:Ml,eventMap:Ol,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Ml,eventMap:Ol,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var kl={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Pl={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Hv(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,p=t.onClick,L=t.onDrag,w=t.onBoundsChanged,g=t.onLoad,b=t.onUnmount,_=u.useContext(le),E=u.useState(null),m=E[0],S=E[1],C=u.useState(null),R=C[0],M=C[1],O=u.useState(null),P=O[0],j=O[1],B=u.useState(null),$=B[0],G=B[1],z=u.useState(null),Z=z[0],A=z[1],T=u.useState(null),k=T[0],D=T[1],U=u.useState(null),V=U[0],W=U[1],I=u.useState(null),X=I[0],ee=I[1],K=u.useState(null),ie=K[0],fe=K[1],ge=u.useState(null),Le=ge[0],Fe=ge[1],we=u.useState(null),Ee=we[0],Ie=we[1],Me=u.useState(null),Re=Me[0],re=Me[1],oe=u.useState(null),ze=oe[0],Ye=oe[1];return u.useEffect(function(){m!==null&&m.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&m!==null&&m.setOptions(e)},[m,e]),u.useEffect(function(){typeof r<"u"&&m!==null&&m.setDraggable(r)},[m,r]),u.useEffect(function(){typeof i<"u"&&m!==null&&m.setEditable(i)},[m,i]),u.useEffect(function(){typeof o<"u"&&m!==null&&m.setVisible(o)},[m,o]),u.useEffect(function(){typeof n<"u"&&m!==null&&m.setBounds(n)},[m,n]),u.useEffect(function(){m&&s&&(R!==null&&google.maps.event.removeListener(R),M(google.maps.event.addListener(m,"dblclick",s)))},[s]),u.useEffect(function(){m&&a&&(P!==null&&google.maps.event.removeListener(P),j(google.maps.event.addListener(m,"dragend",a)))},[a]),u.useEffect(function(){m&&l&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(m,"dragstart",l)))},[l]),u.useEffect(function(){m&&c&&(Z!==null&&google.maps.event.removeListener(Z),A(google.maps.event.addListener(m,"mousedown",c)))},[c]),u.useEffect(function(){m&&f&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(m,"mousemove",f)))},[f]),u.useEffect(function(){m&&d&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(m,"mouseout",d)))},[d]),u.useEffect(function(){m&&h&&(X!==null&&google.maps.event.removeListener(X),ee(google.maps.event.addListener(m,"mouseover",h)))},[h]),u.useEffect(function(){m&&v&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(m,"mouseup",v)))},[v]),u.useEffect(function(){m&&y&&(Le!==null&&google.maps.event.removeListener(Le),Fe(google.maps.event.addListener(m,"rightclick",y)))},[y]),u.useEffect(function(){m&&p&&(Ee!==null&&google.maps.event.removeListener(Ee),Ie(google.maps.event.addListener(m,"click",p)))},[p]),u.useEffect(function(){m&&L&&(Re!==null&&google.maps.event.removeListener(Re),re(google.maps.event.addListener(m,"drag",L)))},[L]),u.useEffect(function(){m&&w&&(ze!==null&&google.maps.event.removeListener(ze),Ye(google.maps.event.addListener(m,"bounds_changed",w)))},[w]),u.useEffect(function(){var J=new google.maps.Rectangle(Q(Q({},e||{}),{map:_}));return typeof o<"u"&&J.setVisible(o),typeof i<"u"&&J.setEditable(i),typeof r<"u"&&J.setDraggable(r),typeof n<"u"&&J.setBounds(n),s&&M(google.maps.event.addListener(J,"dblclick",s)),a&&j(google.maps.event.addListener(J,"dragend",a)),l&&G(google.maps.event.addListener(J,"dragstart",l)),c&&A(google.maps.event.addListener(J,"mousedown",c)),f&&D(google.maps.event.addListener(J,"mousemove",f)),d&&W(google.maps.event.addListener(J,"mouseout",d)),h&&ee(google.maps.event.addListener(J,"mouseover",h)),v&&fe(google.maps.event.addListener(J,"mouseup",v)),y&&Fe(google.maps.event.addListener(J,"rightclick",y)),p&&Ie(google.maps.event.addListener(J,"click",p)),L&&re(google.maps.event.addListener(J,"drag",L)),w&&Ye(google.maps.event.addListener(J,"bounds_changed",w)),S(J),g&&g(J),function(){R!==null&&google.maps.event.removeListener(R),P!==null&&google.maps.event.removeListener(P),$!==null&&google.maps.event.removeListener($),Z!==null&&google.maps.event.removeListener(Z),k!==null&&google.maps.event.removeListener(k),V!==null&&google.maps.event.removeListener(V),X!==null&&google.maps.event.removeListener(X),ie!==null&&google.maps.event.removeListener(ie),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),Re!==null&&google.maps.event.removeListener(Re),ze!==null&&google.maps.event.removeListener(ze),b&&b(J),J.setMap(null)}},[]),null}u.memo(Hv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=ue({updaterMap:Pl,eventMap:kl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Pl,eventMap:kl,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Rl={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Tl={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Gv={};function Zv(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,p=t.onRightClick,L=t.onClick,w=t.onDrag,g=t.onCenterChanged,b=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,m=u.useContext(le),S=u.useState(null),C=S[0],R=S[1],M=u.useState(null),O=M[0],P=M[1],j=u.useState(null),B=j[0],$=j[1],G=u.useState(null),z=G[0],Z=G[1],A=u.useState(null),T=A[0],k=A[1],D=u.useState(null),U=D[0],V=D[1],W=u.useState(null),I=W[0],X=W[1],ee=u.useState(null),K=ee[0],ie=ee[1],fe=u.useState(null),ge=fe[0],Le=fe[1],Fe=u.useState(null),we=Fe[0],Ee=Fe[1],Ie=u.useState(null),Me=Ie[0],Re=Ie[1],re=u.useState(null),oe=re[0],ze=re[1],Ye=u.useState(null),J=Ye[0],$e=Ye[1],Ne=u.useState(null),ht=Ne[0],at=Ne[1];return u.useEffect(function(){C!==null&&C.setMap(m)},[m]),u.useEffect(function(){typeof e<"u"&&C!==null&&C.setOptions(e)},[C,e]),u.useEffect(function(){typeof i<"u"&&C!==null&&C.setDraggable(i)},[C,i]),u.useEffect(function(){typeof o<"u"&&C!==null&&C.setEditable(o)},[C,o]),u.useEffect(function(){typeof s<"u"&&C!==null&&C.setVisible(s)},[C,s]),u.useEffect(function(){typeof r=="number"&&C!==null&&C.setRadius(r)},[C,r]),u.useEffect(function(){typeof n<"u"&&C!==null&&C.setCenter(n)},[C,n]),u.useEffect(function(){C&&a&&(O!==null&&google.maps.event.removeListener(O),P(google.maps.event.addListener(C,"dblclick",a)))},[a]),u.useEffect(function(){C&&l&&(B!==null&&google.maps.event.removeListener(B),$(google.maps.event.addListener(C,"dragend",l)))},[l]),u.useEffect(function(){C&&c&&(z!==null&&google.maps.event.removeListener(z),Z(google.maps.event.addListener(C,"dragstart",c)))},[c]),u.useEffect(function(){C&&f&&(T!==null&&google.maps.event.removeListener(T),k(google.maps.event.addListener(C,"mousedown",f)))},[f]),u.useEffect(function(){C&&d&&(U!==null&&google.maps.event.removeListener(U),V(google.maps.event.addListener(C,"mousemove",d)))},[d]),u.useEffect(function(){C&&h&&(I!==null&&google.maps.event.removeListener(I),X(google.maps.event.addListener(C,"mouseout",h)))},[h]),u.useEffect(function(){C&&v&&(K!==null&&google.maps.event.removeListener(K),ie(google.maps.event.addListener(C,"mouseover",v)))},[v]),u.useEffect(function(){C&&y&&(ge!==null&&google.maps.event.removeListener(ge),Le(google.maps.event.addListener(C,"mouseup",y)))},[y]),u.useEffect(function(){C&&p&&(we!==null&&google.maps.event.removeListener(we),Ee(google.maps.event.addListener(C,"rightclick",p)))},[p]),u.useEffect(function(){C&&L&&(Me!==null&&google.maps.event.removeListener(Me),Re(google.maps.event.addListener(C,"click",L)))},[L]),u.useEffect(function(){C&&w&&(oe!==null&&google.maps.event.removeListener(oe),ze(google.maps.event.addListener(C,"drag",w)))},[w]),u.useEffect(function(){C&&g&&(J!==null&&google.maps.event.removeListener(J),$e(google.maps.event.addListener(C,"center_changed",g)))},[L]),u.useEffect(function(){C&&b&&(ht!==null&&google.maps.event.removeListener(ht),at(google.maps.event.addListener(C,"radius_changed",b)))},[b]),u.useEffect(function(){var se=new google.maps.Circle(Q(Q({},e||Gv),{map:m}));return typeof r=="number"&&se.setRadius(r),typeof n<"u"&&se.setCenter(n),typeof r=="number"&&se.setRadius(r),typeof s<"u"&&se.setVisible(s),typeof o<"u"&&se.setEditable(o),typeof i<"u"&&se.setDraggable(i),a&&P(google.maps.event.addListener(se,"dblclick",a)),l&&$(google.maps.event.addListener(se,"dragend",l)),c&&Z(google.maps.event.addListener(se,"dragstart",c)),f&&k(google.maps.event.addListener(se,"mousedown",f)),d&&V(google.maps.event.addListener(se,"mousemove",d)),h&&X(google.maps.event.addListener(se,"mouseout",h)),v&&ie(google.maps.event.addListener(se,"mouseover",v)),y&&Le(google.maps.event.addListener(se,"mouseup",y)),p&&Ee(google.maps.event.addListener(se,"rightclick",p)),L&&Re(google.maps.event.addListener(se,"click",L)),w&&ze(google.maps.event.addListener(se,"drag",w)),g&&$e(google.maps.event.addListener(se,"center_changed",g)),b&&at(google.maps.event.addListener(se,"radius_changed",b)),R(se),_&&_(se),function(){O!==null&&google.maps.event.removeListener(O),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),U!==null&&google.maps.event.removeListener(U),I!==null&&google.maps.event.removeListener(I),K!==null&&google.maps.event.removeListener(K),ge!==null&&google.maps.event.removeListener(ge),we!==null&&google.maps.event.removeListener(we),Me!==null&&google.maps.event.removeListener(Me),J!==null&&google.maps.event.removeListener(J),ht!==null&&google.maps.event.removeListener(ht),E&&E(se),se.setMap(null)}},[]),null}u.memo(Zv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=ue({updaterMap:Tl,eventMap:Rl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Tl,eventMap:Rl,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Al={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Dl={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Wv(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,p=t.onLoad,L=t.onUnmount,w=u.useContext(le),g=u.useState(null),b=g[0],_=g[1],E=u.useState(null),m=E[0],S=E[1],C=u.useState(null),R=C[0],M=C[1],O=u.useState(null),P=O[0],j=O[1],B=u.useState(null),$=B[0],G=B[1],z=u.useState(null),Z=z[0],A=z[1],T=u.useState(null),k=T[0],D=T[1],U=u.useState(null),V=U[0],W=U[1],I=u.useState(null),X=I[0],ee=I[1],K=u.useState(null),ie=K[0],fe=K[1],ge=u.useState(null),Le=ge[0],Fe=ge[1],we=u.useState(null),Ee=we[0],Ie=we[1],Me=u.useState(null),Re=Me[0],re=Me[1],oe=u.useState(null),ze=oe[0],Ye=oe[1];return u.useEffect(function(){b!==null&&b.setMap(w)},[w]),u.useEffect(function(){b&&r&&(m!==null&&google.maps.event.removeListener(m),S(google.maps.event.addListener(b,"dblclick",r)))},[r]),u.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),M(google.maps.event.addListener(b,"mousedown",i)))},[i]),u.useEffect(function(){b&&o&&(P!==null&&google.maps.event.removeListener(P),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),u.useEffect(function(){b&&s&&($!==null&&google.maps.event.removeListener($),G(google.maps.event.addListener(b,"mouseout",s)))},[s]),u.useEffect(function(){b&&a&&(Z!==null&&google.maps.event.removeListener(Z),A(google.maps.event.addListener(b,"mouseover",a)))},[a]),u.useEffect(function(){b&&l&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(b,"mouseup",l)))},[l]),u.useEffect(function(){b&&c&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(b,"rightclick",c)))},[c]),u.useEffect(function(){b&&n&&(X!==null&&google.maps.event.removeListener(X),ee(google.maps.event.addListener(b,"click",n)))},[n]),u.useEffect(function(){b&&f&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(b,"addfeature",f)))},[f]),u.useEffect(function(){b&&d&&(Le!==null&&google.maps.event.removeListener(Le),Fe(google.maps.event.addListener(b,"removefeature",d)))},[d]),u.useEffect(function(){b&&h&&(Ee!==null&&google.maps.event.removeListener(Ee),Ie(google.maps.event.addListener(b,"removeproperty",h)))},[h]),u.useEffect(function(){b&&v&&(Re!==null&&google.maps.event.removeListener(Re),re(google.maps.event.addListener(b,"setgeometry",v)))},[v]),u.useEffect(function(){b&&y&&(ze!==null&&google.maps.event.removeListener(ze),Ye(google.maps.event.addListener(b,"setproperty",y)))},[y]),u.useEffect(function(){if(w!==null){var J=new google.maps.Data(Q(Q({},e||{}),{map:w}));r&&S(google.maps.event.addListener(J,"dblclick",r)),i&&M(google.maps.event.addListener(J,"mousedown",i)),o&&j(google.maps.event.addListener(J,"mousemove",o)),s&&G(google.maps.event.addListener(J,"mouseout",s)),a&&A(google.maps.event.addListener(J,"mouseover",a)),l&&D(google.maps.event.addListener(J,"mouseup",l)),c&&W(google.maps.event.addListener(J,"rightclick",c)),n&&ee(google.maps.event.addListener(J,"click",n)),f&&fe(google.maps.event.addListener(J,"addfeature",f)),d&&Fe(google.maps.event.addListener(J,"removefeature",d)),h&&Ie(google.maps.event.addListener(J,"removeproperty",h)),v&&re(google.maps.event.addListener(J,"setgeometry",v)),y&&Ye(google.maps.event.addListener(J,"setproperty",y)),_(J),p&&p(J)}return function(){b&&(m!==null&&google.maps.event.removeListener(m),R!==null&&google.maps.event.removeListener(R),P!==null&&google.maps.event.removeListener(P),$!==null&&google.maps.event.removeListener($),Z!==null&&google.maps.event.removeListener(Z),k!==null&&google.maps.event.removeListener(k),V!==null&&google.maps.event.removeListener(V),X!==null&&google.maps.event.removeListener(X),ie!==null&&google.maps.event.removeListener(ie),Le!==null&&google.maps.event.removeListener(Le),Ee!==null&&google.maps.event.removeListener(Ee),Re!==null&&google.maps.event.removeListener(Re),ze!==null&&google.maps.event.removeListener(ze),L&&L(b),b.setMap(null))}},[]),null}u.memo(Wv);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(Q(Q({},this.props.options||{}),{map:this.context}));this.registeredEvents=ue({updaterMap:Dl,eventMap:Al,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Dl,eventMap:Al,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var Il={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},jl={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(Q(Q({},this.props.options),{map:this.context}));this.registeredEvents=ue({updaterMap:jl,eventMap:Il,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:jl,eventMap:Il,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);function cf(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function qv(t,e){return new e(t.lat,t.lng)}function Kv(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Jv(t,e,n){return t instanceof e?t:n(t,e)}function Yv(t,e,n){return t instanceof e?t:n(t,e)}function Xv(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function Qv(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function uf(t,e,n,r){return n!==void 0?Xv(t,e,Yv(n,google.maps.LatLngBounds,Kv)):Qv(t,e,Jv(r,google.maps.LatLng,qv))}function em(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function tm(t,e,n,r,i){var o=function(s){je(a,s);function a(l,c,f,d){var h=s.call(this)||this;return h.container=l,h.pane=c,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,c=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];c==null||c.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),c=Q({},this.container?cf(this.container,i):{x:0,y:0}),f=uf(l,c,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],p=v[1];this.container.style[y]=p}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function Nl(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Bl(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function nm(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,c=u.useContext(le),f=u.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=u.useMemo(function(){return tm(f,r,e,n,a)},[f,r,e,n]);return u.useEffect(function(){return o==null||o(d),d==null||d.setMap(c),function(){s==null||s(d),d==null||d.setMap(null)}},[c,d]),u.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),su.createPortal(l,f)}u.memo(nm);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();qe(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o,s=r.overlayView.getProjection(),a=Q({x:0,y:0},r.containerRef.current?cf(r.containerRef.current,r.props.getPixelPositionOffset):{}),l=uf(s,a,r.props.bounds,r.props.position),c=(o=r.state.containerStyle,o.left),f=o.top,d=o.width,h=o.height;em(l,{left:c,top:f,width:d,height:h})||r.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=u.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=Nl(n.position),i=Nl(this.props.position),o=Bl(n.bounds),s=Bl(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?su.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(u.PureComponent);function rm(){}var Ul={onDblClick:"dblclick",onClick:"click"},Vl={opacity:function(t,e){t.setOpacity(e)}};function im(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=u.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,Q({},r));return l},[]);return u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),u.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),u.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}u.memo(im);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){qe(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Q(Q({},this.props.options),{map:this.context}));this.registeredEvents=ue({updaterMap:Vl,eventMap:Ul,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Vl,eventMap:Ul,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:rm},e.contextType=le,e})(u.PureComponent);var Fl={},zl={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function om(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(le),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||qe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){qe(!!e,"data property is required in HeatmapLayer %s",e)},[e]),u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),u.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(Q(Q({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(om);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){qe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),qe(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(Q(Q({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ue({updaterMap:zl,eventMap:Fl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:zl,eventMap:Fl,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);var $l={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Hl={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=ue({updaterMap:Hl,eventMap:$l,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Hl,eventMap:$l,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){qe(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(u.PureComponent);var Gl={onDirectionsChanged:"directions_changed"},Zl={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ue({updaterMap:Zl,eventMap:Gl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Zl,eventMap:Gl,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=le,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){qe(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(u.PureComponent);var Wl={onPlacesChanged:"places_changed"},ql={bounds:function(t,e){t.setBounds(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(qe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=ue({updaterMap:ql,eventMap:Wl,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:ql,eventMap:Wl,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=le,e})(u.PureComponent);var Kl={onPlaceChanged:"place_changed"},Jl={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;qe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ue({updaterMap:Jl,eventMap:Kl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=ue({updaterMap:Jl,eventMap:Kl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&pe(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(u.PureComponent);const sm='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-opacity=".8" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><path fill="#fff" fill-rule="evenodd" d="M36.503 33.501V19.625a3 3 0 0 0-1.583-2.645l-9.502-5.091a3 3 0 0 0-2.834 0l-9.501 5.091a3 3 0 0 0-1.583 2.645V33.5a3 3 0 0 0 3 3h19.003a3 3 0 0 0 3-3Zm-7.752 1h4.752a1 1 0 0 0 1-1V19.625a1 1 0 0 0-.528-.882l-9.501-5.091a1 1 0 0 0-.945 0l-9.501 5.091a1 1 0 0 0-.528.882V33.5a1 1 0 0 0 1 1h4.75a2.516 2.516 0 0 1-.05-.5V23.747a2.5 2.5 0 0 1 2.5-2.5h4.602a2.5 2.5 0 0 1 2.5 2.5V34c0 .172-.018.339-.05.5Zm-2.434 0a.5.5 0 0 0 .485-.5V23.747a.5.5 0 0 0-.5-.5H21.7a.5.5 0 0 0-.5.5V34a.5.5 0 0 0 .484.5h4.632Z" clip-rule="evenodd"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1068_16960"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_1068_16960" result="shape"/></filter></defs></svg>',am='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#b)"><path fill="currentColor" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z"/><path fill="#fff" d="M33.913 12H14.087A2.087 2.087 0 0 0 12 14.087v19.826c0 1.153.934 2.087 2.087 2.087h19.826A2.087 2.087 0 0 0 36 33.913V14.087A2.087 2.087 0 0 0 33.913 12Zm-20.348 2.087c0-.288.234-.522.522-.522h7.826v4.07h-8.348v-3.548Zm9.913 9.13v-9.652h4.696v9.652h-4.696Zm4.696 1.566h-4.696v9.652h4.696v-9.652Zm1.565 9.652h4.174a.523.523 0 0 0 .522-.522v-9.13h-4.696v9.652Zm0-11.218v-9.652h4.174c.288 0 .522.234.522.522v9.13h-4.696ZM21.913 19.2v4.017h-8.348V19.2h8.348Zm0 9.6v-4.017h-8.348V28.8h8.348Zm-8.348 1.565h8.348v4.07h-7.826a.522.522 0 0 1-.522-.522v-3.548Z"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop stop-color="#1D3665"/><stop offset="1" stop-color="#1D3665" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_2412_6054"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_2412_6054" result="shape"/></filter></defs></svg>',lm='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><g fill="#fff"><path fill-rule="evenodd" d="M15.878 16.411c0-.34.273-.617.61-.617h15.024c.337 0 .61.276.61.617v10.103H15.878V16.41Zm1.22.617v8.253h13.803v-8.253H17.1Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M15.878 25.28h16.244v9.155c0 .864-.694 1.565-1.55 1.565H17.428c-.855 0-1.55-.7-1.55-1.565V25.28Zm1.22 1.234v7.92a.33.33 0 0 0 .33.333h13.145a.33.33 0 0 0 .328-.332v-7.921H17.1ZM14 13.565c0-.864.694-1.565 1.55-1.565h16.9c.856 0 1.55.7 1.55 1.565v1.898c0 .864-.694 1.565-1.55 1.565h-16.9c-.856 0-1.55-.701-1.55-1.565v-1.898Zm1.55-.332a.33.33 0 0 0-.33.332v1.898a.33.33 0 0 0 .33.332h16.9a.33.33 0 0 0 .33-.332v-1.898a.33.33 0 0 0-.33-.332h-16.9Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20.573 24c0-1.912 1.535-3.462 3.427-3.462 1.893 0 3.428 1.55 3.428 3.462v1.872a.639.639 0 0 1-.636.642H21.21a.639.639 0 0 1-.636-.642V24ZM24 21.77A2.218 2.218 0 0 0 21.794 24v1.28h4.413V24c0-1.231-.988-2.23-2.207-2.23Z" clip-rule="evenodd"/><path d="m26.765 29.18-2.724-1.376a.093.093 0 0 0-.083 0l-2.724 1.376a.094.094 0 0 0-.051.084v2.752c0 .036.02.069.05.084l2.725 1.376a.09.09 0 0 0 .042.01.09.09 0 0 0 .041-.01l2.724-1.376a.094.094 0 0 0 .051-.084v-2.751a.095.095 0 0 0-.05-.085ZM24 27.994l2.624 1.326-1.26.637-2.525-1.378 1.16-.585Zm0 2.651-2.625-1.325 1.261-.637 2.524 1.377-1.16.585Zm-2.631-1.118 2.538 1.282v2.431l-2.538-1.282v-2.431Zm2.723 3.713V30.81l2.538-1.282v2.432l-2.538 1.281Z"/><path fill-rule="evenodd" d="M26.892 28.926a.38.38 0 0 1 .206.339v2.751a.379.379 0 0 1-.207.339l-2.723 1.375a.369.369 0 0 1-.338 0l-2.722-1.375a.379.379 0 0 1-.208-.339v-2.752c0-.142.079-.274.207-.339l2.727-1.377a.373.373 0 0 1 .33 0l.002.002 2.726 1.376ZM21.233 32.1a.094.094 0 0 1-.05-.084v-2.752c0-.035.019-.068.05-.084l2.724-1.376a.093.093 0 0 1 .084 0l2.724 1.376a.095.095 0 0 1 .05.085v2.751c0 .035-.019.068-.05.084l-2.724 1.376a.09.09 0 0 1-.042.01.09.09 0 0 1-.042-.01L21.233 32.1Zm5.397-.141v-2.432l-2.538 1.282v2.431l2.538-1.281Zm-.282-.176v-1.796l-1.974.998v1.795l1.974-.997Zm-2.442-.974-2.538-1.282v2.431l2.538 1.282V30.81Zm-2.256-.822 1.974.998v1.795l-1.974-.998v-1.795Zm2.349.658 1.16-.585-2.524-1.377-1.26.637 2.624 1.325Zm.55-.595-.55.277-1.995-1.008.626-.316 1.918 1.047Zm.814-.094 1.26-.636L24 27.994l-1.16.585 2.524 1.377Zm.005-.32-1.918-1.047.549-.277 1.995 1.008-.627.316Z" clip-rule="evenodd"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_958_9661"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape"/></filter></defs></svg>',Rt={PinPvz:lm,PinHome:sm,PinLocker:am},cm=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},ce.createElement("path",{fill:"currentcolor",d:"M12.5 8c0 .287-.108.573-.324.792l-6.789 6.88a1.095 1.095 0 0 1-1.563 0 1.131 1.131 0 0 1 0-1.585L9.83 8 3.824 1.913a1.131 1.131 0 0 1 0-1.585 1.095 1.095 0 0 1 1.564 0l6.789 6.88c.215.219.323.505.323.792Z"})),ff=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},ce.createElement("g",{fill:"#000"},ce.createElement("path",{d:"M0 13.252V8.346h1.053v3.844h3.08v1.062H0ZM4.535 13.252V8.346h1.053v3.844h3.08v1.062H4.535ZM9.126 13.252V9.36a1.02 1.02 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .502.136c.154.09.277.213.367.367.095.15.143.318.143.504v3.892H12.95v-1.58H10.18v1.58H9.126Zm1.053-2.64h2.772V9.413H10.18v1.197ZM14.792 13.252v-4.9h1.087l1.658 1.98 1.65-1.98h1.094v4.9h-1.06V9.965l-1.684 2.014-1.692-2.007v3.28h-1.053ZM21.108 13.252V9.36a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .503.136c.153.09.276.213.366.367A.92.92 0 0 1 26 9.36v3.892h-1.067v-1.58h-2.771v1.58h-1.054Zm1.053-2.64h2.772V9.413h-2.771v1.197ZM1.005 5.648a.973.973 0 0 1-.502-.137A1.018 1.018 0 0 1 0 4.641V1.756a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .502-.137h2.881c.181 0 .347.045.496.136.154.09.276.213.367.367a.92.92 0 0 1 .143.504V4.64c0 .181-.048.349-.143.503-.09.154-.213.277-.367.367a.937.937 0 0 1-.496.137h-2.88Zm.048-1.062h2.772V1.81H1.053v2.776ZM5.64 5.648v-4.9h1.087l1.657 1.98 1.651-1.98h1.094v4.9h-1.06V2.36L8.384 4.375 6.693 2.368v3.28H5.64ZM11.943 5.648v-4.9h1.087l2.738 3.267V.749h1.066v4.899h-1.087l-2.751-3.28v3.28h-1.053ZM17.425 5.648v-4.9h1.04v4.9h-1.04Z"}))),df=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},ce.createElement("g",{fill:"#000"},ce.createElement("path",{d:"M1.416 7.5c-.255 0-.491-.065-.708-.194A1.445 1.445 0 0 1 0 6.06V1.94A1.445 1.445 0 0 1 .708.695C.925.564 1.16.5 1.416.5h4.056c.255 0 .488.065.698.194.217.13.39.305.517.525.134.214.2.454.2.72V6.06c0 .26-.066.5-.2.72-.128.22-.3.395-.517.525-.21.13-.443.194-.698.194H1.416Zm.067-1.517h3.903V2.017H1.483v3.966ZM7.941 7.5v-7h1.53l2.335 2.83L14.13.5h1.54v7h-1.493V2.804l-2.372 2.878-2.382-2.868V7.5H7.94ZM16.816 7.5v-7h1.53l3.856 4.667V.5h1.502v7h-1.53l-3.875-4.686V7.5h-1.483ZM24.536 7.5v-7H26v7h-1.464Z"})));function um(t,e){return e.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in t)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(t)}function Ea(t){return!!(t&&typeof t.then=="function")}function Wi(t,e){return Ea(t)?Promise.resolve(t).then(e):e(t)}function Yl(t){const e=(Array.isArray(t)?t:[t]).map(o=>`'${o}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function fm(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function hf(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function Ct(t){return hf(t)||[]}function dm(t,e){return fm(e)?Ct(e==null?void 0:e[t]):Ct(e)}function As(t){return Array.from(new Set(t))}function pf(t){return t&&t.replace(/\/+$/,"")}function hm(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const pm=(t,e)=>fetch(t,e),gf=(t=pm)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.16.3"},n==null?void 0:n.headers)}));function sn(t){let e=[];return Object.freeze({listen(n){const r=i=>{n(i)};return e.push(r),{unsubscribe(){e=e.filter(i=>r!==i)}}},emit(n){t()&&e.forEach(r=>r({value:n}))}})}function gm(t,e,n){const r=new Set,i=new Set;function o(l){const c=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(h=>c.has(h)||f.namespaces.has(h)))!==-1)&&f.fn({value:void 0})})}let s=[];function a(){if(s.length===0)return;const l=s;s=[],r.forEach(d=>{d({value:void 0})});let c=new Set;l.forEach(d=>{d===void 0?c=void 0:c!==void 0&&d.forEach(h=>c.add(h))});const f=c?Array.from(c.keys()):void 0;o(f)}return Object.freeze({emit(l,c){t()&&(s.push(l),c?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const c={fn:d=>{l(d)},namespaces:new Set};i.add(c);const f={unsubscribe:()=>{i.delete(c)},subscribeNs:d=>(Ct(d).forEach(h=>c.namespaces.add(h)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function vm(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:sn(r),onLanguageChange:sn(r),onLoadingChange:sn(r),onFetchingChange:sn(r),onInitialLoaded:sn(r),onRunningChange:sn(r),onCacheChange:sn(r),onUpdate:gm(r,t,e),onPermanentChange:sn(r),setEmitterActive(o){n=o},on:(o,s)=>{switch(o){case"pendingLanguage":return i.onPendingLanguageChange.listen(s);case"language":return i.onLanguageChange.listen(s);case"loading":return i.onLoadingChange.listen(s);case"fetching":return i.onFetchingChange.listen(s);case"initialLoad":return i.onInitialLoaded.listen(s);case"running":return i.onRunningChange.listen(s);case"cache":return i.onCacheChange.listen(s);case"update":return i.onUpdate.listen(s);case"permanentChange":return i.onPermanentChange.listen(s)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:o})=>i.onUpdate.emit([o.namespace],!0)),i}const vf=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){vf(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},Ar=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},qt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function mm(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(p,L,w){const g=qt(p);l.set(g,{data:vf(L),version:w}),t.emit(p)}function h(p){let L;if(!L){const w=c[qt(p)];typeof w=="function"&&(L=w())}return L||(L=e(p)),L}function v(p,L){var w;let g;return L&&(g=(w=n(p))===null||w===void 0?void 0:w.catch(()=>(console.warn("Tolgee: Failed to fetch data from dev backend"),h(p)))),g||(g=h(p)),g}const y=Object.freeze({addStaticData(p){p&&(c=Object.assign(Object.assign({},c),p),Object.entries(p).forEach(([L,w])=>{if(typeof w!="function"){const g=Ar(L),b=l.get(L);(!b||b.version===0)&&d(g,w,0)}}))},invalidate(){a.clear(),f+=1},addRecord(p,L){d(p,L,f)},exists(p,L=!1){const w=l.get(qt(p));return w&&L?w.version===f:!!w},getRecord(p){var L;return(L=l.get(qt(r(p))))===null||L===void 0?void 0:L.data},getTranslation(p,L){var w;return(w=l.get(qt(p)))===null||w===void 0?void 0:w.data.get(L)},getTranslationNs(p,L,w){var g;for(const b of p)for(const _ of L){const E=(g=l.get(qt({language:_,namespace:b})))===null||g===void 0?void 0:g.data.get(w);if(E!=null)return[b]}return As(p)},getTranslationFallback(p,L,w){var g;for(const b of p)for(const _ of L){const E=(g=l.get(qt({language:_,namespace:b})))===null||g===void 0?void 0:g.data.get(w);if(E!=null)return E}},changeTranslation(p,L,w){var g;const b=(g=l.get(qt(p)))===null||g===void 0?void 0:g.data;b==null||b.set(L,w),t.emit(Object.assign(Object.assign({},p),{key:L}))},isFetching(p){if(i())return!0;if(p===void 0)return a.size>0;const L=Ct(p);return!!Array.from(a.keys()).find(w=>L.includes(Ar(w).namespace))},isLoading(p,L){const w=Ct(L);return!!(i()||Array.from(a.keys()).find(g=>{const b=Ar(g);return(!w.length||w.includes(b.namespace))&&!y.exists({namespace:b.namespace,language:p})}))},async loadRecords(p,L){const w=p.map(b=>{const _=r(b),E=qt(_),m=a.get(E);if(m)return{new:!1,promise:m,keyObject:_,cacheKey:E};const S=v(_,L)||Promise.resolve(void 0);return a.set(E,S),{new:!0,promise:S,keyObject:_,cacheKey:E}});o.notify(),s.notify();const g=await Promise.all(w.map(b=>b.promise));return w.forEach((b,_)=>{const E=a.get(b.cacheKey)!==b.promise;if(b.new&&!E){a.delete(b.cacheKey);const m=g[_];m?y.addRecord(b.keyObject,m):y.getRecord(b.keyObject)||y.addRecord(b.keyObject,{})}}),o.notify(),s.notify(),w.map(b=>y.getRecord(b.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([L,w])=>Object.assign(Object.assign({},Ar(L)),{data:w.data}))}});return y}function mf(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const ym={tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%tolgee:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},Ds="invalid",bm="https://app.tolgee.io",wm=({key:t})=>t,Sm={defaultNs:"",observerOptions:ym,observerType:"invisible",onFormatError:Ds,apiUrl:bm,fetch:gf(),onTranslationMissing:wm},Is=(...t)=>{let e={};return t.forEach(n=>{e=Object.assign(Object.assign(Object.assign({},e),n),{observerOptions:Object.assign(Object.assign({},e.observerOptions),n==null?void 0:n.observerOptions)})}),e};function Xl(t,e){const n=Is(Sm,e==null?void 0:e.initialOptions,t);return n.apiUrl=pf(n.apiUrl),t!=null&&t.fetch&&(n.fetch=gf(t.fetch)),{initialOptions:n,activeNamespaces:(e==null?void 0:e.activeNamespaces)||new Map,language:e==null?void 0:e.language,pendingLanguage:e==null?void 0:e.language,isInitialLoading:!1,isRunning:!1}}function Lm(t,e,n,r,i,o,s,a){const l={ui:void 0},c={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:O,event:P})=>{var j;const B=O.map(({key:$,ns:G,defaultValue:z})=>({key:$,defaultValue:z,fallbackNamespaces:r(G),namespace:i({key:$,ns:G})[0],translation:o({key:$,ns:G})}));(j=c.ui)===null||j===void 0||j.handleElementClick(B,P)},d=(O,P)=>{var j;return((j=c.observer)===null||j===void 0?void 0:j.findPositions(O,P))||[]};function h(O){const P=o({key:O.key,ns:O.ns});return M.formatTranslation(Object.assign(Object.assign({},O),{translation:P,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function y(O){c.observer=O==null?void 0:O()}function p(){return!!c.observer}function L(O){O&&c.formatters.push(O)}function w(O){c.finalFormatter=O}function g(O){l.ui=O}function b(){return!!l.ui}function _(O){c.languageStorage=O}function E(O){c.languageDetector=O}function m(){if(!c.languageDetector)return;const O=n();return c.languageDetector.getLanguage(Object.assign({availableLanguages:O},v()))}function S(O){O&&c.backends.push(O)}function C(O){c.devBackend=O}function R(O,P){const j=Object.freeze({setFinalFormatter:w,addFormatter:L,setObserver:y,hasObserver:p,setUi:g,hasUi:b,setDevBackend:C,addBackend:S,setLanguageDetector:E,setLanguageStorage:_});P(O,j)}const M=Object.freeze({addPlugin:R,run(){var O,P;const{apiKey:j,apiUrl:B,projectId:$,observerOptions:G}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:j,apiUrl:B,projectId:$,highlight:M.highlight,changeTranslation:s,findPositions:d,onPermanentChange:a}),(P=c.observer)===null||P===void 0||P.run({mouseHighlight:!0,options:G,translate:h,onClick:f})},stop(){var O;c.ui=void 0,(O=c.observer)===null||O===void 0||O.stop()},getLanguageStorage(){return c.languageStorage},getInitialLanguage(){var O;const P=n(),j=(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v());return Wi(j,B=>(!P||P.includes(B))&&B?B:m())},setStoredLanguage(O){var P;(P=c.languageStorage)===null||P===void 0||P.setLanguage(O,v())},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:P})=>{for(const j of c.backends){const B=j.getRecord(Object.assign({language:O,namespace:P},v()));if(Ea(B))return B==null?void 0:B.catch($=>(console.error($),{}));if(B!==void 0)return B}},getBackendDevRecord:({language:O,namespace:P})=>{var j;const{apiKey:B,apiUrl:$,projectId:G}=e();return(j=c.devBackend)===null||j===void 0?void 0:j.getRecord(Object.assign({apiKey:B,apiUrl:$,projectId:G,language:O,namespace:P},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,P)=>{var j,B;return((B=(j=c.observer)===null||j===void 0?void 0:j.highlight)===null||B===void 0?void 0:B.call(j,O,P))||{unhighlight(){}}},unwrap(O){var P;return c.observer?(P=c.observer)===null||P===void 0?void 0:P.unwrap(O):{text:O,keys:[]}},wrap(O){var P;return c.observer?(P=c.observer)===null||P===void 0?void 0:P.wrap(O):O.translation},hasDevBackend(){return!!M.getDevBackend()},formatTranslation(O){var P,{formatEnabled:j}=O,B=mf(O,["formatEnabled"]);const{key:$,translation:G,defaultValue:z,noWrap:Z,params:A,ns:T,orEmpty:k}=B,D=G??z;let U="";G==null&&(U=e().onTranslationMissing(B));let V=D??(k?"":U);const W=t(),I=j||!(!((P=c.observer)===null||P===void 0)&&P.outputNotFormattable),X=ee=>c.observer&&!Z?c.observer.wrap({key:$,translation:ee,defaultValue:z,params:A,ns:T}):ee;V=X(V);try{if(D&&W&&I)for(const ee of c.formatters)V=ee.format({translation:V,language:W,params:A});c.finalFormatter&&D&&W&&I&&(V=c.finalFormatter.format({translation:V,language:W,params:A}))}catch(ee){console.error(ee);const K=hm(ee)||Ds,ie=e().onFormatError,fe=typeof ie;fe==="string"?V=ie:fe==="function"?V=ie(K,B):V=Ds,V=X(V)}return V}});return M}const Ql=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Em(t,e,n){let r=Xl(),i;const o=Object.freeze({init(s){r=Xl(s,r)},isRunning(){return r.isRunning},setRunning(s){r.isRunning!==s&&(r.isRunning=s,n.emit(s))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(s){r.isInitialLoading=s},getLanguage(){return r.language||r.initialOptions.language},setLanguage(s){r.language!==s&&(r.language=s,t.emit(s))},getPendingLanguage(){return r.pendingLanguage||o.getLanguage()},setPendingLanguage(s){r.pendingLanguage!==s&&(r.pendingLanguage=s,e.emit(s))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(s){Ct(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0?r.activeNamespaces.set(l,c+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){Ct(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0&&c>1?r.activeNamespaces.set(l,c-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return As([...r.initialOptions.ns||[r.initialOptions.defaultNs],...Ct(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?As([a,...dm(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return Ct(r.initialOptions.fallbackNs)},getDefaultNs(s){return s===void 0?r.initialOptions.defaultNs:s},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const s=Object.keys(r.initialOptions.staticData).map(a=>Ar(a).language);return Array.from(new Set(s))}},withDefaultNs(s){return{namespace:s.namespace===void 0?o.getInitialOptions().defaultNs:s.namespace,language:s.language}},overrideCredentials(s){s?i=Object.assign(Object.assign({},s),{apiUrl:pf(s.apiUrl)}):i=void 0}});return o}function xm(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=mf(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const yf=(t,...e)=>{let n={},r;return typeof t=="object"?n=t:(n.key=t,typeof e[0]=="string"?(n.defaultValue=e[0],r=e[1]):typeof e[0]=="object"&&(r=e[0])),r&&(n=Object.assign(Object.assign({},xm(r)),n)),n};function Cm({options:t}){const e=vm(l,c),n=Ql(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=Ql(!1,()=>m.isLoading(),e.onLoadingChange.emit),i=Em(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Lm(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,w,g,h,v),s=mm(e.onCacheChange,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&y(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function c(S){return i.getDefaultNs(S)}function f(S){return[...Ct(c(S)),...l()]}function d(S){return[...Ct(S??c()),...i.getRequiredNamespaces()]}function h(S,C,R){const M=i.withDefaultNs(S),O=s.getTranslation(M,C);return s.changeTranslation(M,C,R),{revert(){s.changeTranslation(M,C,O)}}}function v(S){e.onPermanentChange.emit({key:S.key,namespace:S.namespace})}function y(S){i.init(S),s.addStaticData(i.getInitialOptions().staticData)}function p(S,C){const R=i.getFallbackLangs(S),M=d(C),O=[];return R.forEach(P=>{M.forEach(j=>{s.exists({language:P,namespace:j},!0)||O.push({language:P,namespace:j})})}),O}function L(S,C){const R=p(S,C);if(R.length)return Wi(m.loadRecords(R),()=>{})}function w({key:S,ns:C}){const R=i.getFallbackLangs(),M=f(C??void 0);return s.getTranslationNs(M,R,S)}function g({key:S,ns:C,language:R}){const M=f(C??void 0),O=i.getFallbackLangs(R);return s.getTranslationFallback(M,O,S)}function b(){const S=Wi(_(),()=>L());if(Ea(S))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(S).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function _(){if(i.getLanguage())return;const C=o.getInitialLanguage();return Wi(C,R=>{const M=R||i.getInitialOptions().defaultLanguage;M&&i.setLanguage(M)})}function E(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Yl("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Yl(["defaultLanguage","language"]))}const m=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:y,getTranslation:g,changeTranslation:h,getTranslationNs:w,getDefaultAndFallbackNs:f,async changeLanguage(S){i.getPendingLanguage()===S&&i.getLanguage()===S||(i.setPendingLanguage(S),i.isRunning()&&await L(S),S===i.getPendingLanguage()&&(i.setLanguage(S),o.setStoredLanguage(S)))},async addActiveNs(S,C){C||i.addActiveNs(S),i.isRunning()&&await L(void 0,S)},loadRecords(S){return s.loadRecords(S,m.isDev())},async loadRecord(S){return(await m.loadRecords([S]))[0]},isLoading(S){return s.isLoading(i.getLanguage(),S)},isLoaded(S){const C=i.getLanguage();if(!C)return!1;const R=i.getFallbackLangs(C),M=d(S),O=[];return R.forEach(P=>{M.forEach(j=>{s.exists({language:P,namespace:j})||O.push({language:P,namespace:j})})}),O.length===0},t:(...S)=>{const C=yf(...S),R=g(C);return o.formatTranslation(Object.assign(Object.assign({},C),{translation:R}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return E(),i.isRunning()||(i.setRunning(!0),o.run(),a=b()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return m}function _m(t){const e=Cm({options:t});e.isDev()&&e.invalidate();function n(i){const o=e.isRunning();o&&e.stop(),i(),e.isDev()&&e.invalidate(),o&&e.run()}const r=Object.freeze({on:e.on,onNsUpdate:e.onUpdate.listenSome,setEmitterActive:e.setEmitterActive,getLanguage:e.getLanguage,getPendingLanguage:e.getPendingLanguage,changeLanguage:e.changeLanguage,changeTranslation:e.changeTranslation,addActiveNs:e.addActiveNs,removeActiveNs:e.removeActiveNs,loadRecords:e.loadRecords,loadRecord:e.loadRecord,addStaticData:e.addStaticData,getRecord:e.getRecord,getAllRecords:e.getAllRecords,isLoaded:e.isLoaded,isInitialLoading:e.isInitialLoading,isLoading:e.isLoading,isFetching:e.isFetching,isRunning:e.isRunning,run:e.run,stop:e.stop,t:e.t,highlight:e.highlight,getInitialOptions:e.getInitialOptions,isDev:e.isDev,wrap:e.wrap,unwrap:e.unwrap,overrideCredentials(i){n(()=>e.overrideCredentials(i))},addPlugin(i){i&&n(()=>e.addPlugin(r,i))},updateOptions(i){i&&n(()=>e.init(i))}});return r}const Om=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=Is(t.options,n),e},init(n){const r=_m(Is(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},bf=0,js=1,Mm=2;class km extends Error{constructor(e,n,r){let i;e===bf?i="Empty parameter":e===js?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function ec(t){return/\s/.test(t)}const un=0,Ns=1,qi=2,Qo=3,es=4,Pm=new Set([qi,Ns,un]),Bs="'",Rm=new Set(["{","}",Bs]),Tm=t=>/[0-9a-zA-Z_]/.test(t);function Am(t){let e=un,n="",r="",i="";const o=[],s=[];let a=0;function l(h){throw new km(h,a,t)}const c=()=>{o.push(n),n=""},f=()=>{Tm(i)||l(js),r+=i},d=()=>{r===""&&l(bf),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case un:i===Bs?(n+=i,e=Ns):i==="{"?(c(),e=Qo):(n+=i,e=un);break;case Ns:Rm.has(i)?(n=n.slice(0,-1)+i,e=qi):(n+=i,e=un);break;case qi:i===Bs?e=un:(n+=i,e=qi);break;case Qo:i==="}"?(d(),e=un):ec(i)?r!==""&&(d(),e=es):(f(),e=Qo);break;case es:i=="}"?e=un:ec(i)?e=es:l(js)}return Pm.has(e)||l(Mm),c(),[o,s]}function Dm(t,e){const[n,r]=Am(t),i=[n[0]];for(let o=1;o<n.length;o++){const s=e==null?void 0:e[r[o-1]];if(s===void 0)throw new Error(`Missing parameter "${r[o-1]}" in "${t}"`);i.push(String(s)),i.push(n[o])}return i.join("")}function Im(){return{format:({translation:t,params:e})=>Dm(t,e)}}const jm=()=>(t,e)=>(e.setFinalFormatter(Im()),t);var ts=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},tc={};(function(t){function e(w,g){var b;return w instanceof Buffer?b=w:b=Buffer.from(w.buffer,w.byteOffset,w.byteLength),b.toString(g)}var n=function(w){return Buffer.from(w)};function r(w){for(var g=0,b=Math.min(256*256,w.length+1),_=new Uint16Array(b),E=[],m=0;;){var S=g<w.length;if(!S||m>=b-1){var C=_.subarray(0,m),R=C;if(E.push(String.fromCharCode.apply(null,R)),!S)return E.join("");w=w.subarray(g),g=0,m=0}var M=w[g++];if(!(M&128))_[m++]=M;else if((M&224)===192){var O=w[g++]&63;_[m++]=(M&31)<<6|O}else if((M&240)===224){var O=w[g++]&63,P=w[g++]&63;_[m++]=(M&31)<<12|O<<6|P}else if((M&248)===240){var O=w[g++]&63,P=w[g++]&63,j=w[g++]&63,B=(M&7)<<18|O<<12|P<<6|j;B>65535&&(B-=65536,_[m++]=B>>>10&1023|55296,B=56320|B&1023),_[m++]=B}}}function i(w){for(var g=0,b=w.length,_=0,E=Math.max(32,b+(b>>>1)+7),m=new Uint8Array(E>>>3<<3);g<b;){var S=w.charCodeAt(g++);if(S>=55296&&S<=56319){if(g<b){var C=w.charCodeAt(g);(C&64512)===56320&&(++g,S=((S&1023)<<10)+(C&1023)+65536)}if(S>=55296&&S<=56319)continue}if(_+4>m.length){E+=8,E*=1+g/w.length*2,E=E>>>3<<3;var R=new Uint8Array(E);R.set(m),m=R}if(S&4294967168)if(!(S&4294965248))m[_++]=S>>>6&31|192;else if(!(S&4294901760))m[_++]=S>>>12&15|224,m[_++]=S>>>6&63|128;else if(!(S&4292870144))m[_++]=S>>>18&7|240,m[_++]=S>>>12&63|128,m[_++]=S>>>6&63|128;else continue;else{m[_++]=S;continue}m[_++]=S&63|128}return m.slice?m.slice(0,_):m.subarray(0,_)}var o="Failed to ",s=function(w,g,b){if(w)throw new Error("".concat(o).concat(g,": the '").concat(b,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function c(){this.encoding="utf-8"}c.prototype.encode=function(w,g){return s(g&&g.stream,"encode","stream"),l(w)};function f(w){var g;try{var b=new Blob([w],{type:"text/plain;charset=UTF-8"});g=URL.createObjectURL(b);var _=new XMLHttpRequest;return _.open("GET",g,!1),_.send(),_.responseText}finally{g&&URL.revokeObjectURL(g)}}var d=!a&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",h=["utf-8","utf8","unicode-1-1-utf-8"],v=r;a?v=e:d&&(v=function(w){try{return f(w)}catch{return r(w)}});var y="construct 'TextDecoder'",p="".concat(o," ").concat(y,": the ");function L(w,g){s(g&&g.fatal,y,"fatal"),w=w||"utf-8";var b;if(a?b=Buffer.isEncoding(w):b=h.indexOf(w.toLowerCase())!==-1,!b)throw new RangeError("".concat(p," encoding label provided ('").concat(w,"') is invalid."));this.encoding=w,this.fatal=!1,this.ignoreBOM=!1}L.prototype.decode=function(w,g){s(g&&g.stream,"decode","stream");var b;return w instanceof Uint8Array?b=w:w.buffer instanceof ArrayBuffer?b=new Uint8Array(w.buffer):b=new Uint8Array(w),v(b,this.encoding)},t.TextEncoder=t.TextEncoder||c,t.TextDecoder=t.TextDecoder||L})(typeof window<"u"?window:ts);var Nm=um({__proto__:null,default:tc},[tc]),ns;(ns=console.assert)===null||ns===void 0||ns.call(console,Nm);const Bm="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function Um(t){const e=Bm.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function Vm(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let o=0;o<n;o+=i)o+i>n&&(i=n-o),r+=String.fromCharCode.apply(null,e.subarray(o,o+i));return r}function Fm(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const o=new Uint8Array(e*5/8|0);for(let s=0;s<e;s++)r=r<<5|Um(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return Vm(o.buffer)}function zm(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=Fm(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function $m(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function Hm(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=zm(e))!==null&&s!==void 0?s:i;let l=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(l+=`?ns=${r}`),$m(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return o(l,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(c=>{if(c.ok)return c.json().then(f=>f[n]);throw new Error(c.statusText)})}}}const Gm=()=>(t,e)=>(e.setDevBackend(Hm()),t);function Zm(t,e){const n=r=>{var i,o;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((o=r.data)===null||o===void 0?void 0:o.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function Wm({message:t,recievingMessage:e,data:n,attempts:r=1}){let i=!1;const o=()=>new Promise((a,l)=>{const c=Zm(e,d);window.postMessage({type:t,data:n},window.origin);const f=setTimeout(v,300);function d(y){clearTimeout(f),h(),a(y)}function h(){c.unsubscribe()}function v(){h(),l()}});return{cancel(){i=!0},promise:(async()=>{for(let a=0;a<r;a++){if(i)return new Promise(()=>{});try{return await o()}catch{continue}}if(!i)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function qm(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=Wm({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const Km="tolgee-in-context-tools.umd.min.js",Jm="@tolgee/in-context-tools",Ym="InContextTools",Xm="https://cdn.jsdelivr.net/npm";function Qm(t){return new Promise((e,n)=>{const r=document.createElement("script");r.src=t,r.addEventListener("load",()=>e()),r.addEventListener("error",i=>n(i.error)),document.body.appendChild(r)})}let rs=null;function ey(t){return rs||(rs=Qm(`${Xm}/@tolgee/web@${t}/dist/${Km}`).then(()=>window[Jm][Ym])),rs}const wf="__tolgee_apiKey",Sf="__tolgee_apiUrl";function nc(){const t=sessionStorage.getItem(wf)||void 0,e=sessionStorage.getItem(Sf)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function ty(){sessionStorage.removeItem(wf),sessionStorage.removeItem(Sf)}function ny(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Lf=()=>t=>t;const ry=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};ry()&&(Lf=()=>t=>{const e=qm(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const o=await ey("5.16.3");return s=>{const a=nc();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&ny(()=>{e.update(n()).catch(ty)})}),nc()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function iy(){return Om().use(Lf())}const oy={useSuspense:!0};let is;const Ef=()=>(is||(is=u.createContext(void 0)),is),sy=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=u.useState(!t.isLoaded());u.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},oy),e),a=Ef();return s.useSuspense?u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:u.createElement(u.Suspense,{fallback:r||null},n)):u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let ay;function ly(){return ay}const cy=()=>{const t=Ef(),e=u.useContext(t)||ly();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},uy=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},xf=(t,e)=>{const{tolgee:n,options:r}=cy(),i=hf(t),o=Ct(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=uy(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=y=>{var p;f.current.push(y),(p=c.current)===null||p===void 0||p.subscribeNs(y)},h=n.isLoaded(i);u.useEffect(()=>{const y=n.onNsUpdate(a);return c.current=y,y.subscribeNs(i),f.current.forEach(p=>{y.subscribeNs(p)}),()=>{y.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(y=>{var p;const L=(p=y.ns)!==null&&p!==void 0?p:i==null?void 0:i[0];return d(L),n.t(Object.assign(Object.assign({},y),{ns:L}))},[n,l]);if(s.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},jt=(t,e)=>{const{t:n,isLoading:r}=xf(t,e);return{t:u.useCallback((...o)=>{const s=yf(...o);return n(s)},[n]),isLoading:r}},fy=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(Us(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},Us(o)):u.cloneElement(i)}else e[n]=r}),e},Us=t=>Array.isArray(t)?u.Children.toArray(t):t,dy=t=>{const e=t.keyName||t.children;e===void 0&&console.error("T component: keyName not defined");const n=t.defaultValue||(t.keyName?t.children:void 0),r=Us(t.t({key:e,params:fy(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},An=t=>{const{t:e}=xf();return u.createElement(dy,Object.assign({t:e},t))},hy="Button-module__root__8RX49h",py="Button-module__primary__st6yY9",gy="Button-module__secondary__j-3rjz",vy="Button-module__loading__QfItr2",my="Button-module__spinner__kVZYqS",Or={root:hy,primary:py,secondary:gy,loading:vy,spinner:my},Ot=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const o=[Or.root,e,Or[r],{[Or.loading]:n}];if(i.as==="link"){const{as:s,...a}=i;return x.jsxs("a",{className:be(o),...a,children:[!n&&t,n&&x.jsx(ri,{className:Or.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return x.jsxs("button",{type:"button",className:be(o),...a,children:[!n&&t,n&&x.jsx(ri,{className:Or.spinner})]})}mn(!1,"Invalid button type")};Ot.defaultProps={as:"button"};const yy="LocationBalloon-module__root__GtUl6q",by="LocationBalloon-module__submit__lNcF4k",wy="LocationBalloon-module__details__--VOKk",Sy="LocationBalloon-module__icon__X7DOVA",Ly="LocationBalloon-module__header__5VQJDW",Ey="LocationBalloon-module__title__bX9pf8",xy="LocationBalloon-module__description__htav7b",Cy="LocationBalloon-module__actions__c8dlOR",an={root:yy,submit:by,details:wy,icon:Sy,header:Ly,title:Ey,description:xy,actions:Cy},_y={default:df,llama:ff},Cf=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onDetails:s,onSubmit:a})=>{const{logo:l="default"}=st(),c=_y[l];return x.jsxs("div",{className:be(an.root,e),children:[x.jsxs("div",{className:an.header,children:[x.jsx("div",{className:an.icon,children:x.jsx(c,{})}),x.jsx("span",{className:an.title,children:o||"{{ properties.point.name }}"})]}),x.jsxs("div",{className:an.description,children:[(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",","," ",i||"{{ properties.point.location_name }}"]}),x.jsxs("div",{className:an.actions,children:[x.jsx(Ot,{id:bs,variant:"primary",className:an.submit,onClick:a,children:t?"{ choose }":x.jsx(An,{keyName:"choose",ns:"common"})}),!n&&x.jsxs(Ot,{id:lo,as:"link",variant:"primary",className:an.details,onClick:s,children:[t?"{ details }":x.jsx(An,{keyName:"details",ns:"common"}),x.jsx(cm,{})]})]})]})},Oy=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("g",{clipPath:"url(#a)"},ce.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M17.071 3.071a1.25 1.25 0 0 0-1.768 0L10 8.375 4.697 3.07a1.25 1.25 0 1 0-1.768 1.77l5.303 5.303-5.303 5.303a1.25 1.25 0 0 0 1.768 1.768L10 11.91l5.303 5.303a1.25 1.25 0 1 0 1.768-1.768l-5.303-5.303L17.07 4.84a1.25 1.25 0 0 0 0-1.768Z",clipRule:"evenodd"})),ce.createElement("defs",null,ce.createElement("clipPath",{id:"a"},ce.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),My="CloseButton-module__root__2m1asd",ky="CloseButton-module__absolutePositionVariant__lGX4cQ",Py="CloseButton-module__relativePositionVariant__LqTTWf",rc={root:My,absolutePositionVariant:ky,relativePositionVariant:Py},ui=({className:t,position:e="absolute",...n})=>x.jsx("div",{...n,className:be(rc.root,t,rc[`${e}PositionVariant`]),children:x.jsx(Oy,{})}),Ry="LocationView-module__title__-wT0bl",Ty="LocationView-module__logo__jDjNMt",Ay="LocationView-module__header__K0gBYX",Dy="LocationView-module__content__wtOPjm",Iy="LocationView-module__section__2J1zAJ",jy="LocationView-module__chips__ALwJDx",Ny="LocationView-module__services__IgJ4ba",By="LocationView-module__images__-wKmRM",Uy="LocationView-module__image__T1E-gt",Vy="LocationView-module__actions__NuafMj",Fy="LocationView-module__actionsHidden__-vX5kK",zy="LocationView-module__submit__c-Hc8u",$y="LocationView-module__scheduleItem__RhAgat",rt={title:Ry,logo:Ty,header:Ay,content:Dy,section:Iy,chips:jy,services:Ny,images:By,image:Uy,actions:Vy,actionsHidden:Fy,submit:zy,scheduleItem:$y},Hy={default:df,llama:ff},Gy=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{const{t:o}=jt(["details_modal","common"]),{logo:s="default"}=st(),a=Hy[s];return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:be(rt.header,t==null?void 0:t.header),children:[x.jsx(ui,{onClick:r}),x.jsxs("div",{className:rt.title,children:[x.jsx("div",{className:rt.logo,children:x.jsx(a,{})}),x.jsx("span",{children:n.name})]})]}),x.jsxs("div",{className:be(rt.content,t==null?void 0:t.content),children:[x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("address"),":"]}),x.jsx("p",{children:n.location.full_address})]}),n.schedule.length>0&&x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("schedule"),":"]}),n.schedule.map((l,c)=>x.jsx("p",{className:rt.scheduleItem,children:l},c))]}),(n.pay_by_card||n.pay_by_card)&&x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("payment_method"),":"]}),x.jsxs("div",{className:rt.chips,children:[n.pay_by_cash&&o("pay_by_cash"),n.pay_by_card&&n.pay_by_cash&&", ",n.pay_by_card&&o("pay_by_card")]})]}),x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("services"),":"]}),x.jsxs("div",{className:rt.services,children:[n.is_pickup&&x.jsx("span",{children:o("is_pickup")}),n.is_delivery&&x.jsx("span",{children:o("is_delivery")}),n.is_dressing_room&&x.jsx("span",{children:o("is_dressing_room")}),n.is_check_order&&x.jsx("span",{children:o("is_check_order")})]})]}),x.jsxs("section",{className:rt.section,children:[x.jsxs("span",{children:[o("location"),":"]}),x.jsx("p",{children:n.location_name})]}),n.images.length>0&&x.jsx("section",{className:rt.images,children:n.images.map(l=>x.jsx("img",{src:l,alt:n.name,className:rt.image},l))})]}),x.jsx("div",{className:be(rt.actions,{[rt.actionsHidden]:e}),children:x.jsx(Ot,{variant:"primary",className:rt.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},_f=u.memo(Gy),Zy={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},Of={optimized:!0},Mf=({isSelectedPoint:t})=>{const e=ye(sa),[n,r]=u.useState(!0);return u.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var Wy=qy()?u.useLayoutEffect:u.useEffect;function qy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ky(){var t=u.useState(Object.create(null)),e=t[1];return u.useCallback(function(){e(Object.create(null))},[])}var Jy=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,o=u.useRef(null),s=u.useRef(null),a=Ky();return Wy(function(){if(o.current){var l=o.current.ownerDocument;return s.current=l==null?void 0:l.createElement(i),l.body.appendChild(s.current),a(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}},[i,a]),s.current?dr.createPortal(n,s.current):u.createElement("span",{ref:o})};/*! *****************************************************************************
|
|
80
80
|
Copyright (c) Microsoft Corporation.
|
|
81
81
|
|
|
82
82
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -89,14 +89,14 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
89
89
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
90
90
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
91
91
|
PERFORMANCE OF THIS SOFTWARE.
|
|
92
|
-
***************************************************************************** */var H=function(){return H=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},H.apply(this,arguments)};function Ca(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function me(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _e(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Ue(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var De;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(De||(De={}));var ar;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(ar||(ar={}));var Fs=De.Start,_a=De.Stop,fi=De.Raise,No=De.Send,kf=De.Cancel,Yy=De.NullEvent,Oa=De.Assign;De.After;De.DoneState;var Pf=De.Log,Xy=De.Init,zs=De.Invoke;De.ErrorExecution;var oc=De.ErrorPlatform,Qy=De.ErrorCustom,Rf=De.Update,e0=De.Choose,t0=De.Pure,Tf=".",sc={},$s="xstate.guard",n0="",Li;function Ma(t,e,n){n===void 0&&(n=Tf);var r=zr(t,n),i=zr(e,n);return Pe(i)?Pe(r)?i===r:!1:Pe(r)?r in i:Object.keys(r).every(function(o){return o in i?Ma(r[o],i[o]):!1})}function Af(t){try{return Pe(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Hs(t,e){try{return pr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function r0(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function zr(t,e){if(r0(t))return t.value;if(pr(t))return po(t);if(typeof t!="string")return t;var n=Hs(t,e);return po(n)}function po(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Dr(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function ac(t,e,n){var r,i,o={};try{for(var s=me(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];n(c)&&(o[l]=e(c,l,t))}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}var i0=function(t){return function(e){var n,r,i=e;try{for(var o=me(t),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[a]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function o0(t,e){return function(n){var r,i,o=n;try{for(var s=me(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function Ki(t){if(!t)return[[]];if(Pe(t))return[[t]];var e=He(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ki(t[n]).map(function(i){return[n].concat(i)})}));return e}function He(t){var e;return(e=[]).concat.apply(e,Ue([],_e(t),!1))}function Df(t){return pr(t)?t:[t]}function Pt(t){return t===void 0?[]:Df(t)}function go(t,e,n){var r,i;if(Oe(t))return t(e,n.data);var o={};try{for(var s=me(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];Oe(c)?o[l]=c(e,n.data):o[l]=c}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function s0(t){return/^(done|error)\./.test(t)}function lc(t){return!!(t instanceof Promise||t!==null&&(Oe(t)||typeof t=="object")&&Oe(t.then))}function a0(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function l0(t,e){var n,r,i=_e([[],[]],2),o=i[0],s=i[1];try{for(var a=me(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}function If(t,e){return Dr(t.states,function(n,r){if(n){var i=(Pe(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:If(n,i)}}})}function c0(t,e){return{current:e,states:If(t,e)}}function cc(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,c=s.assignment,f={state:r,action:s,_event:e},d={};if(Oe(c))d=c(o,e.data,f);else try{for(var h=me(Object.keys(c)),v=h.next();!v.done;v=h.next()){var y=v.value,p=c[y];d[y]=Oe(p)?p(o,e.data,f):p}}catch(L){a={error:L}}finally{try{v&&!v.done&&(l=h.return)&&l.call(h)}finally{if(a)throw a.error}}return Object.assign({},o,d)},t);return i}var u0=function(){};function pr(t){return Array.isArray(t)}function Oe(t){return typeof t=="function"}function Pe(t){return typeof t=="string"}function jf(t,e){if(t)return Pe(t)?{type:$s,name:t,predicate:e?e[t]:void 0}:Oe(t)?{type:$s,name:t.name,predicate:t}:t}function f0(t){try{return"subscribe"in t&&Oe(t.subscribe)}catch{return!1}}var dn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Li={},Li[dn]=function(){return this},Li[Symbol.observable]=function(){return this};function lr(t){return!!t&&"__xstatenode"in t}function d0(t){return!!t&&typeof t.send=="function"}function Bo(t,e){return Pe(t)||typeof t=="number"?H({type:t},e):t}function ot(t,e){if(!Pe(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=Bo(t);return H({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Hn(t,e){var n=Df(e).map(function(r){return typeof r>"u"||typeof r=="string"||lr(r)?{target:r,event:t}:H(H({},r),{event:t})});return n}function h0(t){if(!(t===void 0||t===n0))return Pt(t)}function Nf(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===$s)return((o==null?void 0:o[e.name])||e.predicate)(n,r.data,s);var a=o==null?void 0:o[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,s)}function Bf(t){return typeof t=="string"?{type:t}:t}function Ji(t,e,n){var r=function(){},i=typeof t=="object",o=i?t:null;return{next:((i?t.next:t)||r).bind(o),error:((i?t.error:e)||r).bind(o),complete:((i?t.complete:n)||r).bind(o)}}function Ei(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Gs(t){return(t.type===fi||t.type===No&&t.to===ar.Internal)&&typeof t.delay!="number"}var er=ot({type:Xy});function Zs(t,e){return e&&e[t]||void 0}function oi(t,e){var n;if(Pe(t)||typeof t=="number"){var r=Zs(t,e);Oe(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Oe(t))n={type:t.name||t.toString(),exec:t};else{var r=Zs(t.type,e);if(Oe(r))n=H(H({},t),{exec:r});else if(r){var i=r.type||t.type;n=H(H(H({},r),t),{type:i})}else n=t}return n}var hn=function(t,e){if(!t)return[];var n=pr(t)?t:[t];return n.map(function(r){return oi(r,e)})};function ka(t){var e=oi(t);return H(H({id:Pe(t)?t:e.id},e),{type:e.type})}function p0(t,e){return{type:fi,event:typeof t=="function"?t:Bo(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function g0(t,e,n,r){var i={_event:n},o=ot(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Pe(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;return H(H({},t),{type:fi,_event:o,delay:s})}function v0(t,e){return{to:e?e.to:void 0,type:No,event:Oe(t)?t:Bo(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Oe(t)?t.name:Af(t)}}function m0(t,e,n,r){var i={_event:n},o=ot(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Pe(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;var l=Oe(t.to)?t.to(e,n.data,i):t.to;return H(H({},t),{to:l,_event:o,event:o.data,delay:s})}var y0=function(t,e,n){return H(H({},t),{value:Pe(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},b0=function(t){return{type:kf,sendId:t}};function w0(t){var e=ka(t);return{type:De.Start,activity:e,exec:void 0}}function S0(t){var e=Oe(t)?t:ka(t);return{type:De.Stop,activity:e,exec:void 0}}function L0(t,e,n){var r=Oe(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:De.Stop,activity:i};return o}var E0=function(t){return{type:Oa,assignment:t}};function x0(t,e){var n=e?"#".concat(e):"";return"".concat(De.After,"(").concat(t,")").concat(n)}function xi(t,e){var n="".concat(De.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Yi(t,e){var n="".concat(De.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ir(t,e){var n="".concat(De.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var C0=function(t){var e,n,r=[];try{for(var i=me(t),o=i.next();!o.done;o=i.next())for(var s=o.value,a=0;a<s.actions.length;){if(s.actions[a].type===Oa){r.push(s.actions[a]),s.actions.splice(a,1);continue}a++}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function vo(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:C0(i),l=a.length?cc(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(y,p){var L;switch(p.type){case fi:{var w=g0(p,l,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,l,r),w}case No:var m=m0(p,l,r,t.options.delays);return o&&m.to!==ar.Internal&&(y==="entry"?f.push(m):o(m,l,r)),m;case Pf:{var b=y0(p,l,r);return o==null||o(b,l,r),b}case e0:{var _=p,E=(L=_.conds.find(function(G){var z=jf(G.cond,t.options.guards);return!z||Nf(t,z,l,r,o?void 0:e)}))===null||L===void 0?void 0:L.actions;if(!E)return[];var g=_e(vo(t,e,l,r,[{type:y,actions:hn(Pt(E),t.options.actions)}],o,s),2),S=g[0],C=g[1];return l=C,c==null||c.push(l),S}case t0:{var E=p.get(l,r.data);if(!E)return[];var P=_e(vo(t,e,l,r,[{type:y,actions:hn(Pt(E),t.options.actions)}],o,s),2),M=P[0],O=P[1];return l=O,c==null||c.push(l),M}case _a:{var b=L0(p,l,r);return o==null||o(b,n,r),b}case Oa:{l=cc(l,r,[p],o?void 0:e),c==null||c.push(l);break}default:var k=oi(p,t.options.actions),j=k.exec;if(o)o(k,l,r);else if(j&&c){var U=c.length-1,$=H(H({},k),{exec:function(G){for(var z=[],Z=1;Z<arguments.length;Z++)z[Z-1]=arguments[Z];j.apply(void 0,Ue([c[U]],_e(z),!1))}});k=$}return k}}function h(y){var p,L,w=[];try{for(var m=me(y.actions),b=m.next();!b.done;b=m.next()){var _=b.value,E=d(y.type,_);E&&(w=w.concat(E))}}catch(g){p={error:g}}finally{try{b&&!b.done&&(L=m.return)&&L.call(m)}finally{if(p)throw p.error}}return f.forEach(function(g){o(g,l,r)}),f.length=0,w}var v=He(i.map(h));return[v,l]}var uc=[],Jn=function(t,e){uc.push(t);var n=e(t);return uc.pop(),n};function Uf(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[dn]=function(){return this},e}function _0(t,e,n,r){var i,o=Bf(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?go(t.data,n,r):void 0,l=s?Vf(s,t.id,a):Uf(t.id);return l.meta=t,l}function Vf(t,e,n){var r=Uf(e);if(r.deferred=!0,lr(t)){var i=r.state=Jn(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function O0(t){try{return typeof t.send=="function"}catch{return!1}}function M0(t){return O0(t)&&"id"in t}function k0(t){var e;return H((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[dn]=function(){return this},e),t)}var mo=function(t){return t.type==="atomic"||t.type==="final"};function Ff(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function si(t){return Ff(t).filter(function(e){return e.type!=="history"})}function zf(t){var e=[t];return mo(t)?e:e.concat(He(si(t).map(zf)))}function jr(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=Ws(f),h=new Set(e);try{for(var v=me(h),y=v.next();!y.done;y=v.next())for(var p=y.value,L=p.parent;L&&!h.has(L);)h.add(L),L=L.parent}catch(P){n={error:P}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var w=Ws(h);try{for(var m=me(h),b=m.next();!b.done;b=m.next()){var p=b.value;if(p.type==="compound"&&(!w.get(p)||!w.get(p).length))d.get(p)?d.get(p).forEach(function(M){return h.add(M)}):p.initialStateNodes.forEach(function(M){return h.add(M)});else if(p.type==="parallel")try{for(var _=(s=void 0,me(si(p))),E=_.next();!E.done;E=_.next()){var g=E.value;h.has(g)||(h.add(g),d.get(g)?d.get(g).forEach(function(M){return h.add(M)}):g.initialStateNodes.forEach(function(M){return h.add(M)}))}}catch(M){s={error:M}}finally{try{E&&!E.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}}}catch(P){i={error:P}}finally{try{b&&!b.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}try{for(var S=me(h),C=S.next();!C.done;C=S.next())for(var p=C.value,L=p.parent;L&&!h.has(L);)h.add(L),L=L.parent}catch(P){l={error:P}}finally{try{C&&!C.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}return h}function $f(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(mo(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=$f(o,e)}),i}function Ws(t){var e,n,r=new Map;try{for(var i=me(t),o=i.next();!o.done;o=i.next()){var s=o.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function P0(t,e){var n=jr([t],e);return $f(t,Ws(n))}function Nr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function R0(t){return Ue([],_e(new Set(He(Ue([],_e(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Xi(t,e){return e.type==="compound"?si(e).some(function(n){return n.type==="final"&&Nr(t,n)}):e.type==="parallel"?si(e).every(function(n){return Xi(t,n)}):!1}function T0(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function fc(t){return new Set(He(t.map(function(e){return e.tags})))}function Hf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Pe(t)||Pe(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return Hf(t[i],e[i])})}function A0(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function D0(t,e){var n=t.exec,r=H(H({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var Et=function(){function t(e){var n=this,r;this.actions=[],this.activities=sc,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||sc,this.meta=T0(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return R0(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e;var r=er;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=er;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),Pe(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ue([],_e(i.map(function(o){return r.toStrings(e[o],n).map(function(s){return o+n+s})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=Ca(e,["configuration","transitions","tags","machine"]);return H(H({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return Ma(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;u0(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t}(),I0={deferEvents:!1},dc=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=H(H({},I0),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t}(),os=new Map,j0=0,Mr={bookId:function(){return"x:".concat(j0++)},register:function(t,e){return os.set(t,e),t},get:function(t){return os.get(t)},free:function(t){os.delete(t)}};function Pa(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function N0(){var t=Pa();if(t&&"__xstate__"in t)return t.__xstate__}function B0(t){if(Pa()){var e=N0();e&&e.register(t)}}function U0(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],o=!1,s=function(){if(!o){for(o=!0;i.length>0;){var c=i.shift();n=t.transition(n,c,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=k0({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var h=Ji(c,f,d);return r.add(h),h.next(n),{unsubscribe:function(){r.delete(h)}}}}),l={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,a}var V0={sync:!1,autoForward:!1},et;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(et||(et={}));var F0=function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=et.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(pr(f))return r.batch(f),r.state;var h=ot(Bo(f,d));if(r.status===et.Stopped)return r.state;if(r.status!==et.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(h.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
93
|
-
Event: `).concat(JSON.stringify(h.data)));return r.scheduler.schedule(function(){r.forward(h);var v=r._nextState(h);r.update(v,h)}),r._state},this.sendTo=function(f,d,h){var v=r.parent&&(d===ar.Parent||r.parent.id===d),y=v?r.parent:Pe(d)?d===ar.Internal?r:r.children.get(d)||Mr.get(d):d0(d)?d:void 0;if(!y){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in y){if(r.status!==et.Stopped||r.parent!==y||r.state.done){var p=H(H({},f),{name:f.name===Qy?"".concat(Ir(r.id)):f.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,p]):y.send(p)}}else!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,f.data]):y.send(f.data)},this._exec=function(f,d,h,v){v===void 0&&(v=r.machine.options.actions);var y=f.exec||Zs(f.type,v),p=Oe(y)?y:y?y.exec:f.exec;if(p)try{return p(d,h.data,r.machine.config.predictableActionArguments?{action:f,_event:h}:{action:f,state:r.state,_event:h})}catch(U){throw r.parent&&r.parent.send({type:"xstate.error",data:U}),U}switch(f.type){case fi:{var L=f;r.defer(L);break}case No:var w=f;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,h===er):r.send(w._event);break;case kf:r.cancel(f.sendId);break;case Fs:{if(r.status!==et.Running)return;var m=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[m.id||m.type])break;if(m.type===De.Invoke){var b=Bf(m.src),_=r.machine.options.services?r.machine.options.services[b.type]:void 0,E=m.id,g=m.data,S="autoForward"in m?m.autoForward:!!m.forward;if(!_)return;var C=g?go(g,d,h):void 0;if(typeof _=="string")return;var P=Oe(_)?_(d,h.data,{data:C,src:b,meta:m.meta}):_;if(!P)return;var M=void 0;lr(P)&&(P=C?P.withContext(C):P,M={autoForward:S}),r.spawn(P,E,M)}else r.spawnActivity(m);break}case _a:{r.stopChild(f.activity.id);break}case Pf:var O=f,k=O.label,j=O.value;k?r.logger(k,j):r.logger(j);break}};var i=H(H({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new dc({deferEvents:this.options.deferEvents}),this.sessionId=Mr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Jn(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,i;try{for(var o=me(e.actions),s=o.next();!s.done;s=o.next()){var a=s.value;this.exec(a,e,n)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,o,s,a,l,c,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===er)&&this.options.execute)this.execute(this.state);else for(var h=void 0;h=this._outgoingQueue.shift();)h[0].send(h[1]);if(this.children.forEach(function(P){d.state.children[P.id]=P}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=me(this.eventListeners),y=v.next();!y.done;y=v.next()){var p=y.value;p(e.event)}}catch(P){r={error:P}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var L=me(this.listeners),w=L.next();!w.done;w=L.next()){var p=w.value;p(e,e.event)}}catch(P){o={error:P}}finally{try{w&&!w.done&&(s=L.return)&&s.call(L)}finally{if(o)throw o.error}}try{for(var m=me(this.contextListeners),b=m.next();!b.done;b=m.next()){var _=b.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){a={error:P}}finally{try{b&&!b.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(this.state.done){var E=e.configuration.find(function(P){return P.type==="final"&&P.parent===d.machine}),g=E&&E.doneData?go(E.doneData,e.context,n):void 0;this._doneEvent=Yi(this.id,g);try{for(var S=me(this.doneListeners),C=S.next();!C.done;C=S.next()){var p=C.value;p(this._doneEvent)}}catch(P){c={error:P}}finally{try{C&&!C.done&&(f=S.return)&&f.call(S)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),Mr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===et.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Ji(e,n,r);this.listeners.add(o.next),this.status!==et.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===et.Stopped?o.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===et.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===et.Running)return this;this.machine._init(),Mr.register(this.sessionId,this),this.initialized=!0,this.status=et.Running;var r=e===void 0?this.initialState:Jn(this,function(){return A0(e)?n.machine.resolveState(e):n.machine.resolveState(Et.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,er)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Oe(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,c,f;try{for(var d=me(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(S){e={error:S}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var y=me(this.stopListeners),p=y.next();!p.done;p=y.next()){var v=p.value;v(),this.stopListeners.delete(v)}}catch(S){r={error:S}}finally{try{p&&!p.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}try{for(var L=me(this.contextListeners),w=L.next();!w.done;w=L.next()){var v=w.value;this.contextListeners.delete(v)}}catch(S){o={error:S}}finally{try{w&&!w.done&&(s=L.return)&&s.call(L)}finally{if(o)throw o.error}}try{for(var m=me(this.doneListeners),b=m.next();!b.done;b=m.next()){var v=b.value;this.doneListeners.delete(v)}}catch(S){a={error:S}}finally{try{b&&!b.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=et.Stopped,this._initialState=void 0;try{for(var _=me(Object.keys(this.delayedEventsMap)),E=_.next();!E.done;E=_.next()){var g=E.value;this.clock.clearTimeout(this.delayedEventsMap[g])}}catch(S){c={error:S}}finally{try{E&&!E.done&&(f=_.return)&&f.call(_)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new dc({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=ot({type:"xstate.stop"}),i=Jn(e,function(){var o=He(Ue([],_e(e.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return hn(f.onExit,e.machine.options.actions)})),s=_e(vo(e.machine,e.state,e.state.context,r,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),a=s[0],l=s[1],c=new Et({value:e.state.value,context:l,_event:r,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:a.filter(function(f){return!Gs(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(i,r),e._stopChildren(),Mr.free(e.sessionId)}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===et.NotStarted&&this.options.deferEvents)){if(this.status!==et.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,o,s=n.state,a=!1,l=[],c=function(v){var y=ot(v);n.forward(y),s=Jn(n,function(){return n.machine.transition(s,y,void 0,r||void 0)}),l.push.apply(l,Ue([],_e(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(p){return D0(p,s)})),!1)),a=a||!!s.changed};try{for(var f=me(e),d=f.next();!d.done;d=f.next()){var h=d.value;c(h)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}s.changed=a,s.actions=l,n.update(s,ot(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=ot(e);if(i.name.indexOf(oc)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(oc)===0}))throw i.data.data;var o=Jn(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=me(this.forwardTo),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.children.get(s);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));a.send(e)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),Oe(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==et.Running)return Vf(e,n);if(lc(e))return this.spawnPromise(Promise.resolve(e),n);if(Oe(e))return this.spawnCallback(e,n);if(M0(e))return this.spawnActor(e,n);if(f0(e))return this.spawnObservable(e,n);if(lr(e))return this.spawnMachine(e,H(H({},r),{id:n}));if(a0(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,H(H({},this.options),{parent:this,id:n.id||e.id})),o=H(H({},V0),n);o.sync&&i.onTransition(function(a){r.send(Rf,{state:a,id:i.id})});var s=i;return this.children.set(i.id,s),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(ot(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=U0(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,o=!1,s;e.then(function(l){o||(s=l,i.removeChild(n),i.send(ot(Yi(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Ir(n,l);try{i.send(ot(c,{origin:n}))}catch{i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,c,f){var d=Ji(l,c,f),h=!1;return e.then(function(v){h||(d.next(v),!h&&d.complete())},function(v){h||d.error(v)}),{unsubscribe:function(){return h=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},r[dn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,o=!1,s=new Set,a=new Set,l,c=function(h){l=h,a.forEach(function(v){return v(h)}),!o&&i.send(ot(h,{origin:n}))},f;try{f=e(c,function(h){s.add(h)})}catch(h){this.send(Ir(n,h))}if(lc(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(h){return s.forEach(function(v){return v(h)})},subscribe:function(h){var v=Ji(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Oe(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[dn]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,o,s=e.subscribe(function(l){o=l,i.send(ot(l,{origin:n}))},function(l){i.removeChild(n),i.send(ot(Ir(n,l),{origin:n}))},function(){i.removeChild(n),i.send(ot(Yi(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,c,f){return e.subscribe(l,c,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[dn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[dn]=function(){return this},r))},t.prototype.attachDev=function(){var e=Pa();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(H(H({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:H({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}B0(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[dn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===et.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=Gf,t}();function Gf(t,e){var n=new F0(t,e);return n}function z0(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Ci(t){return H(H({type:zs},t),{toJSON:function(){t.onDone,t.onError;var e=Ca(t,["onDone","onError"]);return H(H({},e),{type:zs,src:z0(t.src)})}})}var _i="",qs="#",ss="*",Gn={},Zn=function(t){return t[0]===qs},$0=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},H0=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var o=this,s;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign($0(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Tf),this.id=this.config.id||Ue([this.machine.key],_e(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Dr(this.config.states,function(c,f){var d,h=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,H((d={},d[h.id]=h,d),h.idMap)),h}):Gn;var a=0;function l(c){var f,d;c.order=a++;try{for(var h=me(Ff(c)),v=h.next();!v.done;v=h.next()){var y=v.value;l(y)}}catch(p){f={error:p}}finally{try{v&&!v.done&&(d=h.return)&&d.call(h)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var f=c.event;return f===_i}):_i in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Pt(this.config.entry||this.config.onEntry).map(function(c){return oi(c)}),this.onExit=Pt(this.config.exit||this.config.onExit).map(function(c){return oi(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Pt(this.config.invoke).map(function(c,f){var d,h;if(lr(c)){var v=Ei(o.id,f);return o.machine.options.services=H((d={},d[v]=c,d),o.machine.options.services),Ci({src:v,id:v})}else if(Pe(c.src)){var v=c.id||Ei(o.id,f);return Ci(H(H({},c),{id:v,src:c.src}))}else if(lr(c.src)||Oe(c.src)){var v=c.id||Ei(o.id,f);return o.machine.options.services=H((h={},h[v]=c.src,h),o.machine.options.services),Ci(H(H({id:v},c),{src:v}))}else{var y=c.src;return Ci(H(H({id:Ei(o.id,f)},c),{src:y}))}}),this.activities=Pt(this.config.activities).concat(this.invoke).map(function(c){return ka(c)}),this.transition=this.transition.bind(this),this.tags=Pt(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||zf(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,o=r.activities,s=r.guards,a=r.services,l=r.delays;return new t(this.config,{actions:H(H({},i),e.actions),activities:H(H({},o),e.activities),guards:H(H({},s),e.guards),services:H(H({},a),e.services),delays:H(H({},l),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return Oe(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Dr(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===_i,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===ss});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,s){var a=Oe(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=x0(a,e.id);return e.onEntry.push(v0(l,{delay:o})),e.onExit.push(b0(l)),l},i=pr(n)?n.map(function(o,s){var a=r(o.delay,s);return H(H({},o),{event:a})}):He(Object.keys(n).map(function(o,s){var a=n[o],l=Pe(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Pt(l).map(function(d){return H(H({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return H(H({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof Et?e.value:zr(e,this.delimiter);if(Pe(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((n={},n[i]=o,n)):[this,this.states[i]]}var s=Object.keys(i),a=[this];return a.push.apply(a,Ue([],_e(He(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=Af(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof Et?e:Et.create(e),r=Array.from(jr([],this.getStateNodes(n.value)));return new Et(H(H({},n),{value:this.resolve(n.value),configuration:r,done:Xi(r,this),tags:fc(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),o=i.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),o=this.getStateNode(i[0]),s=o._transition(e[i[0]],n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionParallelNode=function(e,n,r){var i,o,s={};try{for(var a=me(Object.keys(e)),l=a.next();!l.done;l=a.next()){var c=l.value,f=e[c];if(f){var d=this.getStateNode(c),h=d._transition(f,n,r);h&&(s[c]=h)}}}catch(w){i={error:w}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(w){return s[w]}),y=He(v.map(function(w){return w.transitions})),p=v.some(function(w){return w.transitions.length>0});if(!p)return this.next(n,r);var L=He(Object.keys(s).map(function(w){return s[w].configuration}));return{transitions:y,exitSet:He(v.map(function(w){return w.exitSet})),configuration:L,source:n,actions:He(Object.keys(s).map(function(w){return s[w].actions}))}},t.prototype._transition=function(e,n,r){return Pe(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,ot(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=me(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var h=d.value,v=h.cond,y=h.in,p=e.context,L=y?Pe(y)&&Zn(y)?e.matches(zr(this.getStateNodeById(y).path,this.delimiter)):Ma(zr(y,this.delimiter),i0(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!v||Nf(this.machine,v,p,n,e)}catch(_){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
94
|
-
`).concat(_.message))}if(w&&L){h.target!==void 0&&(l=h.target),a.push.apply(a,Ue([],_e(h.actions),!1)),c=h;break}}}catch(_){r={error:_}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var m=He(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),b=!!c.internal;return{transitions:[c],exitSet:b?[]:He(l.map(function(_){return o.getPotentiallyReenteringNodes(_)})),configuration:m,source:e,actions:a}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,i=e;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,r,i,o,s,a){var l,c,f,d,h=this,v=s?jr([],this.getStateNodes(s.value)):[],y=new Set;try{for(var p=me(Array.from(e).sort(function(O,k){return O.order-k.order})),L=p.next();!L.done;L=p.next()){var w=L.value;(!Nr(v,w)||Nr(r.exitSet,w)||w.parent&&y.has(w.parent))&&y.add(w)}}catch(O){l={error:O}}finally{try{L&&!L.done&&(c=p.return)&&c.call(p)}finally{if(l)throw l.error}}try{for(var m=me(v),b=m.next();!b.done;b=m.next()){var w=b.value;(!Nr(e,w)||Nr(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(O){f={error:O}}finally{try{b&&!b.done&&(d=m.return)&&d.call(m)}finally{if(f)throw f.error}}r.exitSet.sort(function(O,k){return k.order-O.order});var _=Array.from(y).sort(function(O,k){return O.order-k.order}),E=new Set(r.exitSet),g=He(_.map(function(O){var k=[];if(O.type!=="final")return k;var j=O.parent;if(!j.parent)return k;k.push(xi(O.id,O.doneData),xi(j.id,O.doneData?go(O.doneData,i,o):void 0));var U=j.parent;return U.type==="parallel"&&si(U).every(function($){return Xi(r.configuration,$)})&&k.push(xi(U.id)),k})),S=_.map(function(O){var k=O.onEntry,j=O.activities.map(function(U){return w0(U)});return{type:"entry",actions:hn(a?Ue(Ue([],_e(k),!1),_e(j),!1):Ue(Ue([],_e(j),!1),_e(k),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:g.map(function(O){return p0(O)})}),C=Array.from(E).map(function(O){return{type:"exit",actions:hn(Ue(Ue([],_e(O.onExit),!1),_e(O.activities.map(function(k){return S0(k)})),!1),h.machine.options.actions)}}),P=C.concat({type:"transition",actions:hn(r.actions,this.machine.options.actions)}).concat(S);if(n){var M=hn(He(Ue([],_e(e),!1).sort(function(O,k){return k.order-O.order}).map(function(O){return O.onExit})),this.machine.options.actions).filter(function(O){return!Gs(O)});return P.concat({type:"stop",actions:M})}return P},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=ot(n),s;if(e instanceof Et)s=r===void 0?e:this.resolveState(Et.from(e,r));else{var a=Pe(e)?this.resolve(po(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(Et.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!s0(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var c=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=jr([],this.getStateNodes(s.value)),d=c.configuration.length?jr(f,c.configuration):f;return c.configuration=Ue([],_e(d),!1),this.resolveTransition(c,s,s.context,i,o)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var o,s=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,Ue([],_e(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=er);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],y=Xi(v,this),p=h?P0(this.machine,d):void 0,L=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(v),y,e,r,o,n,i),m=n?H({},n.activities):{};try{for(var b=me(w),_=b.next();!_.done;_=b.next()){var E=_.value;try{for(var g=(l=void 0,me(E.actions)),S=g.next();!S.done;S=g.next()){var C=S.value;C.type===Fs?m[C.activity.id||C.activity.type]=C:C.type===_a&&(m[C.activity.id||C.activity.type]=!1)}}catch(V){l={error:V}}finally{try{S&&!S.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}}}catch(V){s={error:V}}finally{try{_&&!_.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}var P=_e(vo(this,n,r,o,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=P[0],O=P[1],k=_e(l0(M,Gs),2),j=k[0],U=k[1],$=M.filter(function(V){var W;return V.type===Fs&&((W=V.activity)===null||W===void 0?void 0:W.type)===zs}),G=$.reduce(function(V,W){return V[W.activity.id]=_0(W.activity,f.machine,O,o),V},n?H({},n.children):{}),z=new Et({value:p||n.value,context:O,_event:o,_sessionid:n?n._sessionid:null,historyValue:p?L?c0(L,p):void 0:n?n.historyValue:void 0,history:!p||e.source?n:void 0,actions:p?U:[],activities:p?m:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:G,done:y,tags:fc(v),machine:this}),Z=r!==O;z.changed=o.name===Rf||Z;var D=z.history;D&&delete D.history;var R=!y&&(this._transient||d.some(function(V){return V._transient}));if(!h&&(!R||o.name===_i))return z;var A=z;if(!y)for(R&&(A=this.resolveRaisedTransition(A,{type:Yy},o,i));j.length;){var T=j.shift();A=this.resolveRaisedTransition(A,T._event,o,i)}var N=A.changed||(D?!!A.actions.length||Z||typeof D.value!=typeof A.value||!Hf(A.value,D.value):void 0);return A.changed=N,A.history=D,A},t.prototype.getStateNode=function(e){if(Zn(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Zn(e)?e.slice(qs.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Zn(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Hs(e,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||Gn;switch(this.type){case"parallel":return Dr(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):Gn});case"compound":if(Pe(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?Dr(e,function(o,s){return o?r.getStateNode(s).resolve(o):Gn}):this.initialStateValue||{};default:return e||Gn}},t.prototype.getResolvedPath=function(e){if(Zn(e)){var n=this.machine.idMap[e.slice(qs.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Hs(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=ac(this.states,function(r){return r.initialStateValue||Gn},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=mo(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;Pe(n.target)?e=Zn(n.target)?po(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(mo(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ki(this.initialStateValue);return He(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=_e(e),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:ac(this.states,function(n,r){if(!e)return n.historyValue();var i=Pe(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?He(Ki(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=o0(r.path,"states")(e).current;return Pe(o)?[r.getStateNode(o)]:He(Ki(o).map(function(s){return n.history==="deep"?r.getFromRelativePath(s):[r.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=He(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,i;if(this.__cache.events)return this.__cache.events;var o=this.states,s=new Set(this.ownEvents);if(o)try{for(var a=me(Object.keys(o)),l=a.next();!l.done;l=a.next()){var c=l.value,f=o[c];if(f.states)try{for(var d=(r=void 0,me(f.events)),h=d.next();!h.done;h=d.next()){var v=h.value;s.add("".concat(v))}}catch(y){r={error:y}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(y){e={error:y}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!Pe(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=i?n.key+r:r;if(n.parent)try{var s=n.parent.getStateNodeByPath(o);return s}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
95
|
-
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=h0(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Pe(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=H(H({},e),{actions:hn(Pt(e.actions)),cond:jf(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return H(H({},a),{target:a.target?a.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return a},t.prototype.formatTransitions=function(){var e,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var o=this.config.on,s=ss,a=o[s],l=a===void 0?[]:a,c=Ca(o,[typeof s=="symbol"?s:s+""]);i=He(Object.keys(c).map(function(m){var b=Hn(m,c[m]);return b}).concat(Hn(ss,l)))}var f=this.config.always?Hn("",this.config.always):[],d=this.config.onDone?Hn(String(xi(this.id)),this.config.onDone):[],h=He(this.invoke.map(function(m){var b=[];return m.onDone&&b.push.apply(b,Ue([],_e(Hn(String(Yi(m.id)),m.onDone)),!1)),m.onError&&b.push.apply(b,Ue([],_e(Hn(String(Ir(m.id)),m.onError)),!1)),b})),v=this.after,y=He(Ue(Ue(Ue(Ue([],_e(d),!1),_e(h),!1),_e(i),!1),_e(f),!1).map(function(m){return Pt(m).map(function(b){return r.formatTransition(b)})}));try{for(var p=me(v),L=p.next();!L.done;L=p.next()){var w=L.value;y.push(w)}}catch(m){e={error:m}}finally{try{L&&!L.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}return y},t}();function G0(t,e,n){return n===void 0&&(n=t.context),new H0(t,e,n)}var Z0=E0,Ks;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Ks||(Ks={}));var $r=u.useLayoutEffect;function hc(t){var e=ce.useRef();return e.current||(e.current={v:t()}),e.current.v}var W0=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},q0=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function K0(t,e){var n,r,i=W0([[],[]],2),o=i[0],s=i[1];try{for(var a=q0(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}var kr=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},pc=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function gc(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function J0(t){var e=u.useRef([]),n=u.useRef([]);$r(function(){var r=t.subscribe(function(i){var o,s;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),l=kr(K0(a,function(d){return d.exec.__effect===Ks.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,pc([],kr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,pc([],kr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),$r(function(){for(;n.current.length;){var r=kr(n.current.shift(),2),i=r[0],o=r[1];gc(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=kr(e.current.shift(),2),i=r[0],o=r[1];gc(i,o)}})}var Hr=function(){return Hr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Hr.apply(this,arguments)},Y0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function X0(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function Q0(t,e,n){e===void 0&&(e={});var r=hc(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,c=e.delays,f=e.state,d=Y0(e,["context","guards","actions","activities","services","delays","state"]),h=hc(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},y=r.withConfig(v,function(){return Hr(Hr({},r.context),i)});return Gf(y,Hr({deferEvents:!0},d))});return $r(function(){var v;return n&&(v=h.subscribe(X0(n))),function(){v==null||v.unsubscribe()}},[n]),$r(function(){return h.start(f?Et.create(f):void 0),function(){h.stop()}},[]),$r(function(){Object.assign(h.machine.options.actions,s),Object.assign(h.machine.options.guards,o),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,l),Object.assign(h.machine.options.delays,c)},[s,o,a,l,c]),J0(h),h}var eb=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function tb(t,e){e===void 0&&(e={});var n=u.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=Q0(t,e,n),i=eb(u.useState(function(){var a=r.machine.initialState;return e.state?Et.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ge.apply(this,arguments)}function tr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const pe={arr:Array.isArray,obj:t=>Object.prototype.toString.call(t)==="[object Object]",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0,nul:t=>t===null,set:t=>t instanceof Set,map:t=>t instanceof Map,equ(t,e){if(typeof t!=typeof e)return!1;if(pe.str(t)||pe.num(t))return t===e;if(pe.obj(t)&&pe.obj(e)&&Object.keys(t).length+Object.keys(e).length===0)return!0;let n;for(n in t)if(!(n in e))return!1;for(n in e)if(t[n]!==e[n])return!1;return pe.und(n)?t===e:!0}};function nb(t,e){return e===void 0&&(e=!0),n=>(pe.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const o=e?i[0].toLowerCase()+i.substring(1):i;return r[o]=t(o),r},t)}function rb(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function On(t,e){return pe.und(t)||pe.nul(t)?e:t}function Oi(t){return pe.und(t)?[]:pe.arr(t)?t:[t]}function Qn(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return pe.fun(t)?t(...n):t}function ib(t){return t.to,t.from,t.config,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.delay,t.attach,t.destroyed,t.interpolateTo,t.ref,t.lazy,tr(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function as(t){const e=ib(t);if(pe.und(e))return Ge({to:e},t);const n=Object.keys(t).reduce((r,i)=>pe.und(e[i])?Ge({},r,{[i]:t[i]}):r,{});return Ge({to:e},n)}function ob(t,e){return e&&(pe.fun(e)?e(t):pe.obj(e)&&(e.current=t)),t}class Tt{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){this.children.length===0&&this.attach(),this.children.push(e)}removeChild(e){const n=this.children.indexOf(e);this.children.splice(n,1),this.children.length===0&&this.detach()}}class Js extends Tt{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof Tt&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof Tt&&e.removeChild(this))}}class Zf extends Tt{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof Tt&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof Tt&&e.removeChild(this))}getValue(e){e===void 0&&(e=!1);const n={};for(const r in this.payload){const i=this.payload[r];e&&!(i instanceof Tt)||(n[r]=i instanceof Tt?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let Ra;function sb(t,e){Ra={fn:t,transform:e}}let Wf;function ab(t){Wf=t}let qf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,yo;function lb(t){yo=t}let Kf=()=>Date.now(),cb=t=>t.current,Jf;function ub(t){Jf=t}class fb extends Zf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?Ge({},e,{style:Jf(e.style)}):e,this.update=n,this.attach()}}const db=t=>pe.fun(t)&&!(t.prototype instanceof u.Component),hb=t=>u.forwardRef((n,r)=>{const i=rb(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(h=>{const v=s.current,y=()=>{let p=!1;a.current&&(p=Ra.fn(a.current,s.current.getAnimatedValue())),(!a.current||p===!1)&&i()};s.current=new fb(h,y),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>cb(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=tr(c,["scrollTop","scrollLeft"]),d=db(t)?void 0:h=>a.current=ob(h,r);return u.createElement(t,Ge({},f,{ref:d}))});let Gr=!1;const Dn=new Set,Yf=()=>{if(!Gr)return!1;let t=Kf();for(let e of Dn){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],o,s;for(let a=0;a<i.animatedValues.length;a++){let l=i.animatedValues[a];if(l.done)continue;let c=i.fromValues[a],f=i.toValues[a],d=l.lastPosition,h=f instanceof Tt,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(h&&(f=f.getValue()),i.immediate){l.setValue(f),l.done=!0;continue}if(typeof c=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=c+i.easing((t-l.startTime)/i.duration)*(f-c),o=t>=l.startTime+i.duration;else if(i.decay)d=c+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-l.startTime))),o=Math.abs(l.lastPosition-d)<.1,o&&(f=d);else{s=l.lastTime!==void 0?l.lastTime:t,v=l.lastVelocity!==void 0?l.lastVelocity:i.initialVelocity,t>s+64&&(s=t);let y=Math.floor(t-s);for(let m=0;m<y;++m){let b=-i.tension*(d-f),_=-i.friction*v,E=(b+_)/i.mass;v=v+E*1/1e3,d=d+v*1/1e3}let p=i.clamp&&i.tension!==0?c<f?d>f:d<f:!1,L=Math.abs(v)<=i.precision,w=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=p||L&&w,l.lastVelocity=v,l.lastTime=t}h&&!i.toValues[a].done&&(o=!1),o?(l.value!==f&&(d=f),l.done=!0):n=!0,l.setValue(d),l.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(Dn.delete(e),e.stop(!0))}return Dn.size?qf(Yf):Gr=!1,Gr},pb=t=>{Dn.has(t)||Dn.add(t),Gr||(Gr=!0,qf(Yf))},gb=t=>{Dn.has(t)&&Dn.delete(t)};function bo(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return bo({range:t,output:e,extrapolate:n});if(yo&&typeof t.output[0]=="string")return yo(t);const r=t,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const f=mb(c,o);return vb(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function vb(t,e,n,r,i,o,s,a,l){let c=l?l(t):t;if(c<e){if(s==="identity")return c;s==="clamp"&&(c=e)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?c=-c:n===1/0?c=c-e:c=(c-e)/(n-e),c=o(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function mb(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class cr extends Js{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Js&&!(e instanceof cr)?e.getPayload():Array.isArray(e)?e:[e],this.calc=bo(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=bo(e,n,r)}interpolate(e,n,r){return new cr(this,e,n,r)}}const Wn=(t,e,n)=>t&&new cr(t,e,n),yb={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};function Xf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Xf(n,e))}class Ys extends Tt{constructor(e){var n;super(),n=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(r,i){i===void 0&&(i=!0),n.value=r,i&&n.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){this.animatedStyles.size===0&&Xf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new cr(this,e,n,r)}}class bb extends Js{constructor(e){super(),this.payload=e.map(n=>new Ys(n))}setValue(e,n){n===void 0&&(n=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((r,i)=>this.payload[i].setValue(r,n)):this.payload.forEach(r=>r.setValue(e,n))}getValue(){return this.payload.map(e=>e.getValue())}interpolate(e,n){return new cr(this,e,n)}}let wb=0,Sb=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=wb++}update(e){if(!e)return this;const n=as(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=tr(n,["delay","to"]);if(pe.arr(o)||pe.fun(o))this.queue.push(Ge({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=Ge({to:{[c]:f},delay:Qn(i,c)},s),h=a[d.delay]&&a[d.delay].to;a[d.delay]=Ge({},a[d.delay],d,{to:Ge({},h,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,l)=>a.delay-l.delay),this.diff(s),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let o=i.from,s=o===void 0?{}:o,a=i.to,l=a===void 0?{}:a;pe.obj(s)&&(this.merged=Ge({},s,this.merged)),pe.obj(l)&&(this.merged=Ge({},this.merged,l))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,o)=>{let s=i.delay,a=tr(i,["delay"]);const l=f=>{o===r.length-1&&n===this.guid&&f&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let c=pe.arr(a.to)||pe.fun(a.to);s?setTimeout(()=>{n===this.guid&&(c?this.runAsync(a,l):this.diff(a).start(l))},s):c?this.runAsync(a,l):this.diff(a).start(l)})}else pe.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),pb(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&gb(this),this}runAsync(e,n){var r=this;e.delay;let i=tr(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(pe.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=Ge({},i,as(i.to[l]));pe.arr(c.config)&&(c.config=c.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(c).start(f))})}else if(pe.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=Ge({},i,as(c));if(pe.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(c){return c===void 0&&(c=!0),r.stop(c)}).then(()=>l))}s.then(n)}diff(e){this.props=Ge({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,o=n.to,s=o===void 0?{}:o,a=n.config,l=a===void 0?{}:a,c=n.reverse,f=n.attach,d=n.reset,h=n.immediate;if(c){var v=[s,i];i=v[0],s=v[1]}this.merged=Ge({},i,this.merged,s),this.hasChanged=!1;let y=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((p,L)=>{let w=L[0],m=L[1],b=p[w]||{};const _=pe.num(m),E=pe.str(m)&&!m.startsWith("#")&&!/\d/.test(m)&&!Wf[m],g=pe.arr(m),S=!_&&!g&&!E;let C=pe.und(i[w])?m:i[w],P=_||g||E?m:1,M=Qn(l,w);y&&(P=y.animations[w].parent);let O=b.parent,k=b.interpolation,j=Oi(y?P.getPayload():P),U,$=m;S&&($=yo({range:[0,1],output:[m,m]})(1));let G=k&&k.getValue();const Z=!pe.und(O)&&b.animatedValues.some(T=>!T.done),D=!pe.equ($,G),R=!pe.equ($,b.previous),A=!pe.equ(M,b.config);if(d||R&&D||A){if(_||E)O=k=b.parent||new Ys(C);else if(g)O=k=b.parent||new bb(C);else if(S){let T=b.interpolation&&b.interpolation.calc(b.parent.value);T=T!==void 0&&!d?T:C,b.parent?(O=b.parent,O.setValue(0,!1)):O=new Ys(0);const N={output:[T,m]};b.interpolation?(k=b.interpolation,b.interpolation.updateConfig(N)):k=O.interpolate(N)}return j=Oi(y?P.getPayload():P),U=Oi(O.getPayload()),d&&!S&&O.setValue(C,!1),this.hasChanged=!0,U.forEach(T=>{T.startPosition=T.value,T.lastPosition=T.value,T.lastVelocity=Z?T.lastVelocity:void 0,T.lastTime=Z?T.lastTime:void 0,T.startTime=Kf(),T.done=!1,T.animatedStyles.clear()}),Qn(h,w)&&O.setValue(S?P:m,!1),Ge({},p,{[w]:Ge({},b,{name:w,parent:O,interpolation:k,animatedValues:U,toValues:j,previous:$,config:M,fromValues:Oi(O.getValue()),immediate:Qn(h,w),initialVelocity:On(M.velocity,0),clamp:On(M.clamp,!1),precision:On(M.precision,.01),tension:On(M.tension,170),friction:On(M.friction,26),mass:On(M.mass,1),duration:M.duration,easing:On(M.easing,T=>T),decay:M.decay})})}else return D?p:(S&&(O.setValue(1,!1),k.updateConfig({output:[$,$]})),O.done=!0,this.hasChanged=!0,Ge({},p,{[w]:Ge({},p[w],{previous:$})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let p in this.animations)this.interpolations[p]=this.animations[p].interpolation,this.values[p]=this.animations[p].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Lb=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=pe.fun(e),o=u.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let f;return[new Array(t).fill().map((d,h)=>{const v=new Sb,y=i?Qn(e,h,v):e[h];return h===0&&(f=y.ref),v.update(y),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,u.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(f=>new Promise(d=>f.start(d)))),stop:f=>r.current.forEach(d=>d.stop(f)),get controllers(){return r.current}}));const l=u.useMemo(()=>f=>r.current.map((d,h)=>{d.update(i?Qn(f,h,d):f[h]),a||d.start()}),[t]);u.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),u.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const c=r.current.map(f=>f.getValues());return i?[c,l,f=>r.current.forEach(d=>d.pause(f))]:c},Eb=t=>{const e=pe.fun(t),n=Lb(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class xb extends Zf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof Tt)&&(e=Ra.transform(e)),this.payload=e}}const wo={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},At="[-+]?\\d*\\.?\\d+",So=At+"%";function Uo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Cb=new RegExp("rgb"+Uo(At,At,At)),_b=new RegExp("rgba"+Uo(At,At,At,At)),Ob=new RegExp("hsl"+Uo(At,So,So)),Mb=new RegExp("hsla"+Uo(At,So,So,At)),kb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Pb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Rb=/^#([0-9a-fA-F]{6})$/,Tb=/^#([0-9a-fA-F]{8})$/;function Ab(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=Rb.exec(t))?parseInt(e[1]+"ff",16)>>>0:wo.hasOwnProperty(t)?wo[t]:(e=Cb.exec(t))?(qn(e[1])<<24|qn(e[2])<<16|qn(e[3])<<8|255)>>>0:(e=_b.exec(t))?(qn(e[1])<<24|qn(e[2])<<16|qn(e[3])<<8|yc(e[4]))>>>0:(e=kb.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=Tb.exec(t))?parseInt(e[1],16)>>>0:(e=Pb.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Ob.exec(t))?(vc(mc(e[1]),Mi(e[2]),Mi(e[3]))|255)>>>0:(e=Mb.exec(t))?(vc(mc(e[1]),Mi(e[2]),Mi(e[3]))|yc(e[4]))>>>0:null}function ls(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function vc(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=ls(i,r,t+1/3),s=ls(i,r,t),a=ls(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function qn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function mc(t){return(parseFloat(t)%360+360)%360/360}function yc(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Mi(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function bc(t){let e=Ab(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,o=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}const ki=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Db=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ib=new RegExp(`(${Object.keys(wo).join("|")})`,"g"),jb=t=>{const e=t.output.map(i=>i.replace(Db,bc)).map(i=>i.replace(Ib,bc)),n=e[0].match(ki).map(()=>[]);e.forEach(i=>{i.match(ki).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(ki).map((i,o)=>bo(Ge({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(ki,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,c,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(c)}, ${f})`)}};let Zr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const Nb=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),Bb=["Webkit","Ms","Moz","O"];Zr=Object.keys(Zr).reduce((t,e)=>(Bb.forEach(n=>t[Nb(n,e)]=t[e]),t),Zr);function Ub(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Zr.hasOwnProperty(t)&&Zr[t])?e+"px":(""+e).trim()}const wc={};ub(t=>new xb(t));lb(jb);ab(wo);sb((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=tr(e,["style","children","scrollTop","scrollLeft"]),c=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";s!==void 0&&(t.scrollTop=s),a!==void 0&&(t.scrollLeft=a),o!==void 0&&(t.textContent=o);for(let f in i)if(i.hasOwnProperty(f)){var n=f.indexOf("--")===0,r=Ub(f,i[f],n);f==="float"&&(f="cssFloat"),n?t.style.setProperty(f,r):t.style[f]=r}for(let f in l){const d=c?f:wc[f]||(wc[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,l[f])}return}else return!1},t=>t);const Vb=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Fb=nb(hb,!1),zb=Fb(Vb);function Sc(t,e){return t.map(function(n,r){return n+e[r]})}function Qf(t,e){return t.map(function(n,r){return n-e[r]})}function Xs(t){return Math.hypot.apply(Math,t)}function $b(t,e,n){var r=Xs(e),i=r===0?0:1/r,o=n===0?0:1/n,s=o*r,a=e.map(function(f){return o*f}),l=e.map(function(f){return i*f}),c=Xs(t);return{velocities:a,velocity:s,distance:c,direction:l}}function Qs(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function Hb(t,e,n){return Math.max(e,Math.min(t,n))}function Gb(t,e){return Math.pow(t,e*5)}function Lc(t,e,n){return e===0||Math.abs(e)===1/0?Gb(t,n):t*e*n/(e+n*t)}function Wr(t,e,n,r){return r===void 0&&(r=.15),r===0?Hb(t,e,n):t<e?-Lc(e-t,n-e,r)+e:t>n?+Lc(t-n,n-e,r)+n:t}function Ec(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zb(t,e,n){return e&&Ec(t.prototype,e),n&&Ec(t,n),t}function dt(){return dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dt.apply(this,arguments)}function ed(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Wb(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Pi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qb(t,e){if(t){if(typeof t=="string")return xc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xc(t,e)}}function xc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vo(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=qb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
96
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function td(){}function nd(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?td:e.length===1?e[0]:function(){for(var r,i=Vo(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function pn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function Ri(t){if(typeof t=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(void 0,n)}else return t}function Ta(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(typeof a){case"function":n[s]=a.call(n,t[s],s,t);break;case"object":n[s]=Ta(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var Kb=180,Jb=.15,Yb=.5,Xb=60,Qb={threshold:function(e){return e===void 0&&(e=0),pn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return pn(Jb);case!1:return pn(0);default:return pn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:pn(e)}},rd=dt({},Qb,{axis:!0,lockDirection:function(e){return e===void 0&&(e=!1),e},bounds:function(e){if(e===void 0&&(e={}),typeof e=="function")return function(d){return rd.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,o=n.right,s=o===void 0?1/0:o,a=n.top,l=a===void 0?-1/0:a,c=n.bottom,f=c===void 0?1/0:c;return[[i,s],[l,f]]}}),ew=typeof window<"u"&&window.document&&window.document.createElement,tw={enabled:function(e){return e===void 0&&(e=!0),e},domTarget:!0,window:function(t){function e(n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return t===void 0&&(t=ew?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,o=n.capture,s=o===void 0?!1:o;return{passive:i,capture:s}}},nw=dt({},rd,{threshold:function(e,n,r){var i=r.filterTaps,o=i===void 0?!1:i,s=r.lockDirection,a=s===void 0?!1:s,l=r.axis,c=l===void 0?void 0:l,f=pn(e,o?3:a||c?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=Yb),pn(e)},swipeDistance:function(e){return e===void 0&&(e=Xb),pn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return Kb;case!1:return 0;default:return e}}});function rw(t){return t===void 0&&(t={}),Ta(t,tw)}function iw(t){return t===void 0&&(t={}),Ta(t,nw)}function ow(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=Wb(t,["domTarget","eventOptions","window","enabled"]),s=rw({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=iw(o),s}function Pr(t){return dt({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:td,canceled:!1,memo:void 0,args:void 0},t)}function id(){var t={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},e=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),n=Pr({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:t,drag:e,pinch:n,wheel:r,move:i,scroll:o}}var kn=new Map,sw=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(o,s){var a;s===void 0&&(s=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f<l;f++)c[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(c))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(o){if(o===void 0&&(o=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!o&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var s=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!s,i.state.last=s&&!a,i.controller.state.shared[i.ingKey]=a}var l=dt({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),c=i.handler(l);return i.state.memo=c!==void 0?c:i.state.memo,i.state._active||i.clean(),l}}var e=t.prototype;return e.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},e.updateGestureState=function(r){Object.assign(this.state,r)},e.checkIntentionality=function(r,i){return{_intentional:r,_blocked:!1}},e.getMovement=function(r){var i=this.config,o=i.initial,s=i.bounds,a=i.rubberband,l=i.threshold,c=this.state,f=c._bounds,d=c._initial,h=c._active,v=c._intentional,y=c.lastOffset,p=c.movement,L=this.getInternalMovement(r,this.state),w=v[0]===!1?Cc(L[0],l[0]):v[0],m=v[1]===!1?Cc(L[1],l[1]):v[1],b=this.checkIntentionality([w,m],L);if(b._blocked)return dt({},b,{_movement:L,delta:[0,0]});var _=b._intentional,E=L,g,S;if(_[0]!==!1&&v[0]===!1&&(S=Ri(o,this.state),g=Ri(s,this.state),d[0]=S[0],f[0]=g[0]),_[1]!==!1&&v[1]===!1){var C,P;S=(C=S)!=null?C:Ri(o,this.state),g=(P=g)!=null?P:Ri(s,this.state),d[1]=S[1],f[1]=g[1]}var M=[_[0]!==!1?L[0]-_[0]:d[0],_[1]!==!1?L[1]-_[1]:d[1]],O=Sc(M,y),k=h?a:[0,0];return M=_c(f,Sc(M,d),k),dt({},b,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:E,movement:M,values:r,offset:_c(f,O,k),delta:Qf(M,p)})},e.clean=function(){this.clearTimeout()},Zb(t,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),t}();function Cc(t,e){return Math.abs(t)>=e?Qs(t)*e:!1}function _c(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],c=a[1],f=t[1],d=f[0],h=f[1];return[Wr(r,l,c,o),Wr(i,d,h,s)]}function cs(t,e,n){var r=t.state,i=t.args,o=e.timeStamp,s=e.type,a=r.values,l=n?0:o-r.startTime;return{_lastEventType:s,event:e,timeStamp:o,elapsedTime:l,args:i,previous:a}}function aw(t,e,n){var r=t.state.offset,i=n.timeStamp;return dt({},id()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function lw(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.call.apply(t,[this,dt({},e,{event:n})].concat(i))}}var cw=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];for(var a=Vo(n.classes),l;!(l=a()).done;){var c=l.value;new c(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var h=d[f],v=h[0],y=h[1];ea(r,v,lw(y,dt({},n.state.shared,{args:o})))}return n.config.domTarget?hw(n,r):pw(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=sd(n.config),i=n.config.eventOptions;r&&di(r,od(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),uw(n)},this.state=id(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function uw(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var o in i){var s=i[o];di(n,s,r)}t.windowListeners={}}}function fw(t,e){var n=t.config,r=t.windowListeners;n.window&&(di(n.window,r[e],n.eventOptions),delete r[e])}function dw(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(di(r.window,i[e],r.eventOptions),ad(r.window,i[e]=n,r.eventOptions))}function hw(t,e){var n=t.config,r=t.domListeners,i=sd(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;di(i,od(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],c=l[0],f=l[1],d=c.slice(2).toLowerCase();r.push([d,nd.apply(void 0,f)])}ad(i,r,o)}function pw(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,s=Object.entries(e);o<s.length;o++){var a=s[o],l=a[0],c=a[1],f=Array.isArray(c)?c:[c],d=l+i;r[d]=nd.apply(void 0,f)}return r}function od(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function sd(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function ea(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function ad(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Vo(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function di(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Vo(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function gw(t,e,n){n===void 0&&(n={});var r=mw(t),i=u.useMemo(function(){return new cw(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?vw:i.bind}function vw(){}function mw(t){var e=new Set;return t.drag&&e.add(kn.get("drag")),t.wheel&&e.add(kn.get("wheel")),t.scroll&&e.add(kn.get("scroll")),t.move&&e.add(kn.get("move")),t.pinch&&e.add(kn.get("pinch")),t.hover&&e.add(kn.get("hover")),e}var yw=function(t){ed(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return Qf(i,o.initial)},n.checkIntentionality=function(i,o){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var s=o.map(Math.abs),a=s[0],l=s[1],c=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:c}:c?this.config.axis&&c!==this.config.axis?{_intentional:i,_blocked:!0,axis:c}:(i[c==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:c}):{_intentional:[!1,!1],_blocked:!1,axis:c}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,$b(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(sw);function ld(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Oc(t){var e="buttons"in t?t.buttons:0,n=ld(t),r=n&&n.length||0,i=r>0||e>0,o=t.shiftKey,s=t.altKey,a=t.metaKey,l=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:o,altKey:s,metaKey:a,ctrlKey:l}}function Mc(t){var e=ld(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var bw=3,ww=220,Sw=function(t){ed(e,t);function e(){var r;return r=t.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.onDragStart=function(i){!r.enabled||r.state._active||(dw(r.controller,r.stateKey,[["pointermove",r.onDragChange],["pointerup",r.onDragEnd],["pointercancel",r.onDragEnd]]),r.updateGestureState({_pointerId:i.pointerId}),r.config.delay>0?(r.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),r.setTimeout(r.startDrag.bind(Pi(r)),r.config.delay,i)):r.startDrag(i))},r.onDragChange=function(i){if(!r.state.canceled&&i.pointerId===r.state._pointerId){if(!r.state._active){r.state._delayedEvent&&(r.clearTimeout(),r.startDrag(i));return}var o=Oc(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Mc(i),a=r.getKinematics(s,i),l=cs(Pi(r),i),c=r.state._isTap,f=Xs(a._movement);c&&f>=bw&&(c=!1),r.updateGestureState(dt({},l,a,{_isTap:c})),r.fireGestureHandler()}},r.onDragEnd=function(i){if(i.pointerId===r.state._pointerId){r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0});var o=r.state._isTap,s=r.state.velocities,a=s[0],l=s[1],c=r.state.movement,f=c[0],d=c[1],h=r.state._intentional,v=h[0],y=h[1],p=r.config.swipeVelocity,L=p[0],w=p[1],m=r.config.swipeDistance,b=m[0],_=m[1],E=dt({},cs(Pi(r),i),r.getMovement(r.state.values)),g=[0,0];E.elapsedTime<ww&&(v!==!1&&Math.abs(a)>L&&Math.abs(f)>b&&(g[0]=Qs(a)),y!==!1&&Math.abs(l)>w&&Math.abs(d)>_&&(g[1]=Qs(l))),r.updateGestureState(dt({},E,{tap:o,swipe:g})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(Pi(r)),r.state._delayedEvent=!1,fw(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0}),r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return r.fireGestureHandler()}))},r.onClick=function(i){r.state._isTap||i.stopPropagation()},r}var n=e.prototype;return n.startDrag=function(i){var o=Mc(i);this.updateSharedState(Oc(i)),this.updateGestureState(dt({},aw(this,o,i),cs(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(ea(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";ea(i,o,this.onClick)}},e}(yw);function Lw(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Qi(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Qi(t[r],e[r]))return!1;return!0}var o;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=t.entries();!(r=o.next()).done;)if(!Qi(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!(i[r]==="_owner"&&t.$$typeof)&&!Qi(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function Ew(t,e){try{return Qi(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function xw(t,e){e===void 0&&(e={}),kn.set("drag",Sw);var n=u.useRef();return n.current||(n.current=Lw(ow,Ew)),gw({drag:t},n.current(e))}/*!
|
|
92
|
+
***************************************************************************** */var H=function(){return H=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},H.apply(this,arguments)};function xa(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function me(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _e(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Ue(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var De;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(De||(De={}));var ar;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(ar||(ar={}));var Vs=De.Start,Ca=De.Stop,fi=De.Raise,No=De.Send,kf=De.Cancel,Yy=De.NullEvent,_a=De.Assign;De.After;De.DoneState;var Pf=De.Log,Xy=De.Init,Fs=De.Invoke;De.ErrorExecution;var ic=De.ErrorPlatform,Qy=De.ErrorCustom,Rf=De.Update,e0=De.Choose,t0=De.Pure,Tf=".",oc={},zs="xstate.guard",n0="",Li;function Oa(t,e,n){n===void 0&&(n=Tf);var r=zr(t,n),i=zr(e,n);return Pe(i)?Pe(r)?i===r:!1:Pe(r)?r in i:Object.keys(r).every(function(o){return o in i?Oa(r[o],i[o]):!1})}function Af(t){try{return Pe(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function $s(t,e){try{return pr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function r0(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function zr(t,e){if(r0(t))return t.value;if(pr(t))return po(t);if(typeof t!="string")return t;var n=$s(t,e);return po(n)}function po(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Dr(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function sc(t,e,n){var r,i,o={};try{for(var s=me(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];n(c)&&(o[l]=e(c,l,t))}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}var i0=function(t){return function(e){var n,r,i=e;try{for(var o=me(t),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[a]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function o0(t,e){return function(n){var r,i,o=n;try{for(var s=me(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function Ki(t){if(!t)return[[]];if(Pe(t))return[[t]];var e=He(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ki(t[n]).map(function(i){return[n].concat(i)})}));return e}function He(t){var e;return(e=[]).concat.apply(e,Ue([],_e(t),!1))}function Df(t){return pr(t)?t:[t]}function Pt(t){return t===void 0?[]:Df(t)}function go(t,e,n){var r,i;if(Oe(t))return t(e,n.data);var o={};try{for(var s=me(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];Oe(c)?o[l]=c(e,n.data):o[l]=c}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function s0(t){return/^(done|error)\./.test(t)}function ac(t){return!!(t instanceof Promise||t!==null&&(Oe(t)||typeof t=="object")&&Oe(t.then))}function a0(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function l0(t,e){var n,r,i=_e([[],[]],2),o=i[0],s=i[1];try{for(var a=me(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}function If(t,e){return Dr(t.states,function(n,r){if(n){var i=(Pe(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:If(n,i)}}})}function c0(t,e){return{current:e,states:If(t,e)}}function lc(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,c=s.assignment,f={state:r,action:s,_event:e},d={};if(Oe(c))d=c(o,e.data,f);else try{for(var h=me(Object.keys(c)),v=h.next();!v.done;v=h.next()){var y=v.value,p=c[y];d[y]=Oe(p)?p(o,e.data,f):p}}catch(L){a={error:L}}finally{try{v&&!v.done&&(l=h.return)&&l.call(h)}finally{if(a)throw a.error}}return Object.assign({},o,d)},t);return i}var u0=function(){};function pr(t){return Array.isArray(t)}function Oe(t){return typeof t=="function"}function Pe(t){return typeof t=="string"}function jf(t,e){if(t)return Pe(t)?{type:zs,name:t,predicate:e?e[t]:void 0}:Oe(t)?{type:zs,name:t.name,predicate:t}:t}function f0(t){try{return"subscribe"in t&&Oe(t.subscribe)}catch{return!1}}var dn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Li={},Li[dn]=function(){return this},Li[Symbol.observable]=function(){return this};function lr(t){return!!t&&"__xstatenode"in t}function d0(t){return!!t&&typeof t.send=="function"}function Bo(t,e){return Pe(t)||typeof t=="number"?H({type:t},e):t}function ot(t,e){if(!Pe(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=Bo(t);return H({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function Hn(t,e){var n=Df(e).map(function(r){return typeof r>"u"||typeof r=="string"||lr(r)?{target:r,event:t}:H(H({},r),{event:t})});return n}function h0(t){if(!(t===void 0||t===n0))return Pt(t)}function Nf(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===zs)return((o==null?void 0:o[e.name])||e.predicate)(n,r.data,s);var a=o==null?void 0:o[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,s)}function Bf(t){return typeof t=="string"?{type:t}:t}function Ji(t,e,n){var r=function(){},i=typeof t=="object",o=i?t:null;return{next:((i?t.next:t)||r).bind(o),error:((i?t.error:e)||r).bind(o),complete:((i?t.complete:n)||r).bind(o)}}function Ei(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Hs(t){return(t.type===fi||t.type===No&&t.to===ar.Internal)&&typeof t.delay!="number"}var er=ot({type:Xy});function Gs(t,e){return e&&e[t]||void 0}function oi(t,e){var n;if(Pe(t)||typeof t=="number"){var r=Gs(t,e);Oe(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Oe(t))n={type:t.name||t.toString(),exec:t};else{var r=Gs(t.type,e);if(Oe(r))n=H(H({},t),{exec:r});else if(r){var i=r.type||t.type;n=H(H(H({},r),t),{type:i})}else n=t}return n}var hn=function(t,e){if(!t)return[];var n=pr(t)?t:[t];return n.map(function(r){return oi(r,e)})};function Ma(t){var e=oi(t);return H(H({id:Pe(t)?t:e.id},e),{type:e.type})}function p0(t,e){return{type:fi,event:typeof t=="function"?t:Bo(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function g0(t,e,n,r){var i={_event:n},o=ot(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Pe(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;return H(H({},t),{type:fi,_event:o,delay:s})}function v0(t,e){return{to:e?e.to:void 0,type:No,event:Oe(t)?t:Bo(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Oe(t)?t.name:Af(t)}}function m0(t,e,n,r){var i={_event:n},o=ot(Oe(t.event)?t.event(e,n.data,i):t.event),s;if(Pe(t.delay)){var a=r&&r[t.delay];s=Oe(a)?a(e,n.data,i):a}else s=Oe(t.delay)?t.delay(e,n.data,i):t.delay;var l=Oe(t.to)?t.to(e,n.data,i):t.to;return H(H({},t),{to:l,_event:o,event:o.data,delay:s})}var y0=function(t,e,n){return H(H({},t),{value:Pe(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},b0=function(t){return{type:kf,sendId:t}};function w0(t){var e=Ma(t);return{type:De.Start,activity:e,exec:void 0}}function S0(t){var e=Oe(t)?t:Ma(t);return{type:De.Stop,activity:e,exec:void 0}}function L0(t,e,n){var r=Oe(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:De.Stop,activity:i};return o}var E0=function(t){return{type:_a,assignment:t}};function x0(t,e){var n=e?"#".concat(e):"";return"".concat(De.After,"(").concat(t,")").concat(n)}function xi(t,e){var n="".concat(De.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Yi(t,e){var n="".concat(De.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ir(t,e){var n="".concat(De.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var C0=function(t){var e,n,r=[];try{for(var i=me(t),o=i.next();!o.done;o=i.next())for(var s=o.value,a=0;a<s.actions.length;){if(s.actions[a].type===_a){r.push(s.actions[a]),s.actions.splice(a,1);continue}a++}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function vo(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:C0(i),l=a.length?lc(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(y,p){var L;switch(p.type){case fi:{var w=g0(p,l,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,l,r),w}case No:var g=m0(p,l,r,t.options.delays);return o&&g.to!==ar.Internal&&(y==="entry"?f.push(g):o(g,l,r)),g;case Pf:{var b=y0(p,l,r);return o==null||o(b,l,r),b}case e0:{var _=p,E=(L=_.conds.find(function(G){var z=jf(G.cond,t.options.guards);return!z||Nf(t,z,l,r,o?void 0:e)}))===null||L===void 0?void 0:L.actions;if(!E)return[];var m=_e(vo(t,e,l,r,[{type:y,actions:hn(Pt(E),t.options.actions)}],o,s),2),S=m[0],C=m[1];return l=C,c==null||c.push(l),S}case t0:{var E=p.get(l,r.data);if(!E)return[];var R=_e(vo(t,e,l,r,[{type:y,actions:hn(Pt(E),t.options.actions)}],o,s),2),M=R[0],O=R[1];return l=O,c==null||c.push(l),M}case Ca:{var b=L0(p,l,r);return o==null||o(b,n,r),b}case _a:{l=lc(l,r,[p],o?void 0:e),c==null||c.push(l);break}default:var P=oi(p,t.options.actions),j=P.exec;if(o)o(P,l,r);else if(j&&c){var B=c.length-1,$=H(H({},P),{exec:function(G){for(var z=[],Z=1;Z<arguments.length;Z++)z[Z-1]=arguments[Z];j.apply(void 0,Ue([c[B]],_e(z),!1))}});P=$}return P}}function h(y){var p,L,w=[];try{for(var g=me(y.actions),b=g.next();!b.done;b=g.next()){var _=b.value,E=d(y.type,_);E&&(w=w.concat(E))}}catch(m){p={error:m}}finally{try{b&&!b.done&&(L=g.return)&&L.call(g)}finally{if(p)throw p.error}}return f.forEach(function(m){o(m,l,r)}),f.length=0,w}var v=He(i.map(h));return[v,l]}var cc=[],Jn=function(t,e){cc.push(t);var n=e(t);return cc.pop(),n};function Uf(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[dn]=function(){return this},e}function _0(t,e,n,r){var i,o=Bf(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?go(t.data,n,r):void 0,l=s?Vf(s,t.id,a):Uf(t.id);return l.meta=t,l}function Vf(t,e,n){var r=Uf(e);if(r.deferred=!0,lr(t)){var i=r.state=Jn(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function O0(t){try{return typeof t.send=="function"}catch{return!1}}function M0(t){return O0(t)&&"id"in t}function k0(t){var e;return H((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[dn]=function(){return this},e),t)}var mo=function(t){return t.type==="atomic"||t.type==="final"};function Ff(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function si(t){return Ff(t).filter(function(e){return e.type!=="history"})}function zf(t){var e=[t];return mo(t)?e:e.concat(He(si(t).map(zf)))}function jr(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=Zs(f),h=new Set(e);try{for(var v=me(h),y=v.next();!y.done;y=v.next())for(var p=y.value,L=p.parent;L&&!h.has(L);)h.add(L),L=L.parent}catch(R){n={error:R}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var w=Zs(h);try{for(var g=me(h),b=g.next();!b.done;b=g.next()){var p=b.value;if(p.type==="compound"&&(!w.get(p)||!w.get(p).length))d.get(p)?d.get(p).forEach(function(M){return h.add(M)}):p.initialStateNodes.forEach(function(M){return h.add(M)});else if(p.type==="parallel")try{for(var _=(s=void 0,me(si(p))),E=_.next();!E.done;E=_.next()){var m=E.value;h.has(m)||(h.add(m),d.get(m)?d.get(m).forEach(function(M){return h.add(M)}):m.initialStateNodes.forEach(function(M){return h.add(M)}))}}catch(M){s={error:M}}finally{try{E&&!E.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}}}catch(R){i={error:R}}finally{try{b&&!b.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var S=me(h),C=S.next();!C.done;C=S.next())for(var p=C.value,L=p.parent;L&&!h.has(L);)h.add(L),L=L.parent}catch(R){l={error:R}}finally{try{C&&!C.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}return h}function $f(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(mo(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=$f(o,e)}),i}function Zs(t){var e,n,r=new Map;try{for(var i=me(t),o=i.next();!o.done;o=i.next()){var s=o.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function P0(t,e){var n=jr([t],e);return $f(t,Zs(n))}function Nr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function R0(t){return Ue([],_e(new Set(He(Ue([],_e(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Xi(t,e){return e.type==="compound"?si(e).some(function(n){return n.type==="final"&&Nr(t,n)}):e.type==="parallel"?si(e).every(function(n){return Xi(t,n)}):!1}function T0(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function uc(t){return new Set(He(t.map(function(e){return e.tags})))}function Hf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Pe(t)||Pe(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return Hf(t[i],e[i])})}function A0(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function D0(t,e){var n=t.exec,r=H(H({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var Et=function(){function t(e){var n=this,r;this.actions=[],this.activities=oc,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||oc,this.meta=T0(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return R0(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e;var r=er;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=er;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),Pe(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ue([],_e(i.map(function(o){return r.toStrings(e[o],n).map(function(s){return o+n+s})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=xa(e,["configuration","transitions","tags","machine"]);return H(H({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return Oa(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;u0(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t}(),I0={deferEvents:!1},fc=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=H(H({},I0),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t}(),os=new Map,j0=0,Mr={bookId:function(){return"x:".concat(j0++)},register:function(t,e){return os.set(t,e),t},get:function(t){return os.get(t)},free:function(t){os.delete(t)}};function ka(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function N0(){var t=ka();if(t&&"__xstate__"in t)return t.__xstate__}function B0(t){if(ka()){var e=N0();e&&e.register(t)}}function U0(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],o=!1,s=function(){if(!o){for(o=!0;i.length>0;){var c=i.shift();n=t.transition(n,c,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=k0({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var h=Ji(c,f,d);return r.add(h),h.next(n),{unsubscribe:function(){r.delete(h)}}}}),l={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,a}var V0={sync:!1,autoForward:!1},et;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(et||(et={}));var F0=function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=et.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(pr(f))return r.batch(f),r.state;var h=ot(Bo(f,d));if(r.status===et.Stopped)return r.state;if(r.status!==et.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(h.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
93
|
+
Event: `).concat(JSON.stringify(h.data)));return r.scheduler.schedule(function(){r.forward(h);var v=r._nextState(h);r.update(v,h)}),r._state},this.sendTo=function(f,d,h){var v=r.parent&&(d===ar.Parent||r.parent.id===d),y=v?r.parent:Pe(d)?d===ar.Internal?r:r.children.get(d)||Mr.get(d):d0(d)?d:void 0;if(!y){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in y){if(r.status!==et.Stopped||r.parent!==y||r.state.done){var p=H(H({},f),{name:f.name===Qy?"".concat(Ir(r.id)):f.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,p]):y.send(p)}}else!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,f.data]):y.send(f.data)},this._exec=function(f,d,h,v){v===void 0&&(v=r.machine.options.actions);var y=f.exec||Gs(f.type,v),p=Oe(y)?y:y?y.exec:f.exec;if(p)try{return p(d,h.data,r.machine.config.predictableActionArguments?{action:f,_event:h}:{action:f,state:r.state,_event:h})}catch(B){throw r.parent&&r.parent.send({type:"xstate.error",data:B}),B}switch(f.type){case fi:{var L=f;r.defer(L);break}case No:var w=f;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,h===er):r.send(w._event);break;case kf:r.cancel(f.sendId);break;case Vs:{if(r.status!==et.Running)return;var g=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[g.id||g.type])break;if(g.type===De.Invoke){var b=Bf(g.src),_=r.machine.options.services?r.machine.options.services[b.type]:void 0,E=g.id,m=g.data,S="autoForward"in g?g.autoForward:!!g.forward;if(!_)return;var C=m?go(m,d,h):void 0;if(typeof _=="string")return;var R=Oe(_)?_(d,h.data,{data:C,src:b,meta:g.meta}):_;if(!R)return;var M=void 0;lr(R)&&(R=C?R.withContext(C):R,M={autoForward:S}),r.spawn(R,E,M)}else r.spawnActivity(g);break}case Ca:{r.stopChild(f.activity.id);break}case Pf:var O=f,P=O.label,j=O.value;P?r.logger(P,j):r.logger(j);break}};var i=H(H({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new fc({deferEvents:this.options.deferEvents}),this.sessionId=Mr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Jn(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,i;try{for(var o=me(e.actions),s=o.next();!s.done;s=o.next()){var a=s.value;this.exec(a,e,n)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,o,s,a,l,c,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===er)&&this.options.execute)this.execute(this.state);else for(var h=void 0;h=this._outgoingQueue.shift();)h[0].send(h[1]);if(this.children.forEach(function(R){d.state.children[R.id]=R}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=me(this.eventListeners),y=v.next();!y.done;y=v.next()){var p=y.value;p(e.event)}}catch(R){r={error:R}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var L=me(this.listeners),w=L.next();!w.done;w=L.next()){var p=w.value;p(e,e.event)}}catch(R){o={error:R}}finally{try{w&&!w.done&&(s=L.return)&&s.call(L)}finally{if(o)throw o.error}}try{for(var g=me(this.contextListeners),b=g.next();!b.done;b=g.next()){var _=b.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(R){a={error:R}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(a)throw a.error}}if(this.state.done){var E=e.configuration.find(function(R){return R.type==="final"&&R.parent===d.machine}),m=E&&E.doneData?go(E.doneData,e.context,n):void 0;this._doneEvent=Yi(this.id,m);try{for(var S=me(this.doneListeners),C=S.next();!C.done;C=S.next()){var p=C.value;p(this._doneEvent)}}catch(R){c={error:R}}finally{try{C&&!C.done&&(f=S.return)&&f.call(S)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),Mr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===et.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Ji(e,n,r);this.listeners.add(o.next),this.status!==et.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===et.Stopped?o.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===et.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===et.Running)return this;this.machine._init(),Mr.register(this.sessionId,this),this.initialized=!0,this.status=et.Running;var r=e===void 0?this.initialState:Jn(this,function(){return A0(e)?n.machine.resolveState(e):n.machine.resolveState(Et.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,er)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Oe(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,c,f;try{for(var d=me(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(S){e={error:S}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var y=me(this.stopListeners),p=y.next();!p.done;p=y.next()){var v=p.value;v(),this.stopListeners.delete(v)}}catch(S){r={error:S}}finally{try{p&&!p.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}try{for(var L=me(this.contextListeners),w=L.next();!w.done;w=L.next()){var v=w.value;this.contextListeners.delete(v)}}catch(S){o={error:S}}finally{try{w&&!w.done&&(s=L.return)&&s.call(L)}finally{if(o)throw o.error}}try{for(var g=me(this.doneListeners),b=g.next();!b.done;b=g.next()){var v=b.value;this.doneListeners.delete(v)}}catch(S){a={error:S}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=et.Stopped,this._initialState=void 0;try{for(var _=me(Object.keys(this.delayedEventsMap)),E=_.next();!E.done;E=_.next()){var m=E.value;this.clock.clearTimeout(this.delayedEventsMap[m])}}catch(S){c={error:S}}finally{try{E&&!E.done&&(f=_.return)&&f.call(_)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new fc({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=ot({type:"xstate.stop"}),i=Jn(e,function(){var o=He(Ue([],_e(e.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return hn(f.onExit,e.machine.options.actions)})),s=_e(vo(e.machine,e.state,e.state.context,r,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),a=s[0],l=s[1],c=new Et({value:e.state.value,context:l,_event:r,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:a.filter(function(f){return!Hs(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(i,r),e._stopChildren(),Mr.free(e.sessionId)}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===et.NotStarted&&this.options.deferEvents)){if(this.status!==et.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,o,s=n.state,a=!1,l=[],c=function(v){var y=ot(v);n.forward(y),s=Jn(n,function(){return n.machine.transition(s,y,void 0,r||void 0)}),l.push.apply(l,Ue([],_e(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(p){return D0(p,s)})),!1)),a=a||!!s.changed};try{for(var f=me(e),d=f.next();!d.done;d=f.next()){var h=d.value;c(h)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}s.changed=a,s.actions=l,n.update(s,ot(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=ot(e);if(i.name.indexOf(ic)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(ic)===0}))throw i.data.data;var o=Jn(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=me(this.forwardTo),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.children.get(s);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));a.send(e)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),Oe(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==et.Running)return Vf(e,n);if(ac(e))return this.spawnPromise(Promise.resolve(e),n);if(Oe(e))return this.spawnCallback(e,n);if(M0(e))return this.spawnActor(e,n);if(f0(e))return this.spawnObservable(e,n);if(lr(e))return this.spawnMachine(e,H(H({},r),{id:n}));if(a0(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,H(H({},this.options),{parent:this,id:n.id||e.id})),o=H(H({},V0),n);o.sync&&i.onTransition(function(a){r.send(Rf,{state:a,id:i.id})});var s=i;return this.children.set(i.id,s),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(ot(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=U0(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,o=!1,s;e.then(function(l){o||(s=l,i.removeChild(n),i.send(ot(Yi(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Ir(n,l);try{i.send(ot(c,{origin:n}))}catch{i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,c,f){var d=Ji(l,c,f),h=!1;return e.then(function(v){h||(d.next(v),!h&&d.complete())},function(v){h||d.error(v)}),{unsubscribe:function(){return h=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},r[dn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,o=!1,s=new Set,a=new Set,l,c=function(h){l=h,a.forEach(function(v){return v(h)}),!o&&i.send(ot(h,{origin:n}))},f;try{f=e(c,function(h){s.add(h)})}catch(h){this.send(Ir(n,h))}if(ac(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(h){return s.forEach(function(v){return v(h)})},subscribe:function(h){var v=Ji(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Oe(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[dn]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,o,s=e.subscribe(function(l){o=l,i.send(ot(l,{origin:n}))},function(l){i.removeChild(n),i.send(ot(Ir(n,l),{origin:n}))},function(){i.removeChild(n),i.send(ot(Yi(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,c,f){return e.subscribe(l,c,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[dn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[dn]=function(){return this},r))},t.prototype.attachDev=function(){var e=ka();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(H(H({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:H({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}B0(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[dn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===et.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=Gf,t}();function Gf(t,e){var n=new F0(t,e);return n}function z0(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Ci(t){return H(H({type:Fs},t),{toJSON:function(){t.onDone,t.onError;var e=xa(t,["onDone","onError"]);return H(H({},e),{type:Fs,src:z0(t.src)})}})}var _i="",Ws="#",ss="*",Gn={},Zn=function(t){return t[0]===Ws},$0=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},H0=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var o=this,s;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign($0(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Tf),this.id=this.config.id||Ue([this.machine.key],_e(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Dr(this.config.states,function(c,f){var d,h=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,H((d={},d[h.id]=h,d),h.idMap)),h}):Gn;var a=0;function l(c){var f,d;c.order=a++;try{for(var h=me(Ff(c)),v=h.next();!v.done;v=h.next()){var y=v.value;l(y)}}catch(p){f={error:p}}finally{try{v&&!v.done&&(d=h.return)&&d.call(h)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var f=c.event;return f===_i}):_i in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Pt(this.config.entry||this.config.onEntry).map(function(c){return oi(c)}),this.onExit=Pt(this.config.exit||this.config.onExit).map(function(c){return oi(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Pt(this.config.invoke).map(function(c,f){var d,h;if(lr(c)){var v=Ei(o.id,f);return o.machine.options.services=H((d={},d[v]=c,d),o.machine.options.services),Ci({src:v,id:v})}else if(Pe(c.src)){var v=c.id||Ei(o.id,f);return Ci(H(H({},c),{id:v,src:c.src}))}else if(lr(c.src)||Oe(c.src)){var v=c.id||Ei(o.id,f);return o.machine.options.services=H((h={},h[v]=c.src,h),o.machine.options.services),Ci(H(H({id:v},c),{src:v}))}else{var y=c.src;return Ci(H(H({id:Ei(o.id,f)},c),{src:y}))}}),this.activities=Pt(this.config.activities).concat(this.invoke).map(function(c){return Ma(c)}),this.transition=this.transition.bind(this),this.tags=Pt(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||zf(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,o=r.activities,s=r.guards,a=r.services,l=r.delays;return new t(this.config,{actions:H(H({},i),e.actions),activities:H(H({},o),e.activities),guards:H(H({},s),e.guards),services:H(H({},a),e.services),delays:H(H({},l),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return Oe(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Dr(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===_i,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===ss});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,s){var a=Oe(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=x0(a,e.id);return e.onEntry.push(v0(l,{delay:o})),e.onExit.push(b0(l)),l},i=pr(n)?n.map(function(o,s){var a=r(o.delay,s);return H(H({},o),{event:a})}):He(Object.keys(n).map(function(o,s){var a=n[o],l=Pe(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Pt(l).map(function(d){return H(H({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return H(H({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof Et?e.value:zr(e,this.delimiter);if(Pe(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((n={},n[i]=o,n)):[this,this.states[i]]}var s=Object.keys(i),a=[this];return a.push.apply(a,Ue([],_e(He(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=Af(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof Et?e:Et.create(e),r=Array.from(jr([],this.getStateNodes(n.value)));return new Et(H(H({},n),{value:this.resolve(n.value),configuration:r,done:Xi(r,this),tags:uc(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),o=i.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),o=this.getStateNode(i[0]),s=o._transition(e[i[0]],n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionParallelNode=function(e,n,r){var i,o,s={};try{for(var a=me(Object.keys(e)),l=a.next();!l.done;l=a.next()){var c=l.value,f=e[c];if(f){var d=this.getStateNode(c),h=d._transition(f,n,r);h&&(s[c]=h)}}}catch(w){i={error:w}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(w){return s[w]}),y=He(v.map(function(w){return w.transitions})),p=v.some(function(w){return w.transitions.length>0});if(!p)return this.next(n,r);var L=He(Object.keys(s).map(function(w){return s[w].configuration}));return{transitions:y,exitSet:He(v.map(function(w){return w.exitSet})),configuration:L,source:n,actions:He(Object.keys(s).map(function(w){return s[w].actions}))}},t.prototype._transition=function(e,n,r){return Pe(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,ot(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=me(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var h=d.value,v=h.cond,y=h.in,p=e.context,L=y?Pe(y)&&Zn(y)?e.matches(zr(this.getStateNodeById(y).path,this.delimiter)):Oa(zr(y,this.delimiter),i0(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!v||Nf(this.machine,v,p,n,e)}catch(_){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
94
|
+
`).concat(_.message))}if(w&&L){h.target!==void 0&&(l=h.target),a.push.apply(a,Ue([],_e(h.actions),!1)),c=h;break}}}catch(_){r={error:_}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var g=He(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),b=!!c.internal;return{transitions:[c],exitSet:b?[]:He(l.map(function(_){return o.getPotentiallyReenteringNodes(_)})),configuration:g,source:e,actions:a}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,i=e;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,r,i,o,s,a){var l,c,f,d,h=this,v=s?jr([],this.getStateNodes(s.value)):[],y=new Set;try{for(var p=me(Array.from(e).sort(function(O,P){return O.order-P.order})),L=p.next();!L.done;L=p.next()){var w=L.value;(!Nr(v,w)||Nr(r.exitSet,w)||w.parent&&y.has(w.parent))&&y.add(w)}}catch(O){l={error:O}}finally{try{L&&!L.done&&(c=p.return)&&c.call(p)}finally{if(l)throw l.error}}try{for(var g=me(v),b=g.next();!b.done;b=g.next()){var w=b.value;(!Nr(e,w)||Nr(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(O){f={error:O}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(f)throw f.error}}r.exitSet.sort(function(O,P){return P.order-O.order});var _=Array.from(y).sort(function(O,P){return O.order-P.order}),E=new Set(r.exitSet),m=He(_.map(function(O){var P=[];if(O.type!=="final")return P;var j=O.parent;if(!j.parent)return P;P.push(xi(O.id,O.doneData),xi(j.id,O.doneData?go(O.doneData,i,o):void 0));var B=j.parent;return B.type==="parallel"&&si(B).every(function($){return Xi(r.configuration,$)})&&P.push(xi(B.id)),P})),S=_.map(function(O){var P=O.onEntry,j=O.activities.map(function(B){return w0(B)});return{type:"entry",actions:hn(a?Ue(Ue([],_e(P),!1),_e(j),!1):Ue(Ue([],_e(j),!1),_e(P),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:m.map(function(O){return p0(O)})}),C=Array.from(E).map(function(O){return{type:"exit",actions:hn(Ue(Ue([],_e(O.onExit),!1),_e(O.activities.map(function(P){return S0(P)})),!1),h.machine.options.actions)}}),R=C.concat({type:"transition",actions:hn(r.actions,this.machine.options.actions)}).concat(S);if(n){var M=hn(He(Ue([],_e(e),!1).sort(function(O,P){return P.order-O.order}).map(function(O){return O.onExit})),this.machine.options.actions).filter(function(O){return!Hs(O)});return R.concat({type:"stop",actions:M})}return R},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=ot(n),s;if(e instanceof Et)s=r===void 0?e:this.resolveState(Et.from(e,r));else{var a=Pe(e)?this.resolve(po(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(Et.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!s0(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var c=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=jr([],this.getStateNodes(s.value)),d=c.configuration.length?jr(f,c.configuration):f;return c.configuration=Ue([],_e(d),!1),this.resolveTransition(c,s,s.context,i,o)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var o,s=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,Ue([],_e(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=er);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],y=Xi(v,this),p=h?P0(this.machine,d):void 0,L=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,w=this.getActions(new Set(v),y,e,r,o,n,i),g=n?H({},n.activities):{};try{for(var b=me(w),_=b.next();!_.done;_=b.next()){var E=_.value;try{for(var m=(l=void 0,me(E.actions)),S=m.next();!S.done;S=m.next()){var C=S.value;C.type===Vs?g[C.activity.id||C.activity.type]=C:C.type===Ca&&(g[C.activity.id||C.activity.type]=!1)}}catch(V){l={error:V}}finally{try{S&&!S.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}}}catch(V){s={error:V}}finally{try{_&&!_.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}var R=_e(vo(this,n,r,o,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=R[0],O=R[1],P=_e(l0(M,Hs),2),j=P[0],B=P[1],$=M.filter(function(V){var W;return V.type===Vs&&((W=V.activity)===null||W===void 0?void 0:W.type)===Fs}),G=$.reduce(function(V,W){return V[W.activity.id]=_0(W.activity,f.machine,O,o),V},n?H({},n.children):{}),z=new Et({value:p||n.value,context:O,_event:o,_sessionid:n?n._sessionid:null,historyValue:p?L?c0(L,p):void 0:n?n.historyValue:void 0,history:!p||e.source?n:void 0,actions:p?B:[],activities:p?g:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:G,done:y,tags:uc(v),machine:this}),Z=r!==O;z.changed=o.name===Rf||Z;var A=z.history;A&&delete A.history;var T=!y&&(this._transient||d.some(function(V){return V._transient}));if(!h&&(!T||o.name===_i))return z;var k=z;if(!y)for(T&&(k=this.resolveRaisedTransition(k,{type:Yy},o,i));j.length;){var D=j.shift();k=this.resolveRaisedTransition(k,D._event,o,i)}var U=k.changed||(A?!!k.actions.length||Z||typeof A.value!=typeof k.value||!Hf(k.value,A.value):void 0);return k.changed=U,k.history=A,k},t.prototype.getStateNode=function(e){if(Zn(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Zn(e)?e.slice(Ws.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Zn(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=$s(e,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||Gn;switch(this.type){case"parallel":return Dr(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):Gn});case"compound":if(Pe(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?Dr(e,function(o,s){return o?r.getStateNode(s).resolve(o):Gn}):this.initialStateValue||{};default:return e||Gn}},t.prototype.getResolvedPath=function(e){if(Zn(e)){var n=this.machine.idMap[e.slice(Ws.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return $s(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=sc(this.states,function(r){return r.initialStateValue||Gn},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=mo(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;Pe(n.target)?e=Zn(n.target)?po(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(mo(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ki(this.initialStateValue);return He(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=_e(e),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:sc(this.states,function(n,r){if(!e)return n.historyValue();var i=Pe(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?He(Ki(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=o0(r.path,"states")(e).current;return Pe(o)?[r.getStateNode(o)]:He(Ki(o).map(function(s){return n.history==="deep"?r.getFromRelativePath(s):[r.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=He(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,i;if(this.__cache.events)return this.__cache.events;var o=this.states,s=new Set(this.ownEvents);if(o)try{for(var a=me(Object.keys(o)),l=a.next();!l.done;l=a.next()){var c=l.value,f=o[c];if(f.states)try{for(var d=(r=void 0,me(f.events)),h=d.next();!h.done;h=d.next()){var v=h.value;s.add("".concat(v))}}catch(y){r={error:y}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(y){e={error:y}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!Pe(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=i?n.key+r:r;if(n.parent)try{var s=n.parent.getStateNodeByPath(o);return s}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
95
|
+
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=h0(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Pe(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=H(H({},e),{actions:hn(Pt(e.actions)),cond:jf(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return H(H({},a),{target:a.target?a.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return a},t.prototype.formatTransitions=function(){var e,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var o=this.config.on,s=ss,a=o[s],l=a===void 0?[]:a,c=xa(o,[typeof s=="symbol"?s:s+""]);i=He(Object.keys(c).map(function(g){var b=Hn(g,c[g]);return b}).concat(Hn(ss,l)))}var f=this.config.always?Hn("",this.config.always):[],d=this.config.onDone?Hn(String(xi(this.id)),this.config.onDone):[],h=He(this.invoke.map(function(g){var b=[];return g.onDone&&b.push.apply(b,Ue([],_e(Hn(String(Yi(g.id)),g.onDone)),!1)),g.onError&&b.push.apply(b,Ue([],_e(Hn(String(Ir(g.id)),g.onError)),!1)),b})),v=this.after,y=He(Ue(Ue(Ue(Ue([],_e(d),!1),_e(h),!1),_e(i),!1),_e(f),!1).map(function(g){return Pt(g).map(function(b){return r.formatTransition(b)})}));try{for(var p=me(v),L=p.next();!L.done;L=p.next()){var w=L.value;y.push(w)}}catch(g){e={error:g}}finally{try{L&&!L.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}return y},t}();function G0(t,e,n){return n===void 0&&(n=t.context),new H0(t,e,n)}var Z0=E0,qs;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(qs||(qs={}));var $r=u.useLayoutEffect;function dc(t){var e=ce.useRef();return e.current||(e.current={v:t()}),e.current.v}var W0=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},q0=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function K0(t,e){var n,r,i=W0([[],[]],2),o=i[0],s=i[1];try{for(var a=q0(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}var kr=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},hc=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function pc(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function J0(t){var e=u.useRef([]),n=u.useRef([]);$r(function(){var r=t.subscribe(function(i){var o,s;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),l=kr(K0(a,function(d){return d.exec.__effect===qs.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,hc([],kr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,hc([],kr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),$r(function(){for(;n.current.length;){var r=kr(n.current.shift(),2),i=r[0],o=r[1];pc(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=kr(e.current.shift(),2),i=r[0],o=r[1];pc(i,o)}})}var Hr=function(){return Hr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Hr.apply(this,arguments)},Y0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function X0(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function Q0(t,e,n){e===void 0&&(e={});var r=dc(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,c=e.delays,f=e.state,d=Y0(e,["context","guards","actions","activities","services","delays","state"]),h=dc(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},y=r.withConfig(v,function(){return Hr(Hr({},r.context),i)});return Gf(y,Hr({deferEvents:!0},d))});return $r(function(){var v;return n&&(v=h.subscribe(X0(n))),function(){v==null||v.unsubscribe()}},[n]),$r(function(){return h.start(f?Et.create(f):void 0),function(){h.stop()}},[]),$r(function(){Object.assign(h.machine.options.actions,s),Object.assign(h.machine.options.guards,o),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,l),Object.assign(h.machine.options.delays,c)},[s,o,a,l,c]),J0(h),h}var eb=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};function tb(t,e){e===void 0&&(e={});var n=u.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=Q0(t,e,n),i=eb(u.useState(function(){var a=r.machine.initialState;return e.state?Et.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ge.apply(this,arguments)}function tr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const he={arr:Array.isArray,obj:t=>Object.prototype.toString.call(t)==="[object Object]",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0,nul:t=>t===null,set:t=>t instanceof Set,map:t=>t instanceof Map,equ(t,e){if(typeof t!=typeof e)return!1;if(he.str(t)||he.num(t))return t===e;if(he.obj(t)&&he.obj(e)&&Object.keys(t).length+Object.keys(e).length===0)return!0;let n;for(n in t)if(!(n in e))return!1;for(n in e)if(t[n]!==e[n])return!1;return he.und(n)?t===e:!0}};function nb(t,e){return e===void 0&&(e=!0),n=>(he.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const o=e?i[0].toLowerCase()+i.substring(1):i;return r[o]=t(o),r},t)}function rb(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function On(t,e){return he.und(t)||he.nul(t)?e:t}function Oi(t){return he.und(t)?[]:he.arr(t)?t:[t]}function Qn(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return he.fun(t)?t(...n):t}function ib(t){return t.to,t.from,t.config,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.delay,t.attach,t.destroyed,t.interpolateTo,t.ref,t.lazy,tr(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function as(t){const e=ib(t);if(he.und(e))return Ge({to:e},t);const n=Object.keys(t).reduce((r,i)=>he.und(e[i])?Ge({},r,{[i]:t[i]}):r,{});return Ge({to:e},n)}function ob(t,e){return e&&(he.fun(e)?e(t):he.obj(e)&&(e.current=t)),t}class Tt{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){this.children.length===0&&this.attach(),this.children.push(e)}removeChild(e){const n=this.children.indexOf(e);this.children.splice(n,1),this.children.length===0&&this.detach()}}class Ks extends Tt{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof Tt&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof Tt&&e.removeChild(this))}}class Zf extends Tt{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof Tt&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof Tt&&e.removeChild(this))}getValue(e){e===void 0&&(e=!1);const n={};for(const r in this.payload){const i=this.payload[r];e&&!(i instanceof Tt)||(n[r]=i instanceof Tt?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let Pa;function sb(t,e){Pa={fn:t,transform:e}}let Wf;function ab(t){Wf=t}let qf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,yo;function lb(t){yo=t}let Kf=()=>Date.now(),cb=t=>t.current,Jf;function ub(t){Jf=t}class fb extends Zf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?Ge({},e,{style:Jf(e.style)}):e,this.update=n,this.attach()}}const db=t=>he.fun(t)&&!(t.prototype instanceof u.Component),hb=t=>u.forwardRef((n,r)=>{const i=rb(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(h=>{const v=s.current,y=()=>{let p=!1;a.current&&(p=Pa.fn(a.current,s.current.getAnimatedValue())),(!a.current||p===!1)&&i()};s.current=new fb(h,y),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>cb(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=tr(c,["scrollTop","scrollLeft"]),d=db(t)?void 0:h=>a.current=ob(h,r);return u.createElement(t,Ge({},f,{ref:d}))});let Gr=!1;const Dn=new Set,Yf=()=>{if(!Gr)return!1;let t=Kf();for(let e of Dn){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],o,s;for(let a=0;a<i.animatedValues.length;a++){let l=i.animatedValues[a];if(l.done)continue;let c=i.fromValues[a],f=i.toValues[a],d=l.lastPosition,h=f instanceof Tt,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(h&&(f=f.getValue()),i.immediate){l.setValue(f),l.done=!0;continue}if(typeof c=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=c+i.easing((t-l.startTime)/i.duration)*(f-c),o=t>=l.startTime+i.duration;else if(i.decay)d=c+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-l.startTime))),o=Math.abs(l.lastPosition-d)<.1,o&&(f=d);else{s=l.lastTime!==void 0?l.lastTime:t,v=l.lastVelocity!==void 0?l.lastVelocity:i.initialVelocity,t>s+64&&(s=t);let y=Math.floor(t-s);for(let g=0;g<y;++g){let b=-i.tension*(d-f),_=-i.friction*v,E=(b+_)/i.mass;v=v+E*1/1e3,d=d+v*1/1e3}let p=i.clamp&&i.tension!==0?c<f?d>f:d<f:!1,L=Math.abs(v)<=i.precision,w=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=p||L&&w,l.lastVelocity=v,l.lastTime=t}h&&!i.toValues[a].done&&(o=!1),o?(l.value!==f&&(d=f),l.done=!0):n=!0,l.setValue(d),l.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(Dn.delete(e),e.stop(!0))}return Dn.size?qf(Yf):Gr=!1,Gr},pb=t=>{Dn.has(t)||Dn.add(t),Gr||(Gr=!0,qf(Yf))},gb=t=>{Dn.has(t)&&Dn.delete(t)};function bo(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return bo({range:t,output:e,extrapolate:n});if(yo&&typeof t.output[0]=="string")return yo(t);const r=t,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const f=mb(c,o);return vb(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function vb(t,e,n,r,i,o,s,a,l){let c=l?l(t):t;if(c<e){if(s==="identity")return c;s==="clamp"&&(c=e)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?c=-c:n===1/0?c=c-e:c=(c-e)/(n-e),c=o(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function mb(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class cr extends Ks{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Ks&&!(e instanceof cr)?e.getPayload():Array.isArray(e)?e:[e],this.calc=bo(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=bo(e,n,r)}interpolate(e,n,r){return new cr(this,e,n,r)}}const Wn=(t,e,n)=>t&&new cr(t,e,n),yb={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};function Xf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Xf(n,e))}class Js extends Tt{constructor(e){var n;super(),n=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(r,i){i===void 0&&(i=!0),n.value=r,i&&n.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){this.animatedStyles.size===0&&Xf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new cr(this,e,n,r)}}class bb extends Ks{constructor(e){super(),this.payload=e.map(n=>new Js(n))}setValue(e,n){n===void 0&&(n=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((r,i)=>this.payload[i].setValue(r,n)):this.payload.forEach(r=>r.setValue(e,n))}getValue(){return this.payload.map(e=>e.getValue())}interpolate(e,n){return new cr(this,e,n)}}let wb=0,Sb=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=wb++}update(e){if(!e)return this;const n=as(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=tr(n,["delay","to"]);if(he.arr(o)||he.fun(o))this.queue.push(Ge({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=Ge({to:{[c]:f},delay:Qn(i,c)},s),h=a[d.delay]&&a[d.delay].to;a[d.delay]=Ge({},a[d.delay],d,{to:Ge({},h,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,l)=>a.delay-l.delay),this.diff(s),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let o=i.from,s=o===void 0?{}:o,a=i.to,l=a===void 0?{}:a;he.obj(s)&&(this.merged=Ge({},s,this.merged)),he.obj(l)&&(this.merged=Ge({},this.merged,l))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,o)=>{let s=i.delay,a=tr(i,["delay"]);const l=f=>{o===r.length-1&&n===this.guid&&f&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let c=he.arr(a.to)||he.fun(a.to);s?setTimeout(()=>{n===this.guid&&(c?this.runAsync(a,l):this.diff(a).start(l))},s):c?this.runAsync(a,l):this.diff(a).start(l)})}else he.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),pb(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&gb(this),this}runAsync(e,n){var r=this;e.delay;let i=tr(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(he.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=Ge({},i,as(i.to[l]));he.arr(c.config)&&(c.config=c.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(c).start(f))})}else if(he.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=Ge({},i,as(c));if(he.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(c){return c===void 0&&(c=!0),r.stop(c)}).then(()=>l))}s.then(n)}diff(e){this.props=Ge({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,o=n.to,s=o===void 0?{}:o,a=n.config,l=a===void 0?{}:a,c=n.reverse,f=n.attach,d=n.reset,h=n.immediate;if(c){var v=[s,i];i=v[0],s=v[1]}this.merged=Ge({},i,this.merged,s),this.hasChanged=!1;let y=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((p,L)=>{let w=L[0],g=L[1],b=p[w]||{};const _=he.num(g),E=he.str(g)&&!g.startsWith("#")&&!/\d/.test(g)&&!Wf[g],m=he.arr(g),S=!_&&!m&&!E;let C=he.und(i[w])?g:i[w],R=_||m||E?g:1,M=Qn(l,w);y&&(R=y.animations[w].parent);let O=b.parent,P=b.interpolation,j=Oi(y?R.getPayload():R),B,$=g;S&&($=yo({range:[0,1],output:[g,g]})(1));let G=P&&P.getValue();const Z=!he.und(O)&&b.animatedValues.some(D=>!D.done),A=!he.equ($,G),T=!he.equ($,b.previous),k=!he.equ(M,b.config);if(d||T&&A||k){if(_||E)O=P=b.parent||new Js(C);else if(m)O=P=b.parent||new bb(C);else if(S){let D=b.interpolation&&b.interpolation.calc(b.parent.value);D=D!==void 0&&!d?D:C,b.parent?(O=b.parent,O.setValue(0,!1)):O=new Js(0);const U={output:[D,g]};b.interpolation?(P=b.interpolation,b.interpolation.updateConfig(U)):P=O.interpolate(U)}return j=Oi(y?R.getPayload():R),B=Oi(O.getPayload()),d&&!S&&O.setValue(C,!1),this.hasChanged=!0,B.forEach(D=>{D.startPosition=D.value,D.lastPosition=D.value,D.lastVelocity=Z?D.lastVelocity:void 0,D.lastTime=Z?D.lastTime:void 0,D.startTime=Kf(),D.done=!1,D.animatedStyles.clear()}),Qn(h,w)&&O.setValue(S?R:g,!1),Ge({},p,{[w]:Ge({},b,{name:w,parent:O,interpolation:P,animatedValues:B,toValues:j,previous:$,config:M,fromValues:Oi(O.getValue()),immediate:Qn(h,w),initialVelocity:On(M.velocity,0),clamp:On(M.clamp,!1),precision:On(M.precision,.01),tension:On(M.tension,170),friction:On(M.friction,26),mass:On(M.mass,1),duration:M.duration,easing:On(M.easing,D=>D),decay:M.decay})})}else return A?p:(S&&(O.setValue(1,!1),P.updateConfig({output:[$,$]})),O.done=!0,this.hasChanged=!0,Ge({},p,{[w]:Ge({},p[w],{previous:$})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let p in this.animations)this.interpolations[p]=this.animations[p].interpolation,this.values[p]=this.animations[p].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Lb=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=he.fun(e),o=u.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let f;return[new Array(t).fill().map((d,h)=>{const v=new Sb,y=i?Qn(e,h,v):e[h];return h===0&&(f=y.ref),v.update(y),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,u.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(f=>new Promise(d=>f.start(d)))),stop:f=>r.current.forEach(d=>d.stop(f)),get controllers(){return r.current}}));const l=u.useMemo(()=>f=>r.current.map((d,h)=>{d.update(i?Qn(f,h,d):f[h]),a||d.start()}),[t]);u.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),u.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const c=r.current.map(f=>f.getValues());return i?[c,l,f=>r.current.forEach(d=>d.pause(f))]:c},Eb=t=>{const e=he.fun(t),n=Lb(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class xb extends Zf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof Tt)&&(e=Pa.transform(e)),this.payload=e}}const wo={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},At="[-+]?\\d*\\.?\\d+",So=At+"%";function Uo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Cb=new RegExp("rgb"+Uo(At,At,At)),_b=new RegExp("rgba"+Uo(At,At,At,At)),Ob=new RegExp("hsl"+Uo(At,So,So)),Mb=new RegExp("hsla"+Uo(At,So,So,At)),kb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Pb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Rb=/^#([0-9a-fA-F]{6})$/,Tb=/^#([0-9a-fA-F]{8})$/;function Ab(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=Rb.exec(t))?parseInt(e[1]+"ff",16)>>>0:wo.hasOwnProperty(t)?wo[t]:(e=Cb.exec(t))?(qn(e[1])<<24|qn(e[2])<<16|qn(e[3])<<8|255)>>>0:(e=_b.exec(t))?(qn(e[1])<<24|qn(e[2])<<16|qn(e[3])<<8|mc(e[4]))>>>0:(e=kb.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=Tb.exec(t))?parseInt(e[1],16)>>>0:(e=Pb.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Ob.exec(t))?(gc(vc(e[1]),Mi(e[2]),Mi(e[3]))|255)>>>0:(e=Mb.exec(t))?(gc(vc(e[1]),Mi(e[2]),Mi(e[3]))|mc(e[4]))>>>0:null}function ls(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function gc(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=ls(i,r,t+1/3),s=ls(i,r,t),a=ls(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function qn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function vc(t){return(parseFloat(t)%360+360)%360/360}function mc(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Mi(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function yc(t){let e=Ab(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,o=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}const ki=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Db=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ib=new RegExp(`(${Object.keys(wo).join("|")})`,"g"),jb=t=>{const e=t.output.map(i=>i.replace(Db,yc)).map(i=>i.replace(Ib,yc)),n=e[0].match(ki).map(()=>[]);e.forEach(i=>{i.match(ki).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(ki).map((i,o)=>bo(Ge({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(ki,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,c,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(c)}, ${f})`)}};let Zr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const Nb=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),Bb=["Webkit","Ms","Moz","O"];Zr=Object.keys(Zr).reduce((t,e)=>(Bb.forEach(n=>t[Nb(n,e)]=t[e]),t),Zr);function Ub(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Zr.hasOwnProperty(t)&&Zr[t])?e+"px":(""+e).trim()}const bc={};ub(t=>new xb(t));lb(jb);ab(wo);sb((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=tr(e,["style","children","scrollTop","scrollLeft"]),c=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";s!==void 0&&(t.scrollTop=s),a!==void 0&&(t.scrollLeft=a),o!==void 0&&(t.textContent=o);for(let f in i)if(i.hasOwnProperty(f)){var n=f.indexOf("--")===0,r=Ub(f,i[f],n);f==="float"&&(f="cssFloat"),n?t.style.setProperty(f,r):t.style[f]=r}for(let f in l){const d=c?f:bc[f]||(bc[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,l[f])}return}else return!1},t=>t);const Vb=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Fb=nb(hb,!1),zb=Fb(Vb);function wc(t,e){return t.map(function(n,r){return n+e[r]})}function Qf(t,e){return t.map(function(n,r){return n-e[r]})}function Ys(t){return Math.hypot.apply(Math,t)}function $b(t,e,n){var r=Ys(e),i=r===0?0:1/r,o=n===0?0:1/n,s=o*r,a=e.map(function(f){return o*f}),l=e.map(function(f){return i*f}),c=Ys(t);return{velocities:a,velocity:s,distance:c,direction:l}}function Xs(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function Hb(t,e,n){return Math.max(e,Math.min(t,n))}function Gb(t,e){return Math.pow(t,e*5)}function Sc(t,e,n){return e===0||Math.abs(e)===1/0?Gb(t,n):t*e*n/(e+n*t)}function Wr(t,e,n,r){return r===void 0&&(r=.15),r===0?Hb(t,e,n):t<e?-Sc(e-t,n-e,r)+e:t>n?+Sc(t-n,n-e,r)+n:t}function Lc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zb(t,e,n){return e&&Lc(t.prototype,e),n&&Lc(t,n),t}function dt(){return dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dt.apply(this,arguments)}function ed(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Wb(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Pi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qb(t,e){if(t){if(typeof t=="string")return Ec(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ec(t,e)}}function Ec(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vo(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=qb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function td(){}function nd(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?td:e.length===1?e[0]:function(){for(var r,i=Vo(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function pn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function Ri(t){if(typeof t=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(void 0,n)}else return t}function Ra(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(typeof a){case"function":n[s]=a.call(n,t[s],s,t);break;case"object":n[s]=Ra(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var Kb=180,Jb=.15,Yb=.5,Xb=60,Qb={threshold:function(e){return e===void 0&&(e=0),pn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return pn(Jb);case!1:return pn(0);default:return pn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:pn(e)}},rd=dt({},Qb,{axis:!0,lockDirection:function(e){return e===void 0&&(e=!1),e},bounds:function(e){if(e===void 0&&(e={}),typeof e=="function")return function(d){return rd.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,o=n.right,s=o===void 0?1/0:o,a=n.top,l=a===void 0?-1/0:a,c=n.bottom,f=c===void 0?1/0:c;return[[i,s],[l,f]]}}),ew=typeof window<"u"&&window.document&&window.document.createElement,tw={enabled:function(e){return e===void 0&&(e=!0),e},domTarget:!0,window:function(t){function e(n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return t===void 0&&(t=ew?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,o=n.capture,s=o===void 0?!1:o;return{passive:i,capture:s}}},nw=dt({},rd,{threshold:function(e,n,r){var i=r.filterTaps,o=i===void 0?!1:i,s=r.lockDirection,a=s===void 0?!1:s,l=r.axis,c=l===void 0?void 0:l,f=pn(e,o?3:a||c?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=Yb),pn(e)},swipeDistance:function(e){return e===void 0&&(e=Xb),pn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return Kb;case!1:return 0;default:return e}}});function rw(t){return t===void 0&&(t={}),Ra(t,tw)}function iw(t){return t===void 0&&(t={}),Ra(t,nw)}function ow(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=Wb(t,["domTarget","eventOptions","window","enabled"]),s=rw({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=iw(o),s}function Pr(t){return dt({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:td,canceled:!1,memo:void 0,args:void 0},t)}function id(){var t={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},e=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),n=Pr({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=Pr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:t,drag:e,pinch:n,wheel:r,move:i,scroll:o}}var kn=new Map,sw=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(o,s){var a;s===void 0&&(s=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f<l;f++)c[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(c))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(o){if(o===void 0&&(o=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!o&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var s=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!s,i.state.last=s&&!a,i.controller.state.shared[i.ingKey]=a}var l=dt({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),c=i.handler(l);return i.state.memo=c!==void 0?c:i.state.memo,i.state._active||i.clean(),l}}var e=t.prototype;return e.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},e.updateGestureState=function(r){Object.assign(this.state,r)},e.checkIntentionality=function(r,i){return{_intentional:r,_blocked:!1}},e.getMovement=function(r){var i=this.config,o=i.initial,s=i.bounds,a=i.rubberband,l=i.threshold,c=this.state,f=c._bounds,d=c._initial,h=c._active,v=c._intentional,y=c.lastOffset,p=c.movement,L=this.getInternalMovement(r,this.state),w=v[0]===!1?xc(L[0],l[0]):v[0],g=v[1]===!1?xc(L[1],l[1]):v[1],b=this.checkIntentionality([w,g],L);if(b._blocked)return dt({},b,{_movement:L,delta:[0,0]});var _=b._intentional,E=L,m,S;if(_[0]!==!1&&v[0]===!1&&(S=Ri(o,this.state),m=Ri(s,this.state),d[0]=S[0],f[0]=m[0]),_[1]!==!1&&v[1]===!1){var C,R;S=(C=S)!=null?C:Ri(o,this.state),m=(R=m)!=null?R:Ri(s,this.state),d[1]=S[1],f[1]=m[1]}var M=[_[0]!==!1?L[0]-_[0]:d[0],_[1]!==!1?L[1]-_[1]:d[1]],O=wc(M,y),P=h?a:[0,0];return M=Cc(f,wc(M,d),P),dt({},b,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:E,movement:M,values:r,offset:Cc(f,O,P),delta:Qf(M,p)})},e.clean=function(){this.clearTimeout()},Zb(t,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),t}();function xc(t,e){return Math.abs(t)>=e?Xs(t)*e:!1}function Cc(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],c=a[1],f=t[1],d=f[0],h=f[1];return[Wr(r,l,c,o),Wr(i,d,h,s)]}function cs(t,e,n){var r=t.state,i=t.args,o=e.timeStamp,s=e.type,a=r.values,l=n?0:o-r.startTime;return{_lastEventType:s,event:e,timeStamp:o,elapsedTime:l,args:i,previous:a}}function aw(t,e,n){var r=t.state.offset,i=n.timeStamp;return dt({},id()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function lw(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.call.apply(t,[this,dt({},e,{event:n})].concat(i))}}var cw=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];for(var a=Vo(n.classes),l;!(l=a()).done;){var c=l.value;new c(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var h=d[f],v=h[0],y=h[1];Qs(r,v,lw(y,dt({},n.state.shared,{args:o})))}return n.config.domTarget?hw(n,r):pw(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=sd(n.config),i=n.config.eventOptions;r&&di(r,od(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),uw(n)},this.state=id(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function uw(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var o in i){var s=i[o];di(n,s,r)}t.windowListeners={}}}function fw(t,e){var n=t.config,r=t.windowListeners;n.window&&(di(n.window,r[e],n.eventOptions),delete r[e])}function dw(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(di(r.window,i[e],r.eventOptions),ad(r.window,i[e]=n,r.eventOptions))}function hw(t,e){var n=t.config,r=t.domListeners,i=sd(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;di(i,od(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],c=l[0],f=l[1],d=c.slice(2).toLowerCase();r.push([d,nd.apply(void 0,f)])}ad(i,r,o)}function pw(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,s=Object.entries(e);o<s.length;o++){var a=s[o],l=a[0],c=a[1],f=Array.isArray(c)?c:[c],d=l+i;r[d]=nd.apply(void 0,f)}return r}function od(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function sd(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Qs(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function ad(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Vo(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function di(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Vo(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function gw(t,e,n){n===void 0&&(n={});var r=mw(t),i=u.useMemo(function(){return new cw(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?vw:i.bind}function vw(){}function mw(t){var e=new Set;return t.drag&&e.add(kn.get("drag")),t.wheel&&e.add(kn.get("wheel")),t.scroll&&e.add(kn.get("scroll")),t.move&&e.add(kn.get("move")),t.pinch&&e.add(kn.get("pinch")),t.hover&&e.add(kn.get("hover")),e}var yw=function(t){ed(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return Qf(i,o.initial)},n.checkIntentionality=function(i,o){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var s=o.map(Math.abs),a=s[0],l=s[1],c=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:c}:c?this.config.axis&&c!==this.config.axis?{_intentional:i,_blocked:!0,axis:c}:(i[c==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:c}):{_intentional:[!1,!1],_blocked:!1,axis:c}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,$b(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(sw);function ld(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function _c(t){var e="buttons"in t?t.buttons:0,n=ld(t),r=n&&n.length||0,i=r>0||e>0,o=t.shiftKey,s=t.altKey,a=t.metaKey,l=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:o,altKey:s,metaKey:a,ctrlKey:l}}function Oc(t){var e=ld(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var bw=3,ww=220,Sw=function(t){ed(e,t);function e(){var r;return r=t.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.onDragStart=function(i){!r.enabled||r.state._active||(dw(r.controller,r.stateKey,[["pointermove",r.onDragChange],["pointerup",r.onDragEnd],["pointercancel",r.onDragEnd]]),r.updateGestureState({_pointerId:i.pointerId}),r.config.delay>0?(r.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),r.setTimeout(r.startDrag.bind(Pi(r)),r.config.delay,i)):r.startDrag(i))},r.onDragChange=function(i){if(!r.state.canceled&&i.pointerId===r.state._pointerId){if(!r.state._active){r.state._delayedEvent&&(r.clearTimeout(),r.startDrag(i));return}var o=_c(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Oc(i),a=r.getKinematics(s,i),l=cs(Pi(r),i),c=r.state._isTap,f=Ys(a._movement);c&&f>=bw&&(c=!1),r.updateGestureState(dt({},l,a,{_isTap:c})),r.fireGestureHandler()}},r.onDragEnd=function(i){if(i.pointerId===r.state._pointerId){r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0});var o=r.state._isTap,s=r.state.velocities,a=s[0],l=s[1],c=r.state.movement,f=c[0],d=c[1],h=r.state._intentional,v=h[0],y=h[1],p=r.config.swipeVelocity,L=p[0],w=p[1],g=r.config.swipeDistance,b=g[0],_=g[1],E=dt({},cs(Pi(r),i),r.getMovement(r.state.values)),m=[0,0];E.elapsedTime<ww&&(v!==!1&&Math.abs(a)>L&&Math.abs(f)>b&&(m[0]=Xs(a)),y!==!1&&Math.abs(l)>w&&Math.abs(d)>_&&(m[1]=Xs(l))),r.updateGestureState(dt({},E,{tap:o,swipe:m})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(Pi(r)),r.state._delayedEvent=!1,fw(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0}),r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return r.fireGestureHandler()}))},r.onClick=function(i){r.state._isTap||i.stopPropagation()},r}var n=e.prototype;return n.startDrag=function(i){var o=Oc(i);this.updateSharedState(_c(i)),this.updateGestureState(dt({},aw(this,o,i),cs(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Qs(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Qs(i,o,this.onClick)}},e}(yw);function Lw(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Qi(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Qi(t[r],e[r]))return!1;return!0}var o;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=t.entries();!(r=o.next()).done;)if(!Qi(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!(i[r]==="_owner"&&t.$$typeof)&&!Qi(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function Ew(t,e){try{return Qi(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function xw(t,e){e===void 0&&(e={}),kn.set("drag",Sw);var n=u.useRef();return n.current||(n.current=Lw(ow,Ew)),gw({drag:t},n.current(e))}/*!
|
|
97
97
|
* tabbable 5.3.3
|
|
98
98
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
99
|
-
*/var cd=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Lo=cd.join(","),ud=typeof Element>"u",Nn=ud?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,
|
|
99
|
+
*/var cd=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Lo=cd.join(","),ud=typeof Element>"u",Nn=ud?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ea=!ud&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},fd=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(Lo));return n&&Nn.call(e,Lo)&&i.unshift(e),i=i.filter(r),i},dd=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scope:s,candidates:c})}else{var f=Nn.call(s,Lo);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&h){var v=t(d===!0?s.children:d.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scope:s,candidates:v})}else o.unshift.apply(o,s.children)}}return i},hd=function(e,n){return e.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},Cw=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},pd=function(e){return e.tagName==="INPUT"},_w=function(e){return pd(e)&&e.type==="hidden"},Ow=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Mw=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},kw=function(e){if(!e.name)return!0;var n=e.form||ea(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=Mw(i,e.form);return!o||o===e},Pw=function(e){return pd(e)&&e.type==="radio"},Rw=function(e){return Pw(e)&&!kw(e)},Mc=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Tw=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Nn.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(Nn.call(s,"details:not([open]) *"))return!0;var a=ea(e).host,l=(a==null?void 0:a.ownerDocument.contains(a))||e.ownerDocument.contains(e);if(!r||r==="full"){if(typeof i=="function"){for(var c=e;e;){var f=e.parentElement,d=ea(e);if(f&&!f.shadowRoot&&i(f)===!0)return Mc(e);e.assignedSlot?e=e.assignedSlot:!f&&d!==e.ownerDocument?e=d.host:e=f}e=c}if(l)return!e.getClientRects().length}else if(r==="non-zero-area")return Mc(e);return!1},Aw=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Nn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},Eo=function(e,n){return!(n.disabled||_w(n)||Tw(n,e)||Ow(n)||Aw(n))},ta=function(e,n){return!(Rw(n)||hd(n)<0||!Eo(e,n))},Dw=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Iw=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=hd(a,s),c=s?t(i.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:i,isScope:s,content:c})}),r.sort(Cw).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},jw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=dd([e],n.includeContainer,{filter:ta.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Dw}):r=fd(e,n.includeContainer,ta.bind(null,n)),Iw(r)},Nw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=dd([e],n.includeContainer,{filter:Eo.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=fd(e,n.includeContainer,Eo.bind(null,n)),r},Ti=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Nn.call(e,Lo)===!1?!1:ta(n,e)},Bw=cd.concat("iframe").join(","),us=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Nn.call(e,Bw)===!1?!1:Eo(n,e)};/*!
|
|
100
100
|
* focus-trap 6.9.4
|
|
101
101
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
102
|
-
*/function Pc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Rc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pc(Object(n),!0).forEach(function(r){Uw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Uw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tc=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),Vw=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Fw=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},zw=function(e){return e.key==="Tab"||e.keyCode===9},Ac=function(e){return setTimeout(e,0)},Dc=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},Rr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},Ai=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},$w=function(e,n){var r=(n==null?void 0:n.document)||document,i=Rc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(g,S,C){return g&&g[S]!==void 0?g[S]:i[C||S]},l=function(g){return o.containerGroups.findIndex(function(S){var C=S.container,P=S.tabbableNodes;return C.contains(g)||P.find(function(M){return M===g})})},c=function(g){var S=i[g];if(typeof S=="function"){for(var C=arguments.length,P=new Array(C>1?C-1:0),M=1;M<C;M++)P[M-1]=arguments[M];S=S.apply(void 0,P)}if(S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(g,"` was specified but was not a node, or did not return a node"))}var O=S;if(typeof S=="string"&&(O=r.querySelector(S),!O))throw new Error("`".concat(g,"` as selector refers to no known node"));return O},f=function(){var g=c("initialFocus");if(g===!1)return!1;if(g===void 0)if(l(r.activeElement)>=0)g=r.activeElement;else{var S=o.tabbableGroups[0],C=S&&S.firstTabbableNode;g=C||c("fallbackFocus")}if(!g)throw new Error("Your focus-trap needs to have at least one focusable element");return g},d=function(){if(o.containerGroups=o.containers.map(function(g){var S=jw(g,i.tabbableOptions),C=Nw(g,i.tabbableOptions);return{container:g,tabbableNodes:S,focusableNodes:C,firstTabbableNode:S.length>0?S[0]:null,lastTabbableNode:S.length>0?S[S.length-1]:null,nextTabbableNode:function(M){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=C.findIndex(function(j){return j===M});if(!(k<0))return O?C.slice(k+1).find(function(j){return Ti(j,i.tabbableOptions)}):C.slice(0,k).reverse().find(function(j){return Ti(j,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(g){return g.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},h=function E(g){if(g!==!1&&g!==r.activeElement){if(!g||!g.focus){E(f());return}g.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=g,Vw(g)&&g.select()}},v=function(g){var S=c("setReturnFocus",g);return S||(S===!1?!1:g)},y=function(g){var S=Ai(g);if(!(l(S)>=0)){if(Rr(i.clickOutsideDeactivates,g)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!us(S,i.tabbableOptions)});return}Rr(i.allowOutsideClick,g)||g.preventDefault()}},p=function(g){var S=Ai(g),C=l(S)>=0;C||S instanceof Document?C&&(o.mostRecentlyFocusedNode=S):(g.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},L=function(g){var S=Ai(g);d();var C=null;if(o.tabbableGroups.length>0){var P=l(S),M=P>=0?o.containerGroups[P]:void 0;if(P<0)g.shiftKey?C=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:C=o.tabbableGroups[0].firstTabbableNode;else if(g.shiftKey){var O=Dc(o.tabbableGroups,function(z){var Z=z.firstTabbableNode;return S===Z});if(O<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S,!1))&&(O=P),O>=0){var k=O===0?o.tabbableGroups.length-1:O-1,j=o.tabbableGroups[k];C=j.lastTabbableNode}}else{var U=Dc(o.tabbableGroups,function(z){var Z=z.lastTabbableNode;return S===Z});if(U<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S))&&(U=P),U>=0){var $=U===o.tabbableGroups.length-1?0:U+1,G=o.tabbableGroups[$];C=G.firstTabbableNode}}}else C=c("fallbackFocus");C&&(g.preventDefault(),h(C))},w=function(g){if(Fw(g)&&Rr(i.escapeDeactivates,g)!==!1){g.preventDefault(),s.deactivate();return}if(zw(g)){L(g);return}},m=function(g){var S=Ai(g);l(S)>=0||Rr(i.clickOutsideDeactivates,g)||Rr(i.allowOutsideClick,g)||(g.preventDefault(),g.stopImmediatePropagation())},b=function(){if(o.active)return Tc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?Ac(function(){h(f())}):h(f()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",m,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",m,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(g){if(o.active)return this;var S=a(g,"onActivate"),C=a(g,"onPostActivate"),P=a(g,"checkCanFocusTrap");P||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,S&&S();var M=function(){P&&d(),b(),C&&C()};return P?(P(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(g){if(!o.active)return this;var S=Rc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},g);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,Tc.deactivateTrap(s);var C=a(S,"onDeactivate"),P=a(S,"onPostDeactivate"),M=a(S,"checkCanReturnFocus"),O=a(S,"returnFocus","returnFocusOnDeactivate");C&&C();var k=function(){Ac(function(){O&&h(v(o.nodeFocusedBeforeActivation)),P&&P()})};return O&&M?(M(v(o.nodeFocusedBeforeActivation)).then(k,k),this):(k(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,_(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),b(),this)},updateContainerElements:function(g){var S=[].concat(g).filter(Boolean);return o.containers=S.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.active&&d(),this}},s.updateContainerElements(e),s};function Hw(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var Aa=!1;if(typeof window<"u"){var Ic={get passive(){Aa=!0}};window.addEventListener("testPassive",null,Ic),window.removeEventListener("testPassive",null,Ic)}var gd=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),vn=[],xo=!1,vd=-1,qr=void 0,Kr=void 0,md=function(e){return vn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},Co=function(e){var n=e||window.event;return md(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},Gw=function(e){if(Kr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Kr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}qr===void 0&&(qr=document.body.style.overflow,document.body.style.overflow="hidden")},Zw=function(){Kr!==void 0&&(document.body.style.paddingRight=Kr,Kr=void 0),qr!==void 0&&(document.body.style.overflow=qr,qr=void 0)},Ww=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},qw=function(e,n){var r=e.targetTouches[0].clientY-vd;return md(e.target)?!1:n&&n.scrollTop===0&&r>0||Ww(n)&&r<0?Co(e):(e.stopPropagation(),!0)},Kw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!vn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};vn=[].concat(Hw(vn),[r]),gd?(e.ontouchstart=function(i){i.targetTouches.length===1&&(vd=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&qw(i,e)},xo||(document.addEventListener("touchmove",Co,Aa?{passive:!1}:void 0),xo=!0)):Gw(n)}},Jw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}vn=vn.filter(function(n){return n.targetElement!==e}),gd?(e.ontouchstart=null,e.ontouchmove=null,xo&&vn.length===0&&(document.removeEventListener("touchmove",Co,Aa?{passive:!1}:void 0),xo=!1)):vn.length||Zw()},In=[],Yw=function(){return In.some(function(t){return t.activeTargets.length>0})},Xw=function(){return In.some(function(t){return t.skippedTargets.length>0})},jc="ResizeObserver loop completed with undelivered notifications.",Qw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:jc}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=jc),window.dispatchEvent(t)},ai;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ai||(ai={}));var jn=function(t){return Object.freeze(t)},eS=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,jn(this)}return t}(),yd=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,jn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Da=function(t){return t instanceof SVGElement&&"getBBox"in t},bd=function(t){if(Da(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},Nc=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},tS=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Jr=typeof window<"u"?window:{},Di=new WeakMap,Bc=/auto|scroll/,nS=/^tb|vertical/,rS=/msie|trident/i.test(Jr.navigator&&Jr.navigator.userAgent),Bt=function(t){return parseFloat(t||"0")},nr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new eS((n?e:t)||0,(n?t:e)||0)},Uc=jn({devicePixelContentBoxSize:nr(),borderBoxSize:nr(),contentBoxSize:nr(),contentRect:new yd(0,0,0,0)}),wd=function(t,e){if(e===void 0&&(e=!1),Di.has(t)&&!e)return Di.get(t);if(bd(t))return Di.set(t,Uc),Uc;var n=getComputedStyle(t),r=Da(t)&&t.ownerSVGElement&&t.getBBox(),i=!rS&&n.boxSizing==="border-box",o=nS.test(n.writingMode||""),s=!r&&Bc.test(n.overflowY||""),a=!r&&Bc.test(n.overflowX||""),l=r?0:Bt(n.paddingTop),c=r?0:Bt(n.paddingRight),f=r?0:Bt(n.paddingBottom),d=r?0:Bt(n.paddingLeft),h=r?0:Bt(n.borderTopWidth),v=r?0:Bt(n.borderRightWidth),y=r?0:Bt(n.borderBottomWidth),p=r?0:Bt(n.borderLeftWidth),L=d+c,w=l+f,m=p+v,b=h+y,_=a?t.offsetHeight-b-t.clientHeight:0,E=s?t.offsetWidth-m-t.clientWidth:0,g=i?L+m:0,S=i?w+b:0,C=r?r.width:Bt(n.width)-g-E,P=r?r.height:Bt(n.height)-S-_,M=C+L+E+m,O=P+w+_+b,k=jn({devicePixelContentBoxSize:nr(Math.round(C*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:nr(M,O,o),contentBoxSize:nr(C,P,o),contentRect:new yd(d,l,C,P)});return Di.set(t,k),k},Sd=function(t,e,n){var r=wd(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case ai.DEVICE_PIXEL_CONTENT_BOX:return s;case ai.BORDER_BOX:return i;default:return o}},iS=function(){function t(e){var n=wd(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=jn([n.borderBoxSize]),this.contentBoxSize=jn([n.contentBoxSize]),this.devicePixelContentBoxSize=jn([n.devicePixelContentBoxSize])}return t}(),Ld=function(t){if(bd(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},oS=function(){var t=1/0,e=[];In.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new iS(c.target),d=Ld(c.target);a.push(f),c.lastReportedSize=Sd(c.target,c.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Vc=function(t){In.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ld(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},sS=function(){var t=0;for(Vc(t);Yw();)t=oS(),Vc(t);return Xw()&&Qw(),t>0},fs,Ed=[],aS=function(){return Ed.splice(0).forEach(function(t){return t()})},lS=function(t){if(!fs){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return aS()}).observe(n,r),fs=function(){n.textContent="".concat(e?e--:e++)}}Ed.push(t),fs()},cS=function(t){lS(function(){requestAnimationFrame(t)})},eo=0,uS=function(){return!!eo},fS=250,dS={attributes:!0,characterData:!0,childList:!0,subtree:!0},Fc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],zc=function(t){return t===void 0&&(t=0),Date.now()+t},ds=!1,hS=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=fS),!ds){ds=!0;var r=zc(e);cS(function(){var i=!1;try{i=sS()}finally{if(ds=!1,e=r-zc(),!uS())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,dS)};document.body?n():Jr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Fc.forEach(function(n){return Jr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Fc.forEach(function(n){return Jr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),ra=new hS,$c=function(t){!eo&&t>0&&ra.start(),eo+=t,!eo&&ra.stop()},pS=function(t){return!Da(t)&&!tS(t)&&getComputedStyle(t).display==="inline"},gS=function(){function t(e,n){this.target=e,this.observedBox=n||ai.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Sd(this.target,this.observedBox,!0);return pS(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),vS=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ii=new WeakMap,Hc=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},ji=function(){function t(){}return t.connect=function(e,n){var r=new vS(e,n);Ii.set(e,r)},t.observe=function(e,n,r){var i=Ii.get(e),o=i.observationTargets.length===0;Hc(i.observationTargets,n)<0&&(o&&In.push(i),i.observationTargets.push(new gS(n,r&&r.box)),$c(1),ra.schedule())},t.unobserve=function(e,n){var r=Ii.get(e),i=Hc(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&In.splice(In.indexOf(r),1),r.observationTargets.splice(i,1),$c(-1))},t.disconnect=function(e){var n=this,r=Ii.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),mS=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ji.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Nc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Nc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.unobserve(this,e)},t.prototype.disconnect=function(){ji.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ut(){return ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ut.apply(this,arguments)}function to(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var Yr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function Tr(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function Ni(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var yS={box:"border-box"};function hs(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=u.useState(0),s=o[0],a=o[1];u.useDebugValue(n+": "+s);var l=u.useCallback(function(c){a(c[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Yr(function(){if(t.current&&r){var c=new mS(l);return c.observe(t.current,yS),function(){c.disconnect()}}},[t,l,r]),r?s:0}function ct(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var Gc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Zc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},bS=G0({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:ut({},Gc,Zc)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:ut({},Gc,Zc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ut({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Z0({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),wS=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],SS=["velocity"],LS=["onRest","config"],xd=yb.default,ES=xd.tension,Bi=xd.friction,xS=u.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,c=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,y=v===void 0?_S:v,p=t.snapPoints,L=p===void 0?OS:p,w=t.blocking,m=w===void 0||w,b=t.scrollLocking,_=b===void 0||b,E=t.style,g=t.onSpringStart,S=t.onSpringCancel,C=t.onSpringEnd,P=t.reserveScrollBarGap,M=P===void 0?m:P,O=t.expandOnContentDrag,k=O!==void 0&&O,j=to(t,wS),U=function(){var F=u.useState(!1),te=F[0],J=F[1],he=u.useState({}),Te=he[0],xe=he[1],Ae=u.useCallback(function(ke){return xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!1,ae))}),function(){xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!0,ae))})}},[]);return u.useEffect(function(){var ke=Object.values(Te);ke.length!==0&&ke.every(Boolean)&&J(!0)},[Te]),{ready:te,registerReady:Ae}}(),$=U.ready,G=U.registerReady,z=u.useRef(!1),Z=u.useRef(g),D=u.useRef(S),R=u.useRef(C);u.useEffect(function(){Z.current=g,D.current=S,R.current=C},[S,g,C]);var A,T,N=Eb(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),V=N[0],W=N[1],I=u.useRef(null),K=u.useRef(null),ee=u.useRef(null),q=u.useRef(null),se=u.useRef(null),de=u.useRef(null),ue=u.useRef(0),Le=u.useRef(),Fe=u.useRef(!1),we=(A=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),T=u.useRef(A==null?void 0:A.matches),u.useDebugValue(T.current?"reduce":"no-preference"),u.useEffect(function(){var F=function(te){T.current=te.matches};return A==null||A.addListener(F),function(){return A==null?void 0:A.removeListener(F)}},[A]),T),Ee=function(F){var te=F.targetRef,J=F.enabled,he=F.reserveScrollBarGap,Te=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(J?"Enabled":"Disabled"),u.useEffect(function(){if(!J)return Te.current.deactivate(),void(Te.current={activate:function(){},deactivate:function(){}});var xe=te.current,Ae=!1;Te.current={activate:function(){Ae||(Ae=!0,Kw(xe,{allowTouchMove:function(ke){return ke.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:he}))},deactivate:function(){Ae&&(Ae=!1,Jw(xe))}}},[J,te,he]),Te}({targetRef:K,enabled:$&&_,reserveScrollBarGap:M}),Ie=function(F){var te=F.targetRef,J=F.enabled,he=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(J?"Enabled":"Disabled"),u.useEffect(function(){if(!J)return he.current.deactivate(),void(he.current={activate:function(){},deactivate:function(){}});var Te=te.current,xe=!1,Ae=[],ke=[];he.current={activate:function(){if(!xe){xe=!0;var Be=Te.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==Be){var ve=ae.getAttribute("aria-hidden");ve!==null&&ve!=="false"||(Ae.push(ve),ke.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){xe&&(xe=!1,ke.forEach(function(Be,ae){var ve=Ae[ae];ve===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",ve)}),Ae=[],ke=[])}}},[te,J]),he}({targetRef:I,enabled:$&&m}),Me=function(F){var te=F.targetRef,J=F.fallbackRef,he=F.initialFocusRef,Te=F.enabled,xe=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Te?"Enabled":"Disabled"),u.useEffect(function(){if(!Te)return xe.current.deactivate(),void(xe.current={activate:function(){},deactivate:function(){}});var Ae=J.current,ke=$w(te.current,{onActivate:void 0,initialFocus:he?function(){return(he==null?void 0:he.current)||Ae}:void 0,fallbackFocus:Ae,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;xe.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(ke.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){Be&&(Be=!1,ke.deactivate())}}},[Te,J,he,te]),xe}({targetRef:I,fallbackRef:de,initialFocusRef:f||void 0,enabled:$&&m&&f!==!1}),Re=function(F){var te=F.getSnapPoints,J=F.heightRef,he=F.lastSnapRef,Te=F.ready,xe=function(Ke){var pt=Ke.contentRef,gt=Ke.controlledMaxHeight,Qe=Ke.footerEnabled,Nt=Ke.footerRef,kt=Ke.headerEnabled,vt=Ke.headerRef,tn=Ke.registerReady,Wt=Ke.resizeSourceRef,vr=u.useMemo(function(){return tn("contentHeight")},[tn]),mr=function(nn,Ln,En){var xn=u.useMemo(function(){return Ln("maxHeight")},[Ln]),Cn=u.useState(function(){return Ni(nn)||typeof window<"u"?window.innerHeight:0}),wr=Cn[0],Sr=Cn[1],rn=wr>0,ne=u.useRef(0);return u.useDebugValue(nn?"controlled":"auto"),u.useEffect(function(){rn&&xn()},[rn,xn]),Yr(function(){if(nn)return Sr(Ni(nn)),void(En.current="maxheightprop");var Ba=function(){ne.current||(ne.current=requestAnimationFrame(function(){Sr(window.innerHeight),En.current="window",ne.current=0}))};return window.addEventListener("resize",Ba),Sr(window.innerHeight),En.current="window",xn(),function(){window.removeEventListener("resize",Ba),cancelAnimationFrame(ne.current)}},[nn,xn,En]),wr}(gt,tn,Wt),Fn=hs(vt,{label:"headerHeight",enabled:kt,resizeSourceRef:Wt}),yr=hs(pt,{label:"contentHeight",enabled:!0,resizeSourceRef:Wt}),zn=hs(Nt,{label:"footerHeight",enabled:Qe,resizeSourceRef:Wt}),Sn=Math.min(mr-Fn-zn,yr)+Fn+zn;u.useDebugValue("minHeight: "+Sn);var br=yr>0;return u.useEffect(function(){br&&vr()},[br,vr]),{maxHeight:mr,minHeight:Sn,headerHeight:Fn,footerHeight:zn}}({contentRef:F.contentRef,controlledMaxHeight:F.controlledMaxHeight,footerEnabled:F.footerEnabled,footerRef:F.footerRef,headerEnabled:F.headerEnabled,headerRef:F.headerRef,registerReady:F.registerReady,resizeSourceRef:F.resizeSourceRef}),Ae=xe.maxHeight,ke=xe.minHeight,Be=xe.headerHeight,ae=xe.footerHeight,ve=function(Ke,pt){var gt=[].concat(Ke).map(Ni).reduce(function(vt,tn){return vt.add(Tr(tn,0,pt)),vt},new Set),Qe=Array.from(gt),Nt=Math.min.apply(Math,Qe);if(Number.isNaN(Nt))throw new TypeError("minSnap is NaN");var kt=Math.max.apply(Math,Qe);if(Number.isNaN(kt))throw new TypeError("maxSnap is NaN");return{snapPoints:Qe,minSnap:Nt,maxSnap:kt}}(Te?te({height:J.current,footerHeight:ae,headerHeight:Be,minHeight:ke,maxHeight:Ae}):[0],Ae),ft=ve.snapPoints,Zt=ve.minSnap,lt=ve.maxSnap;return u.useDebugValue("minSnap: "+Zt+", maxSnap:"+lt),{minSnap:Zt,maxSnap:lt,findSnap:function(Ke){var pt=Ni(typeof Ke=="function"?Ke({footerHeight:ae,headerHeight:Be,height:J.current,minHeight:ke,maxHeight:Ae,snapPoints:ft,lastSnap:he.current}):Ke);return ft.reduce(function(gt,Qe){return Math.abs(Qe-pt)<Math.abs(gt-pt)?Qe:gt},Zt)},maxHeight:Ae}}({contentRef:ee,controlledMaxHeight:h,footerEnabled:!!o,footerRef:se,getSnapPoints:L,headerEnabled:s!==!1,headerRef:q,heightRef:ue,lastSnapRef:c,ready:$,registerReady:G,resizeSourceRef:Le}),re=Re.minSnap,ie=Re.maxSnap,ze=Re.maxHeight,Ye=Re.findSnap,Y=u.useRef(ze),$e=u.useRef(re),Ne=u.useRef(ie),ht=u.useRef(Ye),at=u.useRef(0);Yr(function(){Y.current=ze,Ne.current=ie,$e.current=re,ht.current=Ye,at.current=Ye(y)},[Ye,y,ze,ie,re]);var oe=u.useCallback(function(F){var te=F.onRest,J=F.config,he=(J=J===void 0?{}:J).velocity,Te=he===void 0?1:he,xe=to(J,SS),Ae=to(F,LS);return new Promise(function(ke){return W(ut({},Ae,{config:ut({velocity:Te},xe,{mass:1,tension:ES,friction:Math.max(Bi,Bi+(Bi-Bi*Te))}),onRest:function(){var Be=[].slice.call(arguments);ke.apply(void 0,Be),te==null||te.apply(void 0,Be)}}))})},[W]),wn=tb(bS,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return D.current==null?void 0:D.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(F){return D.current==null?void 0:D.current({type:"SNAP",source:F.snapSource})},[]),onCloseCancel:u.useCallback(function(){return D.current==null?void 0:D.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return D.current==null?void 0:D.current({type:"RESIZE",source:Le.current})},[]),onOpenEnd:u.useCallback(function(){return R.current==null?void 0:R.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(F,te){return R.current==null?void 0:R.current({type:"SNAP",source:F.snapSource})},[]),onResizeEnd:u.useCallback(function(){return R.current==null?void 0:R.current({type:"RESIZE",source:Le.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(F,te){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"SNAP",source:te.payload.source||"custom"}))}catch(J){return Promise.reject(J)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),onSnapEnd:u.useCallback(function(F,te){try{return Promise.resolve(R.current==null?void 0:R.current({type:"SNAP",source:F.snapSource}))}catch(J){return Promise.reject(J)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),renderVisuallyHidden:u.useCallback(function(F,te){try{return Promise.resolve(oe({y:at.current,ready:0,maxHeight:Y.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(J){return Promise.reject(J)}},[oe]),activate:u.useCallback(function(F,te){try{return z.current=!0,Promise.resolve(Promise.all([Ee.current.activate(),Me.current.activate(),Ie.current.activate()])).then(function(){})}catch(J){return Promise.reject(J)}},[Ie,Me,Ee]),deactivate:u.useCallback(function(){try{return Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate(),z.current=!1,Promise.resolve()}catch(F){return Promise.reject(F)}},[Ie,Me,Ee]),openImmediately:u.useCallback(function(){try{return ue.current=at.current,Promise.resolve(oe({y:at.current,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(F){return Promise.reject(F)}},[oe]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(oe({y:0,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){return ue.current=at.current,Promise.resolve(oe({y:at.current,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:at.current,immediate:we.current})).then(function(){})})}catch(F){return Promise.reject(F)}},[oe,we]),snapSmoothly:u.useCallback(function(F,te){try{var J=ht.current(F.y);return ue.current=J,c.current=J,Promise.resolve(oe({y:J,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:$e.current,immediate:we.current,config:{velocity:F.velocity}})).then(function(){})}catch(he){return Promise.reject(he)}},[oe,c,we]),resizeSmoothly:u.useCallback(function(){try{var F=ht.current(ue.current);return ue.current=F,c.current=F,Promise.resolve(oe({y:F,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:$e.current,immediate:Le.current!=="element"||we.current})).then(function(){})}catch(te){return Promise.reject(te)}},[oe,c,we]),closeSmoothly:u.useCallback(function(F,te){try{return oe({minSnap:ue.current,immediate:!0}),ue.current=0,Promise.resolve(oe({y:0,maxHeight:Y.current,maxSnap:Ne.current,immediate:we.current})).then(function(){return Promise.resolve(oe({ready:0,immediate:!0})).then(function(){})})}catch(J){return Promise.reject(J)}},[oe,we])}}),pi=wn[0],Mt=wn[1];u.useEffect(function(){$&&Mt(a?"OPEN":"CLOSE")},[a,Mt,$]),Yr(function(){(ze||ie||re)&&Mt("RESIZE")},[ze,ie,re,Mt]),u.useEffect(function(){return function(){Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate()}},[Ie,Me,Ee]),u.useImperativeHandle(e,function(){return{snapTo:function(F,te){var J=te===void 0?{}:te,he=J.velocity,Te=he===void 0?1:he,xe=J.source,Ae=xe===void 0?"custom":xe;Mt("SNAP",{payload:{y:ht.current(F),velocity:Te,source:Ae}})},get height(){return ue.current}}},[Mt]),u.useEffect(function(){var F=K.current,te=function(he){Fe.current&&he.preventDefault()},J=function(he){F.scrollTop<0&&(requestAnimationFrame(function(){F.style.overflow="hidden",F.scrollTop=0,F.style.removeProperty("overflow")}),he.preventDefault())};return k&&(F.addEventListener("scroll",te),F.addEventListener("touchmove",te),F.addEventListener("touchstart",J)),function(){F.removeEventListener("scroll",te),F.removeEventListener("touchmove",te),F.removeEventListener("touchstart",J)}},[k,K]);var Gt=xw(function(F){var te=F.args,J=(te=te===void 0?[]:te)[0],he=(J=J===void 0?{}:J).closeOnTap,Te=he!==void 0&&he,xe=J.isContentDragging,Ae=xe!==void 0&&xe,ke=F.cancel,Be=F.direction[1],ae=F.down,ve=F.first,ft=F.last,Zt=F.memo,lt=Zt===void 0?V.y.getValue():Zt,Ke=F.tap,pt=F.velocity,gt=-1*F.movement[1];if(!z.current)return ke(),lt;if(d&&Te&&Ke)return ke(),setTimeout(function(){return d()},0),lt;if(Ke)return lt;var Qe=lt+gt,Nt=gt*pt,kt=Math.max($e.current,Math.min(Ne.current,Qe+2*Nt));if(!ae&&d&&Be>0&&Qe+Nt<$e.current/2)return ke(),d(),lt;var vt=ae?d||$e.current!==Ne.current?Wr(Qe,d?0:$e.current,Ne.current,.55):Qe<$e.current?Wr(Qe,$e.current,2*Ne.current,.55):Wr(Qe,$e.current/2,Ne.current,.55):kt;return k&&Ae?(vt>=Ne.current&&(vt=Ne.current),lt===Ne.current&&K.current.scrollTop>0&&(vt=Ne.current),Fe.current=vt<Ne.current):Fe.current=!1,ve&&Mt("DRAG"),ft?(Mt("SNAP",{payload:{y:vt,velocity:pt>.05?pt:1,source:"dragging"}}),lt):(W({y:vt,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:$e.current,immediate:!0,config:{velocity:pt}}),lt)},{filterTaps:!0});if(Number.isNaN(Ne.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN($e.current))throw new TypeError("minSnapRef is NaN!!");var gi=function(F){var te,J=F.spring,he=Wn([J.y,J.maxHeight],function(ae,ve){return Math.round(Tr(ve-ae,0,16))+"px"}),Te=Wn([J.y,J.minSnap,J.maxSnap],function(ae,ve,ft){return Tr(ae,ve,ft)+"px"}),xe=Wn([J.y,J.minSnap,J.maxSnap],function(ae,ve,ft){return ae<ve?ve-ae+"px":ae>ft?ft-ae+"px":"0px"}),Ae=Wn([J.y,J.maxSnap],function(ae,ve){return ae>=ve?Math.ceil(ae-ve):0}),ke=Wn([J.y,J.minSnap],function(ae,ve){if(!ve)return 0;var ft=Math.max(ve/2-45,0);return Tr((ae-ft)*(1/(Math.min(ve/2+45,ve)-ft)+0),0,1)}),Be=Wn([J.y,J.minSnap],function(ae,ve){return ve?Tr(ae/ve,0,1):0});return(te={})["--rsbs-content-opacity"]=ke,te["--rsbs-backdrop-opacity"]=Be,te["--rsbs-antigap-scale-y"]=Ae,te["--rsbs-overlay-translate-y"]=xe,te["--rsbs-overlay-rounded"]=he,te["--rsbs-overlay-h"]=Te,te}({spring:V});return u.createElement(zb.div,ut({},j,{"data-rsbs-root":!0,"data-rsbs-state":CS.find(pi.matches),"data-rsbs-is-blocking":m,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:I,style:ut({},gi,E,{opacity:V.ready})}),r,m&&u.createElement("div",ut({key:"backdrop","data-rsbs-backdrop":!0},Gt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:de,onKeyDown:function(F){F.key==="Escape"&&(F.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",ut({key:"header","data-rsbs-header":!0,ref:q},Gt()),s),u.createElement("div",ut({key:"scroll","data-rsbs-scroll":!0,ref:K},k?Gt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:ee},n)),o&&u.createElement("div",ut({key:"footer",ref:se,"data-rsbs-footer":!0},Gt()),o)))}),CS=["closed","opening","open","closing","dragging","snapping","resizing"];function _S(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function OS(t){return t.minHeight}var MS=["onSpringStart","onSpringEnd","skipInitialTransition"],Cd=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=to(t,MS),s=u.useState(!1),a=s[0],l=s[1],c=u.useRef(),f=u.useRef(null),d=u.useRef(i&&o.open?"OPEN":"CLOSED");Yr(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=u.useCallback(function(y){return Promise.resolve(n==null?void 0:n(y)).then(function(){y.type==="OPEN"&&cancelAnimationFrame(c.current)})},[n]),v=u.useCallback(function(y){return Promise.resolve(r==null?void 0:r(y)).then(function(){y.type==="CLOSE"&&(c.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?u.createElement(Jy,{"data-rsbs-portal":!0},u.createElement(xS,ut({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const _d=28,kS="MapGoogle-module__root__Vi-sMl",PS="MapGoogle-module__hideUI__-JYLuR",RS="MapGoogle-module__mapContainer__OCCTIX",TS="MapGoogle-module__balloon__4UVhuT",AS="MapGoogle-module__details__4osNXn",DS="MapGoogle-module__cluster__5qmRds",IS="MapGoogle-module__overlay__g-nEoT",jS="MapGoogle-module__mapControl__mzyTwr",NS="MapGoogle-module__geolocationControl__1exHgA",BS="MapGoogle-module__bottomSheet__avcBmY",US="MapGoogle-module__locationViewContent__xwLeDh",VS="MapGoogle-module__locationViewHeader__maBLv0",FS="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",zS="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",$S="MapGoogle-module__sheetSubmit__rPQG26",Xe={root:kS,hideUI:PS,mapContainer:RS,balloon:TS,details:AS,cluster:DS,overlay:IS,mapControl:jS,geolocationControl:NS,bottomSheet:BS,locationViewContent:US,locationViewHeader:VS,deliveryDetailsViewContent:FS,deliveryDetailsViewHeader:zS,sheetSubmit:$S},Od=({open:t,children:e,hideFooter:n,minSnapHeight:r,submitDisabled:i,submitLoading:o,onSubmitClick:s,...a})=>x.jsx(Cd,{open:t,expandOnContentDrag:!0,initialFocusRef:!1,defaultSnap:({snapPoints:l})=>Math.min(...l),snapPoints:({headerHeight:l,minHeight:c,footerHeight:f,maxHeight:d})=>[r==null?c:l+f+r,d-_d],footer:n?null:x.jsx(Ot,{disabled:i,loading:o,variant:"primary",className:Xe.sheetSubmit,onClick:s,children:x.jsx(An,{keyName:"choose",ns:"common"})}),sibling:x.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),blocking:!1,children:x.jsx("div",{className:Xe.bottomSheet,children:e})}),HS={header:Xe.locationViewHeader,content:Xe.locationViewContent},GS=({point:t,clusterer:e,hideDetails:n,onPointClick:r,selectedPoint:i,setOpenDetails:o,onPointSelected:s})=>{const a=hi("screenSm"),[l,c]=u.useState(null),f=()=>{o==null||o(!1),s==null||s(t)},d=()=>{s==null||s(null)},h=()=>{o==null||o(!0),s==null||s(t)},v=()=>{r==null||r(t),o==null||o(!1),s==null||s(null)},y=(i==null?void 0:i.uid)===t.uid,p=y?Yn:Xt,L=Mf({isSelectedPoint:y}),w=u.useMemo(()=>{let _;switch(!0){case(t.type===30&&!y):{_=xt(Rt.PinLocker,"--owl-color-primary");break}case(t.type!==30&&!y):{_=xt(Rt.PinPvz,"--owl-color-grey-80");break}case(t.type===30&&y):{_=xt(Rt.PinLocker,"--owl-color-success");break}case(t.type!==30&&y):{_=xt(Rt.PinPvz,"--owl-color-black");break}}return mn(_,"Icon url is not defined"),{scaledSize:new google.maps.Size(...p),url:Jt(_)}},[y,p,t.type]),m=u.useMemo(()=>({lat:t.location.latitude,lng:t.location.longitude}),[t.location.latitude,t.location.longitude]),b=y&&L&&!!(l!=null&&l.getVisible());return x.jsxs(tf,{noClustererRedraw:!0,icon:w,position:m,clusterer:e,options:Of,onLoad:c,onClick:f,children:[a&&x.jsx(Od,{minSnapHeight:200,open:b,onDismiss:d,onSubmitClick:v,children:x.jsx(_f,{classes:HS,hideActions:!0,location:t,onClose:d})}),b&&!a&&x.jsx(lf,{onCloseClick:d,children:x.jsx(Cf,{...t,hideDetails:n,className:Xe.balloon,onSubmit:v,onDetails:h})})]},t.uid)},ZS=({points:t,hideDetails:e,selectedPoint:n,onOpenDetails:r,onPointClick:i,onPointSelected:o})=>x.jsx(Sv,{clusterClass:Xe.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.addEventListener("touchstart",Ms,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.removeEventListener("touchstart",Ms)},children:s=>x.jsx(x.Fragment,{children:t.map(a=>x.jsx(GS,{point:a,clusterer:s,hideDetails:e,selectedPoint:n,setOpenDetails:r,onPointClick:i,onPointSelected:o},a.uid))})}),WS=u.memo(ZS),qS=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{locale:r,hideDetails:i}=st(),o=zt(Fu),s=bt(c=>c.location),a=$t(Ju),l=JSON.stringify([o.length,r,a==null?void 0:a.place_id]);return x.jsx(WS,{points:o,hideDetails:i,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},KS=u.memo(qS),Md=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},ce.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),ce.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),ce.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),JS="DeliveryBalloon-module__root__Nu90iy",YS="DeliveryBalloon-module__details__eqUTaI",XS="DeliveryBalloon-module__header__JVdyxN",QS="DeliveryBalloon-module__title__-zKKCt",e1="DeliveryBalloon-module__description__no5-ki",t1="DeliveryBalloon-module__actions__C-N0H-",n1="DeliveryBalloon-module__errorVariant__e6uhZl",r1="DeliveryBalloon-module__logo__62gC5h",ln={root:JS,details:YS,header:XS,title:QS,description:e1,actions:t1,errorVariant:n1,logo:r1},ia=({SSR:t,variant:e,address:n,className:r,hideDetails:i,hasCloseButton:o,onDetails:s,onClose:a})=>{const l=e==="error",c=e==="default",f=t?"{ courier_balloon.title }":x.jsx(An,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":x.jsx(An,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":x.jsx(An,{keyName:"error_description",ns:"courier_balloon"});return x.jsxs("div",{className:be(ln.root,r,ln[`${e}Variant`]),children:[x.jsxs("div",{className:ln.header,children:[x.jsx(Md,{className:ln.logo}),x.jsx("span",{className:ln.title,children:l?d:f}),o&&x.jsx(ui,{onClick:a})]}),x.jsx("div",{className:ln.description,children:l?h:n||"{{ properties.address }}"}),c&&!i&&x.jsx("div",{className:ln.actions,children:x.jsx(Ot,{id:lo,as:"button",variant:"primary",className:ln.details,onClick:s,children:t?"{ details }":x.jsx(An,{keyName:"details",ns:"common"})})})]})},i1="Chip-module__root__zsoSyP",o1="Chip-module__active__BlTSFB",Wc={root:i1,active:o1},qc=({active:t,children:e,className:n,...r})=>x.jsx("div",{...r,className:be(Wc.root,n,{[Wc.active]:t}),children:e}),s1="TextArea-module__root__8YFknR",a1={root:s1},Kc=u.forwardRef(({className:t,inputRef:e,onChange:n,onBlur:r,onFocus:i,...o},s)=>{const a=u.useRef(null);u.useImperativeHandle(s,()=>({focus:()=>{var c,f;(c=a.current)==null||c.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var c,f;(c=a.current)==null||c.blur(),r&&r({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:c=>{n&&n({target:{value:c}}),a.current&&(a.current.value=c)}}),[r,n,i]);const l=jd(e,a);return x.jsx("textarea",{...o,ref:l,className:be(a1.root,t),onBlur:r,onFocus:i,onChange:n})}),l1=({set:t,hideDeliveryTime:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(e||!!i.delivery_time)&&!!i.apartment_number},t==null||t(i),i},c1="DeliveryDetailsView-module__title__azeoUr",u1="DeliveryDetailsView-module__logo__4zZtpM",f1="DeliveryDetailsView-module__header__oDE9He",d1="DeliveryDetailsView-module__content__6P27SY",h1="DeliveryDetailsView-module__section__2M3Qip",p1="DeliveryDetailsView-module__chips__KmYgha",g1="DeliveryDetailsView-module__actions__43XZ-V",v1="DeliveryDetailsView-module__submit__58LKBw",m1="DeliveryDetailsView-module__actionsHidden__SW-67b",y1="DeliveryDetailsView-module__commentSection__GlX1A2",b1="DeliveryDetailsView-module__comment__2pGG6h",mt={title:c1,logo:u1,header:f1,content:d1,section:h1,chips:p1,actions:g1,submit:v1,actionsHidden:m1,commentSection:y1,comment:b1},w1=u.forwardRef(({classes:t,location:e,hideActions:n,onClose:r,onChange:i,onSubmit:o},s)=>{var g;const{inputs:a,locale:l,hideDeliveryTime:c}=st(),{t:f}=jt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>l1({set:i,hideDeliveryTime:c}),[c,i]),[h,v]=u.useState(!1),[y,p]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...e}),L=u.useCallback(async()=>{v(!0);try{mn(e.address,"Address is required");const S=await Yd({address:e.address,algorithm:10,service:10,language:l||lu});if(!Vu(S))return;const C=S==null?void 0:S.data.data,P={...y,address:C};return o==null||o(P),P}finally{v(!1)}},[l,e.address,o,y]);u.useImperativeHandle(s,()=>({submit:L}),[L]);const w=S=>()=>{p({payload:S,type:"SET_DELIVERY_TIME"})},m=S=>{p({payload:S.target.value,type:"SET_APARTMENT_NUMBER"})},b=S=>{p({payload:S.target.value,type:"SET_COMMENT"})},_=_o(a==null?void 0:a.apartment),E=_o(a==null?void 0:a.comment);return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:be(mt.header,t==null?void 0:t.header),children:[x.jsx(ui,{onClick:r}),x.jsxs("div",{className:mt.title,children:[x.jsx(Md,{className:mt.logo}),x.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),x.jsxs("div",{className:be(mt.content,t==null?void 0:t.content),children:[x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("address"),":"]}),x.jsx("p",{children:e.address})]}),!c&&x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("delivery_time"),":"]}),x.jsxs("div",{className:mt.chips,children:[x.jsx(qc,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),x.jsx(qc,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("apartment_number"),":"]}),x.jsx(Kc,{..._,rows:1,onChange:m})]}),x.jsxs("section",{className:be(mt.section,mt.commentSection),children:[x.jsxs("span",{children:[f("comment"),":"]}),x.jsx(Kc,{...E,className:mt.comment,onChange:b})]})]}),x.jsx("div",{className:be(mt.actions,{[mt.actionsHidden]:n}),children:x.jsx(Ot,{loading:h,disabled:!((g=y.meta)!=null&&g.valid)||h,variant:"primary",className:mt.submit,onClick:L,children:f("choose",{ns:"common"})})})]})}),kd=u.memo(w1),S1={header:Xe.deliveryDetailsViewHeader,content:Xe.deliveryDetailsViewContent},L1=({hideDetails:t,hideDeliveryTime:e,point:n,setOpenDetails:r,setDeliveryPoint:i,onPointClick:o})=>{const s=Mf({isSelectedPoint:!0}),a=u.useRef(null),[l,c]=u.useState(!1),[f,d]=u.useState({...n,comment:"",delivery_time:"",apartment_number:""});u.useEffect(()=>{d({...n,comment:"",delivery_time:"",apartment_number:""})},[n]);const[h,v]=u.useState(null),y=hi("screenSm"),p=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),L=()=>{r==null||r(!0)},w=()=>{i==null||i(null)},m=u.useMemo(()=>({url:Jt(xt(Rt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Xt)}),[]),b=async()=>{var S;try{c(!0);const C=await((S=a.current)==null?void 0:S.submit());if(!C)return;o==null||o(C),r==null||r(!1),i==null||i(null)}finally{c(!1)}},_=x.jsx(ia,{...f,hideDetails:t,hasCloseButton:y,variant:f.address?"default":"error",className:Xe.balloon,onDetails:L,onClose:w}),E=s&&!!(h!=null&&h.getVisible()),g=e?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return x.jsxs(tf,{noClustererRedraw:!0,icon:m,position:p,options:Of,onLoad:v,children:[y&&x.jsxs(Od,{minSnapHeight:f.address?200:void 0,submitDisabled:!g||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:w,onSubmitClick:b,children:[f.address&&x.jsx(kd,{ref:a,classes:S1,hideActions:!0,location:n,onChange:d,onClose:w}),!f.address&&_]}),!y&&E&&x.jsx(lf,{onCloseClick:w,children:_})]})},E1=({children:t,className:e,onLoad:n,onIdle:r,onUnmount:i})=>{const{map:o,disableDelivery:s,hideMapUI:a}=st(),l=u.useMemo(()=>{var f,d;return{lat:((f=o==null?void 0:o.center)==null?void 0:f[0])??co[0],lng:((d=o==null?void 0:o.center)==null?void 0:d[1])??co[1]}},[o==null?void 0:o.center]),c=u.useCallback(async f=>{var v;const{latLng:d}=f;if(!d||s)return;ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null);const h=[d.lat(),d.lng()];try{const y=await sr(h),p=(v=y==null?void 0:y.results)==null?void 0:v[0],L=p==null?void 0:p.formatted_address;$t.getState().setPlace(p),mn(L,"Address is not defined"),We.getState().setDeliverPoint({address:L,coords:h})}catch{We.getState().setDeliverPoint({address:null,coords:h})}},[s]);return x.jsx(Yg,{zoom:o==null?void 0:o.initialZoom,center:l,options:Zy,mapContainerClassName:be(Xe.root,e,{[Xe.hideUI]:a}),onLoad:n,onIdle:r,onUnmount:i,onClick:c,children:t})},x1=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),ce.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),ce.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),ce.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),ce.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),C1=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Xe.mapControl),n.classList.add(Xe.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},_1=t=>{const e=document.createElement("div");e.classList.add(Xe.mapControl),e.classList.add(Xe.geolocationControl),e.innerHTML=$i.renderToString(x.jsx(x1,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{pa(async n=>{var a;const{latitude:r,longitude:i}=n.coords,s=await sr([r,i]);$t.getState().setPlace((a=s.results)==null?void 0:a[0])})})},O1=({className:t})=>{const e=Qt(),n=ye(gu),r=ye(jh),i=zt(va),o=We(Po),{hideMapControls:s,hideDetails:a,disableGeolocation:l,hideDeliveryTime:c,onPointClick:f}=st(),d=u.useCallback(p=>{ye.getState().setMap(p),s||(C1(p),l||_1(p))},[l,s]),h=u.useCallback(()=>{ye.getState().setMap(null)},[]),v=u.useCallback(()=>{if(!n)return;const p=n==null?void 0:n.getBounds();p&&zt.getState().loadNext([[p.getSouthWest().lat(),p.getNorthEast().lat()],[p.getSouthWest().lng(),p.getNorthEast().lng()]],e)},[e,n]),y=u.useCallback(async p=>{var m;if(We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(p),!p)return;const L=[p.location.latitude,p.location.longitude],w=await sr(L);$t.getState().setPlace((m=w.results)==null?void 0:m[0])},[]);return x.jsxs("div",{className:be(Xe.mapContainer,t),children:[x.jsxs(E1,{onIdle:v,onLoad:d,onUnmount:h,children:[o&&x.jsx(L1,{hideDeliveryTime:c,hideDetails:a,point:o,onPointClick:f,setOpenDetails:ye.getState().setDetailsOpen,setDeliveryPoint:We.getState().setDeliverPoint}),x.jsx(KS,{onPointClick:f,onOpenDetails:ye.getState().setDetailsOpen,onPointSelected:y})]}),(i||r)&&x.jsx(ba,{className:Xe.overlay,children:x.jsx(ri,{})})]})},M1=u.memo(O1);function Bn(){return Bn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Bn.apply(this,arguments)}const Pd=(t,e)=>{const n={};for(const r in t)e.indexOf(r)===-1&&(n[r]=t[r]);return n},Rd=u.createContext(null),Fo=u.createContext(null),Td=t=>e=>u.createElement(Fo.Consumer,null,n=>u.createElement(t,Bn({parent:n},e))),k1=(t=[])=>{const[e,n]=u.useState(!1),r=u.useRef(t),i=(()=>{const s=u.useContext(Rd);if(s===null)throw new Error("Couldn't find Yandex.Maps API in the context. Make sure that hook useYMaps is inside <YMaps /> provider");return s})(),o=i.getApi();return u.useEffect(()=>{i.load().then(()=>Promise.all(r.current.map(i.loadModule))).then(()=>n(!0))},[]),e&&o?o:null},P1=()=>{},R1=["onLoad","onError","modules","apiLoader"];function Ia(t,e=!1,n=[]){return r=>{const{width:i,height:o,modules:s=[],onLoad:a=P1}=r,l=k1(n.concat(s)),c=!e||!!l,f=Pd(r,R1);return u.useEffect(()=>l?a(l):void 0,[l]),c?u.createElement(t,Bn({ymaps:l},f)):u.createElement("div",{style:{width:i,height:o}})}}const T1=typeof window<"u",Jc={lang:"ru_RU",load:"",ns:"",mode:"release"},A1=t=>{const{version:e="2.1",enterprise:n=!1,query:r={lang:"ru_RU",load:"",ns:""},preload:i=!1,children:o}=t,s=u.useRef((a=>{const{query:l=Jc}=a,c=Date.now().toString(32),f=l.ns||"",d="__yandex-maps-api-onload__$$"+c,h="__yandex-maps-api-onerror__$$"+c,v=T1?window:{},y={};let p;const L=()=>f?v[f]:p,w=()=>{delete v[d],delete v[h]};return{load:()=>{if(L())return Promise.resolve(p);if(y[f])return y[f];const m={onload:d,onerror:h,...Jc,...l},b=Object.keys(m).map(E=>`${E}=${m[E]}`).join("&"),_=[`https://${a.enterprise?"enterprise.":""}api-maps.yandex.ru`,a.version,"?"+b].join("/");return y[f]=new Promise((E,g)=>{v[d]=S=>{w(),S.ready(()=>{p=S,E(S)})},v[h]=S=>{w(),g(S)},(S=>new Promise((C,P)=>{const M=document.createElement("script");M.type="text/javascript",M.onload=C,M.onerror=P,M.src=S,M.async=!0,document.head.appendChild(M)}))(_).catch(v[h])}),y[f]},getApi:L,loadModule:m=>new Promise((b,_)=>{p.modules.require(m).done(E=>{E.forEach(g=>{((S,C,P,M=!1)=>{const O=typeof C=="string"?C.split("."):C.slice();let k,j=S;for(;O.length>1;)k=O.shift(),j[k]||(j[k]={}),j=j[k];const U=O[0];j[U]=M===!0&&j[U]||P})(p,m,g,!0)}),b(p)},_)})}})({version:e,enterprise:n,query:r,preload:i}));return u.useEffect(()=>{i&&s.current.load()},[s.current]),u.createElement(Rd.Provider,{value:s.current},o)},Yc=/^on(?=[A-Z])/;function Ve(t){return Object.keys(t).reduce((e,n)=>{if(Yc.test(n)){const r=n.replace(Yc,"").toLowerCase();e._events[r]=t[n]}else e[n]=t[n];return e},{_events:{}})}function Un(t,e,n){typeof n=="function"&&t.events.add(e,n)}function Vn(t,e,n){typeof n=="function"&&t.events.remove(e,n)}function gr(t,e,n){Object.keys(Object.assign({},e,n)).forEach(r=>{e[r]!==n[r]&&(Vn(t,r,e[r]),Un(t,r,n[r]))})}const Ad=t=>"default"+t.charAt(0).toUpperCase()+t.slice(1);function tt(t,e){return t[e]!==void 0||t[Ad(e)]===void 0}function X(t,e,n){return(tt(t,e)?t[e]:t[Ad(e)])||n}function nt(t,e,n=null){if(t!==e){if(t&&("current"in t?t.current=null:typeof t=="function"&&t(null)),!e)return;"current"in e?e.current=n:typeof e=="function"&&e(n)}}function Dd(t){const{width:e,height:n,style:r,className:i}=t;return r!==void 0||i!==void 0?Object.assign({},r&&{style:r},i&&{className:i}):{style:{width:e,height:n}}}class D1 extends u.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,n){const{onError:r=()=>{}}=this.props;r(e),this.setState({error:e,errorInfo:n})}render(){return this.state.error?null:this.props.children}}const ja=t=>({onError:e,...n})=>u.createElement(D1,{onError:e},u.createElement(t,n));class Xr extends u.Component{constructor(){super(),this.instance=null,this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this.instance=Xr.mountObject(this._parentElement,this.props.ymaps.Map,this.props),this.setState({instance:this.instance})}componentDidUpdate(e){this.instance!==null&&Xr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Xr.unmountObject(this.instance,this.props)}render(){const e=Dd(this.props),n=Ve(this.props),r=Pd(n,["_events","state","defaultState","options","defaultOptions","instanceRef","ymaps","children","width","height","style","className"]);return u.createElement(Fo.Provider,{value:this.state.instance},u.createElement("div",Bn({ref:this._getRef},e,r),this.props.children))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=new n(e,X(r,"state"),X(r,"options"));return Object.keys(o).forEach(a=>Un(s,a,o[a])),nt(null,i,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"state")){const l=X(n,"state",{}),c=X(r,"state",{});l.type!==c.type&&e.setType(c.type),l.behaviors!==c.behaviors&&(l.behaviors&&e.behaviors.disable(l.behaviors),c.behaviors&&e.behaviors.enable(c.behaviors)),c.zoom&&l.zoom!==c.zoom&&e.setZoom(c.zoom),c.center&&l.center!==c.center&&e.setCenter(c.center),c.bounds&&l.bounds!==c.bounds&&e.setBounds(c.bounds)}if(tt(r,"options")){const l=X(n,"options"),c=X(r,"options",{});l!==c&&e.options.set(c)}X(n,"width")===X(r,"width")&&X(n,"height")===X(r,"height")||e.container.fitToViewport(),gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),e.destroy(),nt(r))}}const Id=ja(Ia(Xr,!0,["Map"]));Id.defaultProps={width:320,height:240};class no extends u.Component{constructor(){super(),this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this._mounted=!0,this.props.ymaps.panorama.isSupported()&&no.mountObject(this._parentElement,this.props.ymaps.panorama,this.props).then(e=>this._mounted&&this.setState({instance:e}))}componentDidUpdate(e){this.state.instance!==null&&no.updateObject(this.state.instance,e,this.props)}componentWillUnmount(){this._mounted=!1,no.unmountObject(this.state.instance,this.props)}render(){const e=Dd(this.props);return u.createElement("div",Bn({ref:this._getRef},e))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=X(r,"point"),a=X(r,"locateOptions"),l=X(r,"options");return new Promise((c,f)=>{n.locate(s,a).done(d=>{if(d.length>0){const h=new n.Player(e,d[0],l);nt(null,i,h),Object.keys(o).forEach(v=>Un(h,v,o[v])),c(h)}},f)})}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}if(tt(r,"point")){const l=X(r,"point"),c=X(n,"point"),f=X(r,"locateOptions");l!==c&&e.moveTo(l,f)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),nt(r))}}class ro extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=ro.mountControl(this.props.ymaps.control[this.props.name],this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&ro.updateControl(this.instance,e,this.props)}componentWillUnmount(){ro.unmountControl(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountControl(e,n){const{instanceRef:r,parent:i,lazy:o,_events:s}=Ve(n),a=new e({data:X(n,"data"),options:X(n,"options"),state:X(n,"state"),mapTypes:X(n,"mapTypes"),lazy:o});if(Object.keys(s).forEach(l=>Un(a,l,s[l])),i&&i.controls&&typeof i.controls.add=="function")i.controls.add(a);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(a)}return nt(null,r,a),a}static updateControl(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}if(tt(r,"data")){const l=X(n,"data"),c=X(r,"data");l!==c&&e.data.set(c)}if(tt(r,"state")){const l=X(n,"state"),c=X(r,"state");l!==c&&e.state.set(c)}if(tt(r,"mapTypes")){const l=X(n,"mapTypes"),c=X(r,"mapTypes");l!==c&&(e.removeAllMapTypes(),c.forEach(f=>e.addMapType(f)))}gr(e,s,i),nt(a,o,e)}static unmountControl(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.controls&&typeof i.controls.remove=="function"?i.controls.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class io extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=io.mountObject(this.props.ymaps.Clusterer,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.state.instance!==null&&io.updateObject(this.instance,e,this.props)}componentWillUnmount(){io.unmountObject(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(X(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount Clusterer");i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class Qr extends u.Component{constructor(){super(),this.state={instance:null}}componentDidMount(){const e=Qr.mountObject(this.props.ymaps.ObjectManager,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&Qr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Qr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=X(n,"options",{}),a=X(n,"features",{}),l=X(n,"filter",null),c=X(n,"objects",{}),f=X(n,"clusters",{}),d=new e(s);if(d.add(a||[]),d.setFilter(l),d.objects.options.set(c),d.clusters.options.set(f),Object.keys(o).forEach(h=>Un(d,h,o[h])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(d);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount ObjectManager");i.add(d)}return nt(null,r,d),d}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}if(tt(r,"objects")){const l=X(n,"objects"),c=X(r,"objects");l!==c&&e.objects.options.set(c)}if(tt(r,"clusters")){const l=X(n,"clusters"),c=X(r,"clusters");l!==c&&e.clusters.options.set(c)}if(tt(r,"filter")){const l=X(n,"filter"),c=X(r,"filter");l!==c&&e.setFilter(c)}if(tt(r,"features")){const l=X(n,"features"),c=X(r,"features");l!==c&&(e.remove(l),e.add(c))}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var I1=ja(Td(Ia(Qr,!0,["ObjectManager"])));class ei extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const{name:e,ymaps:n,dangerZone:r}=this.props,i=ei.mountObject(r&&typeof r.modifyConstructor=="function"?r.modifyConstructor(n[e]):n[e],this.props);this.instance=i,this.setState({instance:i})}componentDidUpdate(e){this.instance!==null&&ei.updateObject(this.instance,e,this.props)}componentWillUnmount(){ei.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(X(n,"geometry"),X(n,"properties"),X(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i&&i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"geometry")){const l=X(n,"geometry",{}),c=X(r,"geometry",{});Array.isArray(c)&&c!==l?Array.isArray(c[0])&&typeof c[1]=="number"?(e.geometry.setCoordinates(c[0]),e.geometry.setRadius(c[1])):e.geometry.setCoordinates(c):typeof c=="object"&&(c.coordinates!==l.coordinates&&e.geometry.setCoordinates(c.coordinates),c.radius!==l.radius&&e.geometry.setRadius(c.radius))}if(tt(r,"properties")){const l=X(n,"properties"),c=X(r,"properties");l!==c&&e.properties.set(c)}if(tt(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var Xc=ja(Td(Ia(t=>u.createElement(ei,Bn({},t,{name:"Placemark"})),!0,["Placemark"])));const oo=(t,e)=>t===30?`custom#pin-locker${e?`__${e}`:""}`:`custom#pin-pvz${e?`__${e}`:""}`,Br=t=>[-(t[0]/2),-t[1]],Qc=(t,e,n)=>t==null?void 0:t.map(r=>{var i;return{id:r.uid,type:"Feature",properties:{point:r},geometry:{type:"Point",coordinates:[r.location.latitude,r.location.longitude]},options:{hideIconOnBalloonOpen:!1,preset:oo(r.type),balloonOffset:[0,-Yn[1]],balloonContentLayout:(i=e==null?void 0:e.templateLayoutFactory)==null?void 0:i.createClass(n)}}}),j1={en:"en_US",ru:"ru_RU"},N1={load:"suggest",apikey:"5298a725-4baa-457a-a2a7-c3abac81db20"},B1=["templateLayoutFactory","option.presetStorage","geocode"],U1=["objectManager.addon.objectsBalloon"],eu=["geoObject.addon.balloon"],V1={yandexMapDisablePoiInteractivity:!1},F1={clusterize:!0},tu={iconImageSize:Xt,iconLayout:"default#image",hideIconOnBalloonOpen:!1,balloonOffset:[0,-Xt[1]],iconImageOffset:Br(Xt)},z1="MapYandex-module__root__GNnwcS",$1="MapYandex-module__overlay__lf7cbO",H1="MapYandex-module__details__T9uy6N",ps={root:z1,overlay:$1,details:H1},G1=({className:t})=>{const{t:e}=jt(["courier_balloon","common"]),n=u.useRef(),r=u.useRef(null),{map:i,locale:o,disableDelivery:s,hideDetails:a,hideMapUI:l,onPointClick:c}=st(),[f,d]=u.useState(null),[h,v]=u.useState([]),[y,p]=u.useState(F1),L=Qt(),w=zt(Fu),m=zt(va),b=We(Po),_=bt(T=>T.location),E=u.useRef([]),g=u.useMemo(()=>$i.renderToString(x.jsx(Cf,{SSR:!0,hideDetails:a})).replace("{ choose }",e("choose")).replace("{ details }",e("details")),[e,o,a]),S=u.useMemo(()=>$i.renderToString(x.jsx(ia,{SSR:!0,variant:"default",hideDetails:a})).replace("{ details }",e("details",{ns:"common"})).replace("{ courier_balloon.title }",e("title")),[e,o,a]),C=u.useMemo(()=>$i.renderToString(x.jsx(ia,{SSR:!0,variant:"error",hideDetails:a})).replace("{ courier_balloon.error_title }",e("error_title")).replace("{ courier_balloon.error_description }",e("error_description")),[e,o,a]),P=u.useMemo(()=>({zoom:(i==null?void 0:i.initialZoom)??sa,center:(i==null?void 0:i.center)??co,behaviors:["default","scrollZoom"]}),[i==null?void 0:i.center,i==null?void 0:i.initialZoom]);u.useEffect(()=>{var T,N;(N=n.current)==null||N.events.fire("boundschange",{newBounds:(T=n.current)==null?void 0:T.getBounds()})},[f]),u.useEffect(()=>{var N;if(!f||!r.current)return;for(const V of E.current)V.id!==(_==null?void 0:_.uid)&&((N=r.current)==null||N.remove(V));const T=Qc(w,f,g);E.current=T,r.current.add(T)},[g,f,w,_==null?void 0:_.uid]);const M=u.useCallback(T=>{const N=T.get("newBounds");zt.getState().loadNext([[N[0][0],N[1][0]],[N[0][1],N[1][1]]],L)},[L]),O=u.useRef(_),k=u.useCallback(T=>{var N,V,W,I;d(T),ye.getState().setLoaded(),(N=T==null?void 0:T.option)==null||N.presetStorage.add("custom#pin-locker",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-primary")),iconImageOffset:Br(Xt)}),(V=T==null?void 0:T.option)==null||V.presetStorage.add("custom#pin-locker__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-success")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),(W=T==null?void 0:T.option)==null||W.presetStorage.add("custom#pin-pvz",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-grey-80")),iconImageOffset:Br(Xt)}),(I=T==null?void 0:T.option)==null||I.presetStorage.add("custom#pin-pvz__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-black")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),p(K=>({...K,clusterIconColor:ga("--owl-color-primary")})),v(Qc(w,T,g))},[g,w]),j=u.useCallback(()=>{ye.getState().setDetailsOpen(!0)},[]),U=u.useCallback(()=>{var T;O.current&&(c==null||c(O.current),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),(T=n.current)==null||T.balloon.close())},[c]),$=u.useCallback(()=>{var T,N;(T=document.getElementById(lo))==null||T.addEventListener("click",j),(N=document.getElementById(ws))==null||N.addEventListener("click",U)},[U,j]),G=u.useCallback(T=>{var V,W,I,K,ee,q;const N=T.get("objectId");((V=O.current)==null?void 0:V.uid)===N&&((K=r.current)==null||K.objects.setObjectOptions((W=O.current)==null?void 0:W.uid,{preset:oo((I=O.current)==null?void 0:I.type)}),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),O.current=null),(ee=document.getElementById(lo))==null||ee.removeEventListener("click",j),(q=document.getElementById(ws))==null||q.removeEventListener("click",U)},[U,j]),z=u.useCallback(T=>{var I,K,ee,q;const N=T.get("objectId"),V=(K=(I=r.current)==null?void 0:I.objects)==null?void 0:K.getById(N);if(!V)return;const W=V.properties.point;ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(W),(ee=r.current)==null||ee.objects.each(se=>{var ue;const de=se;(ue=r.current)==null||ue.objects.setObjectOptions(de.id,{preset:oo(de.properties.point.type)})}),(q=r.current)==null||q.objects.setObjectOptions(N,{preset:oo(W.type,"active")}),O.current=W},[]),Z=u.useCallback(async T=>{if(!f||s)return;const N=T.get("coords"),{geoObjects:V}=await f.geocode(N),W=V.get(0),I=W.getAddressLine(),K=W.properties.get("metaDataProperty.GeocoderMetaData.precision",{});if(bt.getState().setSelectedLocation(null),K!=="exact"){We.getState().setDeliverPoint({coords:N,address:null});return}We.getState().setDeliverPoint({coords:N,address:I})},[s,f]),D=u.useMemo(()=>{var T;return{...tu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(T=f==null?void 0:f.templateLayoutFactory)==null?void 0:T.createClass(S)}},[S,f==null?void 0:f.templateLayoutFactory]),R=u.useMemo(()=>{var T;return{...tu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(T=f==null?void 0:f.templateLayoutFactory)==null?void 0:T.createClass(C)}},[C,f==null?void 0:f.templateLayoutFactory]),A=u.useCallback(T=>{var N,V,W,I,K;(N=T==null?void 0:T.balloon)==null||N.open(),(W=(V=T==null?void 0:T.balloon)==null?void 0:V.events)==null||W.add("open",$),(K=(I=T==null?void 0:T.balloon)==null?void 0:I.events)==null||K.add("close",G)},[G,$]);return x.jsxs("div",{className:be(ps.root,t,{[ps.hideUI]:l}),children:[x.jsx(A1,{query:{...N1,lang:j1[o??"ru"]},children:x.jsxs(Id,{width:"100%",height:"100%",state:P,instanceRef:n,options:V1,modules:B1,onLoad:k,onClick:Z,onBoundsChange:M,children:[(b==null?void 0:b.address)&&x.jsx(Xc,{properties:b,modules:eu,geometry:b.coords,options:D,instanceRef:A},JSON.stringify(b.coords)),b&&!b.address&&x.jsx(Xc,{modules:eu,geometry:b.coords,instanceRef:A,options:R},JSON.stringify(b.coords)),x.jsx(I1,{features:h,instanceRef:r,modules:U1,options:y,onClick:z,onBalloonOpen:$,onBalloonClose:G})]})},o),m&&x.jsx(ba,{className:ps.overlay,children:x.jsx(ri,{})})]})},Z1=u.memo(G1),W1=t=>({google:M1,yandex:Z1})[t];function jd(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const _o=t=>{const e=u.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},q1=()=>{throw new Error("useMediaQuery is a client-only hook")};function K1(t){const e=u.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return u.useSyncExternalStore(e,n,q1)}const J1="768px",Y1="1024px",X1="1280px",Q1="1536px",eL={screenSm:J1,screenMd:Y1,screenLg:X1,screenXl:Q1};function hi(t){return K1(`(max-width: calc(${eL[t]} - 1px))`)}const tL=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=ye(gu);u.useEffect(()=>{i&&ye.getState().setLoaded()},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{var f;const c=await sr(a,"GEOMETRIC_CENTER");$t.getState().setPlace((f=c.results)==null?void 0:f[0],sa)};if(r){l();return}pa(async c=>{var v;const{latitude:f,longitude:d}=c.coords,h=await sr([f,d],"GEOMETRIC_CENTER");$t.getState().setPlace((v=h.results)==null?void 0:v[0])},()=>l())},[o,s,i,e,r])},Nd=iy().use(Gm()).use(jm()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwi2dimy3domrsnezham3ugbvw24tfm5vwk3bqgntxa"}),nL=t=>{u.useEffect(()=>{t&&(Nd.changeLanguage(t),fo.setLanguage(t))},[t])},rL=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&jo(`--owl-color-${n}`,r)}}},[t])},iL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-button-radius",`${t}px`)},[t])},oL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-font",t)},[t])},sL={open:!1},aL=t=>t.open,Tn=bn(t=>({...sL,toggle(e){t(n=>({open:e??!n.open}))}})),lL=t=>{const e=t==="selector";u.useEffect(()=>{e&&Tn.getState().toggle(!0)},[e])},cL=({children:t})=>{const{font:e,palette:n,radius:r,locale:i,startScreen:o}=st();return oL(e),nL(i),rL(n),iL(r),lL(o),x.jsx(x.Fragment,{children:t})},uL=({children:t})=>{const{map:e,disableGeolocation:n}=st();return mn(e==null?void 0:e.center,"Map center is required"),mn(e==null?void 0:e.initialZoom,"Map initial zoom is required"),tL(e.center,e.initialZoom,{disableGeolocation:n}),x.jsx(x.Fragment,{children:t})},fL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},ce.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),dL=()=>{Tn.getState().toggle(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null)},hL="CurrentLocation-module__root__AeQCGT",pL="CurrentLocation-module__icon__459m9q",gL="CurrentLocation-module__text__w-9v28",gs={root:hL,icon:pL,text:gL},Bd=({className:t})=>{const{t:e}=jt("current_location"),n=$t(Ju),r=$t(Ig);return x.jsxs("div",{role:"presentation",className:be(gs.root,t),onClick:dL,children:[x.jsx(fL,{className:gs.icon}),x.jsxs("span",{className:gs.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},vL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},ce.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),mL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},ce.createElement("path",{fill:"#000",d:"M4.1 20a3.966 3.966 0 0 1-2.05-.555 4.15 4.15 0 0 1-1.496-1.498A3.982 3.982 0 0 1 0 15.895V4.133c0-.758.185-1.442.554-2.052A4.15 4.15 0 0 1 2.05.583 3.966 3.966 0 0 1 4.1.028h11.743c.738 0 1.412.185 2.022.555A4.15 4.15 0 0 1 19.36 2.08c.388.61.582 1.294.582 2.052v11.762a3.83 3.83 0 0 1-.582 2.052 4.15 4.15 0 0 1-1.495 1.498c-.61.37-1.284.555-2.022.555H4.099Zm.193-4.327h11.3V4.355h-11.3v11.318ZM22.992 20V.028h4.432L34.182 8.1l6.73-8.072h4.46V20H41.05V6.602l-6.87 8.21-6.896-8.182V20h-4.293Zm25.696 0V.028h4.431l11.162 13.315V.028h4.348V20h-4.431L52.98 6.63V20h-4.294Zm22.352 0V.028h4.238V20H71.04Zm14.963 0V0h4.293v15.673h12.554V20H86.003Zm18.489 0V0h4.293v15.673h12.554V20h-16.847Zm18.717 0V4.133c0-.758.185-1.442.554-2.052a4.156 4.156 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.441.185 2.05.555.628.37 1.126.869 1.495 1.498.388.61.582 1.294.582 2.052V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882ZM146.307 20V.028h4.432l6.758 8.072 6.73-8.072h4.459V20h-4.32V6.602l-6.869 8.21L150.6 6.63V20h-4.293Zm25.751 0V4.133c0-.758.185-1.442.554-2.052a4.148 4.148 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.44.185 2.05.555.628.37 1.126.869 1.496 1.498A3.75 3.75 0 0 1 192 4.133V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882Z"})),yL="Header-module__root__Pe4MYp",bL="Header-module__nav__wtnkmT",wL="Header-module__navItem__-Fy63Z",SL="Header-module__logo__xO2bWO",Ur={root:yL,nav:bL,navItem:wL,logo:SL},LL={llama:mL,default:vL},EL=()=>{const{logo:t="default",hideLogo:e}=st();if(e)return null;const n=LL[t];return x.jsx("div",{className:Ur.logo,children:x.jsx(n,{})})},xL=({className:t})=>{const{t:e}=jt("header"),{disableDelivery:n}=st(),r=ye(Th),i=We(Po);u.useEffect(()=>{i?ye.getState().setMode("location_delivery"):ye.getState().setMode("self_pickup")},[i]);const o=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("self_pickup")},s=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return x.jsxs("div",{className:be(Ur.root,t),children:[x.jsx(EL,{}),x.jsxs("nav",{className:Ur.nav,children:[!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),x.jsx(Bd,{})]})]})},CL=u.memo(xL),_L={open:!1},ur=bn(t=>({..._L,toggle(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),OL="Layout-module__root__qzPL-f",ML="Layout-module__headerHidden__JEN-d0",kL="Layout-module__sidebarHidden__x017O3",PL="Layout-module__sidebarOpen__IZnIjs",Ui={root:OL,headerHidden:ML,sidebarHidden:kL,sidebarOpen:PL},RL=({children:t})=>{const{hideHeader:e,hideFilters:n}=st(),r=ur(i=>i.open);return x.jsx("div",{className:be(Ui.root,{[Ui.sidebarOpen]:r,[Ui.headerHidden]:e,[Ui.sidebarHidden]:n}),children:t})},Na=()=>x.jsx(ba,{children:x.jsx(ri,{})}),TL=({children:t})=>{const e=zt(vg);return zt(va)&&!e?x.jsx(Na,{}):x.jsx(x.Fragment,{children:t})};var Ud={},zo={},Vd={exports:{}},AL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",DL=AL,IL=DL;function Fd(){}function zd(){}zd.resetWarningCache=Fd;var jL=function(){function t(r,i,o,s,a,l){if(l!==IL){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:zd,resetWarningCache:Fd};return n.PropTypes=n,n};Vd.exports=jL();var NL=Vd.exports,$o={},fr={};Object.defineProperty(fr,"__esModule",{value:!0});fr.loadGoogleMapScript=fr.isBrowser=void 0;var $d=typeof window<"u"&&window.document;fr.isBrowser=$d;var BL=function(e,n){if(!$d||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};fr.loadGoogleMapScript=BL;var Ho={};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var UL="https://maps.googleapis.com/maps/api/js";Ho.GOOGLE_MAP_SCRIPT_BASE_URL=UL;function so(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?so=function(n){return typeof n}:so=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(t)}Object.defineProperty($o,"__esModule",{value:!0});$o.default=GL;var yt=FL(u),vs=fr,VL=Ho;function Hd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Hd=function(i){return i?n:e})(t)}function FL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||so(t)!=="object"&&typeof t!="function")return{default:t};var n=Hd(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ru(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(r){zL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zL(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $L(t,e){if(t==null)return{};var n=HL(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function HL(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function GL(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var c=l.types,f=c===void 0?["(cities)"]:c,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,p=$L(l,["types","componentRestrictions","fields","bounds"]),L=t.googleMapsScriptBaseUrl,w=L===void 0?VL.GOOGLE_MAP_SCRIPT_BASE_URL:L,m=t.language,b=(0,yt.useRef)(null),_=(0,yt.useRef)(null),E=(0,yt.useRef)(null),g=(0,yt.useRef)(null),S=m?"&language=".concat(m):"",C="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(S),P=(0,yt.useCallback)(function(){return(0,vs.loadGoogleMapScript)(w,C)},[w,C]);return(0,yt.useEffect)(function(){var M=ru(ru({},p),{},{fields:v,types:f,bounds:y});if(d&&(M.componentRestrictions=d),!(E.current||!b.current||!vs.isBrowser)){e&&!e.current&&(e.current=b.current);var O=function(){var j;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((j=google.maps)!==null&&j!==void 0&&j.places))return console.error("Google maps places API must be loaded.");if(!b.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(b.current,M),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),b.current,E.current)}))};return r?P().then(function(){return O()}):O(),function(){return _.current?_.current.remove():void 0}}},[]),(0,yt.useEffect)(function(){var M;!(yt.default!==null&&yt.default!==void 0&&(M=yt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&vs.isBrowser&&window.MutationObserver&&b.current&&b.current instanceof HTMLInputElement&&(g.current=new MutationObserver(function(){g.current.disconnect(),b.current&&(b.current.autocomplete=a)}),g.current.observe(b.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,yt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,yt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,yt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,yt.useEffect)(function(){E.current&&E.current.setOptions(p)},[p]),{ref:b,autocompleteRef:E}}function ao(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ao=function(n){return typeof n}:ao=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ao(t)}Object.defineProperty(zo,"__esModule",{value:!0});zo.default=void 0;var oa=WL(u),Ze=Gd(NL),ZL=Gd($o);function Gd(t){return t&&t.__esModule?t:{default:t}}function Zd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Zd=function(i){return i?n:e})(t)}function WL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ao(t)!=="object"&&typeof t!="function")return{default:t};var n=Zd(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Oo(){return Oo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Oo.apply(this,arguments)}function qL(t,e){if(t==null)return{};var n=KL(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function KL(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Wd(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,c=qL(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,ZL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return oa.default.createElement("input",Oo({ref:d},c))}Wd.propTypes={apiKey:Ze.default.string,libraries:Ze.default.arrayOf(Ze.default.string),ref:Ze.default.oneOfType([Ze.default.func,Ze.default.shape({current:Ze.default.any})]),googleMapsScriptBaseUrl:Ze.default.string,onPlaceSelected:Ze.default.func,inputAutocompleteValue:Ze.default.string,options:Ze.default.shape({componentRestrictions:Ze.default.object,bounds:Ze.default.object,location:Ze.default.object,offset:Ze.default.number,origin:Ze.default.object,radius:Ze.default.number,sessionToken:Ze.default.object,types:Ze.default.arrayOf(Ze.default.string)}),language:Ze.default.string};var JL=(0,oa.forwardRef)(function(t,e){return oa.default.createElement(Wd,Oo({},t,{refProp:e}))});zo.default=JL;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(zo),n=r($o);function r(i){return i&&i.__esModule?i:{default:i}}})(Ud);var qd=Ud;const YL="Aside-module__root__EotK2f",XL="Aside-module__open__Zwmbs5",QL="Aside-module__overlay__slLdHF",eE="Aside-module__container__28P4wq",Vi={root:YL,open:XL,overlay:QL,container:eE},tE=({open:t,children:e,className:n})=>x.jsxs("div",{className:be(Vi.root,n,{[Vi.open]:t}),children:[x.jsx("div",{className:Vi.overlay}),x.jsx("div",{className:Vi.container,children:e})]}),nE="Input-module__root__TF9IiD",rE="Input-module__endAdornment__m40K5R",iE="Input-module__input__505b7i",oE="Input-module__startAdornment__D-sJ0N",sE="Input-module__label__gmqtsf",aE="Input-module__inputContainer__vubIa-",Kn={root:nE,endAdornment:rE,input:iE,startAdornment:oE,label:sE,inputContainer:aE},Kd=u.forwardRef(({label:t,className:e,startAdornment:n,endAdornment:r,onChange:i,onBlur:o,inputRef:s,...a},l)=>{const c=u.useId(),f=u.useRef(null);u.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(i){i({target:{value:h}});return}if(o){o({target:{value:h}});return}f.current&&(f.current.value=h)}}),[o,i]);const d=jd(s,f);return x.jsxs("label",{htmlFor:a.id??c,className:be(Kn.root,e),children:[t&&x.jsx("span",{className:Kn.label,children:t}),x.jsxs("div",{className:Kn.inputContainer,children:[n&&x.jsx("div",{className:Kn.startAdornment,children:n}),x.jsx("input",{...a,id:a.id??c,ref:d,className:Kn.input,onChange:i,onBlur:o}),r&&x.jsx("div",{className:Kn.endAdornment,children:r})]})]})}),lE="LocationAside-module__submit__CSKcqi",cE="LocationAside-module__container__S1NejR",uE="LocationAside-module__selector__hl74ke",fE="LocationAside-module__label__0Zk8at",dE="LocationAside-module__header__N1wgyn",hE="LocationAside-module__close__VsE88z",Fi={submit:lE,container:cE,selector:uE,label:fE,header:dE,close:hE},pE=u.forwardRef((t,e)=>{const{t:n}=jt(["location_aside","common"]),r=Tn(aL),{country:i,inputs:o,hideCloseButtonOnLocationScreen:s,onLocationSelect:a,onCloseLocationSelector:l}=st(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Tn.getState().toggle(!0),close:()=>Tn.getState().toggle(!1)}),[]);const h=m=>{Tn.getState().toggle(!1),$t.getState().setPlace(m),a==null||a(m),m!=null&&m.formatted_address&&d(m==null?void 0:m.formatted_address)},v=()=>{Tn.getState().toggle(!1),l==null||l()},y=i?{componentRestrictions:{country:i}}:void 0,p=m=>{d(m.target.value)},{ref:L}=qd.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=_o(o==null?void 0:o.city);return x.jsx(tE,{open:r,children:x.jsx("div",{ref:c,className:Fi.container,children:x.jsxs("div",{className:Fi.selector,children:[x.jsxs("div",{className:Fi.header,children:[x.jsx("div",{className:Fi.label,children:n("choose_city")}),!s&&x.jsx(ui,{position:"relative",onClick:v})]}),x.jsx(Kd,{...w,inputRef:L,value:f,placeholder:n("placeholder"),onChange:p})]})})})}),gE=u.memo(pE),vE=({children:t})=>{const{locale:e}=st(),n=u.useRef(e),{isLoaded:r}=iv({language:n.current,libraries:ih,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return r?x.jsx(x.Fragment,{children:t}):x.jsx(Na,{})},mE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),yE=({className:t})=>{const{t:e}=jt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=st(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=m=>{$t.getState().setPlace(m),i==null||i(m)},{ref:h}=qd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=m=>{a&&ye.getState().setBlurred(!!m.target.value),s(m.target.value)},y=()=>{o&&ye.getState().setBlurred(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),l(!0)},p=()=>{ye.getState().setBlurred(!1),l(!1)},L=m=>{m.key==="Enter"&&m.preventDefault()},w=_o(r==null?void 0:r.address);return x.jsx(Kd,{...w,inputRef:h,value:o,className:t,endAdornment:x.jsx(mE,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:p,onKeyDown:L})},bE=({className:t})=>ye(Ih)?x.jsx(yE,{className:t}):null,wE=u.memo(bE),SE="DeliveryDetailsModal-module__root__qwKnjX",LE={root:SE},EE=({onClose:t,onSubmit:e,location:n,className:r})=>x.jsx("div",{className:be(LE.root,r),children:x.jsx(kd,{location:n,onClose:t,onSubmit:e})}),xE="LocationDetailsModal-module__root__PyRnLM",CE={root:xE},_E=({onClose:t,onSubmit:e,location:n,className:r})=>{const i=()=>{e==null||e(n)};return x.jsx("div",{className:be(CE.root,r),children:x.jsx(_f,{location:n,onClose:t,onSubmit:i})})},OE="MapContainer-module__root__1Os6Q-",ME="MapContainer-module__mapWrapper__Cwe7qC",kE="MapContainer-module__wrapperBlurred__04NN2L",PE="MapContainer-module__locationSelector__Pr1zS-",RE="MapContainer-module__filterButton__CW3Qv7",TE="MapContainer-module__sidebarOpen__lGMVrJ",AE="MapContainer-module__filterIcon__T01XsJ",DE="MapContainer-module__details__gM8LWX",Ft={root:OE,mapWrapper:ME,wrapperBlurred:kE,locationSelector:PE,filterButton:RE,sidebarOpen:TE,filterIcon:AE,details:DE},IE=()=>{const{onPointClick:t}=st(),e=ye(aa),n=bt(Bh),r=We(Po),i=u.useCallback(()=>{ye.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null)},[t]);return x.jsxs(x.Fragment,{children:[(r==null?void 0:r.address)&&e&&x.jsx(EE,{location:r,className:Ft.details,onClose:i,onSubmit:o}),n&&e&&x.jsx(_E,{location:n,className:Ft.details,onClose:i,onSubmit:o})]})},jE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},ce.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),ce.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),NE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},ce.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),ce.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),BE=()=>{const t=ur(i=>i.open),e=ur(i=>i.toggle),n=hi("screenSm"),r=()=>{e(!0)};return x.jsxs("div",{role:"presentation",className:be(Ft.filterButton,{[Ft.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&x.jsx(Bd,{}),n?x.jsx(NE,{className:Ft.filterIcon,onClick:r}):x.jsx(jE,{className:Ft.filterIcon})]})},UE=({className:t,children:e})=>{const{hideFilters:n,hideSearchInput:r}=st(),i=ye(Dh),o=ye(aa);return x.jsxs("div",{className:be(Ft.root,t),children:[!r&&!o&&x.jsx(wE,{className:Ft.locationSelector}),!n&&x.jsx(BE,{}),x.jsx("div",{className:be(Ft.mapWrapper,{[Ft.wrapperBlurred]:i}),children:e}),x.jsx(IE,{})]})},VE=u.memo(UE),FE="Separator-module__root__eQtZey",zE={root:FE},ms=({className:t,...e})=>x.jsx("hr",{className:be(zE.root,t),...e}),$E="Sidebar-module__root__4j1MA3",HE="Sidebar-module__closeButton__HLXy1c",GE="Sidebar-module__open__mqQXF6",ZE="Sidebar-module__header__Afp6uz",WE="Sidebar-module__typeFilter__GN46u9",qE="Sidebar-module__separator__6I4QoJ",KE="Sidebar-module__withRightPadding__2u1Ina",JE="Sidebar-module__sheetContent__SaoncI",YE="Sidebar-module__doneButton__4aeaSD",Yt={root:$E,closeButton:HE,open:GE,header:ZE,typeFilter:WE,separator:qE,withRightPadding:KE,sheetContent:JE,doneButton:YE},XE=()=>{const{t}=jt("common"),e=hi("screenSm"),n=ur(i=>i.toggle),r=()=>{n(!1)};return x.jsxs("div",{className:Yt.header,children:[e&&x.jsx("div",{role:"presentation",className:Yt.doneButton,onClick:r,children:t("done")}),!e&&x.jsx(ui,{className:Yt.closeButton,onClick:r})]})},QE="Radio-module__root__7ElY2W",ex="Radio-module__label__c-sYW3",iu={root:QE,label:ex},tx=({label:t,className:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return x.jsxs("label",{htmlFor:i,className:be(iu.label,o),...s,children:[x.jsx("input",{id:i,type:"radio",className:be(iu.root,e),...r}),t]})},rr=t=>x.jsx(tx,{...t,type:"checkbox"}),nx="RadioGroup-module__root__ewZw-x",rx="RadioGroup-module__body__k8BJAs",ix="RadioGroup-module__legend__tcfV7q",ys={root:nx,body:rx,legend:ix},Jd=({label:t,value:e,onChange:n,children:r,className:i,...o})=>x.jsxs("div",{className:be(ys.root,i),...o,children:[t&&x.jsx("span",{className:ys.legend,children:t}),x.jsx("div",{className:ys.body,children:u.Children.map(r,s=>u.isValidElement(s)?u.cloneElement(s,{checked:!!(e!=null&&e[s.props.value]),onChange:a=>n==null?void 0:n({...e,[a.target.value]:a.target.checked})}):null)})]}),ox=({className:t,onChange:e})=>{const{t:n}=jt("receive_filter"),r=Qt(zh);return x.jsxs(Jd,{value:r,label:n("title"),onChange:e,className:t,children:[x.jsx(rr,{name:"receive",value:Dt.DressingRoom,label:n("dressing_room")}),x.jsx(rr,{name:"receive",value:Dt.CheckOrder,label:n("check_order")}),x.jsx(rr,{name:"receive",value:Dt.PayByCash,label:n("pay_by_cash")})]})},sx=u.memo(ox),ax=({className:t,onChange:e})=>{const{t:n}=jt("send_filter"),r=Qt(Fh);return x.jsxs(Jd,{className:t,value:r,label:n("title"),onChange:e,children:[x.jsx(rr,{name:"send",value:It.Return,label:n("sending_returns")}),x.jsx(rr,{name:"send",value:It.Shipping,label:n("shipping")}),x.jsx(rr,{name:"send",value:It.Payment,label:n("payment")})]})},lx=u.memo(ax),cx="TypeFilter-module__root__WH5EQV",ux="TypeFilter-module__button__f0mSfo",zi={root:cx,button:ux},fx=({value:t,onChange:e,className:n})=>{const{t:r}=jt("type_filter"),i=o=>()=>e==null?void 0:e(o);return x.jsxs("div",{className:be(zi.root,n),children:[x.jsx(Ot,{className:zi.button,variant:t===Kt.All?"primary":"secondary",onClick:i(Kt.All),children:r("all")}),x.jsx(Ot,{className:zi.button,variant:t===Kt.PostOffice?"primary":"secondary",onClick:i(Kt.PostOffice),children:r("post_office")}),x.jsx(Ot,{className:zi.button,variant:t===Kt.PickPoint?"primary":"secondary",onClick:i(Kt.PickPoint),children:r("pick_point")})]})},dx=({className:t,onChange:e})=>{const n=Qt(Vh);return x.jsx(fx,{value:n,className:t,onChange:e})},hx=u.memo(dx),px=({className:t})=>{const e=hi("screenSm"),n=ur(l=>l.open),r=u.useCallback(l=>Qt.getState().setFilter({type:l}),[]),i=u.useCallback(l=>Qt.getState().setFilter({send:l}),[]),o=u.useCallback(l=>Qt.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>ur.getState().toggle(!1),[]),a=x.jsxs(x.Fragment,{children:[x.jsx(XE,{}),x.jsxs("div",{className:Yt.withRightPadding,children:[x.jsx(hx,{className:Yt.typeFilter,onChange:r}),x.jsx(ms,{className:Yt.separator}),x.jsx(sx,{onChange:o}),x.jsx(ms,{}),x.jsx(lx,{onChange:i}),x.jsx(ms,{})]})]});return e?x.jsx(Cd,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-_d,onDismiss:s,children:x.jsx("div",{className:Yt.sheetContent,children:a})}):x.jsx("div",{className:be(Yt.root,t,{[Yt.open]:n}),children:a})},gx="App-module__map__Kf-2JS",vx="App-module__sidebar__ORIzGk",mx="App-module__header__bgP9DA",bs={map:gx,sidebar:vx,header:mx};fo.setApiKey("AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");const yx=({config:t,options:e})=>{const n=Rg(t),{map:r,hideHeader:i,hideFilters:o,INN:s}=n;mn(s,"INN is required"),Tg(s,e),mn(r==null?void 0:r.provider,"Map provider is required");const a=W1(r.provider);return mg(),x.jsx(cu.Provider,{value:n,children:x.jsx(uL,{children:x.jsx(cL,{children:x.jsx(sy,{tolgee:Nd,fallback:x.jsx(Na,{}),children:x.jsx(vE,{children:x.jsx(TL,{children:x.jsxs(RL,{children:[!i&&x.jsx(CL,{className:bs.header}),!o&&x.jsx(px,{className:bs.sidebar}),x.jsx(VE,{className:bs.map,children:x.jsx(a,{})}),x.jsx(gE,{})]})})})})})})})},Yd=async t=>ni.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Dt;exports.ESendFilter=It;exports.ETypeFilter=Kt;exports.Widget=yx;exports.createPointsIterator=Os;exports.fetchPointsRequest=_s;exports.fromHoursMinutesToMinutes=$h;exports.fromMinutesToHoursMinutes=Hh;exports.getAddressFromLatLng=sr;exports.getBoundsFromPoint=Gh;exports.getCurrentPosition=pa;exports.getNormalizedAddress=Yd;exports.getPropertyValue=ga;exports.isDeliveryPoint=pg;exports.isHttpSuccess=Vu;exports.replaceSvgCurrentColor=xt;exports.setWidgetCSSProperty=jo;exports.stopImmediatePropagation=Ms;exports.svgStringToBase64URL=Jt;
|
|
102
|
+
*/function kc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kc(Object(n),!0).forEach(function(r){Uw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Uw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rc=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),Vw=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Fw=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},zw=function(e){return e.key==="Tab"||e.keyCode===9},Tc=function(e){return setTimeout(e,0)},Ac=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},Rr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},Ai=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},$w=function(e,n){var r=(n==null?void 0:n.document)||document,i=Pc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(m,S,C){return m&&m[S]!==void 0?m[S]:i[C||S]},l=function(m){return o.containerGroups.findIndex(function(S){var C=S.container,R=S.tabbableNodes;return C.contains(m)||R.find(function(M){return M===m})})},c=function(m){var S=i[m];if(typeof S=="function"){for(var C=arguments.length,R=new Array(C>1?C-1:0),M=1;M<C;M++)R[M-1]=arguments[M];S=S.apply(void 0,R)}if(S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(m,"` was specified but was not a node, or did not return a node"))}var O=S;if(typeof S=="string"&&(O=r.querySelector(S),!O))throw new Error("`".concat(m,"` as selector refers to no known node"));return O},f=function(){var m=c("initialFocus");if(m===!1)return!1;if(m===void 0)if(l(r.activeElement)>=0)m=r.activeElement;else{var S=o.tabbableGroups[0],C=S&&S.firstTabbableNode;m=C||c("fallbackFocus")}if(!m)throw new Error("Your focus-trap needs to have at least one focusable element");return m},d=function(){if(o.containerGroups=o.containers.map(function(m){var S=jw(m,i.tabbableOptions),C=Nw(m,i.tabbableOptions);return{container:m,tabbableNodes:S,focusableNodes:C,firstTabbableNode:S.length>0?S[0]:null,lastTabbableNode:S.length>0?S[S.length-1]:null,nextTabbableNode:function(M){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,P=C.findIndex(function(j){return j===M});if(!(P<0))return O?C.slice(P+1).find(function(j){return Ti(j,i.tabbableOptions)}):C.slice(0,P).reverse().find(function(j){return Ti(j,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(m){return m.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},h=function E(m){if(m!==!1&&m!==r.activeElement){if(!m||!m.focus){E(f());return}m.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=m,Vw(m)&&m.select()}},v=function(m){var S=c("setReturnFocus",m);return S||(S===!1?!1:m)},y=function(m){var S=Ai(m);if(!(l(S)>=0)){if(Rr(i.clickOutsideDeactivates,m)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!us(S,i.tabbableOptions)});return}Rr(i.allowOutsideClick,m)||m.preventDefault()}},p=function(m){var S=Ai(m),C=l(S)>=0;C||S instanceof Document?C&&(o.mostRecentlyFocusedNode=S):(m.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},L=function(m){var S=Ai(m);d();var C=null;if(o.tabbableGroups.length>0){var R=l(S),M=R>=0?o.containerGroups[R]:void 0;if(R<0)m.shiftKey?C=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:C=o.tabbableGroups[0].firstTabbableNode;else if(m.shiftKey){var O=Ac(o.tabbableGroups,function(z){var Z=z.firstTabbableNode;return S===Z});if(O<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S,!1))&&(O=R),O>=0){var P=O===0?o.tabbableGroups.length-1:O-1,j=o.tabbableGroups[P];C=j.lastTabbableNode}}else{var B=Ac(o.tabbableGroups,function(z){var Z=z.lastTabbableNode;return S===Z});if(B<0&&(M.container===S||us(S,i.tabbableOptions)&&!Ti(S,i.tabbableOptions)&&!M.nextTabbableNode(S))&&(B=R),B>=0){var $=B===o.tabbableGroups.length-1?0:B+1,G=o.tabbableGroups[$];C=G.firstTabbableNode}}}else C=c("fallbackFocus");C&&(m.preventDefault(),h(C))},w=function(m){if(Fw(m)&&Rr(i.escapeDeactivates,m)!==!1){m.preventDefault(),s.deactivate();return}if(zw(m)){L(m);return}},g=function(m){var S=Ai(m);l(S)>=0||Rr(i.clickOutsideDeactivates,m)||Rr(i.allowOutsideClick,m)||(m.preventDefault(),m.stopImmediatePropagation())},b=function(){if(o.active)return Rc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?Tc(function(){h(f())}):h(f()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(m){if(o.active)return this;var S=a(m,"onActivate"),C=a(m,"onPostActivate"),R=a(m,"checkCanFocusTrap");R||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,S&&S();var M=function(){R&&d(),b(),C&&C()};return R?(R(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(m){if(!o.active)return this;var S=Pc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},m);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,Rc.deactivateTrap(s);var C=a(S,"onDeactivate"),R=a(S,"onPostDeactivate"),M=a(S,"checkCanReturnFocus"),O=a(S,"returnFocus","returnFocusOnDeactivate");C&&C();var P=function(){Tc(function(){O&&h(v(o.nodeFocusedBeforeActivation)),R&&R()})};return O&&M?(M(v(o.nodeFocusedBeforeActivation)).then(P,P),this):(P(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,_(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),b(),this)},updateContainerElements:function(m){var S=[].concat(m).filter(Boolean);return o.containers=S.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.active&&d(),this}},s.updateContainerElements(e),s};function Hw(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var Ta=!1;if(typeof window<"u"){var Dc={get passive(){Ta=!0}};window.addEventListener("testPassive",null,Dc),window.removeEventListener("testPassive",null,Dc)}var gd=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),vn=[],xo=!1,vd=-1,qr=void 0,Kr=void 0,md=function(e){return vn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},Co=function(e){var n=e||window.event;return md(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},Gw=function(e){if(Kr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Kr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}qr===void 0&&(qr=document.body.style.overflow,document.body.style.overflow="hidden")},Zw=function(){Kr!==void 0&&(document.body.style.paddingRight=Kr,Kr=void 0),qr!==void 0&&(document.body.style.overflow=qr,qr=void 0)},Ww=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},qw=function(e,n){var r=e.targetTouches[0].clientY-vd;return md(e.target)?!1:n&&n.scrollTop===0&&r>0||Ww(n)&&r<0?Co(e):(e.stopPropagation(),!0)},Kw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!vn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};vn=[].concat(Hw(vn),[r]),gd?(e.ontouchstart=function(i){i.targetTouches.length===1&&(vd=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&qw(i,e)},xo||(document.addEventListener("touchmove",Co,Ta?{passive:!1}:void 0),xo=!0)):Gw(n)}},Jw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}vn=vn.filter(function(n){return n.targetElement!==e}),gd?(e.ontouchstart=null,e.ontouchmove=null,xo&&vn.length===0&&(document.removeEventListener("touchmove",Co,Ta?{passive:!1}:void 0),xo=!1)):vn.length||Zw()},In=[],Yw=function(){return In.some(function(t){return t.activeTargets.length>0})},Xw=function(){return In.some(function(t){return t.skippedTargets.length>0})},Ic="ResizeObserver loop completed with undelivered notifications.",Qw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Ic}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Ic),window.dispatchEvent(t)},ai;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ai||(ai={}));var jn=function(t){return Object.freeze(t)},eS=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,jn(this)}return t}(),yd=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,jn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Aa=function(t){return t instanceof SVGElement&&"getBBox"in t},bd=function(t){if(Aa(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},jc=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},tS=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Jr=typeof window<"u"?window:{},Di=new WeakMap,Nc=/auto|scroll/,nS=/^tb|vertical/,rS=/msie|trident/i.test(Jr.navigator&&Jr.navigator.userAgent),Bt=function(t){return parseFloat(t||"0")},nr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new eS((n?e:t)||0,(n?t:e)||0)},Bc=jn({devicePixelContentBoxSize:nr(),borderBoxSize:nr(),contentBoxSize:nr(),contentRect:new yd(0,0,0,0)}),wd=function(t,e){if(e===void 0&&(e=!1),Di.has(t)&&!e)return Di.get(t);if(bd(t))return Di.set(t,Bc),Bc;var n=getComputedStyle(t),r=Aa(t)&&t.ownerSVGElement&&t.getBBox(),i=!rS&&n.boxSizing==="border-box",o=nS.test(n.writingMode||""),s=!r&&Nc.test(n.overflowY||""),a=!r&&Nc.test(n.overflowX||""),l=r?0:Bt(n.paddingTop),c=r?0:Bt(n.paddingRight),f=r?0:Bt(n.paddingBottom),d=r?0:Bt(n.paddingLeft),h=r?0:Bt(n.borderTopWidth),v=r?0:Bt(n.borderRightWidth),y=r?0:Bt(n.borderBottomWidth),p=r?0:Bt(n.borderLeftWidth),L=d+c,w=l+f,g=p+v,b=h+y,_=a?t.offsetHeight-b-t.clientHeight:0,E=s?t.offsetWidth-g-t.clientWidth:0,m=i?L+g:0,S=i?w+b:0,C=r?r.width:Bt(n.width)-m-E,R=r?r.height:Bt(n.height)-S-_,M=C+L+E+g,O=R+w+_+b,P=jn({devicePixelContentBoxSize:nr(Math.round(C*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:nr(M,O,o),contentBoxSize:nr(C,R,o),contentRect:new yd(d,l,C,R)});return Di.set(t,P),P},Sd=function(t,e,n){var r=wd(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case ai.DEVICE_PIXEL_CONTENT_BOX:return s;case ai.BORDER_BOX:return i;default:return o}},iS=function(){function t(e){var n=wd(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=jn([n.borderBoxSize]),this.contentBoxSize=jn([n.contentBoxSize]),this.devicePixelContentBoxSize=jn([n.devicePixelContentBoxSize])}return t}(),Ld=function(t){if(bd(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},oS=function(){var t=1/0,e=[];In.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new iS(c.target),d=Ld(c.target);a.push(f),c.lastReportedSize=Sd(c.target,c.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Uc=function(t){In.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ld(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},sS=function(){var t=0;for(Uc(t);Yw();)t=oS(),Uc(t);return Xw()&&Qw(),t>0},fs,Ed=[],aS=function(){return Ed.splice(0).forEach(function(t){return t()})},lS=function(t){if(!fs){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return aS()}).observe(n,r),fs=function(){n.textContent="".concat(e?e--:e++)}}Ed.push(t),fs()},cS=function(t){lS(function(){requestAnimationFrame(t)})},eo=0,uS=function(){return!!eo},fS=250,dS={attributes:!0,characterData:!0,childList:!0,subtree:!0},Vc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fc=function(t){return t===void 0&&(t=0),Date.now()+t},ds=!1,hS=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=fS),!ds){ds=!0;var r=Fc(e);cS(function(){var i=!1;try{i=sS()}finally{if(ds=!1,e=r-Fc(),!uS())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,dS)};document.body?n():Jr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Vc.forEach(function(n){return Jr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Vc.forEach(function(n){return Jr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),na=new hS,zc=function(t){!eo&&t>0&&na.start(),eo+=t,!eo&&na.stop()},pS=function(t){return!Aa(t)&&!tS(t)&&getComputedStyle(t).display==="inline"},gS=function(){function t(e,n){this.target=e,this.observedBox=n||ai.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Sd(this.target,this.observedBox,!0);return pS(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),vS=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ii=new WeakMap,$c=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},ji=function(){function t(){}return t.connect=function(e,n){var r=new vS(e,n);Ii.set(e,r)},t.observe=function(e,n,r){var i=Ii.get(e),o=i.observationTargets.length===0;$c(i.observationTargets,n)<0&&(o&&In.push(i),i.observationTargets.push(new gS(n,r&&r.box)),zc(1),na.schedule())},t.unobserve=function(e,n){var r=Ii.get(e),i=$c(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&In.splice(In.indexOf(r),1),r.observationTargets.splice(i,1),zc(-1))},t.disconnect=function(e){var n=this,r=Ii.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),mS=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ji.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ji.unobserve(this,e)},t.prototype.disconnect=function(){ji.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ut(){return ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ut.apply(this,arguments)}function to(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var Yr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function Tr(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function Ni(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var yS={box:"border-box"};function hs(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=u.useState(0),s=o[0],a=o[1];u.useDebugValue(n+": "+s);var l=u.useCallback(function(c){a(c[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Yr(function(){if(t.current&&r){var c=new mS(l);return c.observe(t.current,yS),function(){c.disconnect()}}},[t,l,r]),r?s:0}function ct(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var Hc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Gc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},bS=G0({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:ut({},Hc,Gc)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:ut({},Hc,Gc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ut({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Z0({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(ct()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(ct()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),wS=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],SS=["velocity"],LS=["onRest","config"],xd=yb.default,ES=xd.tension,Bi=xd.friction,xS=u.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,c=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,h=t.maxHeight,v=t.defaultSnap,y=v===void 0?_S:v,p=t.snapPoints,L=p===void 0?OS:p,w=t.blocking,g=w===void 0||w,b=t.scrollLocking,_=b===void 0||b,E=t.style,m=t.onSpringStart,S=t.onSpringCancel,C=t.onSpringEnd,R=t.reserveScrollBarGap,M=R===void 0?g:R,O=t.expandOnContentDrag,P=O!==void 0&&O,j=to(t,wS),B=function(){var F=u.useState(!1),te=F[0],q=F[1],de=u.useState({}),Te=de[0],xe=de[1],Ae=u.useCallback(function(ke){return xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!1,ae))}),function(){xe(function(Be){var ae;return ut({},Be,((ae={})[ke]=!0,ae))})}},[]);return u.useEffect(function(){var ke=Object.values(Te);ke.length!==0&&ke.every(Boolean)&&q(!0)},[Te]),{ready:te,registerReady:Ae}}(),$=B.ready,G=B.registerReady,z=u.useRef(!1),Z=u.useRef(m),A=u.useRef(S),T=u.useRef(C);u.useEffect(function(){Z.current=m,A.current=S,T.current=C},[S,m,C]);var k,D,U=Eb(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),V=U[0],W=U[1],I=u.useRef(null),X=u.useRef(null),ee=u.useRef(null),K=u.useRef(null),ie=u.useRef(null),fe=u.useRef(null),ge=u.useRef(0),Le=u.useRef(),Fe=u.useRef(!1),we=(k=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),D=u.useRef(k==null?void 0:k.matches),u.useDebugValue(D.current?"reduce":"no-preference"),u.useEffect(function(){var F=function(te){D.current=te.matches};return k==null||k.addListener(F),function(){return k==null?void 0:k.removeListener(F)}},[k]),D),Ee=function(F){var te=F.targetRef,q=F.enabled,de=F.reserveScrollBarGap,Te=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(q?"Enabled":"Disabled"),u.useEffect(function(){if(!q)return Te.current.deactivate(),void(Te.current={activate:function(){},deactivate:function(){}});var xe=te.current,Ae=!1;Te.current={activate:function(){Ae||(Ae=!0,Kw(xe,{allowTouchMove:function(ke){return ke.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:de}))},deactivate:function(){Ae&&(Ae=!1,Jw(xe))}}},[q,te,de]),Te}({targetRef:X,enabled:$&&_,reserveScrollBarGap:M}),Ie=function(F){var te=F.targetRef,q=F.enabled,de=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(q?"Enabled":"Disabled"),u.useEffect(function(){if(!q)return de.current.deactivate(),void(de.current={activate:function(){},deactivate:function(){}});var Te=te.current,xe=!1,Ae=[],ke=[];de.current={activate:function(){if(!xe){xe=!0;var Be=Te.parentNode;document.querySelectorAll("body > *").forEach(function(ae){if(ae!==Be){var ve=ae.getAttribute("aria-hidden");ve!==null&&ve!=="false"||(Ae.push(ve),ke.push(ae),ae.setAttribute("aria-hidden","true"))}})}},deactivate:function(){xe&&(xe=!1,ke.forEach(function(Be,ae){var ve=Ae[ae];ve===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",ve)}),Ae=[],ke=[])}}},[te,q]),de}({targetRef:I,enabled:$&&g}),Me=function(F){var te=F.targetRef,q=F.fallbackRef,de=F.initialFocusRef,Te=F.enabled,xe=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Te?"Enabled":"Disabled"),u.useEffect(function(){if(!Te)return xe.current.deactivate(),void(xe.current={activate:function(){},deactivate:function(){}});var Ae=q.current,ke=$w(te.current,{onActivate:void 0,initialFocus:de?function(){return(de==null?void 0:de.current)||Ae}:void 0,fallbackFocus:Ae,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;xe.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(ke.activate()).then(function(){return Promise.resolve(new Promise(function(ae){return setTimeout(function(){return ae(void 0)},0)})).then(function(){})}))}catch(ae){return Promise.reject(ae)}},deactivate:function(){Be&&(Be=!1,ke.deactivate())}}},[Te,q,de,te]),xe}({targetRef:I,fallbackRef:fe,initialFocusRef:f||void 0,enabled:$&&g&&f!==!1}),Re=function(F){var te=F.getSnapPoints,q=F.heightRef,de=F.lastSnapRef,Te=F.ready,xe=function(Ke){var pt=Ke.contentRef,gt=Ke.controlledMaxHeight,Qe=Ke.footerEnabled,Nt=Ke.footerRef,kt=Ke.headerEnabled,vt=Ke.headerRef,tn=Ke.registerReady,Wt=Ke.resizeSourceRef,vr=u.useMemo(function(){return tn("contentHeight")},[tn]),mr=function(nn,Ln,En){var xn=u.useMemo(function(){return Ln("maxHeight")},[Ln]),Cn=u.useState(function(){return Ni(nn)||typeof window<"u"?window.innerHeight:0}),wr=Cn[0],Sr=Cn[1],rn=wr>0,ne=u.useRef(0);return u.useDebugValue(nn?"controlled":"auto"),u.useEffect(function(){rn&&xn()},[rn,xn]),Yr(function(){if(nn)return Sr(Ni(nn)),void(En.current="maxheightprop");var Na=function(){ne.current||(ne.current=requestAnimationFrame(function(){Sr(window.innerHeight),En.current="window",ne.current=0}))};return window.addEventListener("resize",Na),Sr(window.innerHeight),En.current="window",xn(),function(){window.removeEventListener("resize",Na),cancelAnimationFrame(ne.current)}},[nn,xn,En]),wr}(gt,tn,Wt),Fn=hs(vt,{label:"headerHeight",enabled:kt,resizeSourceRef:Wt}),yr=hs(pt,{label:"contentHeight",enabled:!0,resizeSourceRef:Wt}),zn=hs(Nt,{label:"footerHeight",enabled:Qe,resizeSourceRef:Wt}),Sn=Math.min(mr-Fn-zn,yr)+Fn+zn;u.useDebugValue("minHeight: "+Sn);var br=yr>0;return u.useEffect(function(){br&&vr()},[br,vr]),{maxHeight:mr,minHeight:Sn,headerHeight:Fn,footerHeight:zn}}({contentRef:F.contentRef,controlledMaxHeight:F.controlledMaxHeight,footerEnabled:F.footerEnabled,footerRef:F.footerRef,headerEnabled:F.headerEnabled,headerRef:F.headerRef,registerReady:F.registerReady,resizeSourceRef:F.resizeSourceRef}),Ae=xe.maxHeight,ke=xe.minHeight,Be=xe.headerHeight,ae=xe.footerHeight,ve=function(Ke,pt){var gt=[].concat(Ke).map(Ni).reduce(function(vt,tn){return vt.add(Tr(tn,0,pt)),vt},new Set),Qe=Array.from(gt),Nt=Math.min.apply(Math,Qe);if(Number.isNaN(Nt))throw new TypeError("minSnap is NaN");var kt=Math.max.apply(Math,Qe);if(Number.isNaN(kt))throw new TypeError("maxSnap is NaN");return{snapPoints:Qe,minSnap:Nt,maxSnap:kt}}(Te?te({height:q.current,footerHeight:ae,headerHeight:Be,minHeight:ke,maxHeight:Ae}):[0],Ae),ft=ve.snapPoints,Zt=ve.minSnap,lt=ve.maxSnap;return u.useDebugValue("minSnap: "+Zt+", maxSnap:"+lt),{minSnap:Zt,maxSnap:lt,findSnap:function(Ke){var pt=Ni(typeof Ke=="function"?Ke({footerHeight:ae,headerHeight:Be,height:q.current,minHeight:ke,maxHeight:Ae,snapPoints:ft,lastSnap:de.current}):Ke);return ft.reduce(function(gt,Qe){return Math.abs(Qe-pt)<Math.abs(gt-pt)?Qe:gt},Zt)},maxHeight:Ae}}({contentRef:ee,controlledMaxHeight:h,footerEnabled:!!o,footerRef:ie,getSnapPoints:L,headerEnabled:s!==!1,headerRef:K,heightRef:ge,lastSnapRef:c,ready:$,registerReady:G,resizeSourceRef:Le}),re=Re.minSnap,oe=Re.maxSnap,ze=Re.maxHeight,Ye=Re.findSnap,J=u.useRef(ze),$e=u.useRef(re),Ne=u.useRef(oe),ht=u.useRef(Ye),at=u.useRef(0);Yr(function(){J.current=ze,Ne.current=oe,$e.current=re,ht.current=Ye,at.current=Ye(y)},[Ye,y,ze,oe,re]);var se=u.useCallback(function(F){var te=F.onRest,q=F.config,de=(q=q===void 0?{}:q).velocity,Te=de===void 0?1:de,xe=to(q,SS),Ae=to(F,LS);return new Promise(function(ke){return W(ut({},Ae,{config:ut({velocity:Te},xe,{mass:1,tension:ES,friction:Math.max(Bi,Bi+(Bi-Bi*Te))}),onRest:function(){var Be=[].slice.call(arguments);ke.apply(void 0,Be),te==null||te.apply(void 0,Be)}}))})},[W]),wn=tb(bS,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(F){return A.current==null?void 0:A.current({type:"SNAP",source:F.snapSource})},[]),onCloseCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"RESIZE",source:Le.current})},[]),onOpenEnd:u.useCallback(function(){return T.current==null?void 0:T.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(F,te){return T.current==null?void 0:T.current({type:"SNAP",source:F.snapSource})},[]),onResizeEnd:u.useCallback(function(){return T.current==null?void 0:T.current({type:"RESIZE",source:Le.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(F,te){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"SNAP",source:te.payload.source||"custom"}))}catch(q){return Promise.reject(q)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(Z.current==null?void 0:Z.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),onSnapEnd:u.useCallback(function(F,te){try{return Promise.resolve(T.current==null?void 0:T.current({type:"SNAP",source:F.snapSource}))}catch(q){return Promise.reject(q)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"OPEN"}))}catch(F){return Promise.reject(F)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"CLOSE"}))}catch(F){return Promise.reject(F)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve(T.current==null?void 0:T.current({type:"RESIZE",source:Le.current}))}catch(F){return Promise.reject(F)}},[]),renderVisuallyHidden:u.useCallback(function(F,te){try{return Promise.resolve(se({y:at.current,ready:0,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(q){return Promise.reject(q)}},[se]),activate:u.useCallback(function(F,te){try{return z.current=!0,Promise.resolve(Promise.all([Ee.current.activate(),Me.current.activate(),Ie.current.activate()])).then(function(){})}catch(q){return Promise.reject(q)}},[Ie,Me,Ee]),deactivate:u.useCallback(function(){try{return Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate(),z.current=!1,Promise.resolve()}catch(F){return Promise.reject(F)}},[Ie,Me,Ee]),openImmediately:u.useCallback(function(){try{return ge.current=at.current,Promise.resolve(se({y:at.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){})}catch(F){return Promise.reject(F)}},[se]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(se({y:0,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:!0})).then(function(){return ge.current=at.current,Promise.resolve(se({y:at.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:at.current,immediate:we.current})).then(function(){})})}catch(F){return Promise.reject(F)}},[se,we]),snapSmoothly:u.useCallback(function(F,te){try{var q=ht.current(F.y);return ge.current=q,c.current=q,Promise.resolve(se({y:q,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:we.current,config:{velocity:F.velocity}})).then(function(){})}catch(de){return Promise.reject(de)}},[se,c,we]),resizeSmoothly:u.useCallback(function(){try{var F=ht.current(ge.current);return ge.current=F,c.current=F,Promise.resolve(se({y:F,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:Le.current!=="element"||we.current})).then(function(){})}catch(te){return Promise.reject(te)}},[se,c,we]),closeSmoothly:u.useCallback(function(F,te){try{return se({minSnap:ge.current,immediate:!0}),ge.current=0,Promise.resolve(se({y:0,maxHeight:J.current,maxSnap:Ne.current,immediate:we.current})).then(function(){return Promise.resolve(se({ready:0,immediate:!0})).then(function(){})})}catch(q){return Promise.reject(q)}},[se,we])}}),pi=wn[0],Mt=wn[1];u.useEffect(function(){$&&Mt(a?"OPEN":"CLOSE")},[a,Mt,$]),Yr(function(){(ze||oe||re)&&Mt("RESIZE")},[ze,oe,re,Mt]),u.useEffect(function(){return function(){Ee.current.deactivate(),Me.current.deactivate(),Ie.current.deactivate()}},[Ie,Me,Ee]),u.useImperativeHandle(e,function(){return{snapTo:function(F,te){var q=te===void 0?{}:te,de=q.velocity,Te=de===void 0?1:de,xe=q.source,Ae=xe===void 0?"custom":xe;Mt("SNAP",{payload:{y:ht.current(F),velocity:Te,source:Ae}})},get height(){return ge.current}}},[Mt]),u.useEffect(function(){var F=X.current,te=function(de){Fe.current&&de.preventDefault()},q=function(de){F.scrollTop<0&&(requestAnimationFrame(function(){F.style.overflow="hidden",F.scrollTop=0,F.style.removeProperty("overflow")}),de.preventDefault())};return P&&(F.addEventListener("scroll",te),F.addEventListener("touchmove",te),F.addEventListener("touchstart",q)),function(){F.removeEventListener("scroll",te),F.removeEventListener("touchmove",te),F.removeEventListener("touchstart",q)}},[P,X]);var Gt=xw(function(F){var te=F.args,q=(te=te===void 0?[]:te)[0],de=(q=q===void 0?{}:q).closeOnTap,Te=de!==void 0&&de,xe=q.isContentDragging,Ae=xe!==void 0&&xe,ke=F.cancel,Be=F.direction[1],ae=F.down,ve=F.first,ft=F.last,Zt=F.memo,lt=Zt===void 0?V.y.getValue():Zt,Ke=F.tap,pt=F.velocity,gt=-1*F.movement[1];if(!z.current)return ke(),lt;if(d&&Te&&Ke)return ke(),setTimeout(function(){return d()},0),lt;if(Ke)return lt;var Qe=lt+gt,Nt=gt*pt,kt=Math.max($e.current,Math.min(Ne.current,Qe+2*Nt));if(!ae&&d&&Be>0&&Qe+Nt<$e.current/2)return ke(),d(),lt;var vt=ae?d||$e.current!==Ne.current?Wr(Qe,d?0:$e.current,Ne.current,.55):Qe<$e.current?Wr(Qe,$e.current,2*Ne.current,.55):Wr(Qe,$e.current/2,Ne.current,.55):kt;return P&&Ae?(vt>=Ne.current&&(vt=Ne.current),lt===Ne.current&&X.current.scrollTop>0&&(vt=Ne.current),Fe.current=vt<Ne.current):Fe.current=!1,ve&&Mt("DRAG"),ft?(Mt("SNAP",{payload:{y:vt,velocity:pt>.05?pt:1,source:"dragging"}}),lt):(W({y:vt,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:!0,config:{velocity:pt}}),lt)},{filterTaps:!0});if(Number.isNaN(Ne.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN($e.current))throw new TypeError("minSnapRef is NaN!!");var gi=function(F){var te,q=F.spring,de=Wn([q.y,q.maxHeight],function(ae,ve){return Math.round(Tr(ve-ae,0,16))+"px"}),Te=Wn([q.y,q.minSnap,q.maxSnap],function(ae,ve,ft){return Tr(ae,ve,ft)+"px"}),xe=Wn([q.y,q.minSnap,q.maxSnap],function(ae,ve,ft){return ae<ve?ve-ae+"px":ae>ft?ft-ae+"px":"0px"}),Ae=Wn([q.y,q.maxSnap],function(ae,ve){return ae>=ve?Math.ceil(ae-ve):0}),ke=Wn([q.y,q.minSnap],function(ae,ve){if(!ve)return 0;var ft=Math.max(ve/2-45,0);return Tr((ae-ft)*(1/(Math.min(ve/2+45,ve)-ft)+0),0,1)}),Be=Wn([q.y,q.minSnap],function(ae,ve){return ve?Tr(ae/ve,0,1):0});return(te={})["--rsbs-content-opacity"]=ke,te["--rsbs-backdrop-opacity"]=Be,te["--rsbs-antigap-scale-y"]=Ae,te["--rsbs-overlay-translate-y"]=xe,te["--rsbs-overlay-rounded"]=de,te["--rsbs-overlay-h"]=Te,te}({spring:V});return u.createElement(zb.div,ut({},j,{"data-rsbs-root":!0,"data-rsbs-state":CS.find(pi.matches),"data-rsbs-is-blocking":g,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:I,style:ut({},gi,E,{opacity:V.ready})}),r,g&&u.createElement("div",ut({key:"backdrop","data-rsbs-backdrop":!0},Gt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:fe,onKeyDown:function(F){F.key==="Escape"&&(F.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",ut({key:"header","data-rsbs-header":!0,ref:K},Gt()),s),u.createElement("div",ut({key:"scroll","data-rsbs-scroll":!0,ref:X},P?Gt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:ee},n)),o&&u.createElement("div",ut({key:"footer",ref:ie,"data-rsbs-footer":!0},Gt()),o)))}),CS=["closed","opening","open","closing","dragging","snapping","resizing"];function _S(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function OS(t){return t.minHeight}var MS=["onSpringStart","onSpringEnd","skipInitialTransition"],Cd=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=to(t,MS),s=u.useState(!1),a=s[0],l=s[1],c=u.useRef(),f=u.useRef(null),d=u.useRef(i&&o.open?"OPEN":"CLOSED");Yr(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var h=u.useCallback(function(y){return Promise.resolve(n==null?void 0:n(y)).then(function(){y.type==="OPEN"&&cancelAnimationFrame(c.current)})},[n]),v=u.useCallback(function(y){return Promise.resolve(r==null?void 0:r(y)).then(function(){y.type==="CLOSE"&&(c.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?u.createElement(Jy,{"data-rsbs-portal":!0},u.createElement(xS,ut({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const _d=28,kS="MapGoogle-module__root__Vi-sMl",PS="MapGoogle-module__hideUI__-JYLuR",RS="MapGoogle-module__mapContainer__OCCTIX",TS="MapGoogle-module__balloon__4UVhuT",AS="MapGoogle-module__details__4osNXn",DS="MapGoogle-module__cluster__5qmRds",IS="MapGoogle-module__overlay__g-nEoT",jS="MapGoogle-module__mapControl__mzyTwr",NS="MapGoogle-module__geolocationControl__1exHgA",BS="MapGoogle-module__bottomSheet__avcBmY",US="MapGoogle-module__locationViewContent__xwLeDh",VS="MapGoogle-module__locationViewHeader__maBLv0",FS="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",zS="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",$S="MapGoogle-module__sheetSubmit__rPQG26",Xe={root:kS,hideUI:PS,mapContainer:RS,balloon:TS,details:AS,cluster:DS,overlay:IS,mapControl:jS,geolocationControl:NS,bottomSheet:BS,locationViewContent:US,locationViewHeader:VS,deliveryDetailsViewContent:FS,deliveryDetailsViewHeader:zS,sheetSubmit:$S},Od=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>x.jsx(Cd,{expandOnContentDrag:!0,open:i,initialFocusRef:!1,defaultSnap:({snapPoints:l})=>Math.min(...l),blocking:!1,snapPoints:({footerHeight:l,headerHeight:c,maxHeight:f,minHeight:d})=>[n==null?d:c+l+n,f-_d],footer:e?null:x.jsx(Ot,{disabled:o,loading:s,variant:"primary",className:Xe.sheetSubmit,onClick:r,children:x.jsx(An,{keyName:"choose",ns:"common"})}),sibling:x.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),children:x.jsx("div",{className:Xe.bottomSheet,children:t})}),HS={header:Xe.locationViewHeader,content:Xe.locationViewContent},GS=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=hi("screenSm"),[l,c]=u.useState(null),f=()=>{s==null||s(!1),r==null||r(i)},d=()=>{r==null||r(null)},h=()=>{s==null||s(!0),r==null||r(i)},v=()=>{n==null||n(i),s==null||s(!1),r==null||r(null)},y=(o==null?void 0:o.uid)===i.uid,p=y?Yn:Xt,L=Mf({isSelectedPoint:y}),w=u.useMemo(()=>{let _;switch(!0){case(i.type===30&&!y):{_=xt(Rt.PinLocker,"--owl-color-primary");break}case(i.type!==30&&!y):{_=xt(Rt.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&y):{_=xt(Rt.PinLocker,"--owl-color-success");break}case(i.type!==30&&y):{_=xt(Rt.PinPvz,"--owl-color-black");break}}return mn(_,"Icon url is not defined"),{scaledSize:new google.maps.Size(...p),url:Jt(_)}},[y,p,i.type]),g=u.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),b=y&&L&&!!(l!=null&&l.getVisible());return x.jsxs(tf,{noClustererRedraw:!0,icon:w,position:g,clusterer:t,options:Of,onLoad:c,onClick:f,children:[a&&x.jsx(Od,{minSnapHeight:200,open:b,onDismiss:d,onSubmitClick:v,children:x.jsx(_f,{hideActions:!0,classes:HS,location:i,onClose:d})}),b&&!a&&x.jsx(lf,{onCloseClick:d,children:x.jsx(Cf,{...i,hideDetails:e,className:Xe.balloon,onSubmit:v,onDetails:h})})]},i.uid)},ZS=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>x.jsx(Sv,{clusterClass:Xe.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.addEventListener("touchstart",Os,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.removeEventListener("touchstart",Os)},children:s=>x.jsx(x.Fragment,{children:i.map(a=>x.jsx(GS,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),WS=u.memo(ZS),qS=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=st(),o=zt(Fu),s=bt(c=>c.location),a=$t(Ju),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return x.jsx(WS,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},KS=u.memo(qS),Md=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},ce.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),ce.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),ce.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),JS="DeliveryBalloon-module__root__Nu90iy",YS="DeliveryBalloon-module__details__eqUTaI",XS="DeliveryBalloon-module__header__JVdyxN",QS="DeliveryBalloon-module__title__-zKKCt",e1="DeliveryBalloon-module__description__no5-ki",t1="DeliveryBalloon-module__actions__C-N0H-",n1="DeliveryBalloon-module__errorVariant__e6uhZl",r1="DeliveryBalloon-module__logo__62gC5h",ln={root:JS,details:YS,header:XS,title:QS,description:e1,actions:t1,errorVariant:n1,logo:r1},ra=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",c=a==="default",f=t?"{ courier_balloon.title }":x.jsx(An,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":x.jsx(An,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":x.jsx(An,{keyName:"error_description",ns:"courier_balloon"});return x.jsxs("div",{className:be(ln.root,n,ln[`${a}Variant`]),children:[x.jsxs("div",{className:ln.header,children:[x.jsx(Md,{className:ln.logo}),x.jsx("span",{className:ln.title,children:l?d:f}),r&&x.jsx(ui,{onClick:o})]}),x.jsx("div",{className:ln.description,children:l?h:e||"{{ properties.address }}"}),c&&!i&&x.jsx("div",{className:ln.actions,children:x.jsx(Ot,{id:lo,as:"button",variant:"primary",className:ln.details,onClick:s,children:t?"{ details }":x.jsx(An,{keyName:"details",ns:"common"})})})]})},i1="Chip-module__root__zsoSyP",o1="Chip-module__active__BlTSFB",Zc={root:i1,active:o1},Wc=({active:t,children:e,className:n,...r})=>x.jsx("div",{...r,className:be(Zc.root,n,{[Zc.active]:t}),children:e}),s1="TextArea-module__root__8YFknR",a1={root:s1},qc=u.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=u.useRef(null);u.useImperativeHandle(s,()=>({focus:()=>{var c,f;(c=a.current)==null||c.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var c,f;(c=a.current)==null||c.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:c=>{r&&r({target:{value:c}}),a.current&&(a.current.value=c)}}),[n,r,i]);const l=jd(e,a);return x.jsx("textarea",{...o,ref:l,className:be(a1.root,t),onBlur:n,onFocus:i,onChange:r})}),l1=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},c1="DeliveryDetailsView-module__title__azeoUr",u1="DeliveryDetailsView-module__logo__4zZtpM",f1="DeliveryDetailsView-module__header__oDE9He",d1="DeliveryDetailsView-module__content__6P27SY",h1="DeliveryDetailsView-module__section__2M3Qip",p1="DeliveryDetailsView-module__chips__KmYgha",g1="DeliveryDetailsView-module__actions__43XZ-V",v1="DeliveryDetailsView-module__submit__58LKBw",m1="DeliveryDetailsView-module__actionsHidden__SW-67b",y1="DeliveryDetailsView-module__commentSection__GlX1A2",b1="DeliveryDetailsView-module__comment__2pGG6h",mt={title:c1,logo:u1,header:f1,content:d1,section:h1,chips:p1,actions:g1,submit:v1,actionsHidden:m1,commentSection:y1,comment:b1},w1=u.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var m;const{hideDeliveryTime:a,inputs:l,locale:c}=st(),{t:f}=jt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>l1({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=u.useState(!1),[y,p]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),L=u.useCallback(async()=>{v(!0);try{mn(n.address,"Address is required");const S=await Yd({address:n.address,algorithm:10,service:10,language:c||lu});if(!Vu(S))return;const C=S==null?void 0:S.data.data,R={...y,address:C};return o==null||o(R),R}finally{v(!1)}},[c,n.address,o,y]);u.useImperativeHandle(s,()=>({submit:L}),[L]);const w=S=>()=>{p({payload:S,type:"SET_DELIVERY_TIME"})},g=S=>{p({payload:S.target.value,type:"SET_APARTMENT_NUMBER"})},b=S=>{p({payload:S.target.value,type:"SET_COMMENT"})},_=_o(l==null?void 0:l.apartment),E=_o(l==null?void 0:l.comment);return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:be(mt.header,t==null?void 0:t.header),children:[x.jsx(ui,{onClick:i}),x.jsxs("div",{className:mt.title,children:[x.jsx(Md,{className:mt.logo}),x.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),x.jsxs("div",{className:be(mt.content,t==null?void 0:t.content),children:[x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("address"),":"]}),x.jsx("p",{children:n.address})]}),!a&&x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("delivery_time"),":"]}),x.jsxs("div",{className:mt.chips,children:[x.jsx(Wc,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),x.jsx(Wc,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),x.jsxs("section",{className:mt.section,children:[x.jsxs("span",{children:[f("apartment_number"),":"]}),x.jsx(qc,{..._,rows:1,onChange:g})]}),x.jsxs("section",{className:be(mt.section,mt.commentSection),children:[x.jsxs("span",{children:[f("comment"),":"]}),x.jsx(qc,{...E,className:mt.comment,onChange:b})]})]}),x.jsx("div",{className:be(mt.actions,{[mt.actionsHidden]:e}),children:x.jsx(Ot,{loading:h,disabled:!((m=y.meta)!=null&&m.valid)||h,variant:"primary",className:mt.submit,onClick:L,children:f("choose",{ns:"common"})})})]})}),kd=u.memo(w1),S1={header:Xe.deliveryDetailsViewHeader,content:Xe.deliveryDetailsViewContent},L1=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Mf({isSelectedPoint:!0}),a=u.useRef(null),[l,c]=u.useState(!1),[f,d]=u.useState({...r,comment:"",delivery_time:"",apartment_number:""});u.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=u.useState(null),y=hi("screenSm"),p=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),L=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},g=u.useMemo(()=>({url:Jt(xt(Rt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Xt)}),[]),b=async()=>{var S;try{c(!0);const C=await((S=a.current)==null?void 0:S.submit());if(!C)return;n==null||n(C),o==null||o(!1),i==null||i(null)}finally{c(!1)}},_=x.jsx(ra,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:Xe.balloon,onDetails:L,onClose:w}),E=s&&!!(h!=null&&h.getVisible()),m=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return x.jsxs(tf,{noClustererRedraw:!0,icon:g,position:p,options:Of,onLoad:v,children:[y&&x.jsxs(Od,{minSnapHeight:f.address?200:void 0,submitDisabled:!m||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:w,onSubmitClick:b,children:[f.address&&x.jsx(kd,{ref:a,hideActions:!0,classes:S1,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&E&&x.jsx(lf,{onCloseClick:w,children:_})]})},E1=({children:t,className:e,onIdle:n,onLoad:r,onUnmount:i})=>{const{disableDelivery:o,hideMapUI:s,map:a}=st(),l=u.useMemo(()=>{var f,d;return{lat:((f=a==null?void 0:a.center)==null?void 0:f[0])??co[0],lng:((d=a==null?void 0:a.center)==null?void 0:d[1])??co[1]}},[a==null?void 0:a.center]),c=u.useCallback(async f=>{var v;const{latLng:d}=f;if(!d||o)return;ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null);const h=[d.lat(),d.lng()];try{const y=await sr(h),p=(v=y==null?void 0:y.results)==null?void 0:v[0],L=p==null?void 0:p.formatted_address;$t.getState().setPlace(p),mn(L,"Address is not defined"),We.getState().setDeliverPoint({address:L,coords:h})}catch{We.getState().setDeliverPoint({address:null,coords:h})}},[o]);return x.jsx(Yg,{zoom:a==null?void 0:a.initialZoom,center:l,options:Zy,mapContainerClassName:be(Xe.root,e,{[Xe.hideUI]:s}),onLoad:r,onIdle:n,onUnmount:i,onClick:c,children:t})},x1=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),ce.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),ce.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),ce.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),ce.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),C1=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Xe.mapControl),n.classList.add(Xe.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},_1=t=>{const e=document.createElement("div");e.classList.add(Xe.mapControl),e.classList.add(Xe.geolocationControl),e.innerHTML=$i.renderToString(x.jsx(x1,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{ha(async n=>{var a;const{latitude:r,longitude:i}=n.coords,s=await sr([r,i]);$t.getState().setPlace((a=s.results)==null?void 0:a[0])})})},O1=({className:t})=>{const e=Qt(),n=ye(gu),r=ye(jh),i=zt(ga),o=We(Po),{disableGeolocation:s,hideDeliveryTime:a,hideDetails:l,hideMapControls:c,onPointClick:f}=st(),d=u.useCallback(p=>{ye.getState().setMap(p),c||(C1(p),s||_1(p))},[s,c]),h=u.useCallback(()=>{ye.getState().setMap(null)},[]),v=u.useCallback(()=>{if(!n)return;const p=n==null?void 0:n.getBounds();p&&zt.getState().loadNext([[p.getSouthWest().lat(),p.getNorthEast().lat()],[p.getSouthWest().lng(),p.getNorthEast().lng()]],e)},[e,n]),y=u.useCallback(async p=>{var g;if(We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(p),!p)return;const L=[p.location.latitude,p.location.longitude],w=await sr(L);$t.getState().setPlace((g=w.results)==null?void 0:g[0])},[]);return x.jsxs("div",{className:be(Xe.mapContainer,t),children:[x.jsxs(E1,{onIdle:v,onLoad:d,onUnmount:h,children:[o&&x.jsx(L1,{hideDeliveryTime:a,hideDetails:l,point:o,setOpenDetails:ye.getState().setDetailsOpen,setDeliveryPoint:We.getState().setDeliverPoint,onPointClick:f}),x.jsx(KS,{onPointClick:f,onOpenDetails:ye.getState().setDetailsOpen,onPointSelected:y})]}),(i||r)&&x.jsx(ya,{className:Xe.overlay,children:x.jsx(ri,{})})]})},M1=u.memo(O1);function Bn(){return Bn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Bn.apply(this,arguments)}const Pd=(t,e)=>{const n={};for(const r in t)e.indexOf(r)===-1&&(n[r]=t[r]);return n},Rd=u.createContext(null),Fo=u.createContext(null),Td=t=>e=>u.createElement(Fo.Consumer,null,n=>u.createElement(t,Bn({parent:n},e))),k1=(t=[])=>{const[e,n]=u.useState(!1),r=u.useRef(t),i=(()=>{const s=u.useContext(Rd);if(s===null)throw new Error("Couldn't find Yandex.Maps API in the context. Make sure that hook useYMaps is inside <YMaps /> provider");return s})(),o=i.getApi();return u.useEffect(()=>{i.load().then(()=>Promise.all(r.current.map(i.loadModule))).then(()=>n(!0))},[]),e&&o?o:null},P1=()=>{},R1=["onLoad","onError","modules","apiLoader"];function Da(t,e=!1,n=[]){return r=>{const{width:i,height:o,modules:s=[],onLoad:a=P1}=r,l=k1(n.concat(s)),c=!e||!!l,f=Pd(r,R1);return u.useEffect(()=>l?a(l):void 0,[l]),c?u.createElement(t,Bn({ymaps:l},f)):u.createElement("div",{style:{width:i,height:o}})}}const T1=typeof window<"u",Kc={lang:"ru_RU",load:"",ns:"",mode:"release"},A1=t=>{const{version:e="2.1",enterprise:n=!1,query:r={lang:"ru_RU",load:"",ns:""},preload:i=!1,children:o}=t,s=u.useRef((a=>{const{query:l=Kc}=a,c=Date.now().toString(32),f=l.ns||"",d="__yandex-maps-api-onload__$$"+c,h="__yandex-maps-api-onerror__$$"+c,v=T1?window:{},y={};let p;const L=()=>f?v[f]:p,w=()=>{delete v[d],delete v[h]};return{load:()=>{if(L())return Promise.resolve(p);if(y[f])return y[f];const g={onload:d,onerror:h,...Kc,...l},b=Object.keys(g).map(E=>`${E}=${g[E]}`).join("&"),_=[`https://${a.enterprise?"enterprise.":""}api-maps.yandex.ru`,a.version,"?"+b].join("/");return y[f]=new Promise((E,m)=>{v[d]=S=>{w(),S.ready(()=>{p=S,E(S)})},v[h]=S=>{w(),m(S)},(S=>new Promise((C,R)=>{const M=document.createElement("script");M.type="text/javascript",M.onload=C,M.onerror=R,M.src=S,M.async=!0,document.head.appendChild(M)}))(_).catch(v[h])}),y[f]},getApi:L,loadModule:g=>new Promise((b,_)=>{p.modules.require(g).done(E=>{E.forEach(m=>{((S,C,R,M=!1)=>{const O=typeof C=="string"?C.split("."):C.slice();let P,j=S;for(;O.length>1;)P=O.shift(),j[P]||(j[P]={}),j=j[P];const B=O[0];j[B]=M===!0&&j[B]||R})(p,g,m,!0)}),b(p)},_)})}})({version:e,enterprise:n,query:r,preload:i}));return u.useEffect(()=>{i&&s.current.load()},[s.current]),u.createElement(Rd.Provider,{value:s.current},o)},Jc=/^on(?=[A-Z])/;function Ve(t){return Object.keys(t).reduce((e,n)=>{if(Jc.test(n)){const r=n.replace(Jc,"").toLowerCase();e._events[r]=t[n]}else e[n]=t[n];return e},{_events:{}})}function Un(t,e,n){typeof n=="function"&&t.events.add(e,n)}function Vn(t,e,n){typeof n=="function"&&t.events.remove(e,n)}function gr(t,e,n){Object.keys(Object.assign({},e,n)).forEach(r=>{e[r]!==n[r]&&(Vn(t,r,e[r]),Un(t,r,n[r]))})}const Ad=t=>"default"+t.charAt(0).toUpperCase()+t.slice(1);function tt(t,e){return t[e]!==void 0||t[Ad(e)]===void 0}function Y(t,e,n){return(tt(t,e)?t[e]:t[Ad(e)])||n}function nt(t,e,n=null){if(t!==e){if(t&&("current"in t?t.current=null:typeof t=="function"&&t(null)),!e)return;"current"in e?e.current=n:typeof e=="function"&&e(n)}}function Dd(t){const{width:e,height:n,style:r,className:i}=t;return r!==void 0||i!==void 0?Object.assign({},r&&{style:r},i&&{className:i}):{style:{width:e,height:n}}}class D1 extends u.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,n){const{onError:r=()=>{}}=this.props;r(e),this.setState({error:e,errorInfo:n})}render(){return this.state.error?null:this.props.children}}const Ia=t=>({onError:e,...n})=>u.createElement(D1,{onError:e},u.createElement(t,n));class Xr extends u.Component{constructor(){super(),this.instance=null,this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this.instance=Xr.mountObject(this._parentElement,this.props.ymaps.Map,this.props),this.setState({instance:this.instance})}componentDidUpdate(e){this.instance!==null&&Xr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Xr.unmountObject(this.instance,this.props)}render(){const e=Dd(this.props),n=Ve(this.props),r=Pd(n,["_events","state","defaultState","options","defaultOptions","instanceRef","ymaps","children","width","height","style","className"]);return u.createElement(Fo.Provider,{value:this.state.instance},u.createElement("div",Bn({ref:this._getRef},e,r),this.props.children))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=new n(e,Y(r,"state"),Y(r,"options"));return Object.keys(o).forEach(a=>Un(s,a,o[a])),nt(null,i,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"state")){const l=Y(n,"state",{}),c=Y(r,"state",{});l.type!==c.type&&e.setType(c.type),l.behaviors!==c.behaviors&&(l.behaviors&&e.behaviors.disable(l.behaviors),c.behaviors&&e.behaviors.enable(c.behaviors)),c.zoom&&l.zoom!==c.zoom&&e.setZoom(c.zoom),c.center&&l.center!==c.center&&e.setCenter(c.center),c.bounds&&l.bounds!==c.bounds&&e.setBounds(c.bounds)}if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options",{});l!==c&&e.options.set(c)}Y(n,"width")===Y(r,"width")&&Y(n,"height")===Y(r,"height")||e.container.fitToViewport(),gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),e.destroy(),nt(r))}}const Id=Ia(Da(Xr,!0,["Map"]));Id.defaultProps={width:320,height:240};class no extends u.Component{constructor(){super(),this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this._mounted=!0,this.props.ymaps.panorama.isSupported()&&no.mountObject(this._parentElement,this.props.ymaps.panorama,this.props).then(e=>this._mounted&&this.setState({instance:e}))}componentDidUpdate(e){this.state.instance!==null&&no.updateObject(this.state.instance,e,this.props)}componentWillUnmount(){this._mounted=!1,no.unmountObject(this.state.instance,this.props)}render(){const e=Dd(this.props);return u.createElement("div",Bn({ref:this._getRef},e))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=Y(r,"point"),a=Y(r,"locateOptions"),l=Y(r,"options");return new Promise((c,f)=>{n.locate(s,a).done(d=>{if(d.length>0){const h=new n.Player(e,d[0],l);nt(null,i,h),Object.keys(o).forEach(v=>Un(h,v,o[v])),c(h)}},f)})}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"point")){const l=Y(r,"point"),c=Y(n,"point"),f=Y(r,"locateOptions");l!==c&&e.moveTo(l,f)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Vn(e,o,i[o])),nt(r))}}class ro extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=ro.mountControl(this.props.ymaps.control[this.props.name],this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&ro.updateControl(this.instance,e,this.props)}componentWillUnmount(){ro.unmountControl(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountControl(e,n){const{instanceRef:r,parent:i,lazy:o,_events:s}=Ve(n),a=new e({data:Y(n,"data"),options:Y(n,"options"),state:Y(n,"state"),mapTypes:Y(n,"mapTypes"),lazy:o});if(Object.keys(s).forEach(l=>Un(a,l,s[l])),i&&i.controls&&typeof i.controls.add=="function")i.controls.add(a);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(a)}return nt(null,r,a),a}static updateControl(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"data")){const l=Y(n,"data"),c=Y(r,"data");l!==c&&e.data.set(c)}if(tt(r,"state")){const l=Y(n,"state"),c=Y(r,"state");l!==c&&e.state.set(c)}if(tt(r,"mapTypes")){const l=Y(n,"mapTypes"),c=Y(r,"mapTypes");l!==c&&(e.removeAllMapTypes(),c.forEach(f=>e.addMapType(f)))}gr(e,s,i),nt(a,o,e)}static unmountControl(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.controls&&typeof i.controls.remove=="function"?i.controls.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class io extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=io.mountObject(this.props.ymaps.Clusterer,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.state.instance!==null&&io.updateObject(this.instance,e,this.props)}componentWillUnmount(){io.unmountObject(this.instance,this.props)}render(){return u.createElement(Fo.Provider,{value:this.state.instance},this.props.children)}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Y(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount Clusterer");i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}class Qr extends u.Component{constructor(){super(),this.state={instance:null}}componentDidMount(){const e=Qr.mountObject(this.props.ymaps.ObjectManager,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&Qr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Qr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=Y(n,"options",{}),a=Y(n,"features",{}),l=Y(n,"filter",null),c=Y(n,"objects",{}),f=Y(n,"clusters",{}),d=new e(s);if(d.add(a||[]),d.setFilter(l),d.objects.options.set(c),d.clusters.options.set(f),Object.keys(o).forEach(h=>Un(d,h,o[h])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(d);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount ObjectManager");i.add(d)}return nt(null,r,d),d}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}if(tt(r,"objects")){const l=Y(n,"objects"),c=Y(r,"objects");l!==c&&e.objects.options.set(c)}if(tt(r,"clusters")){const l=Y(n,"clusters"),c=Y(r,"clusters");l!==c&&e.clusters.options.set(c)}if(tt(r,"filter")){const l=Y(n,"filter"),c=Y(r,"filter");l!==c&&e.setFilter(c)}if(tt(r,"features")){const l=Y(n,"features"),c=Y(r,"features");l!==c&&(e.remove(l),e.add(c))}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var I1=Ia(Td(Da(Qr,!0,["ObjectManager"])));class ei extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const{name:e,ymaps:n,dangerZone:r}=this.props,i=ei.mountObject(r&&typeof r.modifyConstructor=="function"?r.modifyConstructor(n[e]):n[e],this.props);this.instance=i,this.setState({instance:i})}componentDidUpdate(e){this.instance!==null&&ei.updateObject(this.instance,e,this.props)}componentWillUnmount(){ei.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Y(n,"geometry"),Y(n,"properties"),Y(n,"options"));if(Object.keys(o).forEach(a=>Un(s,a,o[a])),i&&i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(s)}return nt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(tt(r,"geometry")){const l=Y(n,"geometry",{}),c=Y(r,"geometry",{});Array.isArray(c)&&c!==l?Array.isArray(c[0])&&typeof c[1]=="number"?(e.geometry.setCoordinates(c[0]),e.geometry.setRadius(c[1])):e.geometry.setCoordinates(c):typeof c=="object"&&(c.coordinates!==l.coordinates&&e.geometry.setCoordinates(c.coordinates),c.radius!==l.radius&&e.geometry.setRadius(c.radius))}if(tt(r,"properties")){const l=Y(n,"properties"),c=Y(r,"properties");l!==c&&e.properties.set(c)}if(tt(r,"options")){const l=Y(n,"options"),c=Y(r,"options");l!==c&&e.options.set(c)}gr(e,s,i),nt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Vn(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),nt(r))}}var Yc=Ia(Td(Da(t=>u.createElement(ei,Bn({},t,{name:"Placemark"})),!0,["Placemark"])));const oo=(t,e)=>t===30?`custom#pin-locker${e?`__${e}`:""}`:`custom#pin-pvz${e?`__${e}`:""}`,Br=t=>[-(t[0]/2),-t[1]],Xc=(t,e,n)=>t==null?void 0:t.map(r=>{var i;return{id:r.uid,type:"Feature",properties:{point:r},geometry:{type:"Point",coordinates:[r.location.latitude,r.location.longitude]},options:{hideIconOnBalloonOpen:!1,preset:oo(r.type),balloonOffset:[0,-Yn[1]],balloonContentLayout:(i=e==null?void 0:e.templateLayoutFactory)==null?void 0:i.createClass(n)}}}),j1={en:"en_US",ru:"ru_RU"},N1={load:"suggest",apikey:"5298a725-4baa-457a-a2a7-c3abac81db20"},B1=["templateLayoutFactory","option.presetStorage","geocode"],U1=["objectManager.addon.objectsBalloon"],Qc=["geoObject.addon.balloon"],V1={yandexMapDisablePoiInteractivity:!1},F1={clusterize:!0},eu={iconImageSize:Xt,iconLayout:"default#image",hideIconOnBalloonOpen:!1,balloonOffset:[0,-Xt[1]],iconImageOffset:Br(Xt)},z1="MapYandex-module__root__GNnwcS",$1="MapYandex-module__overlay__lf7cbO",H1="MapYandex-module__details__T9uy6N",tu={root:z1,overlay:$1,details:H1},G1=({className:t})=>{const{t:e}=jt(["courier_balloon","common"]),n=u.useRef(),r=u.useRef(null),{disableDelivery:i,hideDetails:o,locale:s,map:a,onPointClick:l}=st(),[c,f]=u.useState(null),[d,h]=u.useState([]),[v,y]=u.useState(F1),p=Qt(),L=zt(Fu),w=zt(ga),g=We(Po),b=bt(k=>k.location),_=u.useRef([]),E=u.useMemo(()=>$i.renderToString(x.jsx(Cf,{SSR:!0,hideDetails:o})).replace("{ choose }",e("choose")).replace("{ details }",e("details")),[e,s,o]),m=u.useMemo(()=>$i.renderToString(x.jsx(ra,{SSR:!0,variant:"default",hideDetails:o})).replace("{ details }",e("details",{ns:"common"})).replace("{ courier_balloon.title }",e("title")),[e,s,o]),S=u.useMemo(()=>$i.renderToString(x.jsx(ra,{SSR:!0,variant:"error",hideDetails:o})).replace("{ courier_balloon.error_title }",e("error_title")).replace("{ courier_balloon.error_description }",e("error_description")),[e,s,o]),C=u.useMemo(()=>({zoom:(a==null?void 0:a.initialZoom)??oa,center:(a==null?void 0:a.center)??co,behaviors:["default","scrollZoom"]}),[a==null?void 0:a.center,a==null?void 0:a.initialZoom]);u.useEffect(()=>{var k,D;(D=n.current)==null||D.events.fire("boundschange",{newBounds:(k=n.current)==null?void 0:k.getBounds()})},[c]),u.useEffect(()=>{var D;if(!c||!r.current)return;for(const U of _.current)U.id!==(b==null?void 0:b.uid)&&((D=r.current)==null||D.remove(U));const k=Xc(L,c,E);_.current=k,r.current.add(k)},[E,c,L,b==null?void 0:b.uid]);const R=u.useCallback(k=>{const D=k.get("newBounds");zt.getState().loadNext([[D[0][0],D[1][0]],[D[0][1],D[1][1]]],p)},[p]),M=u.useRef(b),O=u.useCallback(k=>{var D,U,V,W;f(k),ye.getState().setLoaded(),(D=k==null?void 0:k.option)==null||D.presetStorage.add("custom#pin-locker",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-primary")),iconImageOffset:Br(Xt)}),(U=k==null?void 0:k.option)==null||U.presetStorage.add("custom#pin-locker__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinLocker,"--owl-color-success")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),(V=k==null?void 0:k.option)==null||V.presetStorage.add("custom#pin-pvz",{iconImageSize:Xt,iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-grey-80")),iconImageOffset:Br(Xt)}),(W=k==null?void 0:k.option)==null||W.presetStorage.add("custom#pin-pvz__active",{iconLayout:"default#image",iconImageHref:Jt(xt(Rt.PinPvz,"--owl-color-black")),iconImageSize:Yn,iconImageOffset:Br(Yn)}),y(I=>({...I,clusterIconColor:pa("--owl-color-primary")})),h(Xc(L,k,E))},[E,L]),P=u.useCallback(()=>{ye.getState().setDetailsOpen(!0)},[]),j=u.useCallback(()=>{var k;M.current&&(l==null||l(M.current),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),(k=n.current)==null||k.balloon.close())},[l]),B=u.useCallback(()=>{var k,D;(k=document.getElementById(lo))==null||k.addEventListener("click",P),(D=document.getElementById(bs))==null||D.addEventListener("click",j)},[j,P]),$=u.useCallback(k=>{var U,V,W,I,X,ee;const D=k.get("objectId");((U=M.current)==null?void 0:U.uid)===D&&((I=r.current)==null||I.objects.setObjectOptions((V=M.current)==null?void 0:V.uid,{preset:oo((W=M.current)==null?void 0:W.type)}),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null),M.current=null),(X=document.getElementById(lo))==null||X.removeEventListener("click",P),(ee=document.getElementById(bs))==null||ee.removeEventListener("click",j)},[j,P]),G=u.useCallback(k=>{var W,I,X,ee;const D=k.get("objectId"),U=(I=(W=r.current)==null?void 0:W.objects)==null?void 0:I.getById(D);if(!U)return;const V=U.properties.point;ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(V),(X=r.current)==null||X.objects.each(K=>{var fe;const ie=K;(fe=r.current)==null||fe.objects.setObjectOptions(ie.id,{preset:oo(ie.properties.point.type)})}),(ee=r.current)==null||ee.objects.setObjectOptions(D,{preset:oo(V.type,"active")}),M.current=V},[]),z=u.useCallback(async k=>{if(!c||i)return;const D=k.get("coords"),{geoObjects:U}=await c.geocode(D),V=U.get(0),W=V.getAddressLine(),I=V.properties.get("metaDataProperty.GeocoderMetaData.precision",{});if(bt.getState().setSelectedLocation(null),I!=="exact"){We.getState().setDeliverPoint({coords:D,address:null});return}We.getState().setDeliverPoint({coords:D,address:W})},[i,c]),Z=u.useMemo(()=>{var k;return{...eu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(k=c==null?void 0:c.templateLayoutFactory)==null?void 0:k.createClass(m)}},[m,c==null?void 0:c.templateLayoutFactory]),A=u.useMemo(()=>{var k;return{...eu,iconImageHref:Jt(xt(Rt.PinHome,"--owl-color-success")),balloonContentLayout:(k=c==null?void 0:c.templateLayoutFactory)==null?void 0:k.createClass(S)}},[S,c==null?void 0:c.templateLayoutFactory]),T=u.useCallback(k=>{var D,U,V,W,I;(D=k==null?void 0:k.balloon)==null||D.open(),(V=(U=k==null?void 0:k.balloon)==null?void 0:U.events)==null||V.add("open",B),(I=(W=k==null?void 0:k.balloon)==null?void 0:W.events)==null||I.add("close",$)},[$,B]);return x.jsxs("div",{className:be(tu.root,t),children:[x.jsx(A1,{query:{...N1,lang:j1[s??"ru"]},children:x.jsxs(Id,{width:"100%",height:"100%",state:C,instanceRef:n,options:V1,modules:B1,onLoad:O,onClick:z,onBoundsChange:R,children:[(g==null?void 0:g.address)&&x.jsx(Yc,{properties:g,modules:Qc,geometry:g.coords,options:Z,instanceRef:T},JSON.stringify(g.coords)),g&&!g.address&&x.jsx(Yc,{modules:Qc,geometry:g.coords,instanceRef:T,options:A},JSON.stringify(g.coords)),x.jsx(I1,{features:d,instanceRef:r,modules:U1,options:v,onClick:G,onBalloonOpen:B,onBalloonClose:$})]})},s),w&&x.jsx(ya,{className:tu.overlay,children:x.jsx(ri,{})})]})},Z1=u.memo(G1),W1=t=>({google:M1,yandex:Z1})[t];function jd(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const _o=t=>{const e=u.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},q1=()=>{throw new Error("useMediaQuery is a client-only hook")};function K1(t){const e=u.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return u.useSyncExternalStore(e,n,q1)}const J1="768px",Y1="1024px",X1="1280px",Q1="1536px",eL={screenSm:J1,screenMd:Y1,screenLg:X1,screenXl:Q1};function hi(t){return K1(`(max-width: calc(${eL[t]} - 1px))`)}const tL=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=ye(gu);u.useEffect(()=>{i&&ye.getState().setLoaded()},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{var f;const c=await sr(a,"GEOMETRIC_CENTER");$t.getState().setPlace((f=c.results)==null?void 0:f[0],oa)};if(r){l();return}ha(async c=>{var v;const{latitude:f,longitude:d}=c.coords,h=await sr([f,d],"GEOMETRIC_CENTER");$t.getState().setPlace((v=h.results)==null?void 0:v[0])},()=>l())},[o,s,i,e,r])},Nd=iy().use(Gm()).use(jm()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),nL=t=>{u.useEffect(()=>{t&&(Nd.changeLanguage(t),fo.setLanguage(t))},[t])},rL=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&jo(`--owl-color-${n}`,r)}}},[t])},iL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-button-radius",`${t}px`)},[t])},oL=t=>{u.useEffect(()=>{t&&t!==void 0&&jo("--owl-font",t)},[t])},sL={open:!1},aL=t=>t.open,Tn=bn(t=>({...sL,toggle(e){t(n=>({open:e??!n.open}))}})),lL=t=>{const e=t==="selector";u.useEffect(()=>{e&&Tn.getState().toggle(!0)},[e])},cL=({children:t})=>{const{font:e,locale:n,palette:r,radius:i,startScreen:o}=st();return oL(e),nL(n),rL(r),iL(i),lL(o),x.jsx(x.Fragment,{children:t})},uL=({children:t})=>{const{disableGeolocation:e,map:n}=st();return mn(n==null?void 0:n.center,"Map center is required"),mn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),tL(n.center,n.initialZoom,{disableGeolocation:e}),x.jsx(x.Fragment,{children:t})},fL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},ce.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),dL=()=>{Tn.getState().toggle(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null)},hL="CurrentLocation-module__root__AeQCGT",pL="CurrentLocation-module__icon__459m9q",gL="CurrentLocation-module__text__w-9v28",ps={root:hL,icon:pL,text:gL},Bd=({className:t})=>{const{t:e}=jt("current_location"),n=$t(Ju),r=$t(Ig);return x.jsxs("div",{role:"presentation",className:be(ps.root,t),onClick:dL,children:[x.jsx(fL,{className:ps.icon}),x.jsxs("span",{className:ps.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},vL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},ce.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),mL=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},ce.createElement("path",{fill:"#000",d:"M4.1 20a3.966 3.966 0 0 1-2.05-.555 4.15 4.15 0 0 1-1.496-1.498A3.982 3.982 0 0 1 0 15.895V4.133c0-.758.185-1.442.554-2.052A4.15 4.15 0 0 1 2.05.583 3.966 3.966 0 0 1 4.1.028h11.743c.738 0 1.412.185 2.022.555A4.15 4.15 0 0 1 19.36 2.08c.388.61.582 1.294.582 2.052v11.762a3.83 3.83 0 0 1-.582 2.052 4.15 4.15 0 0 1-1.495 1.498c-.61.37-1.284.555-2.022.555H4.099Zm.193-4.327h11.3V4.355h-11.3v11.318ZM22.992 20V.028h4.432L34.182 8.1l6.73-8.072h4.46V20H41.05V6.602l-6.87 8.21-6.896-8.182V20h-4.293Zm25.696 0V.028h4.431l11.162 13.315V.028h4.348V20h-4.431L52.98 6.63V20h-4.294Zm22.352 0V.028h4.238V20H71.04Zm14.963 0V0h4.293v15.673h12.554V20H86.003Zm18.489 0V0h4.293v15.673h12.554V20h-16.847Zm18.717 0V4.133c0-.758.185-1.442.554-2.052a4.156 4.156 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.441.185 2.05.555.628.37 1.126.869 1.495 1.498.388.61.582 1.294.582 2.052V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882ZM146.307 20V.028h4.432l6.758 8.072 6.73-8.072h4.459V20h-4.32V6.602l-6.869 8.21L150.6 6.63V20h-4.293Zm25.751 0V4.133c0-.758.185-1.442.554-2.052a4.148 4.148 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.44.185 2.05.555.628.37 1.126.869 1.496 1.498A3.75 3.75 0 0 1 192 4.133V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882Z"})),yL="Header-module__root__Pe4MYp",bL="Header-module__nav__wtnkmT",wL="Header-module__navItem__-Fy63Z",SL="Header-module__logo__xO2bWO",Ur={root:yL,nav:bL,navItem:wL,logo:SL},LL={llama:mL,default:vL},EL=()=>{const{hideLogo:t,logo:e="default"}=st();if(t)return null;const n=LL[e];return x.jsx("div",{className:Ur.logo,children:x.jsx(n,{})})},xL=({className:t})=>{const{t:e}=jt("header"),{disableDelivery:n}=st(),r=ye(Th),i=We(Po);u.useEffect(()=>{i?ye.getState().setMode("location_delivery"):ye.getState().setMode("self_pickup")},[i]);const o=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("self_pickup")},s=()=>{We.getState().setDeliverPoint(null),ye.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return x.jsxs("div",{className:be(Ur.root,t),children:[x.jsx(EL,{}),x.jsxs("nav",{className:Ur.nav,children:[!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&x.jsx(Ot,{as:"link",className:Ur.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),x.jsx(Bd,{})]})]})},CL=u.memo(xL),_L={open:!1},ur=bn(t=>({..._L,toggle(e){ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),OL="Layout-module__root__qzPL-f",ML="Layout-module__headerHidden__JEN-d0",kL="Layout-module__sidebarHidden__x017O3",PL="Layout-module__sidebarOpen__IZnIjs",Ui={root:OL,headerHidden:ML,sidebarHidden:kL,sidebarOpen:PL},RL=({children:t})=>{const{hideFilters:e,hideHeader:n}=st(),r=ur(i=>i.open);return x.jsx("div",{className:be(Ui.root,{[Ui.sidebarOpen]:r,[Ui.headerHidden]:n,[Ui.sidebarHidden]:e}),children:t})},ja=()=>x.jsx(ya,{children:x.jsx(ri,{})}),TL=({children:t})=>{const e=zt(vg);return zt(ga)&&!e?x.jsx(ja,{}):x.jsx(x.Fragment,{children:t})};var Ud={},zo={},Vd={exports:{}},AL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",DL=AL,IL=DL;function Fd(){}function zd(){}zd.resetWarningCache=Fd;var jL=function(){function t(r,i,o,s,a,l){if(l!==IL){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:zd,resetWarningCache:Fd};return n.PropTypes=n,n};Vd.exports=jL();var NL=Vd.exports,$o={},fr={};Object.defineProperty(fr,"__esModule",{value:!0});fr.loadGoogleMapScript=fr.isBrowser=void 0;var $d=typeof window<"u"&&window.document;fr.isBrowser=$d;var BL=function(e,n){if(!$d||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};fr.loadGoogleMapScript=BL;var Ho={};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var UL="https://maps.googleapis.com/maps/api/js";Ho.GOOGLE_MAP_SCRIPT_BASE_URL=UL;function so(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?so=function(n){return typeof n}:so=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(t)}Object.defineProperty($o,"__esModule",{value:!0});$o.default=GL;var yt=FL(u),gs=fr,VL=Ho;function Hd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Hd=function(i){return i?n:e})(t)}function FL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||so(t)!=="object"&&typeof t!="function")return{default:t};var n=Hd(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ru(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(r){zL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zL(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $L(t,e){if(t==null)return{};var n=HL(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function HL(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function GL(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var c=l.types,f=c===void 0?["(cities)"]:c,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,p=$L(l,["types","componentRestrictions","fields","bounds"]),L=t.googleMapsScriptBaseUrl,w=L===void 0?VL.GOOGLE_MAP_SCRIPT_BASE_URL:L,g=t.language,b=(0,yt.useRef)(null),_=(0,yt.useRef)(null),E=(0,yt.useRef)(null),m=(0,yt.useRef)(null),S=g?"&language=".concat(g):"",C="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(S),R=(0,yt.useCallback)(function(){return(0,gs.loadGoogleMapScript)(w,C)},[w,C]);return(0,yt.useEffect)(function(){var M=ru(ru({},p),{},{fields:v,types:f,bounds:y});if(d&&(M.componentRestrictions=d),!(E.current||!b.current||!gs.isBrowser)){e&&!e.current&&(e.current=b.current);var O=function(){var j;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((j=google.maps)!==null&&j!==void 0&&j.places))return console.error("Google maps places API must be loaded.");if(!b.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(b.current,M),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),b.current,E.current)}))};return r?R().then(function(){return O()}):O(),function(){return _.current?_.current.remove():void 0}}},[]),(0,yt.useEffect)(function(){var M;!(yt.default!==null&&yt.default!==void 0&&(M=yt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&gs.isBrowser&&window.MutationObserver&&b.current&&b.current instanceof HTMLInputElement&&(m.current=new MutationObserver(function(){m.current.disconnect(),b.current&&(b.current.autocomplete=a)}),m.current.observe(b.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,yt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,yt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,yt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,yt.useEffect)(function(){E.current&&E.current.setOptions(p)},[p]),{ref:b,autocompleteRef:E}}function ao(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ao=function(n){return typeof n}:ao=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ao(t)}Object.defineProperty(zo,"__esModule",{value:!0});zo.default=void 0;var ia=WL(u),Ze=Gd(NL),ZL=Gd($o);function Gd(t){return t&&t.__esModule?t:{default:t}}function Zd(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Zd=function(i){return i?n:e})(t)}function WL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ao(t)!=="object"&&typeof t!="function")return{default:t};var n=Zd(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Oo(){return Oo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Oo.apply(this,arguments)}function qL(t,e){if(t==null)return{};var n=KL(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function KL(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Wd(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,c=qL(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,ZL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return ia.default.createElement("input",Oo({ref:d},c))}Wd.propTypes={apiKey:Ze.default.string,libraries:Ze.default.arrayOf(Ze.default.string),ref:Ze.default.oneOfType([Ze.default.func,Ze.default.shape({current:Ze.default.any})]),googleMapsScriptBaseUrl:Ze.default.string,onPlaceSelected:Ze.default.func,inputAutocompleteValue:Ze.default.string,options:Ze.default.shape({componentRestrictions:Ze.default.object,bounds:Ze.default.object,location:Ze.default.object,offset:Ze.default.number,origin:Ze.default.object,radius:Ze.default.number,sessionToken:Ze.default.object,types:Ze.default.arrayOf(Ze.default.string)}),language:Ze.default.string};var JL=(0,ia.forwardRef)(function(t,e){return ia.default.createElement(Wd,Oo({},t,{refProp:e}))});zo.default=JL;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(zo),n=r($o);function r(i){return i&&i.__esModule?i:{default:i}}})(Ud);var qd=Ud;const YL="Aside-module__root__EotK2f",XL="Aside-module__open__Zwmbs5",QL="Aside-module__overlay__slLdHF",eE="Aside-module__container__28P4wq",Vi={root:YL,open:XL,overlay:QL,container:eE},tE=({children:t,className:e,open:n})=>x.jsxs("div",{className:be(Vi.root,e,{[Vi.open]:n}),children:[x.jsx("div",{className:Vi.overlay}),x.jsx("div",{className:Vi.container,children:t})]}),nE="Input-module__root__TF9IiD",rE="Input-module__endAdornment__m40K5R",iE="Input-module__input__505b7i",oE="Input-module__startAdornment__D-sJ0N",sE="Input-module__label__gmqtsf",aE="Input-module__inputContainer__vubIa-",Kn={root:nE,endAdornment:rE,input:iE,startAdornment:oE,label:sE,inputContainer:aE},Kd=u.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const c=u.useId(),f=u.useRef(null);u.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=jd(n,f);return x.jsxs("label",{htmlFor:a.id??c,className:be(Kn.root,t),children:[r&&x.jsx("span",{className:Kn.label,children:r}),x.jsxs("div",{className:Kn.inputContainer,children:[s&&x.jsx("div",{className:Kn.startAdornment,children:s}),x.jsx("input",{...a,ref:d,id:a.id??c,className:Kn.input,onChange:o,onBlur:i}),e&&x.jsx("div",{className:Kn.endAdornment,children:e})]})]})}),lE="LocationAside-module__submit__CSKcqi",cE="LocationAside-module__container__S1NejR",uE="LocationAside-module__selector__hl74ke",fE="LocationAside-module__label__0Zk8at",dE="LocationAside-module__header__N1wgyn",hE="LocationAside-module__close__VsE88z",Fi={submit:lE,container:cE,selector:uE,label:fE,header:dE,close:hE},pE=u.forwardRef((t,e)=>{const{t:n}=jt(["location_aside","common"]),r=Tn(aL),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=st(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Tn.getState().toggle(!0),close:()=>Tn.getState().toggle(!1)}),[]);const h=g=>{Tn.getState().toggle(!1),$t.getState().setPlace(g),l==null||l(g),g!=null&&g.formatted_address&&d(g==null?void 0:g.formatted_address)},v=()=>{Tn.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,p=g=>{d(g.target.value)},{ref:L}=qd.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=_o(s==null?void 0:s.city);return x.jsx(tE,{open:r,children:x.jsx("div",{ref:c,className:Fi.container,children:x.jsxs("div",{className:Fi.selector,children:[x.jsxs("div",{className:Fi.header,children:[x.jsx("div",{className:Fi.label,children:n("choose_city")}),!o&&x.jsx(ui,{position:"relative",onClick:v})]}),x.jsx(Kd,{...w,inputRef:L,value:f,placeholder:n("placeholder"),onChange:p})]})})})}),gE=u.memo(pE),vE=({children:t})=>{const{locale:e}=st(),n=u.useRef(e),{isLoaded:r}=iv({language:n.current,libraries:ih,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return r?x.jsx(x.Fragment,{children:t}):x.jsx(ja,{})},mE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},ce.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),yE=({className:t})=>{const{t:e}=jt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=st(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=g=>{$t.getState().setPlace(g),i==null||i(g)},{ref:h}=qd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=g=>{a&&ye.getState().setBlurred(!!g.target.value),s(g.target.value)},y=()=>{o&&ye.getState().setBlurred(!0),ye.getState().setDetailsOpen(!1),We.getState().setDeliverPoint(null),bt.getState().setSelectedLocation(null),l(!0)},p=()=>{ye.getState().setBlurred(!1),l(!1)},L=g=>{g.key==="Enter"&&g.preventDefault()},w=_o(r==null?void 0:r.address);return x.jsx(Kd,{...w,inputRef:h,value:o,className:t,endAdornment:x.jsx(mE,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:p,onKeyDown:L})},bE=({className:t})=>ye(Ih)?x.jsx(yE,{className:t}):null,wE=u.memo(bE),SE="DeliveryDetailsModal-module__root__qwKnjX",LE={root:SE},EE=({className:t,location:e,onClose:n,onSubmit:r})=>x.jsx("div",{className:be(LE.root,t),children:x.jsx(kd,{location:e,onClose:n,onSubmit:r})}),xE="LocationDetailsModal-module__root__PyRnLM",CE={root:xE},_E=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return x.jsx("div",{className:be(CE.root,t),children:x.jsx(_f,{location:e,onClose:n,onSubmit:i})})},OE="MapContainer-module__root__1Os6Q-",ME="MapContainer-module__mapWrapper__Cwe7qC",kE="MapContainer-module__wrapperBlurred__04NN2L",PE="MapContainer-module__locationSelector__Pr1zS-",RE="MapContainer-module__filterButton__CW3Qv7",TE="MapContainer-module__sidebarOpen__lGMVrJ",AE="MapContainer-module__filterIcon__T01XsJ",DE="MapContainer-module__details__gM8LWX",Ft={root:OE,mapWrapper:ME,wrapperBlurred:kE,locationSelector:PE,filterButton:RE,sidebarOpen:TE,filterIcon:AE,details:DE},IE=()=>{const{onPointClick:t}=st(),e=ye(sa),n=bt(Bh),r=We(Po),i=u.useCallback(()=>{ye.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),ye.getState().setDetailsOpen(!1),bt.getState().setSelectedLocation(null),We.getState().setDeliverPoint(null)},[t]);return x.jsxs(x.Fragment,{children:[(r==null?void 0:r.address)&&e&&x.jsx(EE,{location:r,className:Ft.details,onClose:i,onSubmit:o}),n&&e&&x.jsx(_E,{location:n,className:Ft.details,onClose:i,onSubmit:o})]})},jE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},ce.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),ce.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),NE=t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},ce.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),ce.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),BE=()=>{const t=ur(i=>i.open),e=ur(i=>i.toggle),n=hi("screenSm"),r=()=>{e(!0)};return x.jsxs("div",{role:"presentation",className:be(Ft.filterButton,{[Ft.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&x.jsx(Bd,{}),n?x.jsx(NE,{className:Ft.filterIcon,onClick:r}):x.jsx(jE,{className:Ft.filterIcon})]})},UE=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=st(),i=ye(Dh),o=ye(sa);return x.jsxs("div",{className:be(Ft.root,e),children:[!r&&!o&&x.jsx(wE,{className:Ft.locationSelector}),!n&&x.jsx(BE,{}),x.jsx("div",{className:be(Ft.mapWrapper,{[Ft.wrapperBlurred]:i}),children:t}),x.jsx(IE,{})]})},VE=u.memo(UE),FE="Separator-module__root__eQtZey",zE={root:FE},vs=({className:t,...e})=>x.jsx("hr",{className:be(zE.root,t),...e}),$E="Sidebar-module__root__4j1MA3",HE="Sidebar-module__closeButton__HLXy1c",GE="Sidebar-module__open__mqQXF6",ZE="Sidebar-module__header__Afp6uz",WE="Sidebar-module__typeFilter__GN46u9",qE="Sidebar-module__separator__6I4QoJ",KE="Sidebar-module__withRightPadding__2u1Ina",JE="Sidebar-module__sheetContent__SaoncI",YE="Sidebar-module__doneButton__4aeaSD",Yt={root:$E,closeButton:HE,open:GE,header:ZE,typeFilter:WE,separator:qE,withRightPadding:KE,sheetContent:JE,doneButton:YE},XE=()=>{const{t}=jt("common"),e=hi("screenSm"),n=ur(i=>i.toggle),r=()=>{n(!1)};return x.jsxs("div",{className:Yt.header,children:[e&&x.jsx("div",{role:"presentation",className:Yt.doneButton,onClick:r,children:t("done")}),!e&&x.jsx(ui,{className:Yt.closeButton,onClick:r})]})},QE="Radio-module__root__7ElY2W",ex="Radio-module__label__c-sYW3",iu={root:QE,label:ex},tx=({className:t,label:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return x.jsxs("label",{htmlFor:i,className:be(iu.label,o),...s,children:[x.jsx("input",{id:i,type:"radio",className:be(iu.root,t),...r}),e]})},rr=t=>x.jsx(tx,{...t,type:"checkbox"}),nx="RadioGroup-module__root__ewZw-x",rx="RadioGroup-module__body__k8BJAs",ix="RadioGroup-module__legend__tcfV7q",ms={root:nx,body:rx,legend:ix},Jd=({children:t,className:e,label:n,onChange:r,value:i,...o})=>x.jsxs("div",{className:be(ms.root,e),...o,children:[n&&x.jsx("span",{className:ms.legend,children:n}),x.jsx("div",{className:ms.body,children:u.Children.map(t,s=>u.isValidElement(s)?u.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),ox=({className:t,onChange:e})=>{const{t:n}=jt("receive_filter"),r=Qt(zh);return x.jsxs(Jd,{value:r,label:n("title"),className:t,onChange:e,children:[x.jsx(rr,{name:"receive",value:Dt.DressingRoom,label:n("dressing_room")}),x.jsx(rr,{name:"receive",value:Dt.CheckOrder,label:n("check_order")}),x.jsx(rr,{name:"receive",value:Dt.PayByCash,label:n("pay_by_cash")})]})},sx=u.memo(ox),ax=({className:t,onChange:e})=>{const{t:n}=jt("send_filter"),r=Qt(Fh);return x.jsxs(Jd,{className:t,value:r,label:n("title"),onChange:e,children:[x.jsx(rr,{name:"send",value:It.Return,label:n("sending_returns")}),x.jsx(rr,{name:"send",value:It.Shipping,label:n("shipping")}),x.jsx(rr,{name:"send",value:It.Payment,label:n("payment")})]})},lx=u.memo(ax),cx="TypeFilter-module__root__WH5EQV",ux="TypeFilter-module__button__f0mSfo",zi={root:cx,button:ux},fx=({className:t,onChange:e,value:n})=>{const{t:r}=jt("type_filter"),i=o=>()=>e==null?void 0:e(o);return x.jsxs("div",{className:be(zi.root,t),children:[x.jsx(Ot,{className:zi.button,variant:n===Kt.All?"primary":"secondary",onClick:i(Kt.All),children:r("all")}),x.jsx(Ot,{className:zi.button,variant:n===Kt.PostOffice?"primary":"secondary",onClick:i(Kt.PostOffice),children:r("post_office")}),x.jsx(Ot,{className:zi.button,variant:n===Kt.PickPoint?"primary":"secondary",onClick:i(Kt.PickPoint),children:r("pick_point")})]})},dx=({className:t,onChange:e})=>{const n=Qt(Vh);return x.jsx(fx,{value:n,className:t,onChange:e})},hx=u.memo(dx),px=({className:t})=>{const e=hi("screenSm"),n=ur(l=>l.open),r=u.useCallback(l=>Qt.getState().setFilter({type:l}),[]),i=u.useCallback(l=>Qt.getState().setFilter({send:l}),[]),o=u.useCallback(l=>Qt.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>ur.getState().toggle(!1),[]),a=x.jsxs(x.Fragment,{children:[x.jsx(XE,{}),x.jsxs("div",{className:Yt.withRightPadding,children:[x.jsx(hx,{className:Yt.typeFilter,onChange:r}),x.jsx(vs,{className:Yt.separator}),x.jsx(sx,{onChange:o}),x.jsx(vs,{}),x.jsx(lx,{onChange:i}),x.jsx(vs,{})]})]});return e?x.jsx(Cd,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-_d,onDismiss:s,children:x.jsx("div",{className:Yt.sheetContent,children:a})}):x.jsx("div",{className:be(Yt.root,t,{[Yt.open]:n}),children:a})},gx="App-module__map__Kf-2JS",vx="App-module__sidebar__ORIzGk",mx="App-module__header__bgP9DA",ys={map:gx,sidebar:vx,header:mx};fo.setApiKey("AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");const yx=({config:t,options:e})=>{const n=Rg(t),{INN:r,hideFilters:i,hideHeader:o,map:s}=n;mn(r,"INN is required"),Tg(r,e),mn(s==null?void 0:s.provider,"Map provider is required");const a=W1(s.provider);return mg(),x.jsx(cu.Provider,{value:n,children:x.jsx(uL,{children:x.jsx(cL,{children:x.jsx(sy,{tolgee:Nd,fallback:x.jsx(ja,{}),children:x.jsx(vE,{children:x.jsx(TL,{children:x.jsxs(RL,{children:[!o&&x.jsx(CL,{className:ys.header}),!i&&x.jsx(px,{className:ys.sidebar}),x.jsx(VE,{className:ys.map,children:x.jsx(a,{})}),x.jsx(gE,{})]})})})})})})})},Yd=async t=>ni.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Dt;exports.ESendFilter=It;exports.ETypeFilter=Kt;exports.Widget=yx;exports.createPointsIterator=_s;exports.fetchPointsRequest=Cs;exports.fromHoursMinutesToMinutes=$h;exports.fromMinutesToHoursMinutes=Hh;exports.getAddressFromLatLng=sr;exports.getBoundsFromPoint=Gh;exports.getCurrentPosition=ha;exports.getNormalizedAddress=Yd;exports.getPropertyValue=pa;exports.isDeliveryPoint=pg;exports.isHttpSuccess=Vu;exports.replaceSvgCurrentColor=xt;exports.setWidgetCSSProperty=jo;exports.stopImmediatePropagation=Os;exports.svgStringToBase64URL=Jt;
|