@omnic/widget-locations 1.1.26 → 1.1.28

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),u=require("react"),Qn=require("react-dom"),gd=require("react-dom/server");function Cu(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 oe=Cu(u),_u=Cu(Qn);var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ns(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vd=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}},md=vd;const Wt=Ns(md);let Xr;const yd=new Uint8Array(16);function bd(){if(!Xr&&(Xr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xr(yd)}const Qe=[];for(let t=0;t<256;++t)Qe.push((t+256).toString(16).slice(1));function wd(t,e=0){return Qe[t[e+0]]+Qe[t[e+1]]+Qe[t[e+2]]+Qe[t[e+3]]+"-"+Qe[t[e+4]]+Qe[t[e+5]]+"-"+Qe[t[e+6]]+Qe[t[e+7]]+"-"+Qe[t[e+8]]+Qe[t[e+9]]+"-"+Qe[t[e+10]]+Qe[t[e+11]]+Qe[t[e+12]]+Qe[t[e+13]]+Qe[t[e+14]]+Qe[t[e+15]]}const Sd=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ua={randomUUID:Sd};function Mu(t,e,n){if(ua.randomUUID&&!e&&!t)return ua.randomUUID();t=t||{};const r=t.random||(t.rng||bd)();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 wd(r)}const Ld=Mu(),Ou=Mu(),Ed=[48,66],xd=6,qo=[49.3478969,14.0983344],ku="en",Cd=["places","geocoding"],bn={logo:"default",locale:ku,map:{provider:"google",center:qo,initialZoom:xd}},Pu=u.createContext(bn),tt=()=>u.useContext(Pu);var zt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(zt||{}),Ot=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(Ot||{}),kt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(kt||{}),_d={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_YMAPS_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_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const ca=t=>{let e;const n=new Set,r=(f,d)=>{const h=typeof f=="function"?f(e):f;if(!Object.is(h,e)){const v=e;e=d??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(y=>y(e,v))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(_d?"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()}},c=e=t(r,i,l);return l},Md=t=>t?ca(t):ca;var Tu={exports:{}},Ru={},Au={exports:{}},Du={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),u=require("react"),Qn=require("react-dom"),gd=require("react-dom/server");function Cu(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 oe=Cu(u),_u=Cu(Qn);var Xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ns(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vd=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}},md=vd;const Wt=Ns(md);let Yr;const yd=new Uint8Array(16);function bd(){if(!Yr&&(Yr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yr(yd)}const Qe=[];for(let t=0;t<256;++t)Qe.push((t+256).toString(16).slice(1));function wd(t,e=0){return Qe[t[e+0]]+Qe[t[e+1]]+Qe[t[e+2]]+Qe[t[e+3]]+"-"+Qe[t[e+4]]+Qe[t[e+5]]+"-"+Qe[t[e+6]]+Qe[t[e+7]]+"-"+Qe[t[e+8]]+Qe[t[e+9]]+"-"+Qe[t[e+10]]+Qe[t[e+11]]+Qe[t[e+12]]+Qe[t[e+13]]+Qe[t[e+14]]+Qe[t[e+15]]}const Sd=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ua={randomUUID:Sd};function Mu(t,e,n){if(ua.randomUUID&&!e&&!t)return ua.randomUUID();t=t||{};const r=t.random||(t.rng||bd)();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 wd(r)}const Ld=Mu(),Ou=Mu(),Ed=[48,66],xd=6,qo=[49.3478969,14.0983344],Pu="en",Cd=["places","geocoding"],bn={logo:"default",locale:Pu,map:{provider:"google",center:qo,initialZoom:xd}},ku=u.createContext(bn),tt=()=>u.useContext(ku);var zt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(zt||{}),Ot=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(Ot||{}),Pt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(Pt||{}),_d={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_YMAPS_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_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const ca=t=>{let e;const n=new Set,r=(f,d)=>{const h=typeof f=="function"?f(e):f;if(!Object.is(h,e)){const v=e;e=d??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(y=>y(e,v))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(_d?"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()}},c=e=t(r,i,l);return l},Md=t=>t?ca(t):ca;var Tu={exports:{}},Ru={},Au={exports:{}},Du={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Gn=u;function Od(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var kd=typeof Object.is=="function"?Object.is:Od,Pd=Gn.useState,Td=Gn.useEffect,Rd=Gn.useLayoutEffect,Ad=Gn.useDebugValue;function Dd(t,e){var n=e(),r=Pd({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Rd(function(){i.value=n,i.getSnapshot=e,bo(i)&&o({inst:i})},[t,n,e]),Td(function(){return bo(i)&&o({inst:i}),t(function(){bo(i)&&o({inst:i})})},[t]),Ad(n),n}function bo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!kd(t,n)}catch{return!0}}function Id(t,e){return e()}var Nd=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Id:Dd;Du.useSyncExternalStore=Gn.useSyncExternalStore!==void 0?Gn.useSyncExternalStore:Nd;Au.exports=Du;var jd=Au.exports;/**
9
+ */var Gn=u;function Od(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Pd=typeof Object.is=="function"?Object.is:Od,kd=Gn.useState,Td=Gn.useEffect,Rd=Gn.useLayoutEffect,Ad=Gn.useDebugValue;function Dd(t,e){var n=e(),r=kd({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Rd(function(){i.value=n,i.getSnapshot=e,bo(i)&&o({inst:i})},[t,n,e]),Td(function(){return bo(i)&&o({inst:i}),t(function(){bo(i)&&o({inst:i})})},[t]),Ad(n),n}function bo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Pd(t,n)}catch{return!0}}function Id(t,e){return e()}var Nd=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Id:Dd;Du.useSyncExternalStore=Gn.useSyncExternalStore!==void 0?Gn.useSyncExternalStore:Nd;Au.exports=Du;var jd=Au.exports;/**
10
10
  * @license React
11
11
  * use-sync-external-store-shim/with-selector.production.min.js
12
12
  *
@@ -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 ro=u,Bd=jd;function Ud(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Vd=typeof Object.is=="function"?Object.is:Ud,Fd=Bd.useSyncExternalStore,zd=ro.useRef,$d=ro.useEffect,Hd=ro.useMemo,Wd=ro.useDebugValue;Ru.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=zd(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Hd(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,Vd(f,v))return y;var g=r(v);return i!==void 0&&i(y,g)?y:(f=v,d=g)}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=Fd(t,o[0],o[1]);return $d(function(){s.hasValue=!0,s.value=a},[a]),Wd(a),a};Tu.exports=Ru;var Gd=Tu.exports;const Zd=Ns(Gd);var Iu={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_YMAPS_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_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:qd}=u,{useSyncExternalStoreWithSelector:Kd}=Zd;let fa=!1;const Jd=t=>t;function Xd(t,e=Jd,n){(Iu?"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=Kd(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return qd(r),r}const da=t=>{(Iu?"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"?Md(t):t,n=(r,i)=>Xd(e,r,i);return Object.assign(n,e),n},cn=t=>t?da(t):da,Yd={location:null},js=t=>t.location,vt=cn()(t=>({...Yd,setDeliverPoint(e){t({location:e})}})),Qd={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},Nu=t=>t.map,ep=t=>t.mode,tp=t=>t.bounds,np=t=>t.blurred,rp=t=>t.loaded,ip=t=>t.loading,Bs=t=>t.detailsOpen,Le=cn()(t=>({...Qd,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})}})),op={location:null},sp=t=>t.location,Gt=cn()(t=>({...op,setSelectedLocation(e){t({location:e})}})),ap={query:"",type:zt.All,hours:["08:00","22:00"],send:{[kt.Return]:!1,[kt.Payment]:!1,[kt.Shipping]:!1},receive:{[Ot.PayByCash]:!1,[Ot.CheckOrder]:!1,[Ot.DressingRoom]:!1}},lp=t=>t.type,up=t=>t.send,cp=t=>t.receive,ln=cn(t=>({...ap,setFilter(e){Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),t(e)}})),fp=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},dp=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},pp=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function ju(t,e){return function(){return t.apply(e,arguments)}}const{toString:hp}=Object.prototype,{getPrototypeOf:Us}=Object,io=(t=>e=>{const n=hp.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=t=>(t=t.toLowerCase(),e=>io(e)===t),oo=t=>e=>typeof e===t,{isArray:er}=Array,jr=oo("undefined");function gp(t){return t!==null&&!jr(t)&&t.constructor!==null&&!jr(t.constructor)&&St(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bu=It("ArrayBuffer");function vp(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Bu(t.buffer),e}const mp=oo("string"),St=oo("function"),Uu=oo("number"),so=t=>t!==null&&typeof t=="object",yp=t=>t===!0||t===!1,xi=t=>{if(io(t)!=="object")return!1;const e=Us(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},bp=It("Date"),wp=It("File"),Sp=It("Blob"),Lp=It("FileList"),Ep=t=>so(t)&&St(t.pipe),xp=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||St(t.append)&&((e=io(t))==="formdata"||e==="object"&&St(t.toString)&&t.toString()==="[object FormData]"))},Cp=It("URLSearchParams"),_p=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zr(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),er(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 Vu(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 Fu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zu=t=>!jr(t)&&t!==Fu;function Ko(){const{caseless:t}=zu(this)&&this||{},e={},n=(r,i)=>{const o=t&&Vu(e,i)||i;xi(e[o])&&xi(r)?e[o]=Ko(e[o],r):xi(r)?e[o]=Ko({},r):er(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&zr(arguments[r],n);return e}const Mp=(t,e,n,{allOwnKeys:r}={})=>(zr(e,(i,o)=>{n&&St(i)?t[o]=ju(i,n):t[o]=i},{allOwnKeys:r}),t),Op=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),kp=(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)},Pp=(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&&Us(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Tp=(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},Rp=t=>{if(!t)return null;if(er(t))return t;let e=t.length;if(!Uu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Ap=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Us(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])}},Ip=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Np=It("HTMLFormElement"),jp=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),pa=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Bp=It("RegExp"),$u=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};zr(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},Up=t=>{$u(t,(e,n)=>{if(St(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(St(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+"'")})}})},Vp=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return er(t)?r(t):r(String(t).split(e)),n},Fp=()=>{},zp=(t,e)=>(t=+t,Number.isFinite(t)?t:e),wo="abcdefghijklmnopqrstuvwxyz",ha="0123456789",Hu={DIGIT:ha,ALPHA:wo,ALPHA_DIGIT:wo+wo.toUpperCase()+ha},$p=(t=16,e=Hu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Hp(t){return!!(t&&St(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Wp=t=>{const e=new Array(10),n=(r,i)=>{if(so(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=er(r)?[]:{};return zr(r,(s,a)=>{const l=n(s,i+1);!jr(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Gp=It("AsyncFunction"),Zp=t=>t&&(so(t)||St(t))&&St(t.then)&&St(t.catch),A={isArray:er,isArrayBuffer:Bu,isBuffer:gp,isFormData:xp,isArrayBufferView:vp,isString:mp,isNumber:Uu,isBoolean:yp,isObject:so,isPlainObject:xi,isUndefined:jr,isDate:bp,isFile:wp,isBlob:Sp,isRegExp:Bp,isFunction:St,isStream:Ep,isURLSearchParams:Cp,isTypedArray:Ap,isFileList:Lp,forEach:zr,merge:Ko,extend:Mp,trim:_p,stripBOM:Op,inherits:kp,toFlatObject:Pp,kindOf:io,kindOfTest:It,endsWith:Tp,toArray:Rp,forEachEntry:Dp,matchAll:Ip,isHTMLForm:Np,hasOwnProperty:pa,hasOwnProp:pa,reduceDescriptors:$u,freezeMethods:Up,toObjectSet:Vp,toCamelCase:jp,noop:Fp,toFiniteNumber:zp,findKey:Vu,global:Fu,isContextDefined:zu,ALPHABET:Hu,generateString:$p,isSpecCompliantForm:Hp,toJSONObject:Wp,isAsyncFn:Gp,isThenable:Zp};function ge(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)}A.inherits(ge,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:A.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wu=ge.prototype,Gu={};["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=>{Gu[t]={value:t}});Object.defineProperties(ge,Gu);Object.defineProperty(Wu,"isAxiosError",{value:!0});ge.from=(t,e,n,r,i,o)=>{const s=Object.create(Wu);return A.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ge.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const qp=null;function Jo(t){return A.isPlainObject(t)||A.isArray(t)}function Zu(t){return A.endsWith(t,"[]")?t.slice(0,-2):t}function ga(t,e,n){return t?t.concat(e).map(function(i,o){return i=Zu(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Kp(t){return A.isArray(t)&&!t.some(Jo)}const Jp=A.toFlatObject(A,{},null,function(e){return/^is[A-Z]/.test(e)});function ao(t,e,n){if(!A.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,L){return!A.isUndefined(L[g])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(e);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(A.isDate(y))return y.toISOString();if(!l&&A.isBlob(y))throw new ge("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(y)||A.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,g,L){let w=y;if(y&&!L&&typeof y=="object"){if(A.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(A.isArray(y)&&Kp(y)||(A.isFileList(y)||A.endsWith(g,"[]"))&&(w=A.toArray(y)))return g=Zu(g),w.forEach(function(m,_){!(A.isUndefined(m)||m===null)&&e.append(s===!0?ga([g],_,o):s===null?g:g+"[]",c(m))}),!1}return Jo(y)?!0:(e.append(ga(L,g,o),c(y)),!1)}const d=[],h=Object.assign(Jp,{defaultVisitor:f,convertValue:c,isVisitable:Jo});function v(y,g){if(!A.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(y),A.forEach(y,function(w,S){(!(A.isUndefined(w)||w===null)&&i.call(e,w,A.isString(S)?S.trim():S,g,h))===!0&&v(w,g?g.concat(S):[S])}),d.pop()}}if(!A.isObject(t))throw new TypeError("data must be an object");return v(t),e}function va(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Vs(t,e){this._pairs=[],t&&ao(t,this,e)}const qu=Vs.prototype;qu.append=function(e,n){this._pairs.push([e,n])};qu.toString=function(e){const n=e?function(r){return e.call(this,r,va)}:va;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Xp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ku(t,e,n){if(!e)return t;const r=n&&n.encode||Xp,i=n&&n.serialize;let o;if(i?o=i(e,n):o=A.isURLSearchParams(e)?e.toString():new Vs(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class ma{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){A.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ju={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yp=typeof URLSearchParams<"u"?URLSearchParams:Vs,Qp=typeof FormData<"u"?FormData:null,eh=typeof Blob<"u"?Blob:null,th={isBrowser:!0,classes:{URLSearchParams:Yp,FormData:Qp,Blob:eh},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",nh=(t=>Xu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),rh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ih=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:nh,hasStandardBrowserWebWorkerEnv:rh},Symbol.toStringTag,{value:"Module"})),Rt={...ih,...th};function oh(t,e){return ao(t,new Rt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Rt.isNode&&A.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function sh(t){return A.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ah(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 Yu(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&A.isArray(i)?i.length:s,l?(A.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!A.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&A.isArray(i[s])&&(i[s]=ah(i[s])),!a)}if(A.isFormData(t)&&A.isFunction(t.entries)){const n={};return A.forEachEntry(t,(r,i)=>{e(sh(r),i,n,0)}),n}return null}function lh(t,e,n){if(A.isString(t))try{return(e||JSON.parse)(t),A.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Fs={transitional:Ju,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=A.isObject(e);if(o&&A.isHTMLForm(e)&&(e=new FormData(e)),A.isFormData(e))return i?JSON.stringify(Yu(e)):e;if(A.isArrayBuffer(e)||A.isBuffer(e)||A.isStream(e)||A.isFile(e)||A.isBlob(e))return e;if(A.isArrayBufferView(e))return e.buffer;if(A.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 oh(e,this.formSerializer).toString();if((a=A.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ao(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),lh(e)):e}],transformResponse:[function(e){const n=this.transitional||Fs.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&A.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"?ge.from(a,ge.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:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],t=>{Fs.headers[t]={}});const zs=Fs,uh=A.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"]),ch=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]&&uh[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},ya=Symbol("internals");function lr(t){return t&&String(t).trim().toLowerCase()}function Ci(t){return t===!1||t==null?t:A.isArray(t)?t.map(Ci):String(t)}function fh(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 dh=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function So(t,e,n,r,i){if(A.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!A.isString(e)){if(A.isString(r))return e.indexOf(r)!==-1;if(A.isRegExp(r))return r.test(e)}}function ph(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function hh(t,e){const n=A.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 lo{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=A.findKey(i,f);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Ci(a))}const s=(a,l)=>A.forEach(a,(c,f)=>o(c,f,l));return A.isPlainObject(e)||e instanceof this.constructor?s(e,n):A.isString(e)&&(e=e.trim())&&!dh(e)?s(ch(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=lr(e),e){const r=A.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return fh(i);if(A.isFunction(n))return n.call(this,i,r);if(A.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=A.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||So(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=A.findKey(r,s);a&&(!n||So(r,r[a],a,n))&&(delete r[a],i=!0)}}return A.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||So(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return A.forEach(this,(i,o)=>{const s=A.findKey(r,o);if(s){n[s]=Ci(i),delete n[o];return}const a=e?ph(o):String(o).trim();a!==o&&delete n[o],n[a]=Ci(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return A.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&A.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[ya]=this[ya]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=lr(s);r[a]||(hh(i,s),r[a]=!0)}return A.isArray(e)?e.forEach(o):o(e),this}}lo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(lo.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});A.freezeMethods(lo);const Ht=lo;function Lo(t,e){const n=this||zs,r=e||n,i=Ht.from(r.headers);let o=r.data;return A.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Qu(t){return!!(t&&t.__CANCEL__)}function $r(t,e,n){ge.call(this,t??"canceled",ge.ERR_CANCELED,e,n),this.name="CanceledError"}A.inherits($r,ge,{__CANCEL__:!0});function gh(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vh=Rt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];A.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),A.isString(r)&&s.push("path="+r),A.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 mh(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ec(t,e){return t&&!mh(e)?yh(t,e):e}const bh=Rt.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=A.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function wh(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Sh(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 ba(t,e){let n=0;const r=Sh(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 Lh=typeof XMLHttpRequest<"u",Eh=Lh&&function(t){return new Promise(function(n,r){let i=t.data;const o=Ht.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(A.isFormData(i)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[g,...L]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];o.setContentType([g||"multipart/form-data",...L].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",L=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(g+":"+L))}const h=ec(t.baseURL,t.url);d.open(t.method.toUpperCase(),Ku(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const g=Ht.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:t,request:d};gh(function(m){n(m),c()},function(m){r(m),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 ge("Request aborted",ge.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new ge("Network Error",ge.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||Ju;t.timeoutErrorMessage&&(L=t.timeoutErrorMessage),r(new ge(L,w.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,t,d)),d=null},Rt.hasStandardBrowserEnv&&(a&&A.isFunction(a)&&(a=a(t)),a||a!==!1&&bh(h))){const g=t.xsrfHeaderName&&t.xsrfCookieName&&vh.read(t.xsrfCookieName);g&&o.set(t.xsrfHeaderName,g)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&A.forEach(o.toJSON(),function(L,w){d.setRequestHeader(w,L)}),A.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",ba(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",ba(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=g=>{d&&(r(!g||g.type?new $r(null,t,d):g),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const y=wh(h);if(y&&Rt.protocols.indexOf(y)===-1){r(new ge("Unsupported protocol "+y+":",ge.ERR_BAD_REQUEST,t));return}d.send(i||null)})},Xo={http:qp,xhr:Eh};A.forEach(Xo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const wa=t=>`- ${t}`,xh=t=>A.isFunction(t)||t===null||t===!1,tc={getAdapter:t=>{t=A.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,!xh(n)&&(r=Xo[(s=String(n)).toLowerCase()],r===void 0))throw new ge(`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 :
17
+ */var io=u,Bd=jd;function Vd(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ud=typeof Object.is=="function"?Object.is:Vd,Fd=Bd.useSyncExternalStore,zd=io.useRef,$d=io.useEffect,Hd=io.useMemo,Wd=io.useDebugValue;Ru.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=zd(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Hd(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,Ud(f,v))return y;var g=r(v);return i!==void 0&&i(y,g)?y:(f=v,d=g)}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=Fd(t,o[0],o[1]);return $d(function(){s.hasValue=!0,s.value=a},[a]),Wd(a),a};Tu.exports=Ru;var Gd=Tu.exports;const Zd=Ns(Gd);var Iu={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_YMAPS_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_CJS_IGNORE_WARNING:"true",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:qd}=u,{useSyncExternalStoreWithSelector:Kd}=Zd;let fa=!1;const Jd=t=>t;function Xd(t,e=Jd,n){(Iu?"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=Kd(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return qd(r),r}const da=t=>{(Iu?"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"?Md(t):t,n=(r,i)=>Xd(e,r,i);return Object.assign(n,e),n},cn=t=>t?da(t):da,Yd={location:null},js=t=>t.location,vt=cn()(t=>({...Yd,setDeliverPoint(e){t({location:e})}})),Qd={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},Nu=t=>t.map,ep=t=>t.mode,tp=t=>t.bounds,np=t=>t.blurred,rp=t=>t.loaded,ip=t=>t.loading,Bs=t=>t.detailsOpen,Le=cn()(t=>({...Qd,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})}})),op={location:null},sp=t=>t.location,Gt=cn()(t=>({...op,setSelectedLocation(e){t({location:e})}})),ap={query:"",type:zt.All,hours:["08:00","22:00"],send:{[Pt.Return]:!1,[Pt.Payment]:!1,[Pt.Shipping]:!1},receive:{[Ot.PayByCash]:!1,[Ot.CheckOrder]:!1,[Ot.DressingRoom]:!1}},lp=t=>t.type,up=t=>t.send,cp=t=>t.receive,ln=cn(t=>({...ap,setFilter(e){Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),t(e)}})),fp=t=>{const[e,n]=t.split(":");return Number(e)*60+Number(n)},dp=t=>{const e=Math.floor(t/60),n=t%60;return`${e<10?`0${e}`:e}:${n<10?`0${n}`:n}`},pp=(t,e)=>[[t[0]-e,t[0]+e],[t[1]-e,t[1]+e]];function ju(t,e){return function(){return t.apply(e,arguments)}}const{toString:hp}=Object.prototype,{getPrototypeOf:Vs}=Object,oo=(t=>e=>{const n=hp.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=t=>(t=t.toLowerCase(),e=>oo(e)===t),so=t=>e=>typeof e===t,{isArray:er}=Array,jr=so("undefined");function gp(t){return t!==null&&!jr(t)&&t.constructor!==null&&!jr(t.constructor)&&St(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bu=It("ArrayBuffer");function vp(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Bu(t.buffer),e}const mp=so("string"),St=so("function"),Vu=so("number"),ao=t=>t!==null&&typeof t=="object",yp=t=>t===!0||t===!1,Ci=t=>{if(oo(t)!=="object")return!1;const e=Vs(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},bp=It("Date"),wp=It("File"),Sp=It("Blob"),Lp=It("FileList"),Ep=t=>ao(t)&&St(t.pipe),xp=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||St(t.append)&&((e=oo(t))==="formdata"||e==="object"&&St(t.toString)&&t.toString()==="[object FormData]"))},Cp=It("URLSearchParams"),_p=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zr(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),er(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 Uu(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 Fu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zu=t=>!jr(t)&&t!==Fu;function Ko(){const{caseless:t}=zu(this)&&this||{},e={},n=(r,i)=>{const o=t&&Uu(e,i)||i;Ci(e[o])&&Ci(r)?e[o]=Ko(e[o],r):Ci(r)?e[o]=Ko({},r):er(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&zr(arguments[r],n);return e}const Mp=(t,e,n,{allOwnKeys:r}={})=>(zr(e,(i,o)=>{n&&St(i)?t[o]=ju(i,n):t[o]=i},{allOwnKeys:r}),t),Op=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Pp=(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)},kp=(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&&Vs(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Tp=(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},Rp=t=>{if(!t)return null;if(er(t))return t;let e=t.length;if(!Vu(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Ap=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Vs(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])}},Ip=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Np=It("HTMLFormElement"),jp=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),pa=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Bp=It("RegExp"),$u=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};zr(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},Vp=t=>{$u(t,(e,n)=>{if(St(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(St(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+"'")})}})},Up=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return er(t)?r(t):r(String(t).split(e)),n},Fp=()=>{},zp=(t,e)=>(t=+t,Number.isFinite(t)?t:e),wo="abcdefghijklmnopqrstuvwxyz",ha="0123456789",Hu={DIGIT:ha,ALPHA:wo,ALPHA_DIGIT:wo+wo.toUpperCase()+ha},$p=(t=16,e=Hu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Hp(t){return!!(t&&St(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Wp=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=er(r)?[]:{};return zr(r,(s,a)=>{const l=n(s,i+1);!jr(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Gp=It("AsyncFunction"),Zp=t=>t&&(ao(t)||St(t))&&St(t.then)&&St(t.catch),A={isArray:er,isArrayBuffer:Bu,isBuffer:gp,isFormData:xp,isArrayBufferView:vp,isString:mp,isNumber:Vu,isBoolean:yp,isObject:ao,isPlainObject:Ci,isUndefined:jr,isDate:bp,isFile:wp,isBlob:Sp,isRegExp:Bp,isFunction:St,isStream:Ep,isURLSearchParams:Cp,isTypedArray:Ap,isFileList:Lp,forEach:zr,merge:Ko,extend:Mp,trim:_p,stripBOM:Op,inherits:Pp,toFlatObject:kp,kindOf:oo,kindOfTest:It,endsWith:Tp,toArray:Rp,forEachEntry:Dp,matchAll:Ip,isHTMLForm:Np,hasOwnProperty:pa,hasOwnProp:pa,reduceDescriptors:$u,freezeMethods:Vp,toObjectSet:Up,toCamelCase:jp,noop:Fp,toFiniteNumber:zp,findKey:Uu,global:Fu,isContextDefined:zu,ALPHABET:Hu,generateString:$p,isSpecCompliantForm:Hp,toJSONObject:Wp,isAsyncFn:Gp,isThenable:Zp};function ge(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)}A.inherits(ge,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:A.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Wu=ge.prototype,Gu={};["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=>{Gu[t]={value:t}});Object.defineProperties(ge,Gu);Object.defineProperty(Wu,"isAxiosError",{value:!0});ge.from=(t,e,n,r,i,o)=>{const s=Object.create(Wu);return A.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ge.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const qp=null;function Jo(t){return A.isPlainObject(t)||A.isArray(t)}function Zu(t){return A.endsWith(t,"[]")?t.slice(0,-2):t}function ga(t,e,n){return t?t.concat(e).map(function(i,o){return i=Zu(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Kp(t){return A.isArray(t)&&!t.some(Jo)}const Jp=A.toFlatObject(A,{},null,function(e){return/^is[A-Z]/.test(e)});function lo(t,e,n){if(!A.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,S){return!A.isUndefined(S[g])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(e);if(!A.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(A.isDate(y))return y.toISOString();if(!l&&A.isBlob(y))throw new ge("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(y)||A.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,g,S){let w=y;if(y&&!S&&typeof y=="object"){if(A.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(A.isArray(y)&&Kp(y)||(A.isFileList(y)||A.endsWith(g,"[]"))&&(w=A.toArray(y)))return g=Zu(g),w.forEach(function(m,_){!(A.isUndefined(m)||m===null)&&e.append(s===!0?ga([g],_,o):s===null?g:g+"[]",c(m))}),!1}return Jo(y)?!0:(e.append(ga(S,g,o),c(y)),!1)}const d=[],h=Object.assign(Jp,{defaultVisitor:f,convertValue:c,isVisitable:Jo});function v(y,g){if(!A.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(y),A.forEach(y,function(w,L){(!(A.isUndefined(w)||w===null)&&i.call(e,w,A.isString(L)?L.trim():L,g,h))===!0&&v(w,g?g.concat(L):[L])}),d.pop()}}if(!A.isObject(t))throw new TypeError("data must be an object");return v(t),e}function va(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Us(t,e){this._pairs=[],t&&lo(t,this,e)}const qu=Us.prototype;qu.append=function(e,n){this._pairs.push([e,n])};qu.toString=function(e){const n=e?function(r){return e.call(this,r,va)}:va;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Xp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ku(t,e,n){if(!e)return t;const r=n&&n.encode||Xp,i=n&&n.serialize;let o;if(i?o=i(e,n):o=A.isURLSearchParams(e)?e.toString():new Us(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class ma{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){A.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ju={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yp=typeof URLSearchParams<"u"?URLSearchParams:Us,Qp=typeof FormData<"u"?FormData:null,eh=typeof Blob<"u"?Blob:null,th={isBrowser:!0,classes:{URLSearchParams:Yp,FormData:Qp,Blob:eh},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",nh=(t=>Xu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),rh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ih=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:nh,hasStandardBrowserWebWorkerEnv:rh},Symbol.toStringTag,{value:"Module"})),Rt={...ih,...th};function oh(t,e){return lo(t,new Rt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Rt.isNode&&A.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function sh(t){return A.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ah(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 Yu(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&A.isArray(i)?i.length:s,l?(A.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!A.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&A.isArray(i[s])&&(i[s]=ah(i[s])),!a)}if(A.isFormData(t)&&A.isFunction(t.entries)){const n={};return A.forEachEntry(t,(r,i)=>{e(sh(r),i,n,0)}),n}return null}function lh(t,e,n){if(A.isString(t))try{return(e||JSON.parse)(t),A.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Fs={transitional:Ju,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=A.isObject(e);if(o&&A.isHTMLForm(e)&&(e=new FormData(e)),A.isFormData(e))return i?JSON.stringify(Yu(e)):e;if(A.isArrayBuffer(e)||A.isBuffer(e)||A.isStream(e)||A.isFile(e)||A.isBlob(e))return e;if(A.isArrayBufferView(e))return e.buffer;if(A.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 oh(e,this.formSerializer).toString();if((a=A.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return lo(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),lh(e)):e}],transformResponse:[function(e){const n=this.transitional||Fs.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&A.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"?ge.from(a,ge.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:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],t=>{Fs.headers[t]={}});const zs=Fs,uh=A.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"]),ch=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]&&uh[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},ya=Symbol("internals");function lr(t){return t&&String(t).trim().toLowerCase()}function _i(t){return t===!1||t==null?t:A.isArray(t)?t.map(_i):String(t)}function fh(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 dh=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function So(t,e,n,r,i){if(A.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!A.isString(e)){if(A.isString(r))return e.indexOf(r)!==-1;if(A.isRegExp(r))return r.test(e)}}function ph(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function hh(t,e){const n=A.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 uo{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=A.findKey(i,f);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=_i(a))}const s=(a,l)=>A.forEach(a,(c,f)=>o(c,f,l));return A.isPlainObject(e)||e instanceof this.constructor?s(e,n):A.isString(e)&&(e=e.trim())&&!dh(e)?s(ch(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=lr(e),e){const r=A.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return fh(i);if(A.isFunction(n))return n.call(this,i,r);if(A.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=A.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||So(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=A.findKey(r,s);a&&(!n||So(r,r[a],a,n))&&(delete r[a],i=!0)}}return A.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||So(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return A.forEach(this,(i,o)=>{const s=A.findKey(r,o);if(s){n[s]=_i(i),delete n[o];return}const a=e?ph(o):String(o).trim();a!==o&&delete n[o],n[a]=_i(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return A.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&A.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[ya]=this[ya]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=lr(s);r[a]||(hh(i,s),r[a]=!0)}return A.isArray(e)?e.forEach(o):o(e),this}}uo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(uo.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});A.freezeMethods(uo);const Ht=uo;function Lo(t,e){const n=this||zs,r=e||n,i=Ht.from(r.headers);let o=r.data;return A.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Qu(t){return!!(t&&t.__CANCEL__)}function $r(t,e,n){ge.call(this,t??"canceled",ge.ERR_CANCELED,e,n),this.name="CanceledError"}A.inherits($r,ge,{__CANCEL__:!0});function gh(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vh=Rt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];A.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),A.isString(r)&&s.push("path="+r),A.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 mh(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ec(t,e){return t&&!mh(e)?yh(t,e):e}const bh=Rt.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=A.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function wh(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Sh(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 ba(t,e){let n=0;const r=Sh(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 Lh=typeof XMLHttpRequest<"u",Eh=Lh&&function(t){return new Promise(function(n,r){let i=t.data;const o=Ht.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(A.isFormData(i)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[g,...S]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];o.setContentType([g||"multipart/form-data",...S].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(g+":"+S))}const h=ec(t.baseURL,t.url);d.open(t.method.toUpperCase(),Ku(h,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const g=Ht.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:t,request:d};gh(function(m){n(m),c()},function(m){r(m),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 ge("Request aborted",ge.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const w=t.transitional||Ju;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),r(new ge(S,w.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,t,d)),d=null},Rt.hasStandardBrowserEnv&&(a&&A.isFunction(a)&&(a=a(t)),a||a!==!1&&bh(h))){const g=t.xsrfHeaderName&&t.xsrfCookieName&&vh.read(t.xsrfCookieName);g&&o.set(t.xsrfHeaderName,g)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&A.forEach(o.toJSON(),function(S,w){d.setRequestHeader(w,S)}),A.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",ba(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",ba(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=g=>{d&&(r(!g||g.type?new $r(null,t,d):g),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const y=wh(h);if(y&&Rt.protocols.indexOf(y)===-1){r(new ge("Unsupported protocol "+y+":",ge.ERR_BAD_REQUEST,t));return}d.send(i||null)})},Xo={http:qp,xhr:Eh};A.forEach(Xo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const wa=t=>`- ${t}`,xh=t=>A.isFunction(t)||t===null||t===!1,tc={getAdapter:t=>{t=A.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,!xh(n)&&(r=Xo[(s=String(n)).toLowerCase()],r===void 0))throw new ge(`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
20
  `+o.map(wa).join(`
21
- `):" "+wa(o[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Xo};function Eo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new $r(null,t)}function Sa(t){return Eo(t),t.headers=Ht.from(t.headers),t.data=Lo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tc.getAdapter(t.adapter||zs.adapter)(t).then(function(r){return Eo(t),r.data=Lo.call(t,t.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return Qu(r)||(Eo(t),r&&r.response&&(r.response.data=Lo.call(t,t.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const La=t=>t instanceof Ht?{...t}:t;function Zn(t,e){e=e||{};const n={};function r(c,f,d){return A.isPlainObject(c)&&A.isPlainObject(f)?A.merge.call({caseless:d},c,f):A.isPlainObject(f)?A.merge({},f):A.isArray(f)?f.slice():f}function i(c,f,d){if(A.isUndefined(f)){if(!A.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function o(c,f){if(!A.isUndefined(f))return r(void 0,f)}function s(c,f){if(A.isUndefined(f)){if(!A.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(La(c),La(f),!0)};return A.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,h=d(t[f],e[f],f);A.isUndefined(h)&&d!==a||(n[f]=h)}),n}const nc="1.6.8",$s={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$s[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ea={};$s.transitional=function(e,n,r){function i(o,s){return"[Axios v"+nc+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new ge(i(s," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!Ea[s]&&(Ea[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 Ch(t,e,n){if(typeof t!="object")throw new ge("options must be an object",ge.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 ge("option "+o+" must be "+l,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const Yo={assertOptions:Ch,validators:$s},Jt=Yo.validators;class Bi{constructor(e){this.defaults=e,this.interceptors={request:new ma,response:new ma}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
22
- `+o):r.stack=o}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Zn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yo.assertOptions(r,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),i!=null&&(A.isFunction(i)?n.paramsSerializer={serialize:i}:Yo.assertOptions(i,{encode:Jt.function,serialize:Jt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&A.merge(o.common,o[n.method]);o&&A.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ht.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const y=[Sa.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++],g=a[d++];try{v=y(v)}catch(L){g.call(this,L);break}}try{f=Sa.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=Zn(this.defaults,e);const n=ec(e.baseURL,e.url);return Ku(n,e.params,e.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(e){Bi.prototype[e]=function(n,r){return this.request(Zn(r||{},{method:e,url:n,data:(r||{}).data}))}});A.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Zn(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Bi.prototype[e]=n(),Bi.prototype[e+"Form"]=n(!0)});const _i=Bi;class Hs{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 $r(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 Hs(function(i){e=i}),cancel:e}}}const _h=Hs;function Mh(t){return function(n){return t.apply(null,n)}}function Oh(t){return A.isObject(t)&&t.isAxiosError===!0}const Qo={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(Qo).forEach(([t,e])=>{Qo[e]=t});const kh=Qo;function rc(t){const e=new _i(t),n=ju(_i.prototype.request,e);return A.extend(n,_i.prototype,e,{allOwnKeys:!0}),A.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return rc(Zn(t,i))},n}const Ze=rc(zs);Ze.Axios=_i;Ze.CanceledError=$r;Ze.CancelToken=_h;Ze.isCancel=Qu;Ze.VERSION=nc;Ze.toFormData=ao;Ze.AxiosError=ge;Ze.Cancel=Ze.CanceledError;Ze.all=function(e){return Promise.all(e)};Ze.spread=Mh;Ze.isAxiosError=Oh;Ze.mergeConfig=Zn;Ze.AxiosHeaders=Ht;Ze.formToJSON=t=>Yu(A.isHTMLForm(t)?new FormData(t):t);Ze.getAdapter=tc.getAdapter;Ze.HttpStatusCode=kh;Ze.default=Ze;const Br=Ze.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),Ph=512,Th={[Ot.CheckOrder]:["is_check_order","is_delivery"],[Ot.DressingRoom]:["is_dressing_room","is_delivery"],[Ot.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},Rh={[kt.Return]:["is_pickup"],[kt.Shipping]:["is_pickup"],[kt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*es({bounds:t,filter:e,q:n}={},{controller:r}={}){const i={status:30,page_size:Ph};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=Th[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=Rh[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 Br.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 Br.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 xa=[],ts=(t,e,n)=>{var i;const r=new AbortController;return t&&((i=xa.pop())==null||i.abort()),xa.push(r),async o=>{const s={controller:r};if(!n){const l=await es({filter:e},s).next();o(l.value.data);return}for await(const a of es({filter:e,bounds:n},s))o(a.data)}},ic=":root",uo=(t,e)=>{var n;(n=document.querySelector(ic))==null||n.style.setProperty(t,e)},ns=t=>{t.stopImmediatePropagation()};var Ui={};(function(t){var e,n,r=Jr&&Jr.__awaiter||function(p,b,x,k){return new(x=x||Promise)(function(M,P){function O(j){try{D(k.next(j))}catch(U){P(U)}}function T(j){try{D(k.throw(j))}catch(U){P(U)}}function D(j){var U;j.done?M(j.value):((U=j.value)instanceof x?U:new x(function(N){N(U)})).then(O,T)}D((k=k.apply(p,b||[])).next())})},i=Jr&&Jr.__rest||function(p,b){var x={};for(M in p)Object.prototype.hasOwnProperty.call(p,M)&&b.indexOf(M)<0&&(x[M]=p[M]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,M=Object.getOwnPropertySymbols(p);k<M.length;k++)b.indexOf(M[k])<0&&Object.prototype.propertyIsEnumerable.call(p,M[k])&&(x[M[k]]=p[M[k]]);return x};Object.defineProperty(t,"__esModule",{value:!0}),t.fromLatLng=t.fromPlaceId=t.fromAddress=t.geocode=t.enableAddressDescriptor=t.setOutputFormat=t.setLocationType=t.setResultType=t.setBounds=t.setComponents=t.setRegion=t.setLanguage=t.setKey=t.setDefaults=t.OutputFormat=t.RequestType=void 0,function(p){p.ADDRESS="address",p.LATLNG="latlng",p.PLACE_ID="place_id"}(e=t.RequestType||(t.RequestType={})),function(p){p.XML="xml",p.JSON="json"}(n=t.OutputFormat||(t.OutputFormat={}));const o="https://maps.googleapis.com/maps/api/geocode";let s={outputFormat:n.JSON};function a(p){return r(this,void 0,void 0,function*(){var x=p.outputFormat,b=i(p,["outputFormat"]),b=new URLSearchParams(b).toString(),x=o+`/${x}?`+b;try{var k=yield(yield fetch(x)).json(),{status:M,error_message:P}=k;if(M==="OK")return k;throw new Error(`Geocoding failed: ${P}. Server returned status code ${M}.`)}catch(O){throw O instanceof Error?new Error("Geocoding request failed: "+O.message):new Error("Geocoding request failed with unknown error: "+O)}})}function l(p){s=Object.assign(Object.assign({},s),p)}function c(p){s.key=p}function f(p){s.language=p}function d(p){s.region=p}function h(p){s.components=p}function v(p){s.bounds=p}function y(p){s.result_type=p}function g(p){s.location_type=p}function L(p){s.outputFormat=p}function w(p){s.enable_address_descriptor=p}function S(p,b,x){if(typeof p!="string"||typeof b!="string")throw new Error(`Both requestType and value are required and must be of type string.
23
- requestType: ${typeof p}, value: `+typeof b);return a(Object.assign(Object.assign(Object.assign({},s),x),{[p]:b}))}function m(p,b,x,k){var M={outputFormat:n.JSON};return b&&(M.key=b),x&&(M.language=x),k&&(M.region=k),S(e.ADDRESS,p,M)}function _(p,b,x,k){var M={outputFormat:n.JSON};return b&&(M.key=b),x&&(M.language=x),k&&(M.region=k),S(e.PLACE_ID,p,M)}function E(p,b,x,k,M,P){var O={outputFormat:n.JSON};return x&&(O.key=x),k&&(O.language=k),M&&(O.region=M),P&&(O.location_type=P),S(e.LATLNG,p+","+b,O)}t.setDefaults=l,t.setKey=c,t.setLanguage=f,t.setRegion=d,t.setComponents=h,t.setBounds=v,t.setResultType=y,t.setLocationType=g,t.setOutputFormat=L,t.enableAddressDescriptor=w,t.geocode=S,t.fromAddress=m,t.fromPlaceId=_,t.fromLatLng=E})(Ui);const oc=t=>typeof t=="string",rs=t=>Array.isArray(t)&&t.length===2;async function is(t,e){var i;let n;if(oc(t))n=await Ui.fromPlaceId(t,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");else{const[o,s]=t;n=await Ui.fromLatLng(o,s,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",void 0,void 0,e==null?void 0:e.join("|"))}const 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}}const Ws=(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})},sc=t=>t.status===200,ac=t=>{const e=document.querySelector(ic);return e?getComputedStyle(e).getPropertyValue(t):null},Gs=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Vn=(t,e,n)=>{let r=t;n&&(r=r.replaceAll("secondaryColor",n));const i=(e.includes("--owl")?ac(e):e)||"";return r=r.replaceAll("currentColor",i),r},Ah=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,Dh={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},Ih=t=>t.points,Nh=t=>t.loaded,lc=t=>t.loading,On=cn()((t,e)=>({...Dh,async loadNext(n,r){const{reloading:i}=e();t({error:!1,reloading:!0}),Le.getState().setBounds(n);let o=0;try{await ts(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=tp(Le.getState());t({error:!1,loading:!0});let o=0;try{await ts(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})}}})),jh=()=>{u.useEffect(()=>{On.getState().loadFirst(),console.debug("[OmnicWidgetLocations::pointsLoader]");const t=ln.subscribe(e=>{On.getState().loadFirst(e),console.debug("[OmnicWidgetLocations::filters]",e)});return()=>{t()}},[])},tn=".",Zs=Symbol("target"),uc=Symbol("unsubscribe");function os(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function Bh(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const at=Array.isArray;function Vi(t){return typeof t=="symbol"}const gt={after(t,e){return at(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return at(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=tn),Vi(e)?t+e.toString():t+e):t},initial(t){if(at(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?"":t.slice(0,e)},last(t){if(at(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?t:t.slice(e+1)},walk(t,e){if(at(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(tn);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(tn,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(at(t)){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}return t.length<e.length?!1:t===e?!0:t.startsWith(e)?t[e.length]===tn:!1},isRootPath(t){return at(t)?t.length===0:t===""}};function Uh(t){return typeof t=="object"&&typeof t.next=="function"}function Vh(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[Zs].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 Ca(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&Vi(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let Fh=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,gt.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 ss(t){return toString.call(t)==="[object Object]"}function Yr(){return!0}function Rn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const cc=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),zh=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),fc={push:Yr,pop:Yr,shift:Yr,unshift:Yr,copyWithin:Rn,reverse:Rn,sort:Rn,splice:Rn,flat:Rn,fill:Rn},$h=new Set([...cc,...zh,...Object.keys(fc)]);function Qr(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const dc=["keys","values","entries"],pc=new Set(["has","toString"]),hc={add:Qr,clear:Qr,delete:Qr,forEach:Qr},Hh=new Set([...pc,...Object.keys(hc),...dc]);function ei(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 Wh=new Set([...pc,"get"]),gc={set:ei,clear:ei,delete:ei,forEach:ei},Gh=new Set([...Wh,...Object.keys(gc),...dc]);class un{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 cc.has(e)}_shallowClone(e){let n=e;if(ss(e))n={...e};else if(at(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?(at(i)?this._onIsChanged=fc[n]:i instanceof Set?this._onIsChanged=hc[n]:i instanceof Map&&(this._onIsChanged=gc[n]),i):r}update(e,n,r){const i=gt.after(e,this._path);if(n!=="length"){let o=this.clone;gt.walk(i,s=>{o!=null&&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!=null&&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],gt.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}isPathApplicable(e){return gt.isRootPath(this._path)||gt.isSubPath(e,this._path)}}class _a extends un{static isHandledMethod(e){return $h.has(e)}}class Zh extends un{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class Ma extends un{static isHandledMethod(e){return Hh.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 Oa extends un{static isHandledMethod(e){return Gh.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 qh extends un{constructor(e,n,r,i){super(void 0,n,r,i),this._argument1=r[0],this._weakValue=e.has(this._argument1)}isChanged(e){return this._weakValue!==e.has(this._argument1)}undo(e){this._weakValue&&!e.has(this._argument1)?e.add(this._argument1):e.delete(this._argument1)}}class Kh extends un{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 Sn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ss(e)||at(e)||os(e)}static isHandledMethod(e,n){return ss(e)?un.isHandledMethod(n):at(e)?_a.isHandledMethod(n):e instanceof Set?Ma.isHandledMethod(n):e instanceof Map?Oa.isHandledMethod(n):os(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=un;at(e)?i=_a:e instanceof Date?i=Zh:e instanceof Set?i=Ma:e instanceof Map?i=Oa:e instanceof WeakSet?i=qh:e instanceof WeakMap&&(i=Kh),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack.at(-1).update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,o=Sn.isHandledMethod(r,i);return this._stack.at(-1).preferredThisArg(o,i,n,r)}isChanged(e,n,r){return this._stack.at(-1).isChanged(e,n,r)}isPartOfClone(e){return this._stack.at(-1).isPathApplicable(e)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const Jh={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Cr=(t,e,n={})=>{n={...Jh,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new Fh(i),c=typeof n.onValidate=="function",f=new Sn(c),d=(m,_,E,p,b)=>!c||f.isCloning||n.onValidate(gt.concat(l.getPath(m),_),E,p,b)===!0,h=(m,_,E,p)=>{!Ca(l,n,_)&&!(s&&l.isDetached(m,t))&&v(l.getPath(m),_,E,p)},v=(m,_,E,p,b)=>{f.isCloning&&f.isPartOfClone(m)?f.update(m,_,p):e(gt.concat(m,_),E,p,b)},y=m=>m&&(m[r]??m),g=(m,_,E,p)=>{if(Bh(m)||E==="constructor"||o&&!Sn.isHandledMethod(_,E)||Ca(l,n,E)||l.isGetInvariant(_,E)||s&&l.isDetached(_,t))return m;p===void 0&&(p=l.getPath(_));const b=gt.concat(p,E),x=l.getPath(m);return x&&L(b,x)?l.getProxy(m,x,w,r):l.getProxy(m,b,w,r)},L=(m,_)=>{if(Vi(m)||m.length<=_.length||at(_)&&_.length===0)return!1;const E=at(m)?m:m.split(tn),p=at(_)?_:_.split(tn);return E.length<=p.length?!1:!p.some((b,x)=>b!==E[x])},w={get(m,_,E){if(Vi(_)){if(_===r||_===Zs)return m;if(_===uc&&!l.isUnsubscribed&&l.getPath(m).length===0)return l.unsubscribe(),m}const p=os(m)?Reflect.get(m,_):Reflect.get(m,_,E);return g(p,m,_)},set(m,_,E,p){E=y(E);const b=m[r]??m,x=b[_];if(i(x,E)&&_ in m)return!0;const k=d(m,_,E,x);return k&&l.setProperty(b,_,E,p,x)?(h(m,_,m[_],x),!0):!k},defineProperty(m,_,E){if(!l.isSameDescriptor(E,m,_)){const p=m[_];d(m,_,E.value,p)&&l.defineProperty(m,_,E,p)&&h(m,_,E.value,p)}return!0},deleteProperty(m,_){if(!Reflect.has(m,_))return!0;const E=Reflect.get(m,_),p=d(m,_,void 0,E);return p&&l.deleteProperty(m,_,E)?(h(m,_,void 0,E),!0):!p},apply(m,_,E){const p=_[r]??_;if(l.isUnsubscribed)return Reflect.apply(m,p,E);if((a===!1||a!==!0&&!a.includes(m.name))&&Sn.isHandledType(p)){let b=gt.initial(l.getPath(m));const x=Sn.isHandledMethod(p,m.name);f.start(p,b,E);let k=Reflect.apply(m,f.preferredThisArg(m,_,p),x?E.map(O=>y(O)):E);const M=f.isChanged(p,i),P=f.stop();if(Sn.isHandledType(k)&&x&&(_ instanceof Map&&m.name==="get"&&(b=gt.concat(b,E[0])),k=l.getProxy(k,b,w)),M){const O={name:m.name,args:E,result:k},T=f.isCloning?gt.initial(b):b,D=f.isCloning?gt.last(b):"";d(gt.get(t,T),D,p,P,O)?v(T,D,p,P,O):f.undo(p)}return(_ instanceof Map||_ instanceof Set)&&Uh(k)?Vh(k,m,_,b,g):k}return Reflect.apply(m,_,E)}},S=l.getProxy(t,n.pathAsArray?[]:"",w);return e=e.bind(S),c&&(n.onValidate=n.onValidate.bind(S)),S};Cr.target=t=>(t==null?void 0:t[Zs])??t;Cr.unsubscribe=t=>(t==null?void 0:t[uc])??t;const Xh=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...bn,...e,map:{...bn.map,...e==null?void 0:e.map},palette:{...bn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{if(!i)return;const s={...bn,...t,map:{...bn.map,...t.map},palette:{...bn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",s),r(s)},[t,i]),u.useEffect(()=>{if(o)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=Cr(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s={...n,...Cr.target(this)};s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),console.debug("[OmnicLocationsWidget::changeWindowConfig]",s),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Cr.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,o]),n},Yh=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),Br.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(Br.defaults.baseURL=e.baseURL)};var vc={exports:{}};/*!
21
+ `):" "+wa(o[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Xo};function Eo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new $r(null,t)}function Sa(t){return Eo(t),t.headers=Ht.from(t.headers),t.data=Lo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tc.getAdapter(t.adapter||zs.adapter)(t).then(function(r){return Eo(t),r.data=Lo.call(t,t.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return Qu(r)||(Eo(t),r&&r.response&&(r.response.data=Lo.call(t,t.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const La=t=>t instanceof Ht?{...t}:t;function Zn(t,e){e=e||{};const n={};function r(c,f,d){return A.isPlainObject(c)&&A.isPlainObject(f)?A.merge.call({caseless:d},c,f):A.isPlainObject(f)?A.merge({},f):A.isArray(f)?f.slice():f}function i(c,f,d){if(A.isUndefined(f)){if(!A.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function o(c,f){if(!A.isUndefined(f))return r(void 0,f)}function s(c,f){if(A.isUndefined(f)){if(!A.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(La(c),La(f),!0)};return A.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,h=d(t[f],e[f],f);A.isUndefined(h)&&d!==a||(n[f]=h)}),n}const nc="1.6.8",$s={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$s[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ea={};$s.transitional=function(e,n,r){function i(o,s){return"[Axios v"+nc+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new ge(i(s," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!Ea[s]&&(Ea[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 Ch(t,e,n){if(typeof t!="object")throw new ge("options must be an object",ge.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 ge("option "+o+" must be "+l,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const Yo={assertOptions:Ch,validators:$s},Jt=Yo.validators;class Vi{constructor(e){this.defaults=e,this.interceptors={request:new ma,response:new ma}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
22
+ `+o):r.stack=o}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Zn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yo.assertOptions(r,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),i!=null&&(A.isFunction(i)?n.paramsSerializer={serialize:i}:Yo.assertOptions(i,{encode:Jt.function,serialize:Jt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&A.merge(o.common,o[n.method]);o&&A.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ht.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let f,d=0,h;if(!l){const y=[Sa.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++],g=a[d++];try{v=y(v)}catch(S){g.call(this,S);break}}try{f=Sa.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=Zn(this.defaults,e);const n=ec(e.baseURL,e.url);return Ku(n,e.params,e.paramsSerializer)}}A.forEach(["delete","get","head","options"],function(e){Vi.prototype[e]=function(n,r){return this.request(Zn(r||{},{method:e,url:n,data:(r||{}).data}))}});A.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Zn(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Vi.prototype[e]=n(),Vi.prototype[e+"Form"]=n(!0)});const Mi=Vi;class Hs{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 $r(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 Hs(function(i){e=i}),cancel:e}}}const _h=Hs;function Mh(t){return function(n){return t.apply(null,n)}}function Oh(t){return A.isObject(t)&&t.isAxiosError===!0}const Qo={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(Qo).forEach(([t,e])=>{Qo[e]=t});const Ph=Qo;function rc(t){const e=new Mi(t),n=ju(Mi.prototype.request,e);return A.extend(n,Mi.prototype,e,{allOwnKeys:!0}),A.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return rc(Zn(t,i))},n}const Ze=rc(zs);Ze.Axios=Mi;Ze.CanceledError=$r;Ze.CancelToken=_h;Ze.isCancel=Qu;Ze.VERSION=nc;Ze.toFormData=lo;Ze.AxiosError=ge;Ze.Cancel=Ze.CanceledError;Ze.all=function(e){return Promise.all(e)};Ze.spread=Mh;Ze.isAxiosError=Oh;Ze.mergeConfig=Zn;Ze.AxiosHeaders=Ht;Ze.formToJSON=t=>Yu(A.isHTMLForm(t)?new FormData(t):t);Ze.getAdapter=tc.getAdapter;Ze.HttpStatusCode=Ph;Ze.default=Ze;const Br=Ze.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),kh=512,Th={[Ot.CheckOrder]:["is_check_order","is_delivery"],[Ot.DressingRoom]:["is_dressing_room","is_delivery"],[Ot.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},Rh={[Pt.Return]:["is_pickup"],[Pt.Shipping]:["is_pickup"],[Pt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*es({bounds:t,filter:e,q:n}={},{controller:r}={}){const i={status:30,page_size:kh};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=Th[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=Rh[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 Br.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 Br.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 xa=[],ts=(t,e,n)=>{var i;const r=new AbortController;return t&&((i=xa.pop())==null||i.abort()),xa.push(r),async o=>{const s={controller:r};if(!n){const l=await es({filter:e},s).next();o(l.value.data);return}for await(const a of es({filter:e,bounds:n},s))o(a.data)}},ic=":root",Hr=(t,e)=>{var n;(n=document.querySelector(ic))==null||n.style.setProperty(t,e)},ns=t=>{t.stopImmediatePropagation()};var Ui={};(function(t){var e,n,r=Xr&&Xr.__awaiter||function(p,b,x,P){return new(x=x||Promise)(function(M,k){function O(j){try{D(P.next(j))}catch(V){k(V)}}function T(j){try{D(P.throw(j))}catch(V){k(V)}}function D(j){var V;j.done?M(j.value):((V=j.value)instanceof x?V:new x(function(N){N(V)})).then(O,T)}D((P=P.apply(p,b||[])).next())})},i=Xr&&Xr.__rest||function(p,b){var x={};for(M in p)Object.prototype.hasOwnProperty.call(p,M)&&b.indexOf(M)<0&&(x[M]=p[M]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var P=0,M=Object.getOwnPropertySymbols(p);P<M.length;P++)b.indexOf(M[P])<0&&Object.prototype.propertyIsEnumerable.call(p,M[P])&&(x[M[P]]=p[M[P]]);return x};Object.defineProperty(t,"__esModule",{value:!0}),t.fromLatLng=t.fromPlaceId=t.fromAddress=t.geocode=t.enableAddressDescriptor=t.setOutputFormat=t.setLocationType=t.setResultType=t.setBounds=t.setComponents=t.setRegion=t.setLanguage=t.setKey=t.setDefaults=t.OutputFormat=t.RequestType=void 0,function(p){p.ADDRESS="address",p.LATLNG="latlng",p.PLACE_ID="place_id"}(e=t.RequestType||(t.RequestType={})),function(p){p.XML="xml",p.JSON="json"}(n=t.OutputFormat||(t.OutputFormat={}));const o="https://maps.googleapis.com/maps/api/geocode";let s={outputFormat:n.JSON};function a(p){return r(this,void 0,void 0,function*(){var x=p.outputFormat,b=i(p,["outputFormat"]),b=new URLSearchParams(b).toString(),x=o+`/${x}?`+b;try{var P=yield(yield fetch(x)).json(),{status:M,error_message:k}=P;if(M==="OK")return P;throw new Error(`Geocoding failed: ${k}. Server returned status code ${M}.`)}catch(O){throw O instanceof Error?new Error("Geocoding request failed: "+O.message):new Error("Geocoding request failed with unknown error: "+O)}})}function l(p){s=Object.assign(Object.assign({},s),p)}function c(p){s.key=p}function f(p){s.language=p}function d(p){s.region=p}function h(p){s.components=p}function v(p){s.bounds=p}function y(p){s.result_type=p}function g(p){s.location_type=p}function S(p){s.outputFormat=p}function w(p){s.enable_address_descriptor=p}function L(p,b,x){if(typeof p!="string"||typeof b!="string")throw new Error(`Both requestType and value are required and must be of type string.
23
+ requestType: ${typeof p}, value: `+typeof b);return a(Object.assign(Object.assign(Object.assign({},s),x),{[p]:b}))}function m(p,b,x,P){var M={outputFormat:n.JSON};return b&&(M.key=b),x&&(M.language=x),P&&(M.region=P),L(e.ADDRESS,p,M)}function _(p,b,x,P){var M={outputFormat:n.JSON};return b&&(M.key=b),x&&(M.language=x),P&&(M.region=P),L(e.PLACE_ID,p,M)}function E(p,b,x,P,M,k){var O={outputFormat:n.JSON};return x&&(O.key=x),P&&(O.language=P),M&&(O.region=M),k&&(O.location_type=k),L(e.LATLNG,p+","+b,O)}t.setDefaults=l,t.setKey=c,t.setLanguage=f,t.setRegion=d,t.setComponents=h,t.setBounds=v,t.setResultType=y,t.setLocationType=g,t.setOutputFormat=S,t.enableAddressDescriptor=w,t.geocode=L,t.fromAddress=m,t.fromPlaceId=_,t.fromLatLng=E})(Ui);const oc=t=>typeof t=="string",rs=t=>Array.isArray(t)&&t.length===2;async function is(t,e){var i;let n;if(oc(t))n=await Ui.fromPlaceId(t,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");else{const[o,s]=t;n=await Ui.fromLatLng(o,s,"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",void 0,void 0,e==null?void 0:e.join("|"))}const 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}}const Ws=(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})},sc=t=>t.status===200,ac=t=>{const e=document.querySelector(ic);return e?getComputedStyle(e).getPropertyValue(t):null},Gs=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Un=(t,e,n)=>{let r=t;n&&(r=r.replaceAll("secondaryColor",n));const i=(e.includes("--owl")?ac(e):e)||"";return r=r.replaceAll("currentColor",i),r},Ah=t=>"comment"in t&&"address"in t&&"apartment_number"in t&&"delivery_time"in t,Dh={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},Ih=t=>t.points,Nh=t=>t.loaded,lc=t=>t.loading,On=cn()((t,e)=>({...Dh,async loadNext(n,r){const{reloading:i}=e();t({error:!1,reloading:!0}),Le.getState().setBounds(n);let o=0;try{await ts(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=tp(Le.getState());t({error:!1,loading:!0});let o=0;try{await ts(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})}}})),jh=()=>{u.useEffect(()=>{On.getState().loadFirst(),console.debug("[OmnicWidgetLocations::pointsLoader]");const t=ln.subscribe(e=>{On.getState().loadFirst(e),console.debug("[OmnicWidgetLocations::filters]",e)});return()=>{t()}},[])},tn=".",Zs=Symbol("target"),uc=Symbol("unsubscribe");function os(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function Bh(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const at=Array.isArray;function Fi(t){return typeof t=="symbol"}const gt={after(t,e){return at(t)?t.slice(e.length):e===""?t:t.slice(e.length+1)},concat(t,e){return at(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=tn),Fi(e)?t+e.toString():t+e):t},initial(t){if(at(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?"":t.slice(0,e)},last(t){if(at(t))return t.at(-1)??"";if(t==="")return t;const e=t.lastIndexOf(tn);return e===-1?t:t.slice(e+1)},walk(t,e){if(at(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(tn);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(tn,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t},isSubPath(t,e){if(at(t)){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}return t.length<e.length?!1:t===e?!0:t.startsWith(e)?t[e.length]===tn:!1},isRootPath(t){return at(t)?t.length===0:t===""}};function Vh(t){return typeof t=="object"&&typeof t.next=="function"}function Uh(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[Zs].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 Ca(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&Fi(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}let Fh=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,gt.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 ss(t){return toString.call(t)==="[object Object]"}function Qr(){return!0}function Rn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const cc=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),zh=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),fc={push:Qr,pop:Qr,shift:Qr,unshift:Qr,copyWithin:Rn,reverse:Rn,sort:Rn,splice:Rn,flat:Rn,fill:Rn},$h=new Set([...cc,...zh,...Object.keys(fc)]);function ei(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const dc=["keys","values","entries"],pc=new Set(["has","toString"]),hc={add:ei,clear:ei,delete:ei,forEach:ei},Hh=new Set([...pc,...Object.keys(hc),...dc]);function ti(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 Wh=new Set([...pc,"get"]),gc={set:ti,clear:ti,delete:ti,forEach:ti},Gh=new Set([...Wh,...Object.keys(gc),...dc]);class un{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 cc.has(e)}_shallowClone(e){let n=e;if(ss(e))n={...e};else if(at(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?(at(i)?this._onIsChanged=fc[n]:i instanceof Set?this._onIsChanged=hc[n]:i instanceof Map&&(this._onIsChanged=gc[n]),i):r}update(e,n,r){const i=gt.after(e,this._path);if(n!=="length"){let o=this.clone;gt.walk(i,s=>{o!=null&&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!=null&&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],gt.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}isPathApplicable(e){return gt.isRootPath(this._path)||gt.isSubPath(e,this._path)}}class _a extends un{static isHandledMethod(e){return $h.has(e)}}class Zh extends un{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class Ma extends un{static isHandledMethod(e){return Hh.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 Oa extends un{static isHandledMethod(e){return Gh.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 qh extends un{constructor(e,n,r,i){super(void 0,n,r,i),this._argument1=r[0],this._weakValue=e.has(this._argument1)}isChanged(e){return this._weakValue!==e.has(this._argument1)}undo(e){this._weakValue&&!e.has(this._argument1)?e.add(this._argument1):e.delete(this._argument1)}}class Kh extends un{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 Sn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return ss(e)||at(e)||os(e)}static isHandledMethod(e,n){return ss(e)?un.isHandledMethod(n):at(e)?_a.isHandledMethod(n):e instanceof Set?Ma.isHandledMethod(n):e instanceof Map?Oa.isHandledMethod(n):os(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=un;at(e)?i=_a:e instanceof Date?i=Zh:e instanceof Set?i=Ma:e instanceof Map?i=Oa:e instanceof WeakSet?i=qh:e instanceof WeakMap&&(i=Kh),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack.at(-1).update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,o=Sn.isHandledMethod(r,i);return this._stack.at(-1).preferredThisArg(o,i,n,r)}isChanged(e,n,r){return this._stack.at(-1).isChanged(e,n,r)}isPartOfClone(e){return this._stack.at(-1).isPathApplicable(e)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const Jh={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Cr=(t,e,n={})=>{n={...Jh,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new Fh(i),c=typeof n.onValidate=="function",f=new Sn(c),d=(m,_,E,p,b)=>!c||f.isCloning||n.onValidate(gt.concat(l.getPath(m),_),E,p,b)===!0,h=(m,_,E,p)=>{!Ca(l,n,_)&&!(s&&l.isDetached(m,t))&&v(l.getPath(m),_,E,p)},v=(m,_,E,p,b)=>{f.isCloning&&f.isPartOfClone(m)?f.update(m,_,p):e(gt.concat(m,_),E,p,b)},y=m=>m&&(m[r]??m),g=(m,_,E,p)=>{if(Bh(m)||E==="constructor"||o&&!Sn.isHandledMethod(_,E)||Ca(l,n,E)||l.isGetInvariant(_,E)||s&&l.isDetached(_,t))return m;p===void 0&&(p=l.getPath(_));const b=gt.concat(p,E),x=l.getPath(m);return x&&S(b,x)?l.getProxy(m,x,w,r):l.getProxy(m,b,w,r)},S=(m,_)=>{if(Fi(m)||m.length<=_.length||at(_)&&_.length===0)return!1;const E=at(m)?m:m.split(tn),p=at(_)?_:_.split(tn);return E.length<=p.length?!1:!p.some((b,x)=>b!==E[x])},w={get(m,_,E){if(Fi(_)){if(_===r||_===Zs)return m;if(_===uc&&!l.isUnsubscribed&&l.getPath(m).length===0)return l.unsubscribe(),m}const p=os(m)?Reflect.get(m,_):Reflect.get(m,_,E);return g(p,m,_)},set(m,_,E,p){E=y(E);const b=m[r]??m,x=b[_];if(i(x,E)&&_ in m)return!0;const P=d(m,_,E,x);return P&&l.setProperty(b,_,E,p,x)?(h(m,_,m[_],x),!0):!P},defineProperty(m,_,E){if(!l.isSameDescriptor(E,m,_)){const p=m[_];d(m,_,E.value,p)&&l.defineProperty(m,_,E,p)&&h(m,_,E.value,p)}return!0},deleteProperty(m,_){if(!Reflect.has(m,_))return!0;const E=Reflect.get(m,_),p=d(m,_,void 0,E);return p&&l.deleteProperty(m,_,E)?(h(m,_,void 0,E),!0):!p},apply(m,_,E){const p=_[r]??_;if(l.isUnsubscribed)return Reflect.apply(m,p,E);if((a===!1||a!==!0&&!a.includes(m.name))&&Sn.isHandledType(p)){let b=gt.initial(l.getPath(m));const x=Sn.isHandledMethod(p,m.name);f.start(p,b,E);let P=Reflect.apply(m,f.preferredThisArg(m,_,p),x?E.map(O=>y(O)):E);const M=f.isChanged(p,i),k=f.stop();if(Sn.isHandledType(P)&&x&&(_ instanceof Map&&m.name==="get"&&(b=gt.concat(b,E[0])),P=l.getProxy(P,b,w)),M){const O={name:m.name,args:E,result:P},T=f.isCloning?gt.initial(b):b,D=f.isCloning?gt.last(b):"";d(gt.get(t,T),D,p,k,O)?v(T,D,p,k,O):f.undo(p)}return(_ instanceof Map||_ instanceof Set)&&Vh(P)?Uh(P,m,_,b,g):P}return Reflect.apply(m,_,E)}},L=l.getProxy(t,n.pathAsArray?[]:"",w);return e=e.bind(L),c&&(n.onValidate=n.onValidate.bind(L)),L};Cr.target=t=>(t==null?void 0:t[Zs])??t;Cr.unsubscribe=t=>(t==null?void 0:t[uc])??t;const Xh=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...bn,...e,map:{...bn.map,...e==null?void 0:e.map},palette:{...bn.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{if(!i)return;const s={...bn,...t,map:{...bn.map,...t.map},palette:{...bn.palette,...t.palette}};console.debug("[OmnicLocationsWidget::reactConfig]",s),r(s)},[t,i]),u.useEffect(()=>{if(o)return console.debug("[OmnicLocationsWidget::windowConfig]",n),window.OMNIC_WIDGET_LOCATIONS_CONFIG=Cr(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s={...n,...Cr.target(this)};s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),console.debug("[OmnicLocationsWidget::changeWindowConfig]",s),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Cr.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[n,o]),n},Yh=(t,e)=>{console.debug("[OmnicWidgetLocations::axios]",{INN:t,options:e}),Br.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(Br.defaults.baseURL=e.baseURL)};var vc={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 o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(vc);var Qh=vc.exports;const ve=Ns(Qh),eg={place:null},mc=t=>t.place,tg=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"))},Dt=cn((t,e)=>({...eg,async setPlace(n,r,i){var l,c,f,d,h,v;const{map:o}=Le.getState();let s;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),rs(n)){const y=await is(n,r);s=(l=y==null?void 0:y.results)==null?void 0:l[0],i&&(s=(c=y==null?void 0:y.results)==null?void 0:c.find(g=>{var L;return(L=g.types)==null?void 0:L.includes(i)}))}else s=n;Wt(s,"Place is not defined");let a;if(s!=null&&s.place_id){const{results:y}=await is(s.place_id);a=(d=(f=y==null?void 0:y[0])==null?void 0:f.geometry)==null?void 0:d.viewport}else(h=s==null?void 0:s.geometry)!=null&&h.viewport?a=s.geometry.viewport:(v=s==null?void 0:s.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(s.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),o==null||o.fitBounds(a)),t({place:s}),s},async setPlaceAndPoint(n,r){var c;const i=r==null?void 0:r.types,o=rs(n)?await e().setPlace(n,i):await e().setPlace(n),s=(c=o.geometry)==null?void 0:c.location;Wt(s,"Location is not defined");const a=[s.lat(),s.lng()],l={address:o.formatted_address,coords:a};return r!=null&&r.ignoreSelection||vt.getState().setDeliverPoint(l),o}})),ng="Overlay-module__root__3qTsUC",rg={root:ng},yc=({children:t,className:e})=>C.jsx("div",{className:ve(rg.root,e),children:t}),ig="Spinner-module__loader__U4GVhD",og={loader:ig},Fi=({className:t})=>C.jsx("div",{className:ve(og.loader,t),children:"Loading..."});/*! *****************************************************************************
27
+ */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(vc);var Qh=vc.exports;const ve=Ns(Qh),eg={place:null},mc=t=>t.place,tg=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"))},Dt=cn((t,e)=>({...eg,async setPlace(n,r,i){var l,c,f,d,h,v;const{map:o}=Le.getState();let s;if(console.debug("[OmnicWidgetLocations::setDeliveryAdressPlace]",{value:n,types:r}),rs(n)){const y=await is(n,r);s=(l=y==null?void 0:y.results)==null?void 0:l[0],i&&(s=(c=y==null?void 0:y.results)==null?void 0:c.find(g=>{var S;return(S=g.types)==null?void 0:S.includes(i)}))}else s=n;Wt(s,"Place is not defined");let a;if(s!=null&&s.place_id){const{results:y}=await is(s.place_id);a=(d=(f=y==null?void 0:y[0])==null?void 0:f.geometry)==null?void 0:d.viewport}else(h=s==null?void 0:s.geometry)!=null&&h.viewport?a=s.geometry.viewport:(v=s==null?void 0:s.geometry)!=null&&v.location&&(a=new google.maps.LatLngBounds,a.extend(s.geometry.location));return a&&(console.debug("[OmnicWidgetLocations::fitMapBounds]",a.toJSON()),o==null||o.fitBounds(a)),t({place:s}),s},async setPlaceAndPoint(n,r){var c;const i=r==null?void 0:r.types,o=rs(n)?await e().setPlace(n,i):await e().setPlace(n),s=(c=o.geometry)==null?void 0:c.location;Wt(s,"Location is not defined");const a=[s.lat(),s.lng()],l={address:o.formatted_address,coords:a};return r!=null&&r.ignoreSelection||vt.getState().setDeliverPoint(l),o}})),ng="Overlay-module__root__3qTsUC",rg={root:ng},yc=({children:t,className:e})=>C.jsx("div",{className:ve(rg.root,e),children:t}),ig="Spinner-module__loader__U4GVhD",og={loader:ig},zi=({className:t})=>C.jsx("div",{className:ve(og.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 as=function(t,e){return as=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])},as(t,e)};function Ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");as(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var G=function(){return G=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},G.apply(this,arguments)};function qs(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 sg(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 ag(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 bc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lg=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}},ug=lg,We=bc(ug),ie=u.createContext(null);function cg(){We(!!u.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=u.useContext(ie);return We(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function fg(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function dg(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function pg(t,e,n,r){var i={},o=function(s,a){var l=n[a];l!==e[a]&&(i[a]=l,s(r,l))};return dg(t,o),i}function hg(t,e,n){var r=fg(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function gg(t){google.maps.event.removeListener(t)}function ce(t){t===void 0&&(t=[]),t.forEach(gg)}function ae(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=hg(i,o,n);return pg(e,r,i,o),s}var ka={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"},Pa={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 vg(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,g=t.onMouseDown,L=t.onMouseUp,w=t.onRightClick,S=t.onCenterChanged,m=t.onLoad,_=t.onUnmount,E=u.useState(null),p=E[0],b=E[1],x=u.useRef(null),k=u.useState(null),M=k[0],P=k[1],O=u.useState(null),T=O[0],D=O[1],j=u.useState(null),U=j[0],N=j[1],V=u.useState(null),q=V[0],$=V[1],F=u.useState(null),Z=F[0],te=F[1],X=u.useState(null),J=X[0],R=X[1],fe=u.useState(null),xe=fe[0],H=fe[1],Oe=u.useState(null),ke=Oe[0],se=Oe[1],we=u.useState(null),Ne=we[0],he=we[1],Se=u.useState(null),Pe=Se[0],Ce=Se[1],Te=u.useState(null),ee=Te[0],Ve=Te[1],Q=u.useState(null),qe=Q[0],W=Q[1];return u.useEffect(function(){n&&p!==null&&p.setOptions(n)},[p,n]),u.useEffect(function(){p!==null&&typeof s<"u"&&p.setCenter(s)},[p,s]),u.useEffect(function(){p&&l&&(T!==null&&google.maps.event.removeListener(T),D(google.maps.event.addListener(p,"dblclick",l)))},[l]),u.useEffect(function(){p&&f&&(U!==null&&google.maps.event.removeListener(U),N(google.maps.event.addListener(p,"dragend",f)))},[f]),u.useEffect(function(){p&&d&&(q!==null&&google.maps.event.removeListener(q),$(google.maps.event.addListener(p,"dragstart",d)))},[d]),u.useEffect(function(){p&&g&&(Z!==null&&google.maps.event.removeListener(Z),te(google.maps.event.addListener(p,"mousedown",g)))},[g]),u.useEffect(function(){p&&h&&(J!==null&&google.maps.event.removeListener(J),R(google.maps.event.addListener(p,"mousemove",h)))},[h]),u.useEffect(function(){p&&v&&(xe!==null&&google.maps.event.removeListener(xe),H(google.maps.event.addListener(p,"mouseout",v)))},[v]),u.useEffect(function(){p&&y&&(ke!==null&&google.maps.event.removeListener(ke),se(google.maps.event.addListener(p,"mouseover",y)))},[y]),u.useEffect(function(){p&&L&&(Ne!==null&&google.maps.event.removeListener(Ne),he(google.maps.event.addListener(p,"mouseup",L)))},[L]),u.useEffect(function(){p&&w&&(Pe!==null&&google.maps.event.removeListener(Pe),Ce(google.maps.event.addListener(p,"rightclick",w)))},[w]),u.useEffect(function(){p&&a&&(ee!==null&&google.maps.event.removeListener(ee),Ve(google.maps.event.addListener(p,"click",a)))},[a]),u.useEffect(function(){p&&c&&(qe!==null&&google.maps.event.removeListener(qe),W(google.maps.event.addListener(p,"drag",c)))},[c]),u.useEffect(function(){p&&S&&(M!==null&&google.maps.event.removeListener(M),P(google.maps.event.addListener(p,"center_changed",S)))},[a]),u.useEffect(function(){var Fe=x.current===null?null:new google.maps.Map(x.current,n);return b(Fe),Fe!==null&&m&&m(Fe),function(){Fe!==null&&_&&_(Fe)}},[]),C.jsx("div",{id:r,ref:x,style:i,className:o,children:C.jsx(ie.Provider,{value:p,children:p!==null?e:null})})}u.memo(vg);var mg=function(t){Ie(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=ae({updaterMap:Pa,eventMap:ka,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Pa,eventMap:ka,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),ce(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:C.jsx(ie.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(u.PureComponent),En=typeof document<"u";function wc(t){var e=t.url,n=t.id,r=t.nonce;return En?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 Ta(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
40
+ ***************************************************************************** */var as=function(t,e){return as=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])},as(t,e)};function Ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");as(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var G=function(){return G=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},G.apply(this,arguments)};function qs(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 sg(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 ag(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 bc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lg=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}},ug=lg,We=bc(ug),ie=u.createContext(null);function cg(){We(!!u.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=u.useContext(ie);return We(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function fg(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function dg(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function pg(t,e,n,r){var i={},o=function(s,a){var l=n[a];l!==e[a]&&(i[a]=l,s(r,l))};return dg(t,o),i}function hg(t,e,n){var r=fg(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function gg(t){google.maps.event.removeListener(t)}function ce(t){t===void 0&&(t=[]),t.forEach(gg)}function ae(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=hg(i,o,n);return pg(e,r,i,o),s}var Pa={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"},ka={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 vg(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,g=t.onMouseDown,S=t.onMouseUp,w=t.onRightClick,L=t.onCenterChanged,m=t.onLoad,_=t.onUnmount,E=u.useState(null),p=E[0],b=E[1],x=u.useRef(null),P=u.useState(null),M=P[0],k=P[1],O=u.useState(null),T=O[0],D=O[1],j=u.useState(null),V=j[0],N=j[1],U=u.useState(null),q=U[0],$=U[1],F=u.useState(null),Z=F[0],te=F[1],X=u.useState(null),J=X[0],R=X[1],fe=u.useState(null),xe=fe[0],H=fe[1],Oe=u.useState(null),Pe=Oe[0],se=Oe[1],we=u.useState(null),Ne=we[0],he=we[1],Se=u.useState(null),ke=Se[0],Ce=Se[1],Te=u.useState(null),ee=Te[0],Ue=Te[1],Q=u.useState(null),qe=Q[0],W=Q[1];return u.useEffect(function(){n&&p!==null&&p.setOptions(n)},[p,n]),u.useEffect(function(){p!==null&&typeof s<"u"&&p.setCenter(s)},[p,s]),u.useEffect(function(){p&&l&&(T!==null&&google.maps.event.removeListener(T),D(google.maps.event.addListener(p,"dblclick",l)))},[l]),u.useEffect(function(){p&&f&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(p,"dragend",f)))},[f]),u.useEffect(function(){p&&d&&(q!==null&&google.maps.event.removeListener(q),$(google.maps.event.addListener(p,"dragstart",d)))},[d]),u.useEffect(function(){p&&g&&(Z!==null&&google.maps.event.removeListener(Z),te(google.maps.event.addListener(p,"mousedown",g)))},[g]),u.useEffect(function(){p&&h&&(J!==null&&google.maps.event.removeListener(J),R(google.maps.event.addListener(p,"mousemove",h)))},[h]),u.useEffect(function(){p&&v&&(xe!==null&&google.maps.event.removeListener(xe),H(google.maps.event.addListener(p,"mouseout",v)))},[v]),u.useEffect(function(){p&&y&&(Pe!==null&&google.maps.event.removeListener(Pe),se(google.maps.event.addListener(p,"mouseover",y)))},[y]),u.useEffect(function(){p&&S&&(Ne!==null&&google.maps.event.removeListener(Ne),he(google.maps.event.addListener(p,"mouseup",S)))},[S]),u.useEffect(function(){p&&w&&(ke!==null&&google.maps.event.removeListener(ke),Ce(google.maps.event.addListener(p,"rightclick",w)))},[w]),u.useEffect(function(){p&&a&&(ee!==null&&google.maps.event.removeListener(ee),Ue(google.maps.event.addListener(p,"click",a)))},[a]),u.useEffect(function(){p&&c&&(qe!==null&&google.maps.event.removeListener(qe),W(google.maps.event.addListener(p,"drag",c)))},[c]),u.useEffect(function(){p&&L&&(M!==null&&google.maps.event.removeListener(M),k(google.maps.event.addListener(p,"center_changed",L)))},[a]),u.useEffect(function(){var Fe=x.current===null?null:new google.maps.Map(x.current,n);return b(Fe),Fe!==null&&m&&m(Fe),function(){Fe!==null&&_&&_(Fe)}},[]),C.jsx("div",{id:r,ref:x,style:i,className:o,children:C.jsx(ie.Provider,{value:p,children:p!==null?e:null})})}u.memo(vg);var mg=function(t){Ie(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=ae({updaterMap:ka,eventMap:Pa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ka,eventMap:Pa,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),ce(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:C.jsx(ie.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(u.PureComponent),En=typeof document<"u";function wc(t){var e=t.url,n=t.id,r=t.nonce;return En?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 Ta(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
42
  `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function Sc(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return Ta(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Ta(i)||Reflect.apply(n,t,[i]),i}}}function Lc(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 We(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 ur=!1;function Ec(){return C.jsx("div",{children:"Loading..."})}var ls={id:"script-loader",version:"weekly"};(function(t){Ie(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 sg(n,void 0,void 0,function(){function r(i){if(!ur)i();else if(En)var o=window.setInterval(function(){ur||(window.clearInterval(o),i())},1)}return ag(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){ur=!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&&Sc(),We(!!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:Lc(n.props)};wc(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(En){if(window.google&&window.google.maps&&!ur){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"),En&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(En){this.cleanup();var r=function(){n.check.current||(delete window.google,ur=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(Ec,{})]})},e.defaultProps=ls,e})(u.PureComponent);var Ra;function xc(t){var e=t.id,n=e===void 0?ls.id:e,r=t.version,i=r===void 0?ls.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,g=u.useRef(!1),L=u.useState(!1),w=L[0],S=L[1],m=u.useState(void 0),_=m[0],E=m[1];u.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),u.useEffect(function(){En&&d&&Sc()},[d]),u.useEffect(function(){w&&We(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[w]);var p=Lc({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:l,region:c,libraries:f,channel:h,mapIds:v,authReferrerPolicy:y});u.useEffect(function(){if(!En)return;function k(){g.current&&(S(!0),Ra=p)}if(window.google&&window.google.maps&&Ra===p){k();return}wc({id:n,url:p,nonce:o}).then(k).catch(function(P){g.current&&E(P),console.warn(`
45
+ `))})},n}return e.prototype.componentDidMount=function(){if(En){if(window.google&&window.google.maps&&!ur){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"),En&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(En){this.cleanup();var r=function(){n.check.current||(delete window.google,ur=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(Ec,{})]})},e.defaultProps=ls,e})(u.PureComponent);var Ra;function xc(t){var e=t.id,n=e===void 0?ls.id:e,r=t.version,i=r===void 0?ls.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,g=u.useRef(!1),S=u.useState(!1),w=S[0],L=S[1],m=u.useState(void 0),_=m[0],E=m[1];u.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),u.useEffect(function(){En&&d&&Sc()},[d]),u.useEffect(function(){w&&We(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[w]);var p=Lc({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:l,region:c,libraries:f,channel:h,mapIds:v,authReferrerPolicy:y});u.useEffect(function(){if(!En)return;function P(){g.current&&(L(!0),Ra=p)}if(window.google&&window.google.maps&&Ra===p){P();return}wc({id:n,url:p,nonce:o}).then(P).catch(function(k){g.current&&E(k),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(P)})},[n,p,o]);var b=u.useRef();return u.useEffect(function(){b.current&&f!==b.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"),b.current=f},[f]),{isLoaded:w,loadError:_,url:p}}var yg=C.jsx(Ec,{});function bg(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=qs(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=xc(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||yg}u.memo(bg);var Aa;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Aa||(Aa={}));var Da={},Ia={options:function(t,e){t.setOptions(e)}};function wg(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(ie),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(G(G({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(wg);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Ia,eventMap:Da,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ia,eventMap:Da,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),ce(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);function Sg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ie),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(Sg);(function(t){Ie(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=ie,e})(u.PureComponent);function Lg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ie),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(Lg);(function(t){Ie(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=ie,e})(u.PureComponent);var Na={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},ja={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function Eg(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(ie),h=u.useState(null),v=h[0],y=h[1],g=u.useState(null),L=g[0],w=g[1],S=u.useState(null),m=S[0],_=S[1],E=u.useState(null),p=E[0],b=E[1],x=u.useState(null),k=x[0],M=x[1],P=u.useState(null),O=P[0],T=P[1],D=u.useState(null),j=D[0],U=D[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(){v!==null&&v.setDrawingMode(n??null)},[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&&(m!==null&&google.maps.event.removeListener(m),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),u.useEffect(function(){v&&s&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),u.useEffect(function(){v&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){We(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(G(G({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&w(google.maps.event.addListener(N,"circlecomplete",r)),i&&_(google.maps.event.addListener(N,"markercomplete",i)),o&&b(google.maps.event.addListener(N,"overlaycomplete",o)),s&&M(google.maps.event.addListener(N,"polygoncomplete",s)),a&&T(google.maps.event.addListener(N,"polylinecomplete",a)),l&&U(google.maps.event.addListener(N,"rectanglecomplete",l)),y(N),c&&c(N),function(){v!==null&&(L&&google.maps.event.removeListener(L),m&&google.maps.event.removeListener(m),p&&google.maps.event.removeListener(p),k&&google.maps.event.removeListener(k),O&&google.maps.event.removeListener(O),j&&google.maps.event.removeListener(j),f&&f(v),v.setMap(null))}},[]),null}u.memo(Eg);(function(t){Ie(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)},We(!!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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:ja,eventMap:Na,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ja,eventMap:Na,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),ce(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var Ba={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"},Ua={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)}},zi={};function xg(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,g=t.title,L=t.zIndex,w=t.onClick,S=t.onDblClick,m=t.onDrag,_=t.onDragEnd,E=t.onDragStart,p=t.onMouseOut,b=t.onMouseOver,x=t.onMouseUp,k=t.onMouseDown,M=t.onRightClick,P=t.onClickableChanged,O=t.onCursorChanged,T=t.onAnimationChanged,D=t.onDraggableChanged,j=t.onFlatChanged,U=t.onIconChanged,N=t.onPositionChanged,V=t.onShapeChanged,q=t.onTitleChanged,$=t.onVisibleChanged,F=t.onZindexChanged,Z=t.onLoad,te=t.onUnmount,X=u.useContext(ie),J=u.useState(null),R=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],ke=u.useState(null),se=ke[0],we=ke[1],Ne=u.useState(null),he=Ne[0],Se=Ne[1],Pe=u.useState(null),Ce=Pe[0],Te=Pe[1],ee=u.useState(null),Ve=ee[0],Q=ee[1],qe=u.useState(null),W=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],nt=je[1],ne=u.useState(null),fn=ne[0],qr=ne[1],Et=u.useState(null),jt=Et[0],Kr=Et[1],I=u.useState(null),K=I[0],z=I[1],le=u.useState(null),Re=le[0],me=le[1],Ae=u.useState(null),_e=Ae[0],Be=Ae[1],re=u.useState(null),de=re[0],st=re[1],Bt=u.useState(null),rt=Bt[0],Ge=Bt[1],ct=u.useState(null),ft=ct[0],Ke=ct[1],Pt=u.useState(null),xt=Pt[0],dt=Pt[1],Zt=u.useState(null),Ut=Zt[0],nr=Zt[1],rr=u.useState(null),Pn=rr[0],ir=rr[1],Tn=u.useState(null),dn=Tn[0],or=Tn[1],qt=u.useState(null),pn=qt[0],hn=qt[1],gn=u.useState(null),vn=gn[0],sr=gn[1];u.useEffect(function(){R!==null&&R.setMap(X)},[X]),u.useEffect(function(){typeof n<"u"&&R!==null&&R.setOptions(n)},[R,n]),u.useEffect(function(){typeof s<"u"&&R!==null&&R.setDraggable(s)},[R,s]),u.useEffect(function(){e&&R!==null&&R.setPosition(e)},[R,e]),u.useEffect(function(){typeof a<"u"&&R!==null&&R.setVisible(a)},[R,a]),u.useEffect(function(){R==null||R.setAnimation(l)},[R,l]),u.useEffect(function(){R&&c!==void 0&&R.setClickable(c)},[R,c]),u.useEffect(function(){R&&f!==void 0&&R.setCursor(f)},[R,f]),u.useEffect(function(){R&&d!==void 0&&R.setIcon(d)},[R,d]),u.useEffect(function(){R&&h!==void 0&&R.setLabel(h)},[R,h]),u.useEffect(function(){R&&v!==void 0&&R.setOpacity(v)},[R,v]),u.useEffect(function(){R&&y!==void 0&&R.setShape(y)},[R,y]),u.useEffect(function(){R&&g!==void 0&&R.setTitle(g)},[R,g]),u.useEffect(function(){R&&L!==void 0&&R.setZIndex(L)},[R,L]),u.useEffect(function(){R&&S&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(R,"dblclick",S)))},[S]),u.useEffect(function(){R&&_&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(R,"dragend",_)))},[_]),u.useEffect(function(){R&&E&&(he!==null&&google.maps.event.removeListener(he),Se(google.maps.event.addListener(R,"dragstart",E)))},[E]),u.useEffect(function(){R&&k&&(Ce!==null&&google.maps.event.removeListener(Ce),Te(google.maps.event.addListener(R,"mousedown",k)))},[k]),u.useEffect(function(){R&&p&&(Ve!==null&&google.maps.event.removeListener(Ve),Q(google.maps.event.addListener(R,"mouseout",p)))},[p]),u.useEffect(function(){R&&b&&(W!==null&&google.maps.event.removeListener(W),Fe(google.maps.event.addListener(R,"mouseover",b)))},[b]),u.useEffect(function(){R&&x&&(ut!==null&&google.maps.event.removeListener(ut),nt(google.maps.event.addListener(R,"mouseup",x)))},[x]),u.useEffect(function(){R&&M&&(fn!==null&&google.maps.event.removeListener(fn),qr(google.maps.event.addListener(R,"rightclick",M)))},[M]),u.useEffect(function(){R&&w&&(jt!==null&&google.maps.event.removeListener(jt),Kr(google.maps.event.addListener(R,"click",w)))},[w]),u.useEffect(function(){R&&m&&(K!==null&&google.maps.event.removeListener(K),z(google.maps.event.addListener(R,"drag",m)))},[m]),u.useEffect(function(){R&&P&&(Re!==null&&google.maps.event.removeListener(Re),me(google.maps.event.addListener(R,"clickable_changed",P)))},[P]),u.useEffect(function(){R&&O&&(_e!==null&&google.maps.event.removeListener(_e),Be(google.maps.event.addListener(R,"cursor_changed",O)))},[O]),u.useEffect(function(){R&&T&&(de!==null&&google.maps.event.removeListener(de),st(google.maps.event.addListener(R,"animation_changed",T)))},[T]),u.useEffect(function(){R&&D&&(rt!==null&&google.maps.event.removeListener(rt),Ge(google.maps.event.addListener(R,"draggable_changed",D)))},[D]),u.useEffect(function(){R&&j&&(ft!==null&&google.maps.event.removeListener(ft),Ke(google.maps.event.addListener(R,"flat_changed",j)))},[j]),u.useEffect(function(){R&&U&&(xt!==null&&google.maps.event.removeListener(xt),dt(google.maps.event.addListener(R,"icon_changed",U)))},[U]),u.useEffect(function(){R&&N&&(Ut!==null&&google.maps.event.removeListener(Ut),nr(google.maps.event.addListener(R,"position_changed",N)))},[N]),u.useEffect(function(){R&&V&&(Pn!==null&&google.maps.event.removeListener(Pn),ir(google.maps.event.addListener(R,"shape_changed",V)))},[V]),u.useEffect(function(){R&&q&&(dn!==null&&google.maps.event.removeListener(dn),or(google.maps.event.addListener(R,"title_changed",q)))},[q]),u.useEffect(function(){R&&$&&(pn!==null&&google.maps.event.removeListener(pn),hn(google.maps.event.addListener(R,"visible_changed",$)))},[$]),u.useEffect(function(){R&&F&&(vn!==null&&google.maps.event.removeListener(vn),sr(google.maps.event.addListener(R,"zindex_changed",F)))},[F]),u.useEffect(function(){var Kt=G(G(G({},n||zi),r?zi:{map:X}),{position:e}),Y=new google.maps.Marker(Kt);return r?r.addMarker(Y,!!i):Y.setMap(X),e&&Y.setPosition(e),typeof a<"u"&&Y.setVisible(a),typeof s<"u"&&Y.setDraggable(s),typeof c<"u"&&Y.setClickable(c),typeof f=="string"&&Y.setCursor(f),d&&Y.setIcon(d),typeof h<"u"&&Y.setLabel(h),typeof v<"u"&&Y.setOpacity(v),y&&Y.setShape(y),typeof g=="string"&&Y.setTitle(g),typeof L=="number"&&Y.setZIndex(L),S&&Oe(google.maps.event.addListener(Y,"dblclick",S)),_&&we(google.maps.event.addListener(Y,"dragend",_)),E&&Se(google.maps.event.addListener(Y,"dragstart",E)),k&&Te(google.maps.event.addListener(Y,"mousedown",k)),p&&Q(google.maps.event.addListener(Y,"mouseout",p)),b&&Fe(google.maps.event.addListener(Y,"mouseover",b)),x&&nt(google.maps.event.addListener(Y,"mouseup",x)),M&&qr(google.maps.event.addListener(Y,"rightclick",M)),w&&Kr(google.maps.event.addListener(Y,"click",w)),m&&z(google.maps.event.addListener(Y,"drag",m)),P&&me(google.maps.event.addListener(Y,"clickable_changed",P)),O&&Be(google.maps.event.addListener(Y,"cursor_changed",O)),T&&st(google.maps.event.addListener(Y,"animation_changed",T)),D&&Ge(google.maps.event.addListener(Y,"draggable_changed",D)),j&&Ke(google.maps.event.addListener(Y,"flat_changed",j)),U&&dt(google.maps.event.addListener(Y,"icon_changed",U)),N&&nr(google.maps.event.addListener(Y,"position_changed",N)),V&&ir(google.maps.event.addListener(Y,"shape_changed",V)),q&&or(google.maps.event.addListener(Y,"title_changed",q)),$&&hn(google.maps.event.addListener(Y,"visible_changed",$)),F&&sr(google.maps.event.addListener(Y,"zindex_changed",F)),fe(Y),Z&&Z(Y),function(){H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),Ce!==null&&google.maps.event.removeListener(Ce),Ve!==null&&google.maps.event.removeListener(Ve),W!==null&&google.maps.event.removeListener(W),ut!==null&&google.maps.event.removeListener(ut),fn!==null&&google.maps.event.removeListener(fn),jt!==null&&google.maps.event.removeListener(jt),Re!==null&&google.maps.event.removeListener(Re),_e!==null&&google.maps.event.removeListener(_e),de!==null&&google.maps.event.removeListener(de),rt!==null&&google.maps.event.removeListener(rt),ft!==null&&google.maps.event.removeListener(ft),xt!==null&&google.maps.event.removeListener(xt),Ut!==null&&google.maps.event.removeListener(Ut),dn!==null&&google.maps.event.removeListener(dn),pn!==null&&google.maps.event.removeListener(pn),vn!==null&&google.maps.event.removeListener(vn),te&&te(Y),r?r.removeMarker(Y,!!i):Y&&Y.setMap(null)}},[]);var ar=u.useMemo(function(){return o?u.Children.map(o,function(Kt){if(!u.isValidElement(Kt))return Kt;var Y=Kt;return u.cloneElement(Y,{anchor:R})}):null},[o,R]);return C.jsx(C.Fragment,{children:ar})||null}u.memo(xg);var Cc=function(t){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=G(G(G({},this.props.options||zi),this.props.clusterer?zi:{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=ae({updaterMap:Ua,eventMap:Ba,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ua,eventMap:Ba,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ce(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=ie,e}(u.PureComponent),Cg=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}(),_g=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 Cg(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 Mg(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var Og=2e3,kg=500,Pg="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Tg="png",Rg=[53,56,66,78,90],Ag="cluster",_c=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||Pg,this.imageExtension=r.imageExtension||Tg,this.imageSizes=r.imageSizes||Rg,this.calculator=r.calculator||Mg,this.batchSize=r.batchSize||Og,this.batchSizeIE=r.batchSizeIE||kg,this.clusterClass=r.clusterClass||Ag,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 _g(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}(),yt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ye={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)}},Dg={};function Ig(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,g=t.styles,L=t.title,w=t.zoomOnClick,S=t.onClick,m=t.onClusteringBegin,_=t.onClusteringEnd,E=t.onMouseOver,p=t.onMouseOut,b=t.onLoad,x=t.onUnmount,k=u.useState(null),M=k[0],P=k[1],O=u.useContext(ie),T=u.useState(null),D=T[0],j=T[1],U=u.useState(null),N=U[0],V=U[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),R=J[0],fe=J[1];return u.useEffect(function(){M&&p&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(M,yt.onMouseOut,p)))},[p]),u.useEffect(function(){M&&E&&(R!==null&&google.maps.event.removeListener(R),fe(google.maps.event.addListener(M,yt.onMouseOver,E)))},[E]),u.useEffect(function(){M&&S&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(M,yt.onClick,S)))},[S]),u.useEffect(function(){M&&m&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(M,yt.onClusteringBegin,m)))},[m]),u.useEffect(function(){M&&_&&($!==null&&google.maps.event.removeListener($),V(google.maps.event.addListener(M,yt.onClusteringEnd,_)))},[_]),u.useEffect(function(){typeof r<"u"&&M!==null&&ye.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&ye.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&ye.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&ye.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&ye.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&ye.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&ye.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&ye.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&ye.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof h<"u"&&M!==null&&ye.imageSizes(M,h)},[M,h]),u.useEffect(function(){typeof v<"u"&&M!==null&&ye.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof y<"u"&&M!==null&&ye.minimumClusterSize(M,y)},[M,y]),u.useEffect(function(){typeof g<"u"&&M!==null&&ye.styles(M,g)},[M,g]),u.useEffect(function(){typeof L<"u"&&M!==null&&ye.title(M,L)},[M,L]),u.useEffect(function(){typeof w<"u"&&M!==null&&ye.zoomOnClick(M,w)},[M,w]),u.useEffect(function(){if(O){var xe=G({},n||Dg),H=new _c(O,[],xe);return r&&ye.averageCenter(H,r),i&&ye.batchSizeIE(H,i),o&&ye.calculator(H,o),s&&ye.clusterClass(H,s),a&&ye.enableRetinaIcons(H,a),l&&ye.gridSize(H,l),c&&ye.ignoreHidden(H,c),f&&ye.imageExtension(H,f),d&&ye.imagePath(H,d),h&&ye.imageSizes(H,h),v&&ye.maxZoom(H,v),y&&ye.minimumClusterSize(H,y),g&&ye.styles(H,g),L&&ye.title(H,L),w&&ye.zoomOnClick(H,w),p&&X(google.maps.event.addListener(H,yt.onMouseOut,p)),E&&fe(google.maps.event.addListener(H,yt.onMouseOver,E)),S&&j(google.maps.event.addListener(H,yt.onClick,S)),m&&V(google.maps.event.addListener(H,yt.onClusteringBegin,m)),_&&F(google.maps.event.addListener(H,yt.onClusteringEnd,_)),P(H),b&&b(H),function(){te!==null&&google.maps.event.removeListener(te),R!==null&&google.maps.event.removeListener(R),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),x&&x(H)}}},[]),M!==null&&e(M)||null}u.memo(Ig);var Ng=function(t){Ie(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 _c(this.context,[],this.props.options);this.registeredEvents=ae({updaterMap:ye,eventMap:yt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ye,eventMap:yt,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),ce(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=ie,e}(u.PureComponent);function Va(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var Mc=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||Va(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,Va))}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,g=this.getProjection(),L=g.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}(),Fa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},za={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)}},jg={};function Bg(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(ie),y=u.useState(null),g=y[0],L=y[1],w=u.useState(null),S=w[0],m=w[1],_=u.useState(null),E=_[0],p=_[1],b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],U=u.useRef(null);return u.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.useEffect(function(){if(i&&g!==null){var N=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);g.setPosition(N)}},[i]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(S!==null&&google.maps.event.removeListener(S),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),k(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var N=r||jg,V=N.position,q=qs(N,["position"]),$=void 0;V&&!(V instanceof google.maps.LatLng)&&($=new google.maps.LatLng(V.lat,V.lng));var F=new Mc(G(G({},q),$?{position:$}:{}));U.current=document.createElement("div"),L(F),s&&m(google.maps.event.addListener(F,"closeclick",s)),a&&p(google.maps.event.addListener(F,"domready",a)),l&&k(google.maps.event.addListener(F,"content_changed",l)),c&&O(google.maps.event.addListener(F,"position_changed",c)),f&&j(google.maps.event.addListener(F,"zindex_changed",f)),F.setContent(U.current),n?F.open(v,n):F.getPosition()?F.open(v):We(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(F)}return function(){g!==null&&(S&&google.maps.event.removeListener(S),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),P&&google.maps.event.removeListener(P),D&&google.maps.event.removeListener(D),h&&h(g),g.close())}},[]),U.current?Qn.createPortal(u.Children.only(e),U.current):null}u.memo(Bg);(function(t){Ie(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):We(!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=qs(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new Mc(G(G({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ae({updaterMap:za,eventMap:Fa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:za,eventMap:Fa,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),ce(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ie,e})(u.PureComponent);var Ug=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},$a=bc(Ug);const Ha=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],xo=1,cr=8;class Ks{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!==xo)throw new Error(`Got v${i} data when expected v${xo}.`);const o=Ha[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 Ks(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=Ha.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,(xo<<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 us(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],S=s[2*L+1];w>=e&&w<=r&&S>=n&&S<=i&&c.push(o[L])}continue}const v=h+d>>1,y=s[2*v],g=s[2*v+1];y>=e&&y<=r&&g>=n&&g<=i&&c.push(o[v]),(f===0?e<=y:n<=g)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=g)&&(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++)Wa(o[2*L],o[2*L+1],e,n)<=c&&l.push(i[L]);continue}const v=h+d>>1,y=o[2*v],g=o[2*v+1];Wa(y,g,e,n)<=c&&l.push(i[v]),(f===0?e-r<=y:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function us(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;Oc(t,e,s,r,i,o),us(t,e,n,r,s-1,1-o),us(t,e,n,s+1,i,1-o)}function Oc(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)),g=Math.min(i,Math.floor(n+(c-f)*h/c+v));Oc(t,e,n,y,g,o)}const s=e[2*n+o];let a=r,l=i;for(fr(t,e,r,n),e[2*i+o]>s&&fr(t,e,r,i);a<l;){for(fr(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?fr(t,e,r,l):(l++,fr(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function fr(t,e,n,r){Co(t,n,r),Co(e,2*n,2*r),Co(e,2*n+1,2*r+1)}function Co(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Wa(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const Vg={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ga=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),mn=2,nn=3,_o=4,Qt=5,kc=6;class Fg{constructor(e){this.options=Object.assign(Object.create(Vg),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=Ga(ti(f)),v=Ga(ni(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(ti(r),ni(s),ti(o),ni(i)),c=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(c[h+Qt]>1?Za(c,h,this.clusterProps):this.points[c[h+nn]])}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+_o]===e&&d.push(s[v+Qt]>1?Za(s,v,this.clusterProps):this.points[s[v+nn]])}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 Ks(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+Qt]>1;let f,d,h;if(c)f=Pc(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const g=this.points[n[l+nn]];f=g.properties;const[L,w]=g.geometry.coordinates;d=ti(L),h=ni(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+nn]:y=this.points[n[l+nn]].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+mn]<=n)continue;l[d+mn]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),g=l[d+Qt];let L=g;for(const w of y){const S=w*f;l[S+mn]>n&&(L+=l[S+Qt])}if(L>g&&L>=s){let w=h*g,S=v*g,m,_=-1;const E=((d/f|0)<<5)+(n+1)+this.points.length;for(const p of y){const b=p*f;if(l[b+mn]<=n)continue;l[b+mn]=n;const x=l[b+Qt];w+=l[b]*x,S+=l[b+1]*x,l[b+_o]=E,o&&(m||(m=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(m)),o(m,this._map(l,b)))}l[d+_o]=E,c.push(w/L,S/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 S=w*f;if(!(l[S+mn]<=n)){l[S+mn]=n;for(let m=0;m<f;m++)c.push(l[S+m])}}}}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+Qt]>1){const s=this.clusterProps[e[n+kc]];return r?Object.assign({},s):s}const i=this.points[e[n+nn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Za(t,e,n){return{type:"Feature",id:t[e+nn],properties:Pc(t,e,n),geometry:{type:"Point",coordinates:[zg(t[e]),$g(t[e+1])]}}}function Pc(t,e,n){const r=t[e+Qt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+kc],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+nn],point_count:r,point_count_abbreviated:i})}function ti(t){return t/360+.5}function ni(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 zg(t){return(t-.5)*360}function $g(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
48
+ `)),console.error(k)})},[n,p,o]);var b=u.useRef();return u.useEffect(function(){b.current&&f!==b.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"),b.current=f},[f]),{isLoaded:w,loadError:_,url:p}}var yg=C.jsx(Ec,{});function bg(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=qs(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=xc(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||yg}u.memo(bg);var Aa;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Aa||(Aa={}));var Da={},Ia={options:function(t,e){t.setOptions(e)}};function wg(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(ie),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(G(G({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(wg);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Ia,eventMap:Da,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ia,eventMap:Da,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),ce(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);function Sg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ie),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(Sg);(function(t){Ie(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=ie,e})(u.PureComponent);function Lg(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ie),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(Lg);(function(t){Ie(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=ie,e})(u.PureComponent);var Na={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},ja={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function Eg(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(ie),h=u.useState(null),v=h[0],y=h[1],g=u.useState(null),S=g[0],w=g[1],L=u.useState(null),m=L[0],_=L[1],E=u.useState(null),p=E[0],b=E[1],x=u.useState(null),P=x[0],M=x[1],k=u.useState(null),O=k[0],T=k[1],D=u.useState(null),j=D[0],V=D[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(){v!==null&&v.setDrawingMode(n??null)},[v,n]),u.useEffect(function(){v&&r&&(S!==null&&google.maps.event.removeListener(S),w(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),u.useEffect(function(){v&&i&&(m!==null&&google.maps.event.removeListener(m),_(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(p!==null&&google.maps.event.removeListener(p),b(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&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&(j!==null&&google.maps.event.removeListener(j),V(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){We(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var N=new google.maps.drawing.DrawingManager(G(G({},e||{}),{map:d}));return n&&N.setDrawingMode(n),r&&w(google.maps.event.addListener(N,"circlecomplete",r)),i&&_(google.maps.event.addListener(N,"markercomplete",i)),o&&b(google.maps.event.addListener(N,"overlaycomplete",o)),s&&M(google.maps.event.addListener(N,"polygoncomplete",s)),a&&T(google.maps.event.addListener(N,"polylinecomplete",a)),l&&V(google.maps.event.addListener(N,"rectanglecomplete",l)),y(N),c&&c(N),function(){v!==null&&(S&&google.maps.event.removeListener(S),m&&google.maps.event.removeListener(m),p&&google.maps.event.removeListener(p),P&&google.maps.event.removeListener(P),O&&google.maps.event.removeListener(O),j&&google.maps.event.removeListener(j),f&&f(v),v.setMap(null))}},[]),null}u.memo(Eg);(function(t){Ie(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)},We(!!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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:ja,eventMap:Na,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ja,eventMap:Na,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),ce(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var Ba={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"},Va={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)}},$i={};function xg(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,g=t.title,S=t.zIndex,w=t.onClick,L=t.onDblClick,m=t.onDrag,_=t.onDragEnd,E=t.onDragStart,p=t.onMouseOut,b=t.onMouseOver,x=t.onMouseUp,P=t.onMouseDown,M=t.onRightClick,k=t.onClickableChanged,O=t.onCursorChanged,T=t.onAnimationChanged,D=t.onDraggableChanged,j=t.onFlatChanged,V=t.onIconChanged,N=t.onPositionChanged,U=t.onShapeChanged,q=t.onTitleChanged,$=t.onVisibleChanged,F=t.onZindexChanged,Z=t.onLoad,te=t.onUnmount,X=u.useContext(ie),J=u.useState(null),R=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],Pe=u.useState(null),se=Pe[0],we=Pe[1],Ne=u.useState(null),he=Ne[0],Se=Ne[1],ke=u.useState(null),Ce=ke[0],Te=ke[1],ee=u.useState(null),Ue=ee[0],Q=ee[1],qe=u.useState(null),W=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],nt=je[1],ne=u.useState(null),fn=ne[0],Kr=ne[1],Et=u.useState(null),jt=Et[0],Jr=Et[1],I=u.useState(null),K=I[0],z=I[1],le=u.useState(null),Re=le[0],me=le[1],Ae=u.useState(null),_e=Ae[0],Be=Ae[1],re=u.useState(null),de=re[0],st=re[1],Bt=u.useState(null),rt=Bt[0],Ge=Bt[1],ct=u.useState(null),ft=ct[0],Ke=ct[1],kt=u.useState(null),xt=kt[0],dt=kt[1],Zt=u.useState(null),Vt=Zt[0],nr=Zt[1],rr=u.useState(null),kn=rr[0],ir=rr[1],Tn=u.useState(null),dn=Tn[0],or=Tn[1],qt=u.useState(null),pn=qt[0],hn=qt[1],gn=u.useState(null),vn=gn[0],sr=gn[1];u.useEffect(function(){R!==null&&R.setMap(X)},[X]),u.useEffect(function(){typeof n<"u"&&R!==null&&R.setOptions(n)},[R,n]),u.useEffect(function(){typeof s<"u"&&R!==null&&R.setDraggable(s)},[R,s]),u.useEffect(function(){e&&R!==null&&R.setPosition(e)},[R,e]),u.useEffect(function(){typeof a<"u"&&R!==null&&R.setVisible(a)},[R,a]),u.useEffect(function(){R==null||R.setAnimation(l)},[R,l]),u.useEffect(function(){R&&c!==void 0&&R.setClickable(c)},[R,c]),u.useEffect(function(){R&&f!==void 0&&R.setCursor(f)},[R,f]),u.useEffect(function(){R&&d!==void 0&&R.setIcon(d)},[R,d]),u.useEffect(function(){R&&h!==void 0&&R.setLabel(h)},[R,h]),u.useEffect(function(){R&&v!==void 0&&R.setOpacity(v)},[R,v]),u.useEffect(function(){R&&y!==void 0&&R.setShape(y)},[R,y]),u.useEffect(function(){R&&g!==void 0&&R.setTitle(g)},[R,g]),u.useEffect(function(){R&&S!==void 0&&R.setZIndex(S)},[R,S]),u.useEffect(function(){R&&L&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(R,"dblclick",L)))},[L]),u.useEffect(function(){R&&_&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(R,"dragend",_)))},[_]),u.useEffect(function(){R&&E&&(he!==null&&google.maps.event.removeListener(he),Se(google.maps.event.addListener(R,"dragstart",E)))},[E]),u.useEffect(function(){R&&P&&(Ce!==null&&google.maps.event.removeListener(Ce),Te(google.maps.event.addListener(R,"mousedown",P)))},[P]),u.useEffect(function(){R&&p&&(Ue!==null&&google.maps.event.removeListener(Ue),Q(google.maps.event.addListener(R,"mouseout",p)))},[p]),u.useEffect(function(){R&&b&&(W!==null&&google.maps.event.removeListener(W),Fe(google.maps.event.addListener(R,"mouseover",b)))},[b]),u.useEffect(function(){R&&x&&(ut!==null&&google.maps.event.removeListener(ut),nt(google.maps.event.addListener(R,"mouseup",x)))},[x]),u.useEffect(function(){R&&M&&(fn!==null&&google.maps.event.removeListener(fn),Kr(google.maps.event.addListener(R,"rightclick",M)))},[M]),u.useEffect(function(){R&&w&&(jt!==null&&google.maps.event.removeListener(jt),Jr(google.maps.event.addListener(R,"click",w)))},[w]),u.useEffect(function(){R&&m&&(K!==null&&google.maps.event.removeListener(K),z(google.maps.event.addListener(R,"drag",m)))},[m]),u.useEffect(function(){R&&k&&(Re!==null&&google.maps.event.removeListener(Re),me(google.maps.event.addListener(R,"clickable_changed",k)))},[k]),u.useEffect(function(){R&&O&&(_e!==null&&google.maps.event.removeListener(_e),Be(google.maps.event.addListener(R,"cursor_changed",O)))},[O]),u.useEffect(function(){R&&T&&(de!==null&&google.maps.event.removeListener(de),st(google.maps.event.addListener(R,"animation_changed",T)))},[T]),u.useEffect(function(){R&&D&&(rt!==null&&google.maps.event.removeListener(rt),Ge(google.maps.event.addListener(R,"draggable_changed",D)))},[D]),u.useEffect(function(){R&&j&&(ft!==null&&google.maps.event.removeListener(ft),Ke(google.maps.event.addListener(R,"flat_changed",j)))},[j]),u.useEffect(function(){R&&V&&(xt!==null&&google.maps.event.removeListener(xt),dt(google.maps.event.addListener(R,"icon_changed",V)))},[V]),u.useEffect(function(){R&&N&&(Vt!==null&&google.maps.event.removeListener(Vt),nr(google.maps.event.addListener(R,"position_changed",N)))},[N]),u.useEffect(function(){R&&U&&(kn!==null&&google.maps.event.removeListener(kn),ir(google.maps.event.addListener(R,"shape_changed",U)))},[U]),u.useEffect(function(){R&&q&&(dn!==null&&google.maps.event.removeListener(dn),or(google.maps.event.addListener(R,"title_changed",q)))},[q]),u.useEffect(function(){R&&$&&(pn!==null&&google.maps.event.removeListener(pn),hn(google.maps.event.addListener(R,"visible_changed",$)))},[$]),u.useEffect(function(){R&&F&&(vn!==null&&google.maps.event.removeListener(vn),sr(google.maps.event.addListener(R,"zindex_changed",F)))},[F]),u.useEffect(function(){var Kt=G(G(G({},n||$i),r?$i:{map:X}),{position:e}),Y=new google.maps.Marker(Kt);return r?r.addMarker(Y,!!i):Y.setMap(X),e&&Y.setPosition(e),typeof a<"u"&&Y.setVisible(a),typeof s<"u"&&Y.setDraggable(s),typeof c<"u"&&Y.setClickable(c),typeof f=="string"&&Y.setCursor(f),d&&Y.setIcon(d),typeof h<"u"&&Y.setLabel(h),typeof v<"u"&&Y.setOpacity(v),y&&Y.setShape(y),typeof g=="string"&&Y.setTitle(g),typeof S=="number"&&Y.setZIndex(S),L&&Oe(google.maps.event.addListener(Y,"dblclick",L)),_&&we(google.maps.event.addListener(Y,"dragend",_)),E&&Se(google.maps.event.addListener(Y,"dragstart",E)),P&&Te(google.maps.event.addListener(Y,"mousedown",P)),p&&Q(google.maps.event.addListener(Y,"mouseout",p)),b&&Fe(google.maps.event.addListener(Y,"mouseover",b)),x&&nt(google.maps.event.addListener(Y,"mouseup",x)),M&&Kr(google.maps.event.addListener(Y,"rightclick",M)),w&&Jr(google.maps.event.addListener(Y,"click",w)),m&&z(google.maps.event.addListener(Y,"drag",m)),k&&me(google.maps.event.addListener(Y,"clickable_changed",k)),O&&Be(google.maps.event.addListener(Y,"cursor_changed",O)),T&&st(google.maps.event.addListener(Y,"animation_changed",T)),D&&Ge(google.maps.event.addListener(Y,"draggable_changed",D)),j&&Ke(google.maps.event.addListener(Y,"flat_changed",j)),V&&dt(google.maps.event.addListener(Y,"icon_changed",V)),N&&nr(google.maps.event.addListener(Y,"position_changed",N)),U&&ir(google.maps.event.addListener(Y,"shape_changed",U)),q&&or(google.maps.event.addListener(Y,"title_changed",q)),$&&hn(google.maps.event.addListener(Y,"visible_changed",$)),F&&sr(google.maps.event.addListener(Y,"zindex_changed",F)),fe(Y),Z&&Z(Y),function(){H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),Ce!==null&&google.maps.event.removeListener(Ce),Ue!==null&&google.maps.event.removeListener(Ue),W!==null&&google.maps.event.removeListener(W),ut!==null&&google.maps.event.removeListener(ut),fn!==null&&google.maps.event.removeListener(fn),jt!==null&&google.maps.event.removeListener(jt),Re!==null&&google.maps.event.removeListener(Re),_e!==null&&google.maps.event.removeListener(_e),de!==null&&google.maps.event.removeListener(de),rt!==null&&google.maps.event.removeListener(rt),ft!==null&&google.maps.event.removeListener(ft),xt!==null&&google.maps.event.removeListener(xt),Vt!==null&&google.maps.event.removeListener(Vt),dn!==null&&google.maps.event.removeListener(dn),pn!==null&&google.maps.event.removeListener(pn),vn!==null&&google.maps.event.removeListener(vn),te&&te(Y),r?r.removeMarker(Y,!!i):Y&&Y.setMap(null)}},[]);var ar=u.useMemo(function(){return o?u.Children.map(o,function(Kt){if(!u.isValidElement(Kt))return Kt;var Y=Kt;return u.cloneElement(Y,{anchor:R})}):null},[o,R]);return C.jsx(C.Fragment,{children:ar})||null}u.memo(xg);var Cc=function(t){Ie(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=G(G(G({},this.props.options||$i),this.props.clusterer?$i:{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=ae({updaterMap:Va,eventMap:Ba,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Va,eventMap:Ba,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ce(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=ie,e}(u.PureComponent),Cg=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}(),_g=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 Cg(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 Mg(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var Og=2e3,Pg=500,kg="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Tg="png",Rg=[53,56,66,78,90],Ag="cluster",_c=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||kg,this.imageExtension=r.imageExtension||Tg,this.imageSizes=r.imageSizes||Rg,this.calculator=r.calculator||Mg,this.batchSize=r.batchSize||Og,this.batchSizeIE=r.batchSizeIE||Pg,this.clusterClass=r.clusterClass||Ag,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 _g(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}(),yt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ye={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)}},Dg={};function Ig(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,g=t.styles,S=t.title,w=t.zoomOnClick,L=t.onClick,m=t.onClusteringBegin,_=t.onClusteringEnd,E=t.onMouseOver,p=t.onMouseOut,b=t.onLoad,x=t.onUnmount,P=u.useState(null),M=P[0],k=P[1],O=u.useContext(ie),T=u.useState(null),D=T[0],j=T[1],V=u.useState(null),N=V[0],U=V[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),R=J[0],fe=J[1];return u.useEffect(function(){M&&p&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(M,yt.onMouseOut,p)))},[p]),u.useEffect(function(){M&&E&&(R!==null&&google.maps.event.removeListener(R),fe(google.maps.event.addListener(M,yt.onMouseOver,E)))},[E]),u.useEffect(function(){M&&L&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(M,yt.onClick,L)))},[L]),u.useEffect(function(){M&&m&&(N!==null&&google.maps.event.removeListener(N),U(google.maps.event.addListener(M,yt.onClusteringBegin,m)))},[m]),u.useEffect(function(){M&&_&&($!==null&&google.maps.event.removeListener($),U(google.maps.event.addListener(M,yt.onClusteringEnd,_)))},[_]),u.useEffect(function(){typeof r<"u"&&M!==null&&ye.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&ye.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&ye.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&ye.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&ye.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&ye.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&ye.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&ye.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&ye.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof h<"u"&&M!==null&&ye.imageSizes(M,h)},[M,h]),u.useEffect(function(){typeof v<"u"&&M!==null&&ye.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof y<"u"&&M!==null&&ye.minimumClusterSize(M,y)},[M,y]),u.useEffect(function(){typeof g<"u"&&M!==null&&ye.styles(M,g)},[M,g]),u.useEffect(function(){typeof S<"u"&&M!==null&&ye.title(M,S)},[M,S]),u.useEffect(function(){typeof w<"u"&&M!==null&&ye.zoomOnClick(M,w)},[M,w]),u.useEffect(function(){if(O){var xe=G({},n||Dg),H=new _c(O,[],xe);return r&&ye.averageCenter(H,r),i&&ye.batchSizeIE(H,i),o&&ye.calculator(H,o),s&&ye.clusterClass(H,s),a&&ye.enableRetinaIcons(H,a),l&&ye.gridSize(H,l),c&&ye.ignoreHidden(H,c),f&&ye.imageExtension(H,f),d&&ye.imagePath(H,d),h&&ye.imageSizes(H,h),v&&ye.maxZoom(H,v),y&&ye.minimumClusterSize(H,y),g&&ye.styles(H,g),S&&ye.title(H,S),w&&ye.zoomOnClick(H,w),p&&X(google.maps.event.addListener(H,yt.onMouseOut,p)),E&&fe(google.maps.event.addListener(H,yt.onMouseOver,E)),L&&j(google.maps.event.addListener(H,yt.onClick,L)),m&&U(google.maps.event.addListener(H,yt.onClusteringBegin,m)),_&&F(google.maps.event.addListener(H,yt.onClusteringEnd,_)),k(H),b&&b(H),function(){te!==null&&google.maps.event.removeListener(te),R!==null&&google.maps.event.removeListener(R),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),x&&x(H)}}},[]),M!==null&&e(M)||null}u.memo(Ig);var Ng=function(t){Ie(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 _c(this.context,[],this.props.options);this.registeredEvents=ae({updaterMap:ye,eventMap:yt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ye,eventMap:yt,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),ce(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=ie,e}(u.PureComponent);function Ua(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var Mc=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||Ua(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,Ua))}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,g=this.getProjection(),S=g.fromLatLngToContainerPixel(this.position);S!==null&&(S.x<-c+v?r=S.x+c-v:S.x+d+c+v>a&&(r=S.x+d+c+v-a),this.alignBottom?S.y<-f+y+h?i=S.y+f-y-h:S.y+f+y>l&&(i=S.y+f+y-l):S.y<-f+y?i=S.y+f-y:S.y+h+f+y>l&&(i=S.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}(),Fa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},za={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)}},jg={};function Bg(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(ie),y=u.useState(null),g=y[0],S=y[1],w=u.useState(null),L=w[0],m=w[1],_=u.useState(null),E=_[0],p=_[1],b=u.useState(null),x=b[0],P=b[1],M=u.useState(null),k=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],V=u.useRef(null);return u.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.useEffect(function(){if(i&&g!==null){var N=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);g.setPosition(N)}},[i]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(k!==null&&google.maps.event.removeListener(k),O(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var N=r||jg,U=N.position,q=qs(N,["position"]),$=void 0;U&&!(U instanceof google.maps.LatLng)&&($=new google.maps.LatLng(U.lat,U.lng));var F=new Mc(G(G({},q),$?{position:$}:{}));V.current=document.createElement("div"),S(F),s&&m(google.maps.event.addListener(F,"closeclick",s)),a&&p(google.maps.event.addListener(F,"domready",a)),l&&P(google.maps.event.addListener(F,"content_changed",l)),c&&O(google.maps.event.addListener(F,"position_changed",c)),f&&j(google.maps.event.addListener(F,"zindex_changed",f)),F.setContent(V.current),n?F.open(v,n):F.getPosition()?F.open(v):We(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(F)}return function(){g!==null&&(L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),k&&google.maps.event.removeListener(k),D&&google.maps.event.removeListener(D),h&&h(g),g.close())}},[]),V.current?Qn.createPortal(u.Children.only(e),V.current):null}u.memo(Bg);(function(t){Ie(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):We(!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=qs(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new Mc(G(G({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=ae({updaterMap:za,eventMap:Fa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:za,eventMap:Fa,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),ce(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ie,e})(u.PureComponent);var Vg=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},$a=bc(Vg);const Ha=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],xo=1,cr=8;class Ks{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!==xo)throw new Error(`Got v${i} data when expected v${xo}.`);const o=Ha[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 Ks(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=Ha.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,(xo<<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 us(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 S=h;S<=d;S++){const w=s[2*S],L=s[2*S+1];w>=e&&w<=r&&L>=n&&L<=i&&c.push(o[S])}continue}const v=h+d>>1,y=s[2*v],g=s[2*v+1];y>=e&&y<=r&&g>=n&&g<=i&&c.push(o[v]),(f===0?e<=y:n<=g)&&(l.push(h),l.push(v-1),l.push(1-f)),(f===0?r>=y:i>=g)&&(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 S=h;S<=d;S++)Wa(o[2*S],o[2*S+1],e,n)<=c&&l.push(i[S]);continue}const v=h+d>>1,y=o[2*v],g=o[2*v+1];Wa(y,g,e,n)<=c&&l.push(i[v]),(f===0?e-r<=y:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?e+r>=y:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function us(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;Oc(t,e,s,r,i,o),us(t,e,n,r,s-1,1-o),us(t,e,n,s+1,i,1-o)}function Oc(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)),g=Math.min(i,Math.floor(n+(c-f)*h/c+v));Oc(t,e,n,y,g,o)}const s=e[2*n+o];let a=r,l=i;for(fr(t,e,r,n),e[2*i+o]>s&&fr(t,e,r,i);a<l;){for(fr(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?fr(t,e,r,l):(l++,fr(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function fr(t,e,n,r){Co(t,n,r),Co(e,2*n,2*r),Co(e,2*n+1,2*r+1)}function Co(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Wa(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const Ug={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ga=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),mn=2,nn=3,_o=4,Qt=5,Pc=6;class Fg{constructor(e){this.options=Object.assign(Object.create(Ug),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=Ga(ni(f)),v=Ga(ri(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(ni(r),ri(s),ni(o),ri(i)),c=a.data,f=[];for(const d of l){const h=this.stride*d;f.push(c[h+Qt]>1?Za(c,h,this.clusterProps):this.points[c[h+nn]])}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+_o]===e&&d.push(s[v+Qt]>1?Za(s,v,this.clusterProps):this.points[s[v+nn]])}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 Ks(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+Qt]>1;let f,d,h;if(c)f=kc(n,l,this.clusterProps),d=n[l],h=n[l+1];else{const g=this.points[n[l+nn]];f=g.properties;const[S,w]=g.geometry.coordinates;d=ni(S),h=ri(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+nn]:y=this.points[n[l+nn]].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+mn]<=n)continue;l[d+mn]=n;const h=l[d],v=l[d+1],y=e.within(l[d],l[d+1],a),g=l[d+Qt];let S=g;for(const w of y){const L=w*f;l[L+mn]>n&&(S+=l[L+Qt])}if(S>g&&S>=s){let w=h*g,L=v*g,m,_=-1;const E=((d/f|0)<<5)+(n+1)+this.points.length;for(const p of y){const b=p*f;if(l[b+mn]<=n)continue;l[b+mn]=n;const x=l[b+Qt];w+=l[b]*x,L+=l[b+1]*x,l[b+_o]=E,o&&(m||(m=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(m)),o(m,this._map(l,b)))}l[d+_o]=E,c.push(w/S,L/S,1/0,E,-1,S),o&&c.push(_)}else{for(let w=0;w<f;w++)c.push(l[d+w]);if(S>1)for(const w of y){const L=w*f;if(!(l[L+mn]<=n)){l[L+mn]=n;for(let m=0;m<f;m++)c.push(l[L+m])}}}}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+Qt]>1){const s=this.clusterProps[e[n+Pc]];return r?Object.assign({},s):s}const i=this.points[e[n+nn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Za(t,e,n){return{type:"Feature",id:t[e+nn],properties:kc(t,e,n),geometry:{type:"Point",coordinates:[zg(t[e]),$g(t[e+1])]}}}function kc(t,e,n){const r=t[e+Qt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+Pc],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+nn],point_count:r,point_count_abbreviated:i})}function ni(t){return t/360+.5}function ri(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 zg(t){return(t-.5)*360}function $g(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
49
49
  Copyright (c) Microsoft Corporation.
50
50
 
51
51
  Permission to use, copy, modify, and/or distribute this software for any
@@ -63,7 +63,24 @@ PERFORMANCE OF THIS SOFTWARE.
63
63
  <circle cx="120" cy="120" opacity=".3" r="90" />
64
64
  <circle cx="120" cy="120" opacity=".2" r="110" />
65
65
  <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>
66
- </svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;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 Jg(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Js{constructor(){Jg(Js,google.maps.OverlayView)}}var _r;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(_r||(_r={}));const Xg=(t,e,n)=>{n.fitBounds(e.bounds)};class Yg extends Js{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Zg(r),renderer:o=new Kg,onClusterClick:s=Xg}){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:(mt.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,_r.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)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,_r.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=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new qg(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=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,_r.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Qg(t){var e=cg(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new Yg(G(G({},t),{map:e}));i(o)}},[e]),r}function ev(t){var e=t.children,n=t.options,r=Qg(n);return r!==null?e(r):null}u.memo(ev);var qa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ka={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function tv(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(ie),y=u.useState(null),g=y[0],L=y[1],w=u.useState(null),S=w[0],m=w[1],_=u.useState(null),E=_[0],p=_[1],b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],U=u.useRef(null);return u.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(S!==null&&google.maps.event.removeListener(S),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),k(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){var N=new google.maps.InfoWindow(G({},r||{}));return L(N),U.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&k(google.maps.event.addListener(N,"content_changed",l)),c&&O(google.maps.event.addListener(N,"position_changed",c)),f&&j(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(U.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):We(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){S&&google.maps.event.removeListener(S),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),P&&google.maps.event.removeListener(P),D&&google.maps.event.removeListener(D),h&&h(N),N.close()}},[]),U.current?Qn.createPortal(u.Children.only(e),U.current):null}u.memo(tv);var Tc=function(t){Ie(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):We(!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(G({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ae({updaterMap:Ka,eventMap:qa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ka,eventMap:qa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(ce(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ie,e}(u.PureComponent),Ja={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Xa={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)}},nv={};function rv(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,g=t.onClick,L=t.onDrag,w=t.onLoad,S=t.onUnmount,m=u.useContext(ie),_=u.useState(null),E=_[0],p=_[1],b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],U=u.useState(null),N=U[0],V=U[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),R=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],ke=u.useState(null),se=ke[0],we=ke[1],Ne=u.useState(null),he=Ne[0],Se=Ne[1],Pe=u.useState(null),Ce=Pe[0],Te=Pe[1];return u.useEffect(function(){E!==null&&E.setMap(m)},[m]),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&&(x!==null&&google.maps.event.removeListener(x),k(google.maps.event.addListener(E,"dblclick",s)))},[s]),u.useEffect(function(){E&&a&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(E,"dragend",a)))},[a]),u.useEffect(function(){E&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(E,"dragstart",l)))},[l]),u.useEffect(function(){E&&c&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(E,"mousedown",c)))},[c]),u.useEffect(function(){E&&f&&($!==null&&google.maps.event.removeListener($),F(google.maps.event.addListener(E,"mousemove",f)))},[f]),u.useEffect(function(){E&&d&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(E,"mouseout",d)))},[d]),u.useEffect(function(){E&&h&&(R!==null&&google.maps.event.removeListener(R),fe(google.maps.event.addListener(E,"mouseover",h)))},[h]),u.useEffect(function(){E&&v&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(E,"mouseup",v)))},[v]),u.useEffect(function(){E&&y&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(E,"rightclick",y)))},[y]),u.useEffect(function(){E&&g&&(he!==null&&google.maps.event.removeListener(he),Se(google.maps.event.addListener(E,"click",g)))},[g]),u.useEffect(function(){E&&L&&(Ce!==null&&google.maps.event.removeListener(Ce),Te(google.maps.event.addListener(E,"drag",L)))},[L]),u.useEffect(function(){var ee=new google.maps.Polyline(G(G({},e||nv),{map:m}));return o&&ee.setPath(o),typeof i<"u"&&ee.setVisible(i),typeof r<"u"&&ee.setEditable(r),typeof n<"u"&&ee.setDraggable(n),s&&k(google.maps.event.addListener(ee,"dblclick",s)),a&&O(google.maps.event.addListener(ee,"dragend",a)),l&&j(google.maps.event.addListener(ee,"dragstart",l)),c&&V(google.maps.event.addListener(ee,"mousedown",c)),f&&F(google.maps.event.addListener(ee,"mousemove",f)),d&&X(google.maps.event.addListener(ee,"mouseout",d)),h&&fe(google.maps.event.addListener(ee,"mouseover",h)),v&&Oe(google.maps.event.addListener(ee,"mouseup",v)),y&&we(google.maps.event.addListener(ee,"rightclick",y)),g&&Se(google.maps.event.addListener(ee,"click",g)),L&&Te(google.maps.event.addListener(ee,"drag",L)),p(ee),w&&w(ee),function(){x!==null&&google.maps.event.removeListener(x),P!==null&&google.maps.event.removeListener(P),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),te!==null&&google.maps.event.removeListener(te),R!==null&&google.maps.event.removeListener(R),H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),S&&S(ee),ee.setMap(null)}},[]),null}u.memo(rv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Xa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Xa,eventMap:Ja,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),ce(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var Ya={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Qa={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 iv(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,g=t.onRightClick,L=t.onClick,w=t.onDrag,S=t.onLoad,m=t.onUnmount,_=t.onEdit,E=u.useContext(ie),p=u.useState(null),b=p[0],x=p[1],k=u.useState(null),M=k[0],P=k[1],O=u.useState(null),T=O[0],D=O[1],j=u.useState(null),U=j[0],N=j[1],V=u.useState(null),q=V[0],$=V[1],F=u.useState(null),Z=F[0],te=F[1],X=u.useState(null),J=X[0],R=X[1],fe=u.useState(null),xe=fe[0],H=fe[1],Oe=u.useState(null),ke=Oe[0],se=Oe[1],we=u.useState(null),Ne=we[0],he=we[1],Se=u.useState(null),Pe=Se[0],Ce=Se[1],Te=u.useState(null),ee=Te[0],Ve=Te[1];return u.useEffect(function(){b!==null&&b.setMap(E)},[E]),u.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),u.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),u.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),u.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),u.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),u.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),u.useEffect(function(){b&&a&&(M!==null&&google.maps.event.removeListener(M),P(google.maps.event.addListener(b,"dblclick",a)))},[a]),u.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),u.useEffect(function(){b&&l&&(T!==null&&google.maps.event.removeListener(T),D(google.maps.event.addListener(b,"dragend",l)))},[l]),u.useEffect(function(){b&&c&&(U!==null&&google.maps.event.removeListener(U),N(google.maps.event.addListener(b,"dragstart",c)))},[c]),u.useEffect(function(){b&&f&&(q!==null&&google.maps.event.removeListener(q),$(google.maps.event.addListener(b,"mousedown",f)))},[f]),u.useEffect(function(){b&&d&&(Z!==null&&google.maps.event.removeListener(Z),te(google.maps.event.addListener(b,"mousemove",d)))},[d]),u.useEffect(function(){b&&h&&(J!==null&&google.maps.event.removeListener(J),R(google.maps.event.addListener(b,"mouseout",h)))},[h]),u.useEffect(function(){b&&v&&(xe!==null&&google.maps.event.removeListener(xe),H(google.maps.event.addListener(b,"mouseover",v)))},[v]),u.useEffect(function(){b&&y&&(ke!==null&&google.maps.event.removeListener(ke),se(google.maps.event.addListener(b,"mouseup",y)))},[y]),u.useEffect(function(){b&&g&&(Ne!==null&&google.maps.event.removeListener(Ne),he(google.maps.event.addListener(b,"rightclick",g)))},[g]),u.useEffect(function(){b&&L&&(Pe!==null&&google.maps.event.removeListener(Pe),Ce(google.maps.event.addListener(b,"click",L)))},[L]),u.useEffect(function(){b&&w&&(ee!==null&&google.maps.event.removeListener(ee),Ve(google.maps.event.addListener(b,"drag",w)))},[w]),u.useEffect(function(){var Q=new google.maps.Polygon(G(G({},e||{}),{map:E}));return o&&Q.setPath(o),s&&Q.setPaths(s),typeof i<"u"&&Q.setVisible(i),typeof r<"u"&&Q.setEditable(r),typeof n<"u"&&Q.setDraggable(n),a&&P(google.maps.event.addListener(Q,"dblclick",a)),l&&D(google.maps.event.addListener(Q,"dragend",l)),c&&N(google.maps.event.addListener(Q,"dragstart",c)),f&&$(google.maps.event.addListener(Q,"mousedown",f)),d&&te(google.maps.event.addListener(Q,"mousemove",d)),h&&R(google.maps.event.addListener(Q,"mouseout",h)),v&&H(google.maps.event.addListener(Q,"mouseover",v)),y&&se(google.maps.event.addListener(Q,"mouseup",y)),g&&he(google.maps.event.addListener(Q,"rightclick",g)),L&&Ce(google.maps.event.addListener(Q,"click",L)),w&&Ve(google.maps.event.addListener(Q,"drag",w)),x(Q),S&&S(Q),function(){M!==null&&google.maps.event.removeListener(M),T!==null&&google.maps.event.removeListener(T),U!==null&&google.maps.event.removeListener(U),q!==null&&google.maps.event.removeListener(q),Z!==null&&google.maps.event.removeListener(Z),J!==null&&google.maps.event.removeListener(J),xe!==null&&google.maps.event.removeListener(xe),ke!==null&&google.maps.event.removeListener(ke),Ne!==null&&google.maps.event.removeListener(Ne),Pe!==null&&google.maps.event.removeListener(Pe),m&&m(Q),Q.setMap(null)}},[]),null}u.memo(iv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Qa,eventMap:Ya,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Qa,eventMap:Ya,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),ce(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var el={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"},tl={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 ov(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,g=t.onClick,L=t.onDrag,w=t.onBoundsChanged,S=t.onLoad,m=t.onUnmount,_=u.useContext(ie),E=u.useState(null),p=E[0],b=E[1],x=u.useState(null),k=x[0],M=x[1],P=u.useState(null),O=P[0],T=P[1],D=u.useState(null),j=D[0],U=D[1],N=u.useState(null),V=N[0],q=N[1],$=u.useState(null),F=$[0],Z=$[1],te=u.useState(null),X=te[0],J=te[1],R=u.useState(null),fe=R[0],xe=R[1],H=u.useState(null),Oe=H[0],ke=H[1],se=u.useState(null),we=se[0],Ne=se[1],he=u.useState(null),Se=he[0],Pe=he[1],Ce=u.useState(null),Te=Ce[0],ee=Ce[1],Ve=u.useState(null),Q=Ve[0],qe=Ve[1];return u.useEffect(function(){p!==null&&p.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),u.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),u.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),u.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),u.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),u.useEffect(function(){p&&s&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(p,"dblclick",s)))},[s]),u.useEffect(function(){p&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(p,"dragend",a)))},[a]),u.useEffect(function(){p&&l&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(p,"dragstart",l)))},[l]),u.useEffect(function(){p&&c&&(V!==null&&google.maps.event.removeListener(V),q(google.maps.event.addListener(p,"mousedown",c)))},[c]),u.useEffect(function(){p&&f&&(F!==null&&google.maps.event.removeListener(F),Z(google.maps.event.addListener(p,"mousemove",f)))},[f]),u.useEffect(function(){p&&d&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(p,"mouseout",d)))},[d]),u.useEffect(function(){p&&h&&(fe!==null&&google.maps.event.removeListener(fe),xe(google.maps.event.addListener(p,"mouseover",h)))},[h]),u.useEffect(function(){p&&v&&(Oe!==null&&google.maps.event.removeListener(Oe),ke(google.maps.event.addListener(p,"mouseup",v)))},[v]),u.useEffect(function(){p&&y&&(we!==null&&google.maps.event.removeListener(we),Ne(google.maps.event.addListener(p,"rightclick",y)))},[y]),u.useEffect(function(){p&&g&&(Se!==null&&google.maps.event.removeListener(Se),Pe(google.maps.event.addListener(p,"click",g)))},[g]),u.useEffect(function(){p&&L&&(Te!==null&&google.maps.event.removeListener(Te),ee(google.maps.event.addListener(p,"drag",L)))},[L]),u.useEffect(function(){p&&w&&(Q!==null&&google.maps.event.removeListener(Q),qe(google.maps.event.addListener(p,"bounds_changed",w)))},[w]),u.useEffect(function(){var W=new google.maps.Rectangle(G(G({},e||{}),{map:_}));return typeof o<"u"&&W.setVisible(o),typeof i<"u"&&W.setEditable(i),typeof r<"u"&&W.setDraggable(r),typeof n<"u"&&W.setBounds(n),s&&M(google.maps.event.addListener(W,"dblclick",s)),a&&T(google.maps.event.addListener(W,"dragend",a)),l&&U(google.maps.event.addListener(W,"dragstart",l)),c&&q(google.maps.event.addListener(W,"mousedown",c)),f&&Z(google.maps.event.addListener(W,"mousemove",f)),d&&J(google.maps.event.addListener(W,"mouseout",d)),h&&xe(google.maps.event.addListener(W,"mouseover",h)),v&&ke(google.maps.event.addListener(W,"mouseup",v)),y&&Ne(google.maps.event.addListener(W,"rightclick",y)),g&&Pe(google.maps.event.addListener(W,"click",g)),L&&ee(google.maps.event.addListener(W,"drag",L)),w&&qe(google.maps.event.addListener(W,"bounds_changed",w)),b(W),S&&S(W),function(){k!==null&&google.maps.event.removeListener(k),O!==null&&google.maps.event.removeListener(O),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),X!==null&&google.maps.event.removeListener(X),fe!==null&&google.maps.event.removeListener(fe),Oe!==null&&google.maps.event.removeListener(Oe),we!==null&&google.maps.event.removeListener(we),Se!==null&&google.maps.event.removeListener(Se),Te!==null&&google.maps.event.removeListener(Te),Q!==null&&google.maps.event.removeListener(Q),m&&m(W),W.setMap(null)}},[]),null}u.memo(ov);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:tl,eventMap:el,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:tl,eventMap:el,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),ce(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var nl={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"},rl={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)}},sv={};function av(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,g=t.onRightClick,L=t.onClick,w=t.onDrag,S=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,p=u.useContext(ie),b=u.useState(null),x=b[0],k=b[1],M=u.useState(null),P=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],U=u.useState(null),N=U[0],V=U[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),R=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],ke=u.useState(null),se=ke[0],we=ke[1],Ne=u.useState(null),he=Ne[0],Se=Ne[1],Pe=u.useState(null),Ce=Pe[0],Te=Pe[1],ee=u.useState(null),Ve=ee[0],Q=ee[1],qe=u.useState(null),W=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],nt=je[1];return u.useEffect(function(){x!==null&&x.setMap(p)},[p]),u.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),u.useEffect(function(){typeof i<"u"&&x!==null&&x.setDraggable(i)},[x,i]),u.useEffect(function(){typeof o<"u"&&x!==null&&x.setEditable(o)},[x,o]),u.useEffect(function(){typeof s<"u"&&x!==null&&x.setVisible(s)},[x,s]),u.useEffect(function(){typeof r=="number"&&x!==null&&x.setRadius(r)},[x,r]),u.useEffect(function(){typeof n<"u"&&x!==null&&x.setCenter(n)},[x,n]),u.useEffect(function(){x&&a&&(P!==null&&google.maps.event.removeListener(P),O(google.maps.event.addListener(x,"dblclick",a)))},[a]),u.useEffect(function(){x&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(x,"dragend",l)))},[l]),u.useEffect(function(){x&&c&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(x,"dragstart",c)))},[c]),u.useEffect(function(){x&&f&&($!==null&&google.maps.event.removeListener($),F(google.maps.event.addListener(x,"mousedown",f)))},[f]),u.useEffect(function(){x&&d&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(x,"mousemove",d)))},[d]),u.useEffect(function(){x&&h&&(R!==null&&google.maps.event.removeListener(R),fe(google.maps.event.addListener(x,"mouseout",h)))},[h]),u.useEffect(function(){x&&v&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(x,"mouseover",v)))},[v]),u.useEffect(function(){x&&y&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(x,"mouseup",y)))},[y]),u.useEffect(function(){x&&g&&(he!==null&&google.maps.event.removeListener(he),Se(google.maps.event.addListener(x,"rightclick",g)))},[g]),u.useEffect(function(){x&&L&&(Ce!==null&&google.maps.event.removeListener(Ce),Te(google.maps.event.addListener(x,"click",L)))},[L]),u.useEffect(function(){x&&w&&(Ve!==null&&google.maps.event.removeListener(Ve),Q(google.maps.event.addListener(x,"drag",w)))},[w]),u.useEffect(function(){x&&S&&(W!==null&&google.maps.event.removeListener(W),Fe(google.maps.event.addListener(x,"center_changed",S)))},[L]),u.useEffect(function(){x&&m&&(ut!==null&&google.maps.event.removeListener(ut),nt(google.maps.event.addListener(x,"radius_changed",m)))},[m]),u.useEffect(function(){var ne=new google.maps.Circle(G(G({},e||sv),{map:p}));return typeof r=="number"&&ne.setRadius(r),typeof n<"u"&&ne.setCenter(n),typeof r=="number"&&ne.setRadius(r),typeof s<"u"&&ne.setVisible(s),typeof o<"u"&&ne.setEditable(o),typeof i<"u"&&ne.setDraggable(i),a&&O(google.maps.event.addListener(ne,"dblclick",a)),l&&j(google.maps.event.addListener(ne,"dragend",l)),c&&V(google.maps.event.addListener(ne,"dragstart",c)),f&&F(google.maps.event.addListener(ne,"mousedown",f)),d&&X(google.maps.event.addListener(ne,"mousemove",d)),h&&fe(google.maps.event.addListener(ne,"mouseout",h)),v&&Oe(google.maps.event.addListener(ne,"mouseover",v)),y&&we(google.maps.event.addListener(ne,"mouseup",y)),g&&Se(google.maps.event.addListener(ne,"rightclick",g)),L&&Te(google.maps.event.addListener(ne,"click",L)),w&&Q(google.maps.event.addListener(ne,"drag",w)),S&&Fe(google.maps.event.addListener(ne,"center_changed",S)),m&&nt(google.maps.event.addListener(ne,"radius_changed",m)),k(ne),_&&_(ne),function(){P!==null&&google.maps.event.removeListener(P),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),te!==null&&google.maps.event.removeListener(te),R!==null&&google.maps.event.removeListener(R),H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),Ce!==null&&google.maps.event.removeListener(Ce),W!==null&&google.maps.event.removeListener(W),ut!==null&&google.maps.event.removeListener(ut),E&&E(ne),ne.setMap(null)}},[]),null}u.memo(av);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:rl,eventMap:nl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:rl,eventMap:nl,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),ce(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var il={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ol={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 lv(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,g=t.onLoad,L=t.onUnmount,w=u.useContext(ie),S=u.useState(null),m=S[0],_=S[1],E=u.useState(null),p=E[0],b=E[1],x=u.useState(null),k=x[0],M=x[1],P=u.useState(null),O=P[0],T=P[1],D=u.useState(null),j=D[0],U=D[1],N=u.useState(null),V=N[0],q=N[1],$=u.useState(null),F=$[0],Z=$[1],te=u.useState(null),X=te[0],J=te[1],R=u.useState(null),fe=R[0],xe=R[1],H=u.useState(null),Oe=H[0],ke=H[1],se=u.useState(null),we=se[0],Ne=se[1],he=u.useState(null),Se=he[0],Pe=he[1],Ce=u.useState(null),Te=Ce[0],ee=Ce[1],Ve=u.useState(null),Q=Ve[0],qe=Ve[1];return u.useEffect(function(){m!==null&&m.setMap(w)},[w]),u.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),u.useEffect(function(){m&&i&&(k!==null&&google.maps.event.removeListener(k),M(google.maps.event.addListener(m,"mousedown",i)))},[i]),u.useEffect(function(){m&&o&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(m,"mousemove",o)))},[o]),u.useEffect(function(){m&&s&&(j!==null&&google.maps.event.removeListener(j),U(google.maps.event.addListener(m,"mouseout",s)))},[s]),u.useEffect(function(){m&&a&&(V!==null&&google.maps.event.removeListener(V),q(google.maps.event.addListener(m,"mouseover",a)))},[a]),u.useEffect(function(){m&&l&&(F!==null&&google.maps.event.removeListener(F),Z(google.maps.event.addListener(m,"mouseup",l)))},[l]),u.useEffect(function(){m&&c&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(m,"rightclick",c)))},[c]),u.useEffect(function(){m&&n&&(fe!==null&&google.maps.event.removeListener(fe),xe(google.maps.event.addListener(m,"click",n)))},[n]),u.useEffect(function(){m&&f&&(Oe!==null&&google.maps.event.removeListener(Oe),ke(google.maps.event.addListener(m,"addfeature",f)))},[f]),u.useEffect(function(){m&&d&&(we!==null&&google.maps.event.removeListener(we),Ne(google.maps.event.addListener(m,"removefeature",d)))},[d]),u.useEffect(function(){m&&h&&(Se!==null&&google.maps.event.removeListener(Se),Pe(google.maps.event.addListener(m,"removeproperty",h)))},[h]),u.useEffect(function(){m&&v&&(Te!==null&&google.maps.event.removeListener(Te),ee(google.maps.event.addListener(m,"setgeometry",v)))},[v]),u.useEffect(function(){m&&y&&(Q!==null&&google.maps.event.removeListener(Q),qe(google.maps.event.addListener(m,"setproperty",y)))},[y]),u.useEffect(function(){if(w!==null){var W=new google.maps.Data(G(G({},e||{}),{map:w}));r&&b(google.maps.event.addListener(W,"dblclick",r)),i&&M(google.maps.event.addListener(W,"mousedown",i)),o&&T(google.maps.event.addListener(W,"mousemove",o)),s&&U(google.maps.event.addListener(W,"mouseout",s)),a&&q(google.maps.event.addListener(W,"mouseover",a)),l&&Z(google.maps.event.addListener(W,"mouseup",l)),c&&J(google.maps.event.addListener(W,"rightclick",c)),n&&xe(google.maps.event.addListener(W,"click",n)),f&&ke(google.maps.event.addListener(W,"addfeature",f)),d&&Ne(google.maps.event.addListener(W,"removefeature",d)),h&&Pe(google.maps.event.addListener(W,"removeproperty",h)),v&&ee(google.maps.event.addListener(W,"setgeometry",v)),y&&qe(google.maps.event.addListener(W,"setproperty",y)),_(W),g&&g(W)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),k!==null&&google.maps.event.removeListener(k),O!==null&&google.maps.event.removeListener(O),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),X!==null&&google.maps.event.removeListener(X),fe!==null&&google.maps.event.removeListener(fe),Oe!==null&&google.maps.event.removeListener(Oe),we!==null&&google.maps.event.removeListener(we),Se!==null&&google.maps.event.removeListener(Se),Te!==null&&google.maps.event.removeListener(Te),Q!==null&&google.maps.event.removeListener(Q),L&&L(m),m.setMap(null))}},[]),null}u.memo(lv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:ol,eventMap:il,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ol,eventMap:il,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),ce(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var sl={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},al={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ie(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(G(G({},this.props.options),{map:this.context}));this.registeredEvents=ae({updaterMap:al,eventMap:sl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:al,eventMap:sl,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),ce(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);function Rc(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function uv(t,e){return new e(t.lat,t.lng)}function cv(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 fv(t,e,n){return t instanceof e?t:n(t,e)}function dv(t,e,n){return t instanceof e?t:n(t,e)}function pv(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 hv(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 Ac(t,e,n,r){return n!==void 0?pv(t,e,dv(n,google.maps.LatLngBounds,cv)):hv(t,e,fv(r,google.maps.LatLng,uv))}function gv(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function vv(t,e,n,r,i){var o=function(s){Ie(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=G({},this.container?Rc(this.container,i):{x:0,y:0}),f=Ac(l,c,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},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 ll(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 mv(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(ie),f=u.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=u.useMemo(function(){return vv(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]),_u.createPortal(l,f)}u.memo(mv);(function(t){Ie(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();We(!!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=r.overlayView.getProjection(),s=G({x:0,y:0},r.containerRef.current?Rc(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=Ac(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,c=l.left,f=l.top,d=l.width,h=l.height;gv(a,{left:c,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.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=ll(n.position),i=ll(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?_u.createPortal(C.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=ie,e})(u.PureComponent);function yv(){}var cl={onDblClick:"dblclick",onClick:"click"},fl={opacity:function(t,e){t.setOpacity(e)}};function bv(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(ie),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,G({},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(bv);(function(t){Ie(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(){We(!!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,G(G({},this.props.options),{map:this.context}));this.registeredEvents=ae({updaterMap:fl,eventMap:cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:fl,eventMap:cl,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:yv},e.contextType=ie,e})(u.PureComponent);var dl={},pl={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function wv(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(ie),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){We(!!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(G(G({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(wv);(function(t){Ie(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(){We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),We(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(G(G({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ae({updaterMap:pl,eventMap:dl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:pl,eventMap:dl,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),ce(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,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){Ie(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=ae({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&&(ce(this.registeredEvents),this.registeredEvents=ae({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),ce(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);(function(t){Ie(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=ie,e})(u.PureComponent);(function(t){Ie(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(){We(!!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 vl={onDirectionsChanged:"directions_changed"},ml={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){Ie(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=ae({updaterMap:ml,eventMap:vl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ml,eventMap:vl,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),ce(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return C.jsx(C.Fragment,{})},e.contextType=ie,e})(u.PureComponent);(function(t){Ie(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(){We(!!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 yl={onPlacesChanged:"places_changed"},bl={bounds:function(t,e){t.setBounds(e)}};(function(t){Ie(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(We(!!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=ae({updaterMap:bl,eventMap:yl,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:bl,eventMap:yl,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),ce(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=ie,e})(u.PureComponent);var wl={onPlaceChanged:"place_changed"},Sl={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){Ie(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;We(!!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=ae({updaterMap:Sl,eventMap:wl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Sl,eventMap:wl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&ce(this.registeredEvents)},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ie,e})(u.PureComponent);const Sv='<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>',Lv=`<svg width="48" height="60" viewBox="0 0 48 60" fill="none" xmlns="http://www.w3.org/2000/svg">
66
+ </svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;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 Jg(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Js{constructor(){Jg(Js,google.maps.OverlayView)}}var _r;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(_r||(_r={}));const Xg=(t,e,n)=>{n.fitBounds(e.bounds)};class Yg extends Js{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Zg(r),renderer:o=new Kg,onClusterClick:s=Xg}){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:(mt.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,_r.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)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,_r.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=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new qg(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=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,_r.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Qg(t){var e=cg(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new Yg(G(G({},t),{map:e}));i(o)}},[e]),r}function ev(t){var e=t.children,n=t.options,r=Qg(n);return r!==null?e(r):null}u.memo(ev);var qa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ka={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function tv(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(ie),y=u.useState(null),g=y[0],S=y[1],w=u.useState(null),L=w[0],m=w[1],_=u.useState(null),E=_[0],p=_[1],b=u.useState(null),x=b[0],P=b[1],M=u.useState(null),k=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],V=u.useRef(null);return u.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),u.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),u.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),u.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),u.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),u.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),P(google.maps.event.addListener(g,"content_changed",l)))},[l]),u.useEffect(function(){g&&c&&(k!==null&&google.maps.event.removeListener(k),O(google.maps.event.addListener(g,"position_changed",c)))},[c]),u.useEffect(function(){g&&f&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),u.useEffect(function(){var N=new google.maps.InfoWindow(G({},r||{}));return S(N),V.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&P(google.maps.event.addListener(N,"content_changed",l)),c&&O(google.maps.event.addListener(N,"position_changed",c)),f&&j(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(V.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):We(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),k&&google.maps.event.removeListener(k),D&&google.maps.event.removeListener(D),h&&h(N),N.close()}},[]),V.current?Qn.createPortal(u.Children.only(e),V.current):null}u.memo(tv);var Tc=function(t){Ie(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):We(!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(G({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ae({updaterMap:Ka,eventMap:qa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Ka,eventMap:qa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(ce(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Qn.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ie,e}(u.PureComponent),Ja={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Xa={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)}},nv={};function rv(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,g=t.onClick,S=t.onDrag,w=t.onLoad,L=t.onUnmount,m=u.useContext(ie),_=u.useState(null),E=_[0],p=_[1],b=u.useState(null),x=b[0],P=b[1],M=u.useState(null),k=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],V=u.useState(null),N=V[0],U=V[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),R=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],Pe=u.useState(null),se=Pe[0],we=Pe[1],Ne=u.useState(null),he=Ne[0],Se=Ne[1],ke=u.useState(null),Ce=ke[0],Te=ke[1];return u.useEffect(function(){E!==null&&E.setMap(m)},[m]),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&&(x!==null&&google.maps.event.removeListener(x),P(google.maps.event.addListener(E,"dblclick",s)))},[s]),u.useEffect(function(){E&&a&&(k!==null&&google.maps.event.removeListener(k),O(google.maps.event.addListener(E,"dragend",a)))},[a]),u.useEffect(function(){E&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(E,"dragstart",l)))},[l]),u.useEffect(function(){E&&c&&(N!==null&&google.maps.event.removeListener(N),U(google.maps.event.addListener(E,"mousedown",c)))},[c]),u.useEffect(function(){E&&f&&($!==null&&google.maps.event.removeListener($),F(google.maps.event.addListener(E,"mousemove",f)))},[f]),u.useEffect(function(){E&&d&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(E,"mouseout",d)))},[d]),u.useEffect(function(){E&&h&&(R!==null&&google.maps.event.removeListener(R),fe(google.maps.event.addListener(E,"mouseover",h)))},[h]),u.useEffect(function(){E&&v&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(E,"mouseup",v)))},[v]),u.useEffect(function(){E&&y&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(E,"rightclick",y)))},[y]),u.useEffect(function(){E&&g&&(he!==null&&google.maps.event.removeListener(he),Se(google.maps.event.addListener(E,"click",g)))},[g]),u.useEffect(function(){E&&S&&(Ce!==null&&google.maps.event.removeListener(Ce),Te(google.maps.event.addListener(E,"drag",S)))},[S]),u.useEffect(function(){var ee=new google.maps.Polyline(G(G({},e||nv),{map:m}));return o&&ee.setPath(o),typeof i<"u"&&ee.setVisible(i),typeof r<"u"&&ee.setEditable(r),typeof n<"u"&&ee.setDraggable(n),s&&P(google.maps.event.addListener(ee,"dblclick",s)),a&&O(google.maps.event.addListener(ee,"dragend",a)),l&&j(google.maps.event.addListener(ee,"dragstart",l)),c&&U(google.maps.event.addListener(ee,"mousedown",c)),f&&F(google.maps.event.addListener(ee,"mousemove",f)),d&&X(google.maps.event.addListener(ee,"mouseout",d)),h&&fe(google.maps.event.addListener(ee,"mouseover",h)),v&&Oe(google.maps.event.addListener(ee,"mouseup",v)),y&&we(google.maps.event.addListener(ee,"rightclick",y)),g&&Se(google.maps.event.addListener(ee,"click",g)),S&&Te(google.maps.event.addListener(ee,"drag",S)),p(ee),w&&w(ee),function(){x!==null&&google.maps.event.removeListener(x),k!==null&&google.maps.event.removeListener(k),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),te!==null&&google.maps.event.removeListener(te),R!==null&&google.maps.event.removeListener(R),H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),L&&L(ee),ee.setMap(null)}},[]),null}u.memo(rv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Xa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Xa,eventMap:Ja,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),ce(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var Ya={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Qa={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 iv(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,g=t.onRightClick,S=t.onClick,w=t.onDrag,L=t.onLoad,m=t.onUnmount,_=t.onEdit,E=u.useContext(ie),p=u.useState(null),b=p[0],x=p[1],P=u.useState(null),M=P[0],k=P[1],O=u.useState(null),T=O[0],D=O[1],j=u.useState(null),V=j[0],N=j[1],U=u.useState(null),q=U[0],$=U[1],F=u.useState(null),Z=F[0],te=F[1],X=u.useState(null),J=X[0],R=X[1],fe=u.useState(null),xe=fe[0],H=fe[1],Oe=u.useState(null),Pe=Oe[0],se=Oe[1],we=u.useState(null),Ne=we[0],he=we[1],Se=u.useState(null),ke=Se[0],Ce=Se[1],Te=u.useState(null),ee=Te[0],Ue=Te[1];return u.useEffect(function(){b!==null&&b.setMap(E)},[E]),u.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),u.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),u.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),u.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),u.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),u.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),u.useEffect(function(){b&&a&&(M!==null&&google.maps.event.removeListener(M),k(google.maps.event.addListener(b,"dblclick",a)))},[a]),u.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),u.useEffect(function(){b&&l&&(T!==null&&google.maps.event.removeListener(T),D(google.maps.event.addListener(b,"dragend",l)))},[l]),u.useEffect(function(){b&&c&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(b,"dragstart",c)))},[c]),u.useEffect(function(){b&&f&&(q!==null&&google.maps.event.removeListener(q),$(google.maps.event.addListener(b,"mousedown",f)))},[f]),u.useEffect(function(){b&&d&&(Z!==null&&google.maps.event.removeListener(Z),te(google.maps.event.addListener(b,"mousemove",d)))},[d]),u.useEffect(function(){b&&h&&(J!==null&&google.maps.event.removeListener(J),R(google.maps.event.addListener(b,"mouseout",h)))},[h]),u.useEffect(function(){b&&v&&(xe!==null&&google.maps.event.removeListener(xe),H(google.maps.event.addListener(b,"mouseover",v)))},[v]),u.useEffect(function(){b&&y&&(Pe!==null&&google.maps.event.removeListener(Pe),se(google.maps.event.addListener(b,"mouseup",y)))},[y]),u.useEffect(function(){b&&g&&(Ne!==null&&google.maps.event.removeListener(Ne),he(google.maps.event.addListener(b,"rightclick",g)))},[g]),u.useEffect(function(){b&&S&&(ke!==null&&google.maps.event.removeListener(ke),Ce(google.maps.event.addListener(b,"click",S)))},[S]),u.useEffect(function(){b&&w&&(ee!==null&&google.maps.event.removeListener(ee),Ue(google.maps.event.addListener(b,"drag",w)))},[w]),u.useEffect(function(){var Q=new google.maps.Polygon(G(G({},e||{}),{map:E}));return o&&Q.setPath(o),s&&Q.setPaths(s),typeof i<"u"&&Q.setVisible(i),typeof r<"u"&&Q.setEditable(r),typeof n<"u"&&Q.setDraggable(n),a&&k(google.maps.event.addListener(Q,"dblclick",a)),l&&D(google.maps.event.addListener(Q,"dragend",l)),c&&N(google.maps.event.addListener(Q,"dragstart",c)),f&&$(google.maps.event.addListener(Q,"mousedown",f)),d&&te(google.maps.event.addListener(Q,"mousemove",d)),h&&R(google.maps.event.addListener(Q,"mouseout",h)),v&&H(google.maps.event.addListener(Q,"mouseover",v)),y&&se(google.maps.event.addListener(Q,"mouseup",y)),g&&he(google.maps.event.addListener(Q,"rightclick",g)),S&&Ce(google.maps.event.addListener(Q,"click",S)),w&&Ue(google.maps.event.addListener(Q,"drag",w)),x(Q),L&&L(Q),function(){M!==null&&google.maps.event.removeListener(M),T!==null&&google.maps.event.removeListener(T),V!==null&&google.maps.event.removeListener(V),q!==null&&google.maps.event.removeListener(q),Z!==null&&google.maps.event.removeListener(Z),J!==null&&google.maps.event.removeListener(J),xe!==null&&google.maps.event.removeListener(xe),Pe!==null&&google.maps.event.removeListener(Pe),Ne!==null&&google.maps.event.removeListener(Ne),ke!==null&&google.maps.event.removeListener(ke),m&&m(Q),Q.setMap(null)}},[]),null}u.memo(iv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:Qa,eventMap:Ya,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Qa,eventMap:Ya,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),ce(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var el={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"},tl={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 ov(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,g=t.onClick,S=t.onDrag,w=t.onBoundsChanged,L=t.onLoad,m=t.onUnmount,_=u.useContext(ie),E=u.useState(null),p=E[0],b=E[1],x=u.useState(null),P=x[0],M=x[1],k=u.useState(null),O=k[0],T=k[1],D=u.useState(null),j=D[0],V=D[1],N=u.useState(null),U=N[0],q=N[1],$=u.useState(null),F=$[0],Z=$[1],te=u.useState(null),X=te[0],J=te[1],R=u.useState(null),fe=R[0],xe=R[1],H=u.useState(null),Oe=H[0],Pe=H[1],se=u.useState(null),we=se[0],Ne=se[1],he=u.useState(null),Se=he[0],ke=he[1],Ce=u.useState(null),Te=Ce[0],ee=Ce[1],Ue=u.useState(null),Q=Ue[0],qe=Ue[1];return u.useEffect(function(){p!==null&&p.setMap(_)},[_]),u.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),u.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),u.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),u.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),u.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),u.useEffect(function(){p&&s&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(p,"dblclick",s)))},[s]),u.useEffect(function(){p&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(p,"dragend",a)))},[a]),u.useEffect(function(){p&&l&&(j!==null&&google.maps.event.removeListener(j),V(google.maps.event.addListener(p,"dragstart",l)))},[l]),u.useEffect(function(){p&&c&&(U!==null&&google.maps.event.removeListener(U),q(google.maps.event.addListener(p,"mousedown",c)))},[c]),u.useEffect(function(){p&&f&&(F!==null&&google.maps.event.removeListener(F),Z(google.maps.event.addListener(p,"mousemove",f)))},[f]),u.useEffect(function(){p&&d&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(p,"mouseout",d)))},[d]),u.useEffect(function(){p&&h&&(fe!==null&&google.maps.event.removeListener(fe),xe(google.maps.event.addListener(p,"mouseover",h)))},[h]),u.useEffect(function(){p&&v&&(Oe!==null&&google.maps.event.removeListener(Oe),Pe(google.maps.event.addListener(p,"mouseup",v)))},[v]),u.useEffect(function(){p&&y&&(we!==null&&google.maps.event.removeListener(we),Ne(google.maps.event.addListener(p,"rightclick",y)))},[y]),u.useEffect(function(){p&&g&&(Se!==null&&google.maps.event.removeListener(Se),ke(google.maps.event.addListener(p,"click",g)))},[g]),u.useEffect(function(){p&&S&&(Te!==null&&google.maps.event.removeListener(Te),ee(google.maps.event.addListener(p,"drag",S)))},[S]),u.useEffect(function(){p&&w&&(Q!==null&&google.maps.event.removeListener(Q),qe(google.maps.event.addListener(p,"bounds_changed",w)))},[w]),u.useEffect(function(){var W=new google.maps.Rectangle(G(G({},e||{}),{map:_}));return typeof o<"u"&&W.setVisible(o),typeof i<"u"&&W.setEditable(i),typeof r<"u"&&W.setDraggable(r),typeof n<"u"&&W.setBounds(n),s&&M(google.maps.event.addListener(W,"dblclick",s)),a&&T(google.maps.event.addListener(W,"dragend",a)),l&&V(google.maps.event.addListener(W,"dragstart",l)),c&&q(google.maps.event.addListener(W,"mousedown",c)),f&&Z(google.maps.event.addListener(W,"mousemove",f)),d&&J(google.maps.event.addListener(W,"mouseout",d)),h&&xe(google.maps.event.addListener(W,"mouseover",h)),v&&Pe(google.maps.event.addListener(W,"mouseup",v)),y&&Ne(google.maps.event.addListener(W,"rightclick",y)),g&&ke(google.maps.event.addListener(W,"click",g)),S&&ee(google.maps.event.addListener(W,"drag",S)),w&&qe(google.maps.event.addListener(W,"bounds_changed",w)),b(W),L&&L(W),function(){P!==null&&google.maps.event.removeListener(P),O!==null&&google.maps.event.removeListener(O),j!==null&&google.maps.event.removeListener(j),U!==null&&google.maps.event.removeListener(U),F!==null&&google.maps.event.removeListener(F),X!==null&&google.maps.event.removeListener(X),fe!==null&&google.maps.event.removeListener(fe),Oe!==null&&google.maps.event.removeListener(Oe),we!==null&&google.maps.event.removeListener(we),Se!==null&&google.maps.event.removeListener(Se),Te!==null&&google.maps.event.removeListener(Te),Q!==null&&google.maps.event.removeListener(Q),m&&m(W),W.setMap(null)}},[]),null}u.memo(ov);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:tl,eventMap:el,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:tl,eventMap:el,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),ce(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var nl={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"},rl={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)}},sv={};function av(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,g=t.onRightClick,S=t.onClick,w=t.onDrag,L=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,p=u.useContext(ie),b=u.useState(null),x=b[0],P=b[1],M=u.useState(null),k=M[0],O=M[1],T=u.useState(null),D=T[0],j=T[1],V=u.useState(null),N=V[0],U=V[1],q=u.useState(null),$=q[0],F=q[1],Z=u.useState(null),te=Z[0],X=Z[1],J=u.useState(null),R=J[0],fe=J[1],xe=u.useState(null),H=xe[0],Oe=xe[1],Pe=u.useState(null),se=Pe[0],we=Pe[1],Ne=u.useState(null),he=Ne[0],Se=Ne[1],ke=u.useState(null),Ce=ke[0],Te=ke[1],ee=u.useState(null),Ue=ee[0],Q=ee[1],qe=u.useState(null),W=qe[0],Fe=qe[1],je=u.useState(null),ut=je[0],nt=je[1];return u.useEffect(function(){x!==null&&x.setMap(p)},[p]),u.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),u.useEffect(function(){typeof i<"u"&&x!==null&&x.setDraggable(i)},[x,i]),u.useEffect(function(){typeof o<"u"&&x!==null&&x.setEditable(o)},[x,o]),u.useEffect(function(){typeof s<"u"&&x!==null&&x.setVisible(s)},[x,s]),u.useEffect(function(){typeof r=="number"&&x!==null&&x.setRadius(r)},[x,r]),u.useEffect(function(){typeof n<"u"&&x!==null&&x.setCenter(n)},[x,n]),u.useEffect(function(){x&&a&&(k!==null&&google.maps.event.removeListener(k),O(google.maps.event.addListener(x,"dblclick",a)))},[a]),u.useEffect(function(){x&&l&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(x,"dragend",l)))},[l]),u.useEffect(function(){x&&c&&(N!==null&&google.maps.event.removeListener(N),U(google.maps.event.addListener(x,"dragstart",c)))},[c]),u.useEffect(function(){x&&f&&($!==null&&google.maps.event.removeListener($),F(google.maps.event.addListener(x,"mousedown",f)))},[f]),u.useEffect(function(){x&&d&&(te!==null&&google.maps.event.removeListener(te),X(google.maps.event.addListener(x,"mousemove",d)))},[d]),u.useEffect(function(){x&&h&&(R!==null&&google.maps.event.removeListener(R),fe(google.maps.event.addListener(x,"mouseout",h)))},[h]),u.useEffect(function(){x&&v&&(H!==null&&google.maps.event.removeListener(H),Oe(google.maps.event.addListener(x,"mouseover",v)))},[v]),u.useEffect(function(){x&&y&&(se!==null&&google.maps.event.removeListener(se),we(google.maps.event.addListener(x,"mouseup",y)))},[y]),u.useEffect(function(){x&&g&&(he!==null&&google.maps.event.removeListener(he),Se(google.maps.event.addListener(x,"rightclick",g)))},[g]),u.useEffect(function(){x&&S&&(Ce!==null&&google.maps.event.removeListener(Ce),Te(google.maps.event.addListener(x,"click",S)))},[S]),u.useEffect(function(){x&&w&&(Ue!==null&&google.maps.event.removeListener(Ue),Q(google.maps.event.addListener(x,"drag",w)))},[w]),u.useEffect(function(){x&&L&&(W!==null&&google.maps.event.removeListener(W),Fe(google.maps.event.addListener(x,"center_changed",L)))},[S]),u.useEffect(function(){x&&m&&(ut!==null&&google.maps.event.removeListener(ut),nt(google.maps.event.addListener(x,"radius_changed",m)))},[m]),u.useEffect(function(){var ne=new google.maps.Circle(G(G({},e||sv),{map:p}));return typeof r=="number"&&ne.setRadius(r),typeof n<"u"&&ne.setCenter(n),typeof r=="number"&&ne.setRadius(r),typeof s<"u"&&ne.setVisible(s),typeof o<"u"&&ne.setEditable(o),typeof i<"u"&&ne.setDraggable(i),a&&O(google.maps.event.addListener(ne,"dblclick",a)),l&&j(google.maps.event.addListener(ne,"dragend",l)),c&&U(google.maps.event.addListener(ne,"dragstart",c)),f&&F(google.maps.event.addListener(ne,"mousedown",f)),d&&X(google.maps.event.addListener(ne,"mousemove",d)),h&&fe(google.maps.event.addListener(ne,"mouseout",h)),v&&Oe(google.maps.event.addListener(ne,"mouseover",v)),y&&we(google.maps.event.addListener(ne,"mouseup",y)),g&&Se(google.maps.event.addListener(ne,"rightclick",g)),S&&Te(google.maps.event.addListener(ne,"click",S)),w&&Q(google.maps.event.addListener(ne,"drag",w)),L&&Fe(google.maps.event.addListener(ne,"center_changed",L)),m&&nt(google.maps.event.addListener(ne,"radius_changed",m)),P(ne),_&&_(ne),function(){k!==null&&google.maps.event.removeListener(k),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),te!==null&&google.maps.event.removeListener(te),R!==null&&google.maps.event.removeListener(R),H!==null&&google.maps.event.removeListener(H),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),Ce!==null&&google.maps.event.removeListener(Ce),W!==null&&google.maps.event.removeListener(W),ut!==null&&google.maps.event.removeListener(ut),E&&E(ne),ne.setMap(null)}},[]),null}u.memo(av);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:rl,eventMap:nl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:rl,eventMap:nl,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),ce(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var il={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ol={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 lv(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,g=t.onLoad,S=t.onUnmount,w=u.useContext(ie),L=u.useState(null),m=L[0],_=L[1],E=u.useState(null),p=E[0],b=E[1],x=u.useState(null),P=x[0],M=x[1],k=u.useState(null),O=k[0],T=k[1],D=u.useState(null),j=D[0],V=D[1],N=u.useState(null),U=N[0],q=N[1],$=u.useState(null),F=$[0],Z=$[1],te=u.useState(null),X=te[0],J=te[1],R=u.useState(null),fe=R[0],xe=R[1],H=u.useState(null),Oe=H[0],Pe=H[1],se=u.useState(null),we=se[0],Ne=se[1],he=u.useState(null),Se=he[0],ke=he[1],Ce=u.useState(null),Te=Ce[0],ee=Ce[1],Ue=u.useState(null),Q=Ue[0],qe=Ue[1];return u.useEffect(function(){m!==null&&m.setMap(w)},[w]),u.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),u.useEffect(function(){m&&i&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(m,"mousedown",i)))},[i]),u.useEffect(function(){m&&o&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(m,"mousemove",o)))},[o]),u.useEffect(function(){m&&s&&(j!==null&&google.maps.event.removeListener(j),V(google.maps.event.addListener(m,"mouseout",s)))},[s]),u.useEffect(function(){m&&a&&(U!==null&&google.maps.event.removeListener(U),q(google.maps.event.addListener(m,"mouseover",a)))},[a]),u.useEffect(function(){m&&l&&(F!==null&&google.maps.event.removeListener(F),Z(google.maps.event.addListener(m,"mouseup",l)))},[l]),u.useEffect(function(){m&&c&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(m,"rightclick",c)))},[c]),u.useEffect(function(){m&&n&&(fe!==null&&google.maps.event.removeListener(fe),xe(google.maps.event.addListener(m,"click",n)))},[n]),u.useEffect(function(){m&&f&&(Oe!==null&&google.maps.event.removeListener(Oe),Pe(google.maps.event.addListener(m,"addfeature",f)))},[f]),u.useEffect(function(){m&&d&&(we!==null&&google.maps.event.removeListener(we),Ne(google.maps.event.addListener(m,"removefeature",d)))},[d]),u.useEffect(function(){m&&h&&(Se!==null&&google.maps.event.removeListener(Se),ke(google.maps.event.addListener(m,"removeproperty",h)))},[h]),u.useEffect(function(){m&&v&&(Te!==null&&google.maps.event.removeListener(Te),ee(google.maps.event.addListener(m,"setgeometry",v)))},[v]),u.useEffect(function(){m&&y&&(Q!==null&&google.maps.event.removeListener(Q),qe(google.maps.event.addListener(m,"setproperty",y)))},[y]),u.useEffect(function(){if(w!==null){var W=new google.maps.Data(G(G({},e||{}),{map:w}));r&&b(google.maps.event.addListener(W,"dblclick",r)),i&&M(google.maps.event.addListener(W,"mousedown",i)),o&&T(google.maps.event.addListener(W,"mousemove",o)),s&&V(google.maps.event.addListener(W,"mouseout",s)),a&&q(google.maps.event.addListener(W,"mouseover",a)),l&&Z(google.maps.event.addListener(W,"mouseup",l)),c&&J(google.maps.event.addListener(W,"rightclick",c)),n&&xe(google.maps.event.addListener(W,"click",n)),f&&Pe(google.maps.event.addListener(W,"addfeature",f)),d&&Ne(google.maps.event.addListener(W,"removefeature",d)),h&&ke(google.maps.event.addListener(W,"removeproperty",h)),v&&ee(google.maps.event.addListener(W,"setgeometry",v)),y&&qe(google.maps.event.addListener(W,"setproperty",y)),_(W),g&&g(W)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),P!==null&&google.maps.event.removeListener(P),O!==null&&google.maps.event.removeListener(O),j!==null&&google.maps.event.removeListener(j),U!==null&&google.maps.event.removeListener(U),F!==null&&google.maps.event.removeListener(F),X!==null&&google.maps.event.removeListener(X),fe!==null&&google.maps.event.removeListener(fe),Oe!==null&&google.maps.event.removeListener(Oe),we!==null&&google.maps.event.removeListener(we),Se!==null&&google.maps.event.removeListener(Se),Te!==null&&google.maps.event.removeListener(Te),Q!==null&&google.maps.event.removeListener(Q),S&&S(m),m.setMap(null))}},[]),null}u.memo(lv);(function(t){Ie(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(G(G({},this.props.options||{}),{map:this.context}));this.registeredEvents=ae({updaterMap:ol,eventMap:il,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ol,eventMap:il,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),ce(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);var sl={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},al={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ie(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(G(G({},this.props.options),{map:this.context}));this.registeredEvents=ae({updaterMap:al,eventMap:sl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:al,eventMap:sl,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),ce(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);function Rc(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function uv(t,e){return new e(t.lat,t.lng)}function cv(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 fv(t,e,n){return t instanceof e?t:n(t,e)}function dv(t,e,n){return t instanceof e?t:n(t,e)}function pv(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 hv(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 Ac(t,e,n,r){return n!==void 0?pv(t,e,dv(n,google.maps.LatLngBounds,cv)):hv(t,e,fv(r,google.maps.LatLng,uv))}function gv(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function vv(t,e,n,r,i){var o=function(s){Ie(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=G({},this.container?Rc(this.container,i):{x:0,y:0}),f=Ac(l,c,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},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 ll(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 mv(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(ie),f=u.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=u.useMemo(function(){return vv(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]),_u.createPortal(l,f)}u.memo(mv);(function(t){Ie(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();We(!!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=r.overlayView.getProjection(),s=G({x:0,y:0},r.containerRef.current?Rc(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=Ac(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,c=l.left,f=l.top,d=l.width,h=l.height;gv(a,{left:c,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.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=ll(n.position),i=ll(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?_u.createPortal(C.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=ie,e})(u.PureComponent);function yv(){}var cl={onDblClick:"dblclick",onClick:"click"},fl={opacity:function(t,e){t.setOpacity(e)}};function bv(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(ie),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,G({},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(bv);(function(t){Ie(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(){We(!!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,G(G({},this.props.options),{map:this.context}));this.registeredEvents=ae({updaterMap:fl,eventMap:cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:fl,eventMap:cl,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:yv},e.contextType=ie,e})(u.PureComponent);var dl={},pl={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function wv(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(ie),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){We(!!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(G(G({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(wv);(function(t){Ie(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(){We(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),We(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(G(G({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ae({updaterMap:pl,eventMap:dl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:pl,eventMap:dl,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),ce(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ie,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){Ie(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=ae({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&&(ce(this.registeredEvents),this.registeredEvents=ae({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),ce(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ie,e})(u.PureComponent);(function(t){Ie(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=ie,e})(u.PureComponent);(function(t){Ie(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(){We(!!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 vl={onDirectionsChanged:"directions_changed"},ml={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){Ie(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=ae({updaterMap:ml,eventMap:vl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:ml,eventMap:vl,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),ce(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return C.jsx(C.Fragment,{})},e.contextType=ie,e})(u.PureComponent);(function(t){Ie(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(){We(!!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 yl={onPlacesChanged:"places_changed"},bl={bounds:function(t,e){t.setBounds(e)}};(function(t){Ie(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(We(!!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=ae({updaterMap:bl,eventMap:yl,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:bl,eventMap:yl,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),ce(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=ie,e})(u.PureComponent);var wl={onPlaceChanged:"place_changed"},Sl={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){Ie(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;We(!!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=ae({updaterMap:Sl,eventMap:wl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){ce(this.registeredEvents),this.registeredEvents=ae({updaterMap:Sl,eventMap:wl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&ce(this.registeredEvents)},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ie,e})(u.PureComponent);const Sv='<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>',Lv=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" viewBox="0 0 48 66" fill="none">
67
+ <path
68
+ d="M23.999 66C35.0452 66 44 63.3137 44 59.9999C44 56.6863 35.0452 54 23.999 54C12.9548 54 4 56.6863 4 59.9999C4 63.3137 12.9548 66 23.999 66Z"
69
+ fill="url(#paint0_radial_10036_91741)" fill-opacity="0.4" />
70
+ <path fill-rule="evenodd" clip-rule="evenodd"
71
+ d="M24 0C35.2114 0 48 8.2877 48 24.0882C48 34.5995 40.0114 48.4107 24 60C7.98857 48.4107 0 34.5995 0 24.0882C0 8.2877 12.7886 0 24 0Z"
72
+ fill="currentColor" />
73
+ <path
74
+ d="M16.3444 37C15.3815 37 14.4907 36.7685 13.6722 36.3056C12.8537 35.8426 12.2037 35.2176 11.7222 34.4306C11.2407 33.6435 11 32.787 11 31.8611V17.1389C11 16.1898 11.2407 15.3333 11.7222 14.5694C12.2037 13.7824 12.8537 13.1574 13.6722 12.6944C14.4907 12.2315 15.3815 12 16.3444 12H31.6556C32.6185 12 33.4972 12.2315 34.2917 12.6944C35.1102 13.1574 35.7602 13.7824 36.2417 14.5694C36.7472 15.3333 37 16.1898 37 17.1389V31.8611C37 32.787 36.7472 33.6435 36.2417 34.4306C35.7602 35.2176 35.1102 35.8426 34.2917 36.3056C33.4972 36.7685 32.6185 37 31.6556 37H16.3444ZM16.5972 31.5833H31.3306V17.4167H16.5972V31.5833Z"
75
+ fill="white" />
76
+ <defs>
77
+ <radialGradient id="paint0_radial_10036_91741" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse"
78
+ gradientTransform="translate(24 60) rotate(90) scale(6 20)">
79
+ <stop />
80
+ <stop offset="1" stop-opacity="0" />
81
+ </radialGradient>
82
+ </defs>
83
+ </svg>`,Ev=`<svg width="48" height="60" viewBox="0 0 48 60" fill="none" xmlns="http://www.w3.org/2000/svg">
67
84
  <path fill-rule="evenodd" clip-rule="evenodd" d="M24 0C35.2114 0 48 8.2877 48 24.0882C48 34.5995 40.0114 48.4107 24
68
85
  60C7.98857 48.4107 0 34.5995 0 24.0882C0 8.2877 12.7886 0 24 0Z" fill="currentColor" />
69
86
  <path fill-rule="evenodd" clip-rule="evenodd" d="M10.0042 24.2835C9.80882 16.3692 16.4453 10 24.2856 10C31.7119
@@ -71,7 +88,7 @@ PERFORMANCE OF THIS SOFTWARE.
71
88
  31.9966 10.0042 24.2835ZM24 31.7778C28.2955 31.7778 31.7778 28.2955 31.7778 24C31.7778 19.7045 28.2955 16.2222 24
72
89
  16.2222C19.7044 16.2222 16.2222 19.7045 16.2222 24C16.2222 28.2955 19.7044 31.7778 24 31.7778Z"
73
90
  fill="secondaryColor" />
74
- </svg>`,Ev=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66">
91
+ </svg>`,xv=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66">
75
92
  <path fill="url(#a)" fill-opacity=".4"
76
93
  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"
77
94
  style="mix-blend-mode:darken" />
@@ -109,7 +126,7 @@ PERFORMANCE OF THIS SOFTWARE.
109
126
  <feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape" />
110
127
  </filter>
111
128
  </defs>
112
- </svg>`,yr={PinPvz:Ev,PinHome:Sv,PinLocker:Lv},xv=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},oe.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"})),Dc=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},oe.createElement("g",{fill:"#000"},oe.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"}))),Ic=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},oe.createElement("g",{fill:"#000"},oe.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 Cv(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 co(t){return!!(t&&typeof t.then=="function")}function Mi(t,e){return co(t)?Promise.resolve(t).then(e):e(t)}function Mo(t,e,n){function r(i){const o=e(i);throw t.emit(o),console.error(o),o}try{const i=n();return co(i)?i.catch(r):i}catch(i){r(i)}}function Ll(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 _v(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Nc(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function wt(t){return Nc(t)||[]}function Mv(t,e){return _v(e)?wt(e==null?void 0:e[t]):wt(e)}function fs(t){return Array.from(new Set(t))}function jc(t){return t&&t.replace(/\/+$/,"")}function Ov(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const kv=(t,e)=>fetch(t,e),Bc=(t=kv)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.22.0"},n==null?void 0:n.headers)}));function Vt(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 Pv(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=>(wt(d).forEach(h=>c.namespaces.add(h)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function Tv(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:Vt(r),onLanguageChange:Vt(r),onLoadingChange:Vt(r),onFetchingChange:Vt(r),onInitialLoaded:Vt(r),onRunningChange:Vt(r),onCacheChange:Vt(r),onUpdate:Pv(r,t,e),onPermanentChange:Vt(r),onError:Vt(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);case"error":return i.onError.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}class El extends Error{constructor(e,n,r=!1){const{language:i,namespace:o}=e;super(`Tolgee: Failed to fetch record for "${i}"${o&&` and "${o}"`}`),this.cause=n,this.isDev=r,this.name="RecordFetchError",this.language=i,this.namespace=o}}class Rv extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class xl extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const Uc=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Uc(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},br=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Ft=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Av(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(g,L,w){const S=Ft(g);l.set(S,{data:Uc(L),version:w}),t.onCacheChange.emit(g)}function h(g){let L;if(!L){const w=c[Ft(g)];typeof w=="function"&&(L=w())}return L||(L=e(g)),co(L)?L==null?void 0:L.catch(w=>{const S=new El(g,w);throw t.onError.emit(S),console.error(S),S}):L}function v(g,L){var w;let S;return L&&(S=(w=n(g))===null||w===void 0?void 0:w.catch(m=>{const _=new El(g,m,!0);return t.onError.emit(_),console.warn(_),h(g)})),S||(S=h(g)),S}const y=Object.freeze({addStaticData(g){g&&(c=Object.assign(Object.assign({},c),g),Object.entries(g).forEach(([L,w])=>{if(typeof w!="function"){const S=br(L),m=l.get(L);(!m||m.version===0)&&d(S,w,0)}}))},invalidate(){a.clear(),f+=1},addRecord(g,L){d(g,L,f)},exists(g,L=!1){const w=l.get(Ft(g));return w&&L?w.version===f:!!w},getRecord(g){var L;return(L=l.get(Ft(r(g))))===null||L===void 0?void 0:L.data},getTranslation(g,L){var w;return(w=l.get(Ft(g)))===null||w===void 0?void 0:w.data.get(L)},getTranslationNs(g,L,w){var S;for(const m of g)for(const _ of L){const E=(S=l.get(Ft({language:_,namespace:m})))===null||S===void 0?void 0:S.data.get(w);if(E!=null)return[m]}return fs(g)},getTranslationFallback(g,L,w){var S;for(const m of g)for(const _ of L){const E=(S=l.get(Ft({language:_,namespace:m})))===null||S===void 0?void 0:S.data.get(w);if(E!=null)return E}},changeTranslation(g,L,w){var S;const m=(S=l.get(Ft(g)))===null||S===void 0?void 0:S.data;m==null||m.set(L,w),t.onCacheChange.emit(Object.assign(Object.assign({},g),{key:L}))},isFetching(g){if(i())return!0;if(g===void 0)return a.size>0;const L=wt(g);return!!Array.from(a.keys()).find(w=>L.includes(br(w).namespace))},isLoading(g,L){const w=wt(L);return!!(i()||Array.from(a.keys()).find(S=>{const m=br(S);return(!w.length||w.includes(m.namespace))&&!y.exists({namespace:m.namespace,language:g})}))},async loadRecords(g,L){const w=g.map(m=>{const _=r(m),E=Ft(_),p=a.get(E);if(p)return{new:!1,promise:p,keyObject:_,cacheKey:E};const b=v(_,L)||Promise.resolve(void 0);return a.set(E,b),{new:!0,promise:b,keyObject:_,cacheKey:E}});o.notify(),s.notify();const S=await Promise.all(w.map(m=>m.promise));return w.forEach((m,_)=>{const E=a.get(m.cacheKey)!==m.promise;if(m.new&&!E){a.delete(m.cacheKey);const p=S[_];p?y.addRecord(m.keyObject,p):y.getRecord(m.keyObject)||y.addRecord(m.keyObject,{})}}),o.notify(),s.notify(),w.map(m=>y.getRecord(m.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([L,w])=>Object.assign(Object.assign({},br(L)),{data:w.data}))}});return y}function Vc(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 Dv={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",Iv="https://app.tolgee.io",Nv=({key:t})=>t,jv={defaultNs:"",observerOptions:Dv,observerType:"invisible",onFormatError:ds,apiUrl:Iv,fetch:Bc(),onTranslationMissing:Nv},ps=(...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 Cl(t,e){const n=ps(jv,e==null?void 0:e.initialOptions,t);return n.apiUrl=jc(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Bc(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 Bv(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:T})=>{var D;const j=O.map(({key:U,ns:N,defaultValue:V})=>({key:U,defaultValue:V,fallbackNamespaces:r(N),namespace:i({key:U,ns:N})[0],translation:o({key:U,ns:N})}));(D=c.ui)===null||D===void 0||D.handleElementClick(j,T)},d=(O,T)=>{var D;return((D=c.observer)===null||D===void 0?void 0:D.findPositions(O,T))||[]};function h(O){const T=o({key:O.key,ns:O.ns});return P.formatTranslation(Object.assign(Object.assign({},O),{translation:T,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function y(O){c.observer=O==null?void 0:O()}function g(){return!!c.observer}function L(O){O&&c.formatters.push(O)}function w(O){c.finalFormatter=O}function S(O){l.ui=O}function m(){return!!l.ui}function _(O){c.languageStorage=O}function E(O){c.languageDetector=O}function p(){return Mo(a.onError,O=>new xl("Tolgee: Failed to load language",O),()=>{var O;return(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v())})}function b(){if(!c.languageDetector)return;const O=n();return Mo(a.onError,T=>new Rv("Tolgee: Failed to detect language",T),()=>{var T;return(T=c.languageDetector)===null||T===void 0?void 0:T.getLanguage(Object.assign({availableLanguages:O},v()))})}function x(O){O&&c.backends.push(O)}function k(O){c.devBackend=O}function M(O,T){const D=Object.freeze({setFinalFormatter:w,addFormatter:L,setObserver:y,hasObserver:g,setUi:S,hasUi:m,setDevBackend:k,addBackend:x,setLanguageDetector:E,setLanguageStorage:_});T(O,D)}const P=Object.freeze({addPlugin:M,run(){var O,T;const{apiKey:D,apiUrl:j,projectId:U,observerOptions:N}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:D,apiUrl:j,projectId:U,highlight:P.highlight,changeTranslation:s,findPositions:d,onPermanentChange:V=>a.onPermanentChange.emit(V)}),(T=c.observer)===null||T===void 0||T.run({mouseHighlight:!0,options:N,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(){const O=n(),T=p();return Mi(T,D=>(!O||O.includes(D))&&D?D:b())},setStoredLanguage(O){return Mo(a.onError,T=>new xl("Tolgee: Failed to store language",T),()=>{var T;return(T=c.languageStorage)===null||T===void 0?void 0:T.setLanguage(O,v())})},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:T})=>{for(const D of c.backends){const j=D.getRecord(Object.assign({language:O,namespace:T},v()));if(j!==void 0)return j}},getBackendDevRecord:({language:O,namespace:T})=>{var D;const{apiKey:j,apiUrl:U,projectId:N}=e();return(D=c.devBackend)===null||D===void 0?void 0:D.getRecord(Object.assign({apiKey:j,apiUrl:U,projectId:N,language:O,namespace:T},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,T)=>{var D,j;return((j=(D=c.observer)===null||D===void 0?void 0:D.highlight)===null||j===void 0?void 0:j.call(D,O,T))||{unhighlight(){}}},unwrap(O){var T;return c.observer?(T=c.observer)===null||T===void 0?void 0:T.unwrap(O):{text:O,keys:[]}},wrap(O){var T;return c.observer?(T=c.observer)===null||T===void 0?void 0:T.wrap(O):O.translation},hasDevBackend(){return!!P.getDevBackend()},formatTranslation(O){var T,{formatEnabled:D}=O,j=Vc(O,["formatEnabled"]);const{key:U,translation:N,defaultValue:V,noWrap:q,params:$,ns:F,orEmpty:Z}=j,te=N??V;let X="";N==null&&(X=e().onTranslationMissing(j));let J=te??(Z?"":X);const R=t(),fe=D||!(!((T=c.observer)===null||T===void 0)&&T.outputNotFormattable),xe=H=>c.observer&&!q?c.observer.wrap({key:U,translation:H,defaultValue:V,params:$,ns:F}):H;J=xe(J);try{if(te&&R&&fe)for(const H of c.formatters)J=H.format({translation:J,language:R,params:$});c.finalFormatter&&te&&R&&fe&&(J=c.finalFormatter.format({translation:J,language:R,params:$}))}catch(H){console.error(H);const Oe=Ov(H)||ds,ke=e().onFormatError,se=typeof ke;se==="string"?J=ke:se==="function"?J=ke(Oe,j):J=ds,J=xe(J)}return J}});return P}const _l=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Uv(t,e,n){let r=Cl(),i;const o=Object.freeze({init(s){r=Cl(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){wt(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){wt(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 fs([...r.initialOptions.ns||[r.initialOptions.defaultNs],...wt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?fs([a,...Mv(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return wt(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=>br(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:jc(s.apiUrl)}):i=void 0}});return o}function Vv(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=Vc(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const Fc=(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({},Vv(r)),n)),n};function Fv({options:t}){const e=Tv(l,c),n=_l(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=_l(!1,()=>E.isLoading(),e.onLoadingChange.emit),i=Uv(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Bv(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,L,w,h,e),s=Av(e,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&v(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function c(p){return i.getDefaultNs(p)}function f(p){return[...wt(c(p)),...l()]}function d(p){return[...wt(p??c()),...i.getRequiredNamespaces()]}function h(p,b,x){const k=i.withDefaultNs(p),M=s.getTranslation(k,b);return s.changeTranslation(k,b,x),{revert(){s.changeTranslation(k,b,M)}}}function v(p){i.init(p),s.addStaticData(i.getInitialOptions().staticData)}function y(p,b){const x=i.getFallbackLangs(p),k=d(b),M=[];return x.forEach(P=>{k.forEach(O=>{s.exists({language:P,namespace:O},!0)||M.push({language:P,namespace:O})})}),M}function g(p,b){const x=y(p,b);if(x.length)return Mi(E.loadRecords(x),()=>{})}function L({key:p,ns:b}){const x=i.getFallbackLangs(),k=f(b??void 0);return s.getTranslationNs(k,x,p)}function w({key:p,ns:b,language:x}){const k=f(b??void 0),M=i.getFallbackLangs(x);return s.getTranslationFallback(k,M,p)}function S(){const p=Mi(m(),()=>g());if(co(p))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(p).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function m(){if(i.getLanguage())return;const b=o.getInitialLanguage();return Mi(b,x=>{const k=x||i.getInitialOptions().defaultLanguage;k&&i.setLanguage(k)})}function _(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Ll("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Ll(["defaultLanguage","language"]))}const E=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:v,getTranslation:w,changeTranslation:h,getTranslationNs:L,getDefaultAndFallbackNs:f,async changeLanguage(p){i.getPendingLanguage()===p&&i.getLanguage()===p||(i.setPendingLanguage(p),i.isRunning()&&await g(p),p===i.getPendingLanguage()&&(i.setLanguage(p),await o.setStoredLanguage(p)))},async addActiveNs(p,b){b||i.addActiveNs(p),i.isRunning()&&await g(void 0,p)},loadRecords(p){return s.loadRecords(p,E.isDev())},async loadRecord(p){return(await E.loadRecords([p]))[0]},isLoading(p){return s.isLoading(i.getLanguage(),p)},isLoaded(p){const b=i.getLanguage();if(!b)return!1;const x=i.getFallbackLangs(b),k=d(p),M=[];return x.forEach(P=>{k.forEach(O=>{s.exists({language:P,namespace:O})||M.push({language:P,namespace:O})})}),M.length===0},t:(...p)=>{const b=Fc(...p),x=w(b);return o.formatTranslation(Object.assign(Object.assign({},b),{translation:x}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return _(),i.isRunning()||(i.setRunning(!0),o.run(),a=S()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return E}function zv(t){const e=Fv({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 $v=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=ps(t.options,n),e},init(n){const r=zv(ps(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},zc=0,hs=1,Hv=2;class Wv extends Error{constructor(e,n,r){let i;e===zc?i="Empty parameter":e===hs?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Ml(t){return/\s/.test(t)}const en=0,gs=1,Oi=2,Oo=3,ko=4,Gv=new Set([Oi,gs,en]),vs="'",Zv=new Set(["{","}",vs]),qv=t=>/[0-9a-zA-Z_]/.test(t);function Kv(t){let e=en,n="",r="",i="";const o=[],s=[];let a=0;function l(h){throw new Wv(h,a,t)}const c=()=>{o.push(n),n=""},f=()=>{qv(i)||l(hs),r+=i},d=()=>{r===""&&l(zc),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case en:i===vs?(n+=i,e=gs):i==="{"?(c(),e=Oo):(n+=i,e=en);break;case gs:Zv.has(i)?(n=n.slice(0,-1)+i,e=Oi):(n+=i,e=en);break;case Oi:i===vs?e=en:(n+=i,e=Oi);break;case Oo:i==="}"?(d(),e=en):Ml(i)?r!==""&&(d(),e=ko):(f(),e=Oo);break;case ko:i=="}"?e=en:Ml(i)?e=ko:l(hs)}return Gv.has(e)||l(Hv),c(),[o,s]}function Jv(t,e){const[n,r]=Kv(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 Xv(){return{format:({translation:t,params:e})=>Jv(t,e)}}const Yv=()=>(t,e)=>(e.setFinalFormatter(Xv()),t);var Po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ol={};(function(t){function e(w,S){var m;return w instanceof Buffer?m=w:m=Buffer.from(w.buffer,w.byteOffset,w.byteLength),m.toString(S)}var n=function(w){return Buffer.from(w)};function r(w){for(var S=0,m=Math.min(256*256,w.length+1),_=new Uint16Array(m),E=[],p=0;;){var b=S<w.length;if(!b||p>=m-1){var x=_.subarray(0,p),k=x;if(E.push(String.fromCharCode.apply(null,k)),!b)return E.join("");w=w.subarray(S),S=0,p=0}var M=w[S++];if(!(M&128))_[p++]=M;else if((M&224)===192){var P=w[S++]&63;_[p++]=(M&31)<<6|P}else if((M&240)===224){var P=w[S++]&63,O=w[S++]&63;_[p++]=(M&31)<<12|P<<6|O}else if((M&248)===240){var P=w[S++]&63,O=w[S++]&63,T=w[S++]&63,D=(M&7)<<18|P<<12|O<<6|T;D>65535&&(D-=65536,_[p++]=D>>>10&1023|55296,D=56320|D&1023),_[p++]=D}}}function i(w){for(var S=0,m=w.length,_=0,E=Math.max(32,m+(m>>>1)+7),p=new Uint8Array(E>>>3<<3);S<m;){var b=w.charCodeAt(S++);if(b>=55296&&b<=56319){if(S<m){var x=w.charCodeAt(S);(x&64512)===56320&&(++S,b=((b&1023)<<10)+(x&1023)+65536)}if(b>=55296&&b<=56319)continue}if(_+4>p.length){E+=8,E*=1+S/w.length*2,E=E>>>3<<3;var k=new Uint8Array(E);k.set(p),p=k}if(b&4294967168)if(!(b&4294965248))p[_++]=b>>>6&31|192;else if(!(b&4294901760))p[_++]=b>>>12&15|224,p[_++]=b>>>6&63|128;else if(!(b&4292870144))p[_++]=b>>>18&7|240,p[_++]=b>>>12&63|128,p[_++]=b>>>6&63|128;else continue;else{p[_++]=b;continue}p[_++]=b&63|128}return p.slice?p.slice(0,_):p.subarray(0,_)}var o="Failed to ",s=function(w,S,m){if(w)throw new Error("".concat(o).concat(S,": the '").concat(m,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function c(){this.encoding="utf-8"}c.prototype.encode=function(w,S){return s(S&&S.stream,"encode","stream"),l(w)};function f(w){var S;try{var m=new Blob([w],{type:"text/plain;charset=UTF-8"});S=URL.createObjectURL(m);var _=new XMLHttpRequest;return _.open("GET",S,!1),_.send(),_.responseText}finally{S&&URL.revokeObjectURL(S)}}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'",g="".concat(o," ").concat(y,": the ");function L(w,S){s(S&&S.fatal,y,"fatal"),w=w||"utf-8";var m;if(a?m=Buffer.isEncoding(w):m=h.indexOf(w.toLowerCase())!==-1,!m)throw new RangeError("".concat(g," encoding label provided ('").concat(w,"') is invalid."));this.encoding=w,this.fatal=!1,this.ignoreBOM=!1}L.prototype.decode=function(w,S){s(S&&S.stream,"decode","stream");var m;return w instanceof Uint8Array?m=w:w.buffer instanceof ArrayBuffer?m=new Uint8Array(w.buffer):m=new Uint8Array(w),v(m,this.encoding)},t.TextEncoder=t.TextEncoder||c,t.TextDecoder=t.TextDecoder||L})(typeof window<"u"?window:Po);var Qv=Cv({__proto__:null,default:Ol},[Ol]),To;(To=console.assert)===null||To===void 0||To.call(console,Qv);const em="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function tm(t){const e=em.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function nm(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 rm(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|tm(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return nm(o.buffer)}function im(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=rm(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function om(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function sm(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=im(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}`),om(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 am=()=>(t,e)=>(e.setDevBackend(sm()),t);function lm(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 um({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let o=!1;const s=()=>new Promise((l,c)=>{const f=lm(e,h);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(y,i);function h(g){clearTimeout(d),v(),l(g)}function v(){f.unsubscribe()}function y(){v(),c()}});return{cancel(){o=!0},promise:(async()=>{for(let l=0;l<r;l++){if(o)return new Promise(()=>{});try{return await s()}catch{continue}}if(!o)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function cm(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=um({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const fm="tolgee-in-context-tools.umd.min.js",dm="@tolgee/in-context-tools",pm="InContextTools",hm="https://cdn.jsdelivr.net/npm";function gm(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.head.appendChild(r)})}let Ro=null;function vm(t){return Ro||(Ro=gm(`${hm}/@tolgee/web@${t}/dist/${fm}`).then(()=>window[dm][pm])),Ro}const $c="__tolgee_apiKey",Hc="__tolgee_apiUrl";function kl(){const t=sessionStorage.getItem($c)||void 0,e=sessionStorage.getItem(Hc)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function mm(){sessionStorage.removeItem($c),sessionStorage.removeItem(Hc)}function ym(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Wc=()=>t=>t;const bm=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};bm()&&(Wc=()=>t=>{const e=cm(),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 vm("5.22.0");return s=>{const a=kl();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&ym(()=>{e.update(n()).catch(mm)})}),kl()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function wm(){return $v().use(Wc())}const Sm={useSuspense:!0};let Ao;const Gc=()=>(Ao||(Ao=u.createContext(void 0)),Ao),Lm=({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({},Sm),e),a=Gc();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 Em;function xm(){return Em}const Cm=()=>{const t=Gc(),e=u.useContext(t)||xm();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},_m=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},Zc=(t,e)=>{const{tolgee:n,options:r}=Cm(),i=Nc(t),o=wt(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=_m(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=y=>{var g;f.current.push(y),(g=c.current)===null||g===void 0||g.subscribeNs(y)},h=n.isLoaded(i);u.useEffect(()=>{const y=n.onNsUpdate(a);return c.current=y,y.subscribeNs(i),f.current.forEach(g=>{y.subscribeNs(g)}),()=>{y.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(y=>{var g;const L=(g=y.ns)!==null&&g!==void 0?g: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}},Nt=(t,e)=>{const{t:n,isLoading:r}=Zc(t,e);return{t:u.useCallback((...o)=>{const s=Fc(...o);return n(s)},[n]),isLoading:r}},Mm=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(ms(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},ms(o)):u.cloneElement(i)}else e[n]=r}),e},ms=t=>Array.isArray(t)?u.Children.toArray(t):t,Om=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=ms(t.t({key:e,params:Mm(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},xn=t=>{const{t:e}=Zc();return u.createElement(Om,Object.assign({t:e},t))},km="Button-module__root__8RX49h",Pm="Button-module__primary__st6yY9",Tm="Button-module__secondary__j-3rjz",Rm="Button-module__loading__QfItr2",Am="Button-module__spinner__kVZYqS",dr={root:km,primary:Pm,secondary:Tm,loading:Rm,spinner:Am},Lt=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const o=[dr.root,e,dr[r],{[dr.loading]:n}];if(i.as==="link"){const{as:s,...a}=i;return C.jsxs("a",{className:ve(o),...a,children:[!n&&t,n&&C.jsx(Fi,{className:dr.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return C.jsxs("button",{type:"button",className:ve(o),...a,children:[!n&&t,n&&C.jsx(Fi,{className:dr.spinner})]})}Wt(!1,"Invalid button type")};Lt.defaultProps={as:"button"};const Dm="LocationBalloon-module__root__GtUl6q",Im="LocationBalloon-module__submit__lNcF4k",Nm="LocationBalloon-module__details__--VOKk",jm="LocationBalloon-module__icon__X7DOVA",Bm="LocationBalloon-module__header__5VQJDW",Um="LocationBalloon-module__title__bX9pf8",Vm="LocationBalloon-module__description__htav7b",Fm="LocationBalloon-module__actions__c8dlOR",Xt={root:Dm,submit:Im,details:Nm,icon:jm,header:Bm,title:Um,description:Vm,actions:Fm},zm={default:Ic,llama:Dc},$m=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onDetails:s,onSubmit:a})=>{const{logo:l="default"}=tt(),c=zm[l];return C.jsxs("div",{className:ve(Xt.root,e),children:[C.jsxs("div",{className:Xt.header,children:[C.jsx("div",{className:Xt.icon,children:C.jsx(c,{})}),C.jsx("span",{className:Xt.title,children:o||"{{ properties.point.name }}"})]}),C.jsxs("div",{className:Xt.description,children:[(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",","," ",i||"{{ properties.point.location_name }}"]}),C.jsxs("div",{className:Xt.actions,children:[C.jsx(Lt,{id:Ld,variant:"primary",className:Xt.submit,onClick:a,children:t?"{ choose }":C.jsx(xn,{keyName:"choose",ns:"common"})}),!n&&C.jsxs(Lt,{id:Ou,as:"link",variant:"primary",className:Xt.details,onClick:s,children:[t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"}),C.jsx(xv,{})]})]})]})},Hm=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("g",{clipPath:"url(#a)"},oe.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"})),oe.createElement("defs",null,oe.createElement("clipPath",{id:"a"},oe.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),Wm="CloseButton-module__root__2m1asd",Gm="CloseButton-module__absolutePositionVariant__lGX4cQ",Zm="CloseButton-module__relativePositionVariant__LqTTWf",Pl={root:Wm,absolutePositionVariant:Gm,relativePositionVariant:Zm},Hr=({className:t,position:e="absolute",...n})=>C.jsx("div",{...n,className:ve(Pl.root,t,Pl[`${e}PositionVariant`]),children:C.jsx(Hm,{})}),qm="LocationView-module__title__-wT0bl",Km="LocationView-module__logo__jDjNMt",Jm="LocationView-module__header__K0gBYX",Xm="LocationView-module__content__wtOPjm",Ym="LocationView-module__section__2J1zAJ",Qm="LocationView-module__chips__ALwJDx",ey="LocationView-module__services__IgJ4ba",ty="LocationView-module__images__-wKmRM",ny="LocationView-module__image__T1E-gt",ry="LocationView-module__actions__NuafMj",iy="LocationView-module__actionsHidden__-vX5kK",oy="LocationView-module__submit__c-Hc8u",sy="LocationView-module__scheduleItem__RhAgat",Ye={title:qm,logo:Km,header:Jm,content:Xm,section:Ym,chips:Qm,services:ey,images:ty,image:ny,actions:ry,actionsHidden:iy,submit:oy,scheduleItem:sy},ay={default:Ic,llama:Dc},ly=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{const{t:o}=Nt(["details_modal","common"]),{logo:s="default"}=tt(),a=ay[s];return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:ve(Ye.header,t==null?void 0:t.header),children:[C.jsx(Hr,{onClick:r}),C.jsxs("div",{className:Ye.title,children:[C.jsx("div",{className:Ye.logo,children:C.jsx(a,{})}),C.jsx("span",{children:n.name})]})]}),C.jsxs("div",{className:ve(Ye.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("address"),":"]}),C.jsx("p",{children:n.location.full_address})]}),n.schedule.length>0&&C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("schedule"),":"]}),n.schedule.map((l,c)=>C.jsx("p",{className:Ye.scheduleItem,children:l},c))]}),(n.pay_by_card||n.pay_by_card)&&C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("payment_method"),":"]}),C.jsxs("div",{className:Ye.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")]})]}),C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("services"),":"]}),C.jsxs("div",{className:Ye.services,children:[n.is_pickup&&C.jsx("span",{children:o("is_pickup")}),n.is_delivery&&C.jsx("span",{children:o("is_delivery")}),n.is_dressing_room&&C.jsx("span",{children:o("is_dressing_room")}),n.is_check_order&&C.jsx("span",{children:o("is_check_order")})]})]}),C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("location"),":"]}),C.jsx("p",{children:n.location_name})]}),n.images.length>0&&C.jsx("section",{className:Ye.images,children:n.images.map(l=>C.jsx("img",{src:l,alt:n.name,className:Ye.image},l))})]}),C.jsx("div",{className:ve(Ye.actions,{[Ye.actionsHidden]:e}),children:C.jsx(Lt,{variant:"primary",className:Ye.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},qc=u.memo(ly),uy=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}],cy=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcd00"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#ffd900"},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}],fy={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},Kc={optimized:!0},Jc=({isSelectedPoint:t})=>{const e=Le(Bs),[n,r]=u.useState(!0);return u.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var dy=py()?u.useLayoutEffect:u.useEffect;function py(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function hy(){var t=u.useState(Object.create(null)),e=t[1];return u.useCallback(function(){e(Object.create(null))},[])}var gy=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=hy();return dy(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?Qn.createPortal(n,s.current):u.createElement("span",{ref:o})};/*! *****************************************************************************
129
+ </svg>`,yr={PinPvz:xv,PinHome:Sv,PinOmnic:Ev,PinLlama:Lv},Cv=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},oe.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"})),Dc=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},oe.createElement("g",{fill:"#000"},oe.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"}))),Ic=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},oe.createElement("g",{fill:"#000"},oe.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 _v(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 co(t){return!!(t&&typeof t.then=="function")}function Oi(t,e){return co(t)?Promise.resolve(t).then(e):e(t)}function Mo(t,e,n){function r(i){const o=e(i);throw t.emit(o),console.error(o),o}try{const i=n();return co(i)?i.catch(r):i}catch(i){r(i)}}function Ll(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 Mv(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Nc(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function wt(t){return Nc(t)||[]}function Ov(t,e){return Mv(e)?wt(e==null?void 0:e[t]):wt(e)}function fs(t){return Array.from(new Set(t))}function jc(t){return t&&t.replace(/\/+$/,"")}function Pv(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const kv=(t,e)=>fetch(t,e),Bc=(t=kv)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.22.0"},n==null?void 0:n.headers)}));function Ut(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 Tv(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=>(wt(d).forEach(h=>c.namespaces.add(h)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function Rv(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:Ut(r),onLanguageChange:Ut(r),onLoadingChange:Ut(r),onFetchingChange:Ut(r),onInitialLoaded:Ut(r),onRunningChange:Ut(r),onCacheChange:Ut(r),onUpdate:Tv(r,t,e),onPermanentChange:Ut(r),onError:Ut(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);case"error":return i.onError.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}class El extends Error{constructor(e,n,r=!1){const{language:i,namespace:o}=e;super(`Tolgee: Failed to fetch record for "${i}"${o&&` and "${o}"`}`),this.cause=n,this.isDev=r,this.name="RecordFetchError",this.language=i,this.namespace=o}}class Av extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageDetectorError"}}class xl extends Error{constructor(e,n){super(e),this.cause=n,this.name="LanguageStorageError"}}const Vc=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){Vc(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},br=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Ft=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Dv(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(g,S,w){const L=Ft(g);l.set(L,{data:Vc(S),version:w}),t.onCacheChange.emit(g)}function h(g){let S;if(!S){const w=c[Ft(g)];typeof w=="function"&&(S=w())}return S||(S=e(g)),co(S)?S==null?void 0:S.catch(w=>{const L=new El(g,w);throw t.onError.emit(L),console.error(L),L}):S}function v(g,S){var w;let L;return S&&(L=(w=n(g))===null||w===void 0?void 0:w.catch(m=>{const _=new El(g,m,!0);return t.onError.emit(_),console.warn(_),h(g)})),L||(L=h(g)),L}const y=Object.freeze({addStaticData(g){g&&(c=Object.assign(Object.assign({},c),g),Object.entries(g).forEach(([S,w])=>{if(typeof w!="function"){const L=br(S),m=l.get(S);(!m||m.version===0)&&d(L,w,0)}}))},invalidate(){a.clear(),f+=1},addRecord(g,S){d(g,S,f)},exists(g,S=!1){const w=l.get(Ft(g));return w&&S?w.version===f:!!w},getRecord(g){var S;return(S=l.get(Ft(r(g))))===null||S===void 0?void 0:S.data},getTranslation(g,S){var w;return(w=l.get(Ft(g)))===null||w===void 0?void 0:w.data.get(S)},getTranslationNs(g,S,w){var L;for(const m of g)for(const _ of S){const E=(L=l.get(Ft({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(w);if(E!=null)return[m]}return fs(g)},getTranslationFallback(g,S,w){var L;for(const m of g)for(const _ of S){const E=(L=l.get(Ft({language:_,namespace:m})))===null||L===void 0?void 0:L.data.get(w);if(E!=null)return E}},changeTranslation(g,S,w){var L;const m=(L=l.get(Ft(g)))===null||L===void 0?void 0:L.data;m==null||m.set(S,w),t.onCacheChange.emit(Object.assign(Object.assign({},g),{key:S}))},isFetching(g){if(i())return!0;if(g===void 0)return a.size>0;const S=wt(g);return!!Array.from(a.keys()).find(w=>S.includes(br(w).namespace))},isLoading(g,S){const w=wt(S);return!!(i()||Array.from(a.keys()).find(L=>{const m=br(L);return(!w.length||w.includes(m.namespace))&&!y.exists({namespace:m.namespace,language:g})}))},async loadRecords(g,S){const w=g.map(m=>{const _=r(m),E=Ft(_),p=a.get(E);if(p)return{new:!1,promise:p,keyObject:_,cacheKey:E};const b=v(_,S)||Promise.resolve(void 0);return a.set(E,b),{new:!0,promise:b,keyObject:_,cacheKey:E}});o.notify(),s.notify();const L=await Promise.all(w.map(m=>m.promise));return w.forEach((m,_)=>{const E=a.get(m.cacheKey)!==m.promise;if(m.new&&!E){a.delete(m.cacheKey);const p=L[_];p?y.addRecord(m.keyObject,p):y.getRecord(m.keyObject)||y.addRecord(m.keyObject,{})}}),o.notify(),s.notify(),w.map(m=>y.getRecord(m.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([S,w])=>Object.assign(Object.assign({},br(S)),{data:w.data}))}});return y}function Uc(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 Iv={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",Nv="https://app.tolgee.io",jv=({key:t})=>t,Bv={defaultNs:"",observerOptions:Iv,observerType:"invisible",onFormatError:ds,apiUrl:Nv,fetch:Bc(),onTranslationMissing:jv},ps=(...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 Cl(t,e){const n=ps(Bv,e==null?void 0:e.initialOptions,t);return n.apiUrl=jc(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Bc(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 Vv(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:T})=>{var D;const j=O.map(({key:V,ns:N,defaultValue:U})=>({key:V,defaultValue:U,fallbackNamespaces:r(N),namespace:i({key:V,ns:N})[0],translation:o({key:V,ns:N})}));(D=c.ui)===null||D===void 0||D.handleElementClick(j,T)},d=(O,T)=>{var D;return((D=c.observer)===null||D===void 0?void 0:D.findPositions(O,T))||[]};function h(O){const T=o({key:O.key,ns:O.ns});return k.formatTranslation(Object.assign(Object.assign({},O),{translation:T,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function y(O){c.observer=O==null?void 0:O()}function g(){return!!c.observer}function S(O){O&&c.formatters.push(O)}function w(O){c.finalFormatter=O}function L(O){l.ui=O}function m(){return!!l.ui}function _(O){c.languageStorage=O}function E(O){c.languageDetector=O}function p(){return Mo(a.onError,O=>new xl("Tolgee: Failed to load language",O),()=>{var O;return(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v())})}function b(){if(!c.languageDetector)return;const O=n();return Mo(a.onError,T=>new Av("Tolgee: Failed to detect language",T),()=>{var T;return(T=c.languageDetector)===null||T===void 0?void 0:T.getLanguage(Object.assign({availableLanguages:O},v()))})}function x(O){O&&c.backends.push(O)}function P(O){c.devBackend=O}function M(O,T){const D=Object.freeze({setFinalFormatter:w,addFormatter:S,setObserver:y,hasObserver:g,setUi:L,hasUi:m,setDevBackend:P,addBackend:x,setLanguageDetector:E,setLanguageStorage:_});T(O,D)}const k=Object.freeze({addPlugin:M,run(){var O,T;const{apiKey:D,apiUrl:j,projectId:V,observerOptions:N}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:D,apiUrl:j,projectId:V,highlight:k.highlight,changeTranslation:s,findPositions:d,onPermanentChange:U=>a.onPermanentChange.emit(U)}),(T=c.observer)===null||T===void 0||T.run({mouseHighlight:!0,options:N,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(){const O=n(),T=p();return Oi(T,D=>(!O||O.includes(D))&&D?D:b())},setStoredLanguage(O){return Mo(a.onError,T=>new xl("Tolgee: Failed to store language",T),()=>{var T;return(T=c.languageStorage)===null||T===void 0?void 0:T.setLanguage(O,v())})},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:T})=>{for(const D of c.backends){const j=D.getRecord(Object.assign({language:O,namespace:T},v()));if(j!==void 0)return j}},getBackendDevRecord:({language:O,namespace:T})=>{var D;const{apiKey:j,apiUrl:V,projectId:N}=e();return(D=c.devBackend)===null||D===void 0?void 0:D.getRecord(Object.assign({apiKey:j,apiUrl:V,projectId:N,language:O,namespace:T},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,T)=>{var D,j;return((j=(D=c.observer)===null||D===void 0?void 0:D.highlight)===null||j===void 0?void 0:j.call(D,O,T))||{unhighlight(){}}},unwrap(O){var T;return c.observer?(T=c.observer)===null||T===void 0?void 0:T.unwrap(O):{text:O,keys:[]}},wrap(O){var T;return c.observer?(T=c.observer)===null||T===void 0?void 0:T.wrap(O):O.translation},hasDevBackend(){return!!k.getDevBackend()},formatTranslation(O){var T,{formatEnabled:D}=O,j=Uc(O,["formatEnabled"]);const{key:V,translation:N,defaultValue:U,noWrap:q,params:$,ns:F,orEmpty:Z}=j,te=N??U;let X="";N==null&&(X=e().onTranslationMissing(j));let J=te??(Z?"":X);const R=t(),fe=D||!(!((T=c.observer)===null||T===void 0)&&T.outputNotFormattable),xe=H=>c.observer&&!q?c.observer.wrap({key:V,translation:H,defaultValue:U,params:$,ns:F}):H;J=xe(J);try{if(te&&R&&fe)for(const H of c.formatters)J=H.format({translation:J,language:R,params:$});c.finalFormatter&&te&&R&&fe&&(J=c.finalFormatter.format({translation:J,language:R,params:$}))}catch(H){console.error(H);const Oe=Pv(H)||ds,Pe=e().onFormatError,se=typeof Pe;se==="string"?J=Pe:se==="function"?J=Pe(Oe,j):J=ds,J=xe(J)}return J}});return k}const _l=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Uv(t,e,n){let r=Cl(),i;const o=Object.freeze({init(s){r=Cl(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){wt(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){wt(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 fs([...r.initialOptions.ns||[r.initialOptions.defaultNs],...wt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?fs([a,...Ov(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return wt(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=>br(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:jc(s.apiUrl)}):i=void 0}});return o}function Fv(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=Uc(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const Fc=(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({},Fv(r)),n)),n};function zv({options:t}){const e=Rv(l,c),n=_l(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=_l(!1,()=>E.isLoading(),e.onLoadingChange.emit),i=Uv(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Vv(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,S,w,h,e),s=Dv(e,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&v(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function c(p){return i.getDefaultNs(p)}function f(p){return[...wt(c(p)),...l()]}function d(p){return[...wt(p??c()),...i.getRequiredNamespaces()]}function h(p,b,x){const P=i.withDefaultNs(p),M=s.getTranslation(P,b);return s.changeTranslation(P,b,x),{revert(){s.changeTranslation(P,b,M)}}}function v(p){i.init(p),s.addStaticData(i.getInitialOptions().staticData)}function y(p,b){const x=i.getFallbackLangs(p),P=d(b),M=[];return x.forEach(k=>{P.forEach(O=>{s.exists({language:k,namespace:O},!0)||M.push({language:k,namespace:O})})}),M}function g(p,b){const x=y(p,b);if(x.length)return Oi(E.loadRecords(x),()=>{})}function S({key:p,ns:b}){const x=i.getFallbackLangs(),P=f(b??void 0);return s.getTranslationNs(P,x,p)}function w({key:p,ns:b,language:x}){const P=f(b??void 0),M=i.getFallbackLangs(x);return s.getTranslationFallback(P,M,p)}function L(){const p=Oi(m(),()=>g());if(co(p))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(p).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function m(){if(i.getLanguage())return;const b=o.getInitialLanguage();return Oi(b,x=>{const P=x||i.getInitialOptions().defaultLanguage;P&&i.setLanguage(P)})}function _(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Ll("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Ll(["defaultLanguage","language"]))}const E=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:v,getTranslation:w,changeTranslation:h,getTranslationNs:S,getDefaultAndFallbackNs:f,async changeLanguage(p){i.getPendingLanguage()===p&&i.getLanguage()===p||(i.setPendingLanguage(p),i.isRunning()&&await g(p),p===i.getPendingLanguage()&&(i.setLanguage(p),await o.setStoredLanguage(p)))},async addActiveNs(p,b){b||i.addActiveNs(p),i.isRunning()&&await g(void 0,p)},loadRecords(p){return s.loadRecords(p,E.isDev())},async loadRecord(p){return(await E.loadRecords([p]))[0]},isLoading(p){return s.isLoading(i.getLanguage(),p)},isLoaded(p){const b=i.getLanguage();if(!b)return!1;const x=i.getFallbackLangs(b),P=d(p),M=[];return x.forEach(k=>{P.forEach(O=>{s.exists({language:k,namespace:O})||M.push({language:k,namespace:O})})}),M.length===0},t:(...p)=>{const b=Fc(...p),x=w(b);return o.formatTranslation(Object.assign(Object.assign({},b),{translation:x}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return _(),i.isRunning()||(i.setRunning(!0),o.run(),a=L()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return E}function $v(t){const e=zv({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 Hv=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=ps(t.options,n),e},init(n){const r=$v(ps(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},zc=0,hs=1,Wv=2;class Gv extends Error{constructor(e,n,r){let i;e===zc?i="Empty parameter":e===hs?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Ml(t){return/\s/.test(t)}const en=0,gs=1,Pi=2,Oo=3,Po=4,Zv=new Set([Pi,gs,en]),vs="'",qv=new Set(["{","}",vs]),Kv=t=>/[0-9a-zA-Z_]/.test(t);function Jv(t){let e=en,n="",r="",i="";const o=[],s=[];let a=0;function l(h){throw new Gv(h,a,t)}const c=()=>{o.push(n),n=""},f=()=>{Kv(i)||l(hs),r+=i},d=()=>{r===""&&l(zc),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case en:i===vs?(n+=i,e=gs):i==="{"?(c(),e=Oo):(n+=i,e=en);break;case gs:qv.has(i)?(n=n.slice(0,-1)+i,e=Pi):(n+=i,e=en);break;case Pi:i===vs?e=en:(n+=i,e=Pi);break;case Oo:i==="}"?(d(),e=en):Ml(i)?r!==""&&(d(),e=Po):(f(),e=Oo);break;case Po:i=="}"?e=en:Ml(i)?e=Po:l(hs)}return Zv.has(e)||l(Wv),c(),[o,s]}function Xv(t,e){const[n,r]=Jv(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 Yv(){return{format:({translation:t,params:e})=>Xv(t,e)}}const Qv=()=>(t,e)=>(e.setFinalFormatter(Yv()),t);var ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ol={};(function(t){function e(w,L){var m;return w instanceof Buffer?m=w:m=Buffer.from(w.buffer,w.byteOffset,w.byteLength),m.toString(L)}var n=function(w){return Buffer.from(w)};function r(w){for(var L=0,m=Math.min(256*256,w.length+1),_=new Uint16Array(m),E=[],p=0;;){var b=L<w.length;if(!b||p>=m-1){var x=_.subarray(0,p),P=x;if(E.push(String.fromCharCode.apply(null,P)),!b)return E.join("");w=w.subarray(L),L=0,p=0}var M=w[L++];if(!(M&128))_[p++]=M;else if((M&224)===192){var k=w[L++]&63;_[p++]=(M&31)<<6|k}else if((M&240)===224){var k=w[L++]&63,O=w[L++]&63;_[p++]=(M&31)<<12|k<<6|O}else if((M&248)===240){var k=w[L++]&63,O=w[L++]&63,T=w[L++]&63,D=(M&7)<<18|k<<12|O<<6|T;D>65535&&(D-=65536,_[p++]=D>>>10&1023|55296,D=56320|D&1023),_[p++]=D}}}function i(w){for(var L=0,m=w.length,_=0,E=Math.max(32,m+(m>>>1)+7),p=new Uint8Array(E>>>3<<3);L<m;){var b=w.charCodeAt(L++);if(b>=55296&&b<=56319){if(L<m){var x=w.charCodeAt(L);(x&64512)===56320&&(++L,b=((b&1023)<<10)+(x&1023)+65536)}if(b>=55296&&b<=56319)continue}if(_+4>p.length){E+=8,E*=1+L/w.length*2,E=E>>>3<<3;var P=new Uint8Array(E);P.set(p),p=P}if(b&4294967168)if(!(b&4294965248))p[_++]=b>>>6&31|192;else if(!(b&4294901760))p[_++]=b>>>12&15|224,p[_++]=b>>>6&63|128;else if(!(b&4292870144))p[_++]=b>>>18&7|240,p[_++]=b>>>12&63|128,p[_++]=b>>>6&63|128;else continue;else{p[_++]=b;continue}p[_++]=b&63|128}return p.slice?p.slice(0,_):p.subarray(0,_)}var o="Failed to ",s=function(w,L,m){if(w)throw new Error("".concat(o).concat(L,": the '").concat(m,"' option is unsupported."))},a=typeof Buffer=="function"&&Buffer.from,l=a?n:i;function c(){this.encoding="utf-8"}c.prototype.encode=function(w,L){return s(L&&L.stream,"encode","stream"),l(w)};function f(w){var L;try{var m=new Blob([w],{type:"text/plain;charset=UTF-8"});L=URL.createObjectURL(m);var _=new XMLHttpRequest;return _.open("GET",L,!1),_.send(),_.responseText}finally{L&&URL.revokeObjectURL(L)}}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'",g="".concat(o," ").concat(y,": the ");function S(w,L){s(L&&L.fatal,y,"fatal"),w=w||"utf-8";var m;if(a?m=Buffer.isEncoding(w):m=h.indexOf(w.toLowerCase())!==-1,!m)throw new RangeError("".concat(g," encoding label provided ('").concat(w,"') is invalid."));this.encoding=w,this.fatal=!1,this.ignoreBOM=!1}S.prototype.decode=function(w,L){s(L&&L.stream,"decode","stream");var m;return w instanceof Uint8Array?m=w:w.buffer instanceof ArrayBuffer?m=new Uint8Array(w.buffer):m=new Uint8Array(w),v(m,this.encoding)},t.TextEncoder=t.TextEncoder||c,t.TextDecoder=t.TextDecoder||S})(typeof window<"u"?window:ko);var em=_v({__proto__:null,default:Ol},[Ol]),To;(To=console.assert)===null||To===void 0||To.call(console,em);const tm="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function nm(t){const e=tm.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function rm(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 im(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|nm(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return rm(o.buffer)}function om(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=im(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function sm(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function am(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=om(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}`),sm(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 lm=()=>(t,e)=>(e.setDevBackend(am()),t);function um(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 cm({message:t,recievingMessage:e,data:n,attempts:r=1,timeout:i=300}){let o=!1;const s=()=>new Promise((l,c)=>{const f=um(e,h);window.postMessage({type:t,data:n},window.origin);const d=setTimeout(y,i);function h(g){clearTimeout(d),v(),l(g)}function v(){f.unsubscribe()}function y(){v(),c()}});return{cancel(){o=!0},promise:(async()=>{for(let l=0;l<r;l++){if(o)return new Promise(()=>{});try{return await s()}catch{continue}}if(!o)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function fm(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=cm({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const dm="tolgee-in-context-tools.umd.min.js",pm="@tolgee/in-context-tools",hm="InContextTools",gm="https://cdn.jsdelivr.net/npm";function vm(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.head.appendChild(r)})}let Ro=null;function mm(t){return Ro||(Ro=vm(`${gm}/@tolgee/web@${t}/dist/${dm}`).then(()=>window[pm][hm])),Ro}const $c="__tolgee_apiKey",Hc="__tolgee_apiUrl";function Pl(){const t=sessionStorage.getItem($c)||void 0,e=sessionStorage.getItem(Hc)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function ym(){sessionStorage.removeItem($c),sessionStorage.removeItem(Hc)}function bm(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let Wc=()=>t=>t;const wm=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};wm()&&(Wc=()=>t=>{const e=fm(),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 mm("5.22.0");return s=>{const a=Pl();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&bm(()=>{e.update(n()).catch(ym)})}),Pl()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function Sm(){return Hv().use(Wc())}const Lm={useSuspense:!0};let Ao;const Gc=()=>(Ao||(Ao=u.createContext(void 0)),Ao),Em=({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({},Lm),e),a=Gc();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 xm;function Cm(){return xm}const _m=()=>{const t=Gc(),e=u.useContext(t)||Cm();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},Mm=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},Zc=(t,e)=>{const{tolgee:n,options:r}=_m(),i=Nc(t),o=wt(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=Mm(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=y=>{var g;f.current.push(y),(g=c.current)===null||g===void 0||g.subscribeNs(y)},h=n.isLoaded(i);u.useEffect(()=>{const y=n.onNsUpdate(a);return c.current=y,y.subscribeNs(i),f.current.forEach(g=>{y.subscribeNs(g)}),()=>{y.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(y=>{var g;const S=(g=y.ns)!==null&&g!==void 0?g:i==null?void 0:i[0];return d(S),n.t(Object.assign(Object.assign({},y),{ns:S}))},[n,l]);if(s.useSuspense&&!h)throw n.addActiveNs(i,!0);return{t:v,isLoading:!h}},Nt=(t,e)=>{const{t:n,isLoading:r}=Zc(t,e);return{t:u.useCallback((...o)=>{const s=Fc(...o);return n(s)},[n]),isLoading:r}},Om=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(ms(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},ms(o)):u.cloneElement(i)}else e[n]=r}),e},ms=t=>Array.isArray(t)?u.Children.toArray(t):t,Pm=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=ms(t.t({key:e,params:Om(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},xn=t=>{const{t:e}=Zc();return u.createElement(Pm,Object.assign({t:e},t))},km="Button-module__root__8RX49h",Tm="Button-module__primary__st6yY9",Rm="Button-module__secondary__j-3rjz",Am="Button-module__loading__QfItr2",Dm="Button-module__spinner__kVZYqS",dr={root:km,primary:Tm,secondary:Rm,loading:Am,spinner:Dm},Lt=({children:t,className:e,loading:n,variant:r="primary",...i})=>{const o=[dr.root,e,dr[r],{[dr.loading]:n}];if(i.as==="link"){const{as:s,...a}=i;return C.jsxs("a",{className:ve(o),...a,children:[!n&&t,n&&C.jsx(zi,{className:dr.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return C.jsxs("button",{type:"button",className:ve(o),...a,children:[!n&&t,n&&C.jsx(zi,{className:dr.spinner})]})}Wt(!1,"Invalid button type")};Lt.defaultProps={as:"button"};const Im="LocationBalloon-module__root__GtUl6q",Nm="LocationBalloon-module__submit__lNcF4k",jm="LocationBalloon-module__details__--VOKk",Bm="LocationBalloon-module__icon__X7DOVA",Vm="LocationBalloon-module__header__5VQJDW",Um="LocationBalloon-module__title__bX9pf8",Fm="LocationBalloon-module__description__htav7b",zm="LocationBalloon-module__actions__c8dlOR",Xt={root:Im,submit:Nm,details:jm,icon:Bm,header:Vm,title:Um,description:Fm,actions:zm},$m={default:Ic,llama:Dc},Hm=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onDetails:s,onSubmit:a})=>{const{logo:l="default"}=tt(),c=$m[l];return C.jsxs("div",{className:ve(Xt.root,e),children:[C.jsxs("div",{className:Xt.header,children:[C.jsx("div",{className:Xt.icon,children:C.jsx(c,{})}),C.jsx("span",{className:Xt.title,children:o||"{{ properties.point.name }}"})]}),C.jsxs("div",{className:Xt.description,children:[(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",","," ",i||"{{ properties.point.location_name }}"]}),C.jsxs("div",{className:Xt.actions,children:[C.jsx(Lt,{id:Ld,variant:"primary",className:Xt.submit,onClick:a,children:t?"{ choose }":C.jsx(xn,{keyName:"choose",ns:"common"})}),!n&&C.jsxs(Lt,{id:Ou,as:"link",variant:"primary",className:Xt.details,onClick:s,children:[t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"}),C.jsx(Cv,{})]})]})]})},Wm=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("g",{clipPath:"url(#a)"},oe.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"})),oe.createElement("defs",null,oe.createElement("clipPath",{id:"a"},oe.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),Gm="CloseButton-module__root__2m1asd",Zm="CloseButton-module__absolutePositionVariant__lGX4cQ",qm="CloseButton-module__relativePositionVariant__LqTTWf",kl={root:Gm,absolutePositionVariant:Zm,relativePositionVariant:qm},Wr=({className:t,position:e="absolute",...n})=>C.jsx("div",{...n,className:ve(kl.root,t,kl[`${e}PositionVariant`]),children:C.jsx(Wm,{})}),Km="LocationView-module__title__-wT0bl",Jm="LocationView-module__logo__jDjNMt",Xm="LocationView-module__header__K0gBYX",Ym="LocationView-module__content__wtOPjm",Qm="LocationView-module__section__2J1zAJ",ey="LocationView-module__chips__ALwJDx",ty="LocationView-module__services__IgJ4ba",ny="LocationView-module__images__-wKmRM",ry="LocationView-module__image__T1E-gt",iy="LocationView-module__actions__NuafMj",oy="LocationView-module__actionsHidden__-vX5kK",sy="LocationView-module__submit__c-Hc8u",ay="LocationView-module__scheduleItem__RhAgat",Ye={title:Km,logo:Jm,header:Xm,content:Ym,section:Qm,chips:ey,services:ty,images:ny,image:ry,actions:iy,actionsHidden:oy,submit:sy,scheduleItem:ay},ly={default:Ic,llama:Dc},uy=({classes:t,hideActions:e,location:n,onClose:r,onSubmit:i})=>{const{t:o}=Nt(["details_modal","common"]),{logo:s="default"}=tt(),a=ly[s];return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:ve(Ye.header,t==null?void 0:t.header),children:[C.jsx(Wr,{onClick:r}),C.jsxs("div",{className:Ye.title,children:[C.jsx("div",{className:Ye.logo,children:C.jsx(a,{})}),C.jsx("span",{children:n.name})]})]}),C.jsxs("div",{className:ve(Ye.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("address"),":"]}),C.jsx("p",{children:n.location.full_address})]}),n.schedule.length>0&&C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("schedule"),":"]}),n.schedule.map((l,c)=>C.jsx("p",{className:Ye.scheduleItem,children:l},c))]}),(n.pay_by_card||n.pay_by_card)&&C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("payment_method"),":"]}),C.jsxs("div",{className:Ye.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")]})]}),C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("services"),":"]}),C.jsxs("div",{className:Ye.services,children:[n.is_pickup&&C.jsx("span",{children:o("is_pickup")}),n.is_delivery&&C.jsx("span",{children:o("is_delivery")}),n.is_dressing_room&&C.jsx("span",{children:o("is_dressing_room")}),n.is_check_order&&C.jsx("span",{children:o("is_check_order")})]})]}),C.jsxs("section",{className:Ye.section,children:[C.jsxs("span",{children:[o("location"),":"]}),C.jsx("p",{children:n.location_name})]}),n.images.length>0&&C.jsx("section",{className:Ye.images,children:n.images.map(l=>C.jsx("img",{src:l,alt:n.name,className:Ye.image},l))})]}),C.jsx("div",{className:ve(Ye.actions,{[Ye.actionsHidden]:e}),children:C.jsx(Lt,{variant:"primary",className:Ye.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},qc=u.memo(uy),cy=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}];function fy(t="#ffcc00"){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:t}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:t},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}]}const dy={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},Kc={optimized:!0},Jc=({isSelectedPoint:t})=>{const e=Le(Bs),[n,r]=u.useState(!0);return u.useEffect(()=>{r(t?!e:!0)},[e,t]),n};var py=hy()?u.useLayoutEffect:u.useEffect;function hy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function gy(){var t=u.useState(Object.create(null)),e=t[1];return u.useCallback(function(){e(Object.create(null))},[])}var vy=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=gy();return py(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?Qn.createPortal(n,s.current):u.createElement("span",{ref:o})};/*! *****************************************************************************
113
130
  Copyright (c) Microsoft Corporation.
114
131
 
115
132
  Permission to use, copy, modify, and/or distribute this software for any
@@ -122,14 +139,14 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
122
139
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
123
140
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
124
141
  PERFORMANCE OF THIS SOFTWARE.
125
- ***************************************************************************** */var B=function(){return B=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},B.apply(this,arguments)};function Xs(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 pe(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 be(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 qn;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(qn||(qn={}));var ys=De.Start,Ys=De.Stop,Wr=De.Raise,fo=De.Send,Xc=De.Cancel,vy=De.NullEvent,Qs=De.Assign;De.After;De.DoneState;var Yc=De.Log,my=De.Init,bs=De.Invoke;De.ErrorExecution;var Tl=De.ErrorPlatform,yy=De.ErrorCustom,Qc=De.Update,by=De.Choose,wy=De.Pure,ef=".",Rl={},ws="xstate.guard",Sy="",ri;function ea(t,e,n){n===void 0&&(n=ef);var r=Mr(t,n),i=Mr(e,n);return Me(i)?Me(r)?i===r:!1:Me(r)?r in i:Object.keys(r).every(function(o){return o in i?ea(r[o],i[o]):!1})}function tf(t){try{return Me(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 Ss(t,e){try{return tr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function Ly(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Mr(t,e){if(Ly(t))return t.value;if(tr(t))return $i(t);if(typeof t!="string")return t;var n=Ss(t,e);return $i(n)}function $i(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 wr(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 Al(t,e,n){var r,i,o={};try{for(var s=pe(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 Ey=function(t){return function(e){var n,r,i=e;try{for(var o=pe(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 xy(t,e){return function(n){var r,i,o=n;try{for(var s=pe(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(Me(t))return[[t]];var e=ze(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 ze(t){var e;return(e=[]).concat.apply(e,Ue([],be(t),!1))}function nf(t){return tr(t)?t:[t]}function Ct(t){return t===void 0?[]:nf(t)}function Hi(t,e,n){var r,i;if(Ee(t))return t(e,n.data);var o={};try{for(var s=pe(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];Ee(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 Cy(t){return/^(done|error)\./.test(t)}function Dl(t){return!!(t instanceof Promise||t!==null&&(Ee(t)||typeof t=="object")&&Ee(t.then))}function _y(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function My(t,e){var n,r,i=be([[],[]],2),o=i[0],s=i[1];try{for(var a=pe(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 rf(t,e){return wr(t.states,function(n,r){if(n){var i=(Me(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:rf(n,i)}}})}function Oy(t,e){return{current:e,states:rf(t,e)}}function Il(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(Ee(c))d=c(o,e.data,f);else try{for(var h=pe(Object.keys(c)),v=h.next();!v.done;v=h.next()){var y=v.value,g=c[y];d[y]=Ee(g)?g(o,e.data,f):g}}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 ky=function(){};function tr(t){return Array.isArray(t)}function Ee(t){return typeof t=="function"}function Me(t){return typeof t=="string"}function of(t,e){if(t)return Me(t)?{type:ws,name:t,predicate:e?e[t]:void 0}:Ee(t)?{type:ws,name:t.name,predicate:t}:t}function Py(t){try{return"subscribe"in t&&Ee(t.subscribe)}catch{return!1}}var rn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ri={},ri[rn]=function(){return this},ri[Symbol.observable]=function(){return this};function Kn(t){return!!t&&"__xstatenode"in t}function Ty(t){return!!t&&typeof t.send=="function"}function po(t,e){return Me(t)||typeof t=="number"?B({type:t},e):t}function et(t,e){if(!Me(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=po(t);return B({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function An(t,e){var n=nf(e).map(function(r){return typeof r>"u"||typeof r=="string"||Kn(r)?{target:r,event:t}:B(B({},r),{event:t})});return n}function Ry(t){if(!(t===void 0||t===Sy))return Ct(t)}function sf(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===ws)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 af(t){return typeof t=="string"?{type:t}:t}function Pi(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 ii(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Ls(t){return(t.type===Wr||t.type===fo&&t.to===qn.Internal)&&typeof t.delay!="number"}var zn=et({type:my});function Es(t,e){return e&&e[t]||void 0}function Ur(t,e){var n;if(Me(t)||typeof t=="number"){var r=Es(t,e);Ee(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Ee(t))n={type:t.name||t.toString(),exec:t};else{var r=Es(t.type,e);if(Ee(r))n=B(B({},t),{exec:r});else if(r){var i=r.type||t.type;n=B(B(B({},r),t),{type:i})}else n=t}return n}var on=function(t,e){if(!t)return[];var n=tr(t)?t:[t];return n.map(function(r){return Ur(r,e)})};function ta(t){var e=Ur(t);return B(B({id:Me(t)?t:e.id},e),{type:e.type})}function Ay(t,e){return{type:Wr,event:typeof t=="function"?t:po(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Dy(t,e,n,r){var i={_event:n},o=et(Ee(t.event)?t.event(e,n.data,i):t.event),s;if(Me(t.delay)){var a=r&&r[t.delay];s=Ee(a)?a(e,n.data,i):a}else s=Ee(t.delay)?t.delay(e,n.data,i):t.delay;return B(B({},t),{type:Wr,_event:o,delay:s})}function Iy(t,e){return{to:e?e.to:void 0,type:fo,event:Ee(t)?t:po(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Ee(t)?t.name:tf(t)}}function Ny(t,e,n,r){var i={_event:n},o=et(Ee(t.event)?t.event(e,n.data,i):t.event),s;if(Me(t.delay)){var a=r&&r[t.delay];s=Ee(a)?a(e,n.data,i):a}else s=Ee(t.delay)?t.delay(e,n.data,i):t.delay;var l=Ee(t.to)?t.to(e,n.data,i):t.to;return B(B({},t),{to:l,_event:o,event:o.data,delay:s})}var jy=function(t,e,n){return B(B({},t),{value:Me(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},By=function(t){return{type:Xc,sendId:t}};function Uy(t){var e=ta(t);return{type:De.Start,activity:e,exec:void 0}}function Vy(t){var e=Ee(t)?t:ta(t);return{type:De.Stop,activity:e,exec:void 0}}function Fy(t,e,n){var r=Ee(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 zy=function(t){return{type:Qs,assignment:t}};function $y(t,e){var n=e?"#".concat(e):"";return"".concat(De.After,"(").concat(t,")").concat(n)}function oi(t,e){var n="".concat(De.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ti(t,e){var n="".concat(De.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Sr(t,e){var n="".concat(De.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var Hy=function(t){var e,n,r=[];try{for(var i=pe(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===Qs){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 Wi(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:Hy(i),l=a.length?Il(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(y,g){var L;switch(g.type){case Wr:{var w=Dy(g,l,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,l,r),w}case fo:var S=Ny(g,l,r,t.options.delays);return o&&S.to!==qn.Internal&&(y==="entry"?f.push(S):o(S,l,r)),S;case Yc:{var m=jy(g,l,r);return o==null||o(m,l,r),m}case by:{var _=g,E=(L=_.conds.find(function(U){var N=of(U.cond,t.options.guards);return!N||sf(t,N,l,r,o?void 0:e)}))===null||L===void 0?void 0:L.actions;if(!E)return[];var p=be(Wi(t,e,l,r,[{type:y,actions:on(Ct(E),t.options.actions)}],o,s),2),b=p[0],x=p[1];return l=x,c==null||c.push(l),b}case wy:{var E=g.get(l,r.data);if(!E)return[];var k=be(Wi(t,e,l,r,[{type:y,actions:on(Ct(E),t.options.actions)}],o,s),2),M=k[0],P=k[1];return l=P,c==null||c.push(l),M}case Ys:{var m=Fy(g,l,r);return o==null||o(m,n,r),m}case Qs:{l=Il(l,r,[g],o?void 0:e),c==null||c.push(l);break}default:var O=Ur(g,t.options.actions),T=O.exec;if(o)o(O,l,r);else if(T&&c){var D=c.length-1,j=B(B({},O),{exec:function(U){for(var N=[],V=1;V<arguments.length;V++)N[V-1]=arguments[V];T.apply(void 0,Ue([c[D]],be(N),!1))}});O=j}return O}}function h(y){var g,L,w=[];try{for(var S=pe(y.actions),m=S.next();!m.done;m=S.next()){var _=m.value,E=d(y.type,_);E&&(w=w.concat(E))}}catch(p){g={error:p}}finally{try{m&&!m.done&&(L=S.return)&&L.call(S)}finally{if(g)throw g.error}}return f.forEach(function(p){o(p,l,r)}),f.length=0,w}var v=ze(i.map(h));return[v,l]}var Un=function(t,e){var n=e(t);return n};function lf(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[rn]=function(){return this},e}function Wy(t,e,n,r){var i,o=af(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?Hi(t.data,n,r):void 0,l=s?uf(s,t.id,a):lf(t.id);return l.meta=t,l}function uf(t,e,n){var r=lf(e);if(r.deferred=!0,Kn(t)){var i=r.state=Un(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Gy(t){try{return typeof t.send=="function"}catch{return!1}}function Zy(t){return Gy(t)&&"id"in t}function qy(t){var e;return B((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[rn]=function(){return this},e),t)}var Gi=function(t){return t.type==="atomic"||t.type==="final"};function cf(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Vr(t){return cf(t).filter(function(e){return e.type!=="history"})}function ff(t){var e=[t];return Gi(t)?e:e.concat(ze(Vr(t).map(ff)))}function Lr(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=xs(f),h=new Set(e);try{for(var v=pe(h),y=v.next();!y.done;y=v.next())for(var g=y.value,L=g.parent;L&&!h.has(L);)h.add(L),L=L.parent}catch(k){n={error:k}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var w=xs(h);try{for(var S=pe(h),m=S.next();!m.done;m=S.next()){var g=m.value;if(g.type==="compound"&&(!w.get(g)||!w.get(g).length))d.get(g)?d.get(g).forEach(function(M){return h.add(M)}):g.initialStateNodes.forEach(function(M){return h.add(M)});else if(g.type==="parallel")try{for(var _=(s=void 0,pe(Vr(g))),E=_.next();!E.done;E=_.next()){var p=E.value;h.has(p)||(h.add(p),d.get(p)?d.get(p).forEach(function(M){return h.add(M)}):p.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(k){i={error:k}}finally{try{m&&!m.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}try{for(var b=pe(h),x=b.next();!x.done;x=b.next())for(var g=x.value,L=g.parent;L&&!h.has(L);)h.add(L),L=L.parent}catch(k){l={error:k}}finally{try{x&&!x.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}return h}function df(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(Gi(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=df(o,e)}),i}function xs(t){var e,n,r=new Map;try{for(var i=pe(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 Ky(t,e){var n=Lr([t],e);return df(t,xs(n))}function Er(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Jy(t){return Ue([],be(new Set(ze(Ue([],be(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Ri(t,e){return e.type==="compound"?Vr(e).some(function(n){return n.type==="final"&&Er(t,n)}):e.type==="parallel"?Vr(e).every(function(n){return Ri(t,n)}):!1}function Xy(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Nl(t){return new Set(ze(t.map(function(e){return e.tags})))}function pf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Me(t)||Me(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return pf(t[i],e[i])})}function Yy(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function Qy(t,e){var n=t.exec,r=B(B({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var bt=function(){function t(e){var n=this,r;this.actions=[],this.activities=Rl,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||Rl,this.meta=Xy(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 Jy(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=zn;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=zn;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="."),Me(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ue([],be(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=Xs(e,["configuration","transitions","tags","machine"]);return B(B({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return ea(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;ky(!!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}(),e0={deferEvents:!1},jl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=B(B({},e0),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}(),Do=new Map,t0=0,pr={bookId:function(){return"x:".concat(t0++)},register:function(t,e){return Do.set(t,e),t},get:function(t){return Do.get(t)},free:function(t){Do.delete(t)}};function na(){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=na();if(t&&"__xstate__"in t)return t.__xstate__}function r0(t){if(na()){var e=n0();e&&e.register(t)}}function i0(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=qy({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var h=Pi(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 o0={sync:!1,autoForward:!1},Je;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Je||(Je={}));var s0=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=Je.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(tr(f))return r.batch(f),r.state;var h=et(po(f,d));if(r.status===Je.Stopped)return r.state;if(r.status!==Je.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.
126
- 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===qn.Parent||r.parent.id===d),y=v?r.parent:Me(d)?d===qn.Internal?r:r.children.get(d)||pr.get(d):Ty(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!==Je.Stopped||r.parent!==y||r.state.done){var g=B(B({},f),{name:f.name===yy?"".concat(Sr(r.id)):f.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,g]):y.send(g)}}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||Es(f.type,v),g=Ee(y)?y:y?y.exec:f.exec;if(g)try{return g(d,h.data,r.machine.config.predictableActionArguments?{action:f,_event:h}:{action:f,state:r.state,_event:h})}catch(D){throw r.parent&&r.parent.send({type:"xstate.error",data:D}),D}switch(f.type){case Wr:{var L=f;r.defer(L);break}case fo:var w=f;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,h===zn):r.send(w._event);break;case Xc:r.cancel(f.sendId);break;case ys:{if(r.status!==Je.Running)return;var S=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[S.id||S.type])break;if(S.type===De.Invoke){var m=af(S.src),_=r.machine.options.services?r.machine.options.services[m.type]:void 0,E=S.id,p=S.data,b="autoForward"in S?S.autoForward:!!S.forward;if(!_)return;var x=p?Hi(p,d,h):void 0;if(typeof _=="string")return;var k=Ee(_)?_(d,h.data,{data:x,src:m,meta:S.meta}):_;if(!k)return;var M=void 0;Kn(k)&&(k=x?k.withContext(x):k,M={autoForward:b}),r.spawn(k,E,M)}else r.spawnActivity(S);break}case Ys:{r.stopChild(f.activity.id);break}case Yc:var P=f,O=P.label,T=P.value;O?r.logger(O,T):r.logger(T);break}};var i=B(B({},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 jl({deferEvents:this.options.deferEvents}),this.sessionId=pr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Un(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=pe(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===zn)&&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(k){d.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=pe(this.eventListeners),y=v.next();!y.done;y=v.next()){var g=y.value;g(e.event)}}catch(k){r={error:k}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var L=pe(this.listeners),w=L.next();!w.done;w=L.next()){var g=w.value;g(e,e.event)}}catch(k){o={error:k}}finally{try{w&&!w.done&&(s=L.return)&&s.call(L)}finally{if(o)throw o.error}}try{for(var S=pe(this.contextListeners),m=S.next();!m.done;m=S.next()){var _=m.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){a={error:k}}finally{try{m&&!m.done&&(l=S.return)&&l.call(S)}finally{if(a)throw a.error}}if(this.state.done){var E=e.configuration.find(function(k){return k.type==="final"&&k.parent===d.machine}),p=E&&E.doneData?Hi(E.doneData,e.context,n):void 0;this._doneEvent=Ti(this.id,p);try{for(var b=pe(this.doneListeners),x=b.next();!x.done;x=b.next()){var g=x.value;g(this._doneEvent)}}catch(k){c={error:k}}finally{try{x&&!x.done&&(f=b.return)&&f.call(b)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),pr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Je.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Pi(e,n,r);this.listeners.add(o.next),this.status!==Je.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===Je.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===Je.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===Je.Running)return this;this.machine._init(),pr.register(this.sessionId,this),this.initialized=!0,this.status=Je.Running;var r=e===void 0?this.initialState:Un(this,function(){return Yy(e)?n.machine.resolveState(e):n.machine.resolveState(bt.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,zn)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Ee(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=pe(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(b){e={error:b}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var y=pe(this.stopListeners),g=y.next();!g.done;g=y.next()){var v=g.value;v(),this.stopListeners.delete(v)}}catch(b){r={error:b}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}try{for(var L=pe(this.contextListeners),w=L.next();!w.done;w=L.next()){var v=w.value;this.contextListeners.delete(v)}}catch(b){o={error:b}}finally{try{w&&!w.done&&(s=L.return)&&s.call(L)}finally{if(o)throw o.error}}try{for(var S=pe(this.doneListeners),m=S.next();!m.done;m=S.next()){var v=m.value;this.doneListeners.delete(v)}}catch(b){a={error:b}}finally{try{m&&!m.done&&(l=S.return)&&l.call(S)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Je.Stopped,this._initialState=void 0;try{for(var _=pe(Object.keys(this.delayedEventsMap)),E=_.next();!E.done;E=_.next()){var p=E.value;this.clock.clearTimeout(this.delayedEventsMap[p])}}catch(b){c={error:b}}finally{try{E&&!E.done&&(f=_.return)&&f.call(_)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new jl({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var i=et({type:"xstate.stop"}),o=Un(e,function(){var s=ze(Ue([],be(e.state.configuration),!1).sort(function(d,h){return h.order-d.order}).map(function(d){return on(d.onExit,e.machine.options.actions)})),a=be(Wi(e.machine,e.state,e.state.context,i,[{type:"exit",actions:s}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),l=a[0],c=a[1],f=new bt({value:e.state.value,context:c,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:l.filter(function(d){return!Ls(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return f.changed=!0,f});e.update(o,i),e._stopChildren(),pr.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Je.NotStarted&&this.options.deferEvents)){if(this.status!==Je.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=et(v);n.forward(y),s=Un(n,function(){return n.machine.transition(s,y,void 0,r||void 0)}),l.push.apply(l,Ue([],be(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(g){return Qy(g,s)})),!1)),a=a||!!s.changed};try{for(var f=pe(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,et(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=et(e);if(i.name.indexOf(Tl)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Tl)===0}))throw i.data.data;var o=Un(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=pe(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),Ee(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Je.Running)return uf(e,n);if(Dl(e))return this.spawnPromise(Promise.resolve(e),n);if(Ee(e))return this.spawnCallback(e,n);if(Zy(e))return this.spawnActor(e,n);if(Py(e))return this.spawnObservable(e,n);if(Kn(e))return this.spawnMachine(e,B(B({},r),{id:n}));if(_y(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,B(B({},this.options),{parent:this,id:n.id||e.id})),o=B(B({},o0),n);o.sync&&i.onTransition(function(a){r.send(Qc,{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(et(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=i0(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(et(Ti(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Sr(n,l);try{i.send(et(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=Pi(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[rn]=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(et(h,{origin:n}))},f;try{f=e(c,function(h){s.add(h)})}catch(h){this.send(Sr(n,h))}if(Dl(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=Pi(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Ee(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[rn]=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(et(l,{origin:n}))},function(l){i.removeChild(n),i.send(et(Sr(n,l),{origin:n}))},function(){i.removeChild(n),i.send(et(Ti(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[rn]=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[rn]=function(){return this},r))},t.prototype.attachDev=function(){var e=na();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(B(B({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:B({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}r0(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[rn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Je.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=hf,t}();function hf(t,e){var n=new s0(t,e);return n}function a0(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function si(t){return B(B({type:bs},t),{toJSON:function(){t.onDone,t.onError;var e=Xs(t,["onDone","onError"]);return B(B({},e),{type:bs,src:a0(t.src)})}})}var ai="",Cs="#",Io="*",Dn={},In=function(t){return t[0]===Cs},l0=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},u0=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(l0(),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:ef),this.id=this.config.id||Ue([this.machine.key],be(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?wr(this.config.states,function(c,f){var d,h=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,B((d={},d[h.id]=h,d),h.idMap)),h}):Dn;var a=0;function l(c){var f,d;c.order=a++;try{for(var h=pe(cf(c)),v=h.next();!v.done;v=h.next()){var y=v.value;l(y)}}catch(g){f={error:g}}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===ai}):ai in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Ct(this.config.entry||this.config.onEntry).map(function(c){return Ur(c)}),this.onExit=Ct(this.config.exit||this.config.onExit).map(function(c){return Ur(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Ct(this.config.invoke).map(function(c,f){var d,h;if(Kn(c)){var v=ii(o.id,f);return o.machine.options.services=B((d={},d[v]=c,d),o.machine.options.services),si({src:v,id:v})}else if(Me(c.src)){var v=c.id||ii(o.id,f);return si(B(B({},c),{id:v,src:c.src}))}else if(Kn(c.src)||Ee(c.src)){var v=c.id||ii(o.id,f);return o.machine.options.services=B((h={},h[v]=c.src,h),o.machine.options.services),si(B(B({id:v},c),{src:v}))}else{var y=c.src;return si(B(B({id:ii(o.id,f)},c),{src:y}))}}),this.activities=Ct(this.config.activities).concat(this.invoke).map(function(c){return ta(c)}),this.transition=this.transition.bind(this),this.tags=Ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||ff(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:B(B({},i),e.actions),activities:B(B({},o),e.activities),guards:B(B({},s),e.guards),services:B(B({},a),e.services),delays:B(B({},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 Ee(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:wr(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===ai,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===Io});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=Ee(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=$y(a,e.id);return e.onEntry.push(Iy(l,{delay:o})),e.onExit.push(By(l)),l},i=tr(n)?n.map(function(o,s){var a=r(o.delay,s);return B(B({},o),{event:a})}):ze(Object.keys(n).map(function(o,s){var a=n[o],l=Me(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Ct(l).map(function(d){return B(B({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return B(B({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof bt?e.value:Mr(e,this.delimiter);if(Me(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([],be(ze(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=tf(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof bt?e:bt.create(e),r=Array.from(Lr([],this.getStateNodes(n.value)));return new bt(B(B({},n),{value:this.resolve(n.value),configuration:r,done:Ri(r,this),tags:Nl(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=pe(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=ze(v.map(function(w){return w.transitions})),g=v.some(function(w){return w.transitions.length>0});if(!g)return this.next(n,r);var L=ze(Object.keys(s).map(function(w){return s[w].configuration}));return{transitions:y,exitSet:ze(v.map(function(w){return w.exitSet})),configuration:L,source:n,actions:ze(Object.keys(s).map(function(w){return s[w].actions}))}},t.prototype._transition=function(e,n,r){return Me(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,et(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=pe(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var h=d.value,v=h.cond,y=h.in,g=e.context,L=y?Me(y)&&In(y)?e.matches(Mr(this.getStateNodeById(y).path,this.delimiter)):ea(Mr(y,this.delimiter),Ey(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!v||sf(this.machine,v,g,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,`':
127
- `).concat(_.message))}if(w&&L){h.target!==void 0&&(l=h.target),a.push.apply(a,Ue([],be(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 S=ze(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),m=!!c.internal;return{transitions:[c],exitSet:m?[]:ze(l.map(function(_){return o.getPotentiallyReenteringNodes(_)})),configuration:S,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?Lr([],this.getStateNodes(s.value)):[],y=new Set;try{for(var g=pe(Array.from(e).sort(function(P,O){return P.order-O.order})),L=g.next();!L.done;L=g.next()){var w=L.value;(!Er(v,w)||Er(r.exitSet,w)||w.parent&&y.has(w.parent))&&y.add(w)}}catch(P){l={error:P}}finally{try{L&&!L.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}try{for(var S=pe(v),m=S.next();!m.done;m=S.next()){var w=m.value;(!Er(e,w)||Er(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(P){f={error:P}}finally{try{m&&!m.done&&(d=S.return)&&d.call(S)}finally{if(f)throw f.error}}r.exitSet.sort(function(P,O){return O.order-P.order});var _=Array.from(y).sort(function(P,O){return P.order-O.order}),E=new Set(r.exitSet),p=ze(_.map(function(P){var O=[];if(P.type!=="final")return O;var T=P.parent;if(!T.parent)return O;O.push(oi(P.id,P.doneData),oi(T.id,P.doneData?Hi(P.doneData,i,o):void 0));var D=T.parent;return D.type==="parallel"&&Vr(D).every(function(j){return Ri(r.configuration,j)})&&O.push(oi(D.id)),O})),b=_.map(function(P){var O=P.onEntry,T=P.activities.map(function(D){return Uy(D)});return{type:"entry",actions:on(a?Ue(Ue([],be(O),!1),be(T),!1):Ue(Ue([],be(T),!1),be(O),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:p.map(function(P){return Ay(P)})}),x=Array.from(E).map(function(P){return{type:"exit",actions:on(Ue(Ue([],be(P.onExit),!1),be(P.activities.map(function(O){return Vy(O)})),!1),h.machine.options.actions)}}),k=x.concat({type:"transition",actions:on(r.actions,this.machine.options.actions)}).concat(b);if(n){var M=on(ze(Ue([],be(e),!1).sort(function(P,O){return O.order-P.order}).map(function(P){return P.onExit})),this.machine.options.actions).filter(function(P){return!Ls(P)});return k.concat({type:"stop",actions:M})}return k},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=et(n),s;if(e instanceof bt)s=r===void 0?e:this.resolveState(bt.from(e,r));else{var a=Me(e)?this.resolve($i(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(bt.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!Cy(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=Lr([],this.getStateNodes(s.value)),d=c.configuration.length?Lr(f,c.configuration):f;return c.configuration=Ue([],be(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([],be(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=zn);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],y=Ri(v,this),g=h?Ky(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),S=n?B({},n.activities):{};try{for(var m=pe(w),_=m.next();!_.done;_=m.next()){var E=_.value;try{for(var p=(l=void 0,pe(E.actions)),b=p.next();!b.done;b=p.next()){var x=b.value;x.type===ys?S[x.activity.id||x.activity.type]=x:x.type===Ys&&(S[x.activity.id||x.activity.type]=!1)}}catch(X){l={error:X}}finally{try{b&&!b.done&&(c=p.return)&&c.call(p)}finally{if(l)throw l.error}}}}catch(X){s={error:X}}finally{try{_&&!_.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}var k=be(Wi(this,n,r,o,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=k[0],P=k[1],O=be(My(M,Ls),2),T=O[0],D=O[1],j=M.filter(function(X){var J;return X.type===ys&&((J=X.activity)===null||J===void 0?void 0:J.type)===bs}),U=j.reduce(function(X,J){return X[J.activity.id]=Wy(J.activity,f.machine,P,o),X},n?B({},n.children):{}),N=new bt({value:g||n.value,context:P,_event:o,_sessionid:n?n._sessionid:null,historyValue:g?L?Oy(L,g):void 0:n?n.historyValue:void 0,history:!g||e.source?n:void 0,actions:g?D:[],activities:g?S:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:U,done:y,tags:Nl(v),machine:this}),V=r!==P;N.changed=o.name===Qc||V;var q=N.history;q&&delete q.history;var $=!y&&(this._transient||d.some(function(X){return X._transient}));if(!h&&(!$||o.name===ai))return N;var F=N;if(!y)for($&&(F=this.resolveRaisedTransition(F,{type:vy},o,i));T.length;){var Z=T.shift();F=this.resolveRaisedTransition(F,Z._event,o,i)}var te=F.changed||(q?!!F.actions.length||V||typeof q.value!=typeof F.value||!pf(F.value,q.value):void 0);return F.changed=te,F.history=q,F},t.prototype.getStateNode=function(e){if(In(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=In(e)?e.slice(Cs.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"&&In(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Ss(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||Dn;switch(this.type){case"parallel":return wr(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):Dn});case"compound":if(Me(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?wr(e,function(o,s){return o?r.getStateNode(s).resolve(o):Dn}):this.initialStateValue||{};default:return e||Dn}},t.prototype.getResolvedPath=function(e){if(In(e)){var n=this.machine.idMap[e.slice(Cs.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Ss(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=Al(this.states,function(r){return r.initialStateValue||Dn},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=Gi(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;Me(n.target)?e=In(n.target)?$i(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(Gi(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=ki(this.initialStateValue);return ze(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=be(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:Al(this.states,function(n,r){if(!e)return n.historyValue();var i=Me(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?ze(ki(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=xy(r.path,"states")(e).current;return Me(o)?[r.getStateNode(o)]:ze(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=ze(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=pe(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,pe(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(!Me(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,`':
128
- `).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Ry(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Me(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=B(B({},e),{actions:on(Ct(e.actions)),cond:of(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return B(B({},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=Io,a=o[s],l=a===void 0?[]:a,c=Xs(o,[typeof s=="symbol"?s:s+""]);i=ze(Object.keys(c).map(function(S){var m=An(S,c[S]);return m}).concat(An(Io,l)))}var f=this.config.always?An("",this.config.always):[],d=this.config.onDone?An(String(oi(this.id)),this.config.onDone):[],h=ze(this.invoke.map(function(S){var m=[];return S.onDone&&m.push.apply(m,Ue([],be(An(String(Ti(S.id)),S.onDone)),!1)),S.onError&&m.push.apply(m,Ue([],be(An(String(Sr(S.id)),S.onError)),!1)),m})),v=this.after,y=ze(Ue(Ue(Ue(Ue([],be(d),!1),be(h),!1),be(i),!1),be(f),!1).map(function(S){return Ct(S).map(function(m){return r.formatTransition(m)})}));try{for(var g=pe(v),L=g.next();!L.done;L=g.next()){var w=L.value;y.push(w)}}catch(S){e={error:S}}finally{try{L&&!L.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return y},t}();function c0(t,e,n){return n===void 0&&(n=t.context),new u0(t,e,n)}var f0=zy,_s;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(_s||(_s={}));var Or=u.useLayoutEffect;function Bl(t){var e=oe.useRef();return e.current||(e.current={v:t()}),e.current.v}var d0=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},p0=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 h0(t,e){var n,r,i=d0([[],[]],2),o=i[0],s=i[1];try{for(var a=p0(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 hr=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},Ul=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 Vl(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function g0(t){var e=u.useRef([]),n=u.useRef([]);Or(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=hr(h0(a,function(d){return d.exec.__effect===_s.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,Ul([],hr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,Ul([],hr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),Or(function(){for(;n.current.length;){var r=hr(n.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=hr(e.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}})}var kr=function(){return kr=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},kr.apply(this,arguments)},v0=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 m0(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function y0(t,e,n){e===void 0&&(e={});var r=Bl(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=v0(e,["context","guards","actions","activities","services","delays","state"]),h=Bl(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},y=r.withConfig(v,function(){return kr(kr({},r.context),i)});return hf(y,kr({deferEvents:!0},d))});return Or(function(){var v;return n&&(v=h.subscribe(m0(n))),function(){v==null||v.unsubscribe()}},[n]),Or(function(){return h.start(f?bt.create(f):void 0),function(){h.stop()}},[]),Or(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]),g0(h),h}var b0=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 w0(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=y0(t,e,n),i=b0(u.useState(function(){var a=r.machine.initialState;return e.state?bt.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function $e(){return $e=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},$e.apply(this,arguments)}function $n(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 ue={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(ue.str(t)||ue.num(t))return t===e;if(ue.obj(t)&&ue.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 ue.und(n)?t===e:!0}};function S0(t,e){return e===void 0&&(e=!0),n=>(ue.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 L0(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function yn(t,e){return ue.und(t)||ue.nul(t)?e:t}function li(t){return ue.und(t)?[]:ue.arr(t)?t:[t]}function Fn(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 ue.fun(t)?t(...n):t}function E0(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,$n(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function No(t){const e=E0(t);if(ue.und(e))return $e({to:e},t);const n=Object.keys(t).reduce((r,i)=>ue.und(e[i])?$e({},r,{[i]:t[i]}):r,{});return $e({to:e},n)}function x0(t,e){return e&&(ue.fun(e)?e(t):ue.obj(e)&&(e.current=t)),t}class _t{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 Ms extends _t{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof _t&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof _t&&e.removeChild(this))}}class gf extends _t{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof _t&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof _t&&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 _t)||(n[r]=i instanceof _t?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let ra;function C0(t,e){ra={fn:t,transform:e}}let vf;function _0(t){vf=t}let mf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Zi;function M0(t){Zi=t}let yf=()=>Date.now(),O0=t=>t.current,bf;function k0(t){bf=t}class P0 extends gf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?$e({},e,{style:bf(e.style)}):e,this.update=n,this.attach()}}const T0=t=>ue.fun(t)&&!(t.prototype instanceof u.Component),R0=t=>u.forwardRef((n,r)=>{const i=L0(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(h=>{const v=s.current,y=()=>{let g=!1;a.current&&(g=ra.fn(a.current,s.current.getAnimatedValue())),(!a.current||g===!1)&&i()};s.current=new P0(h,y),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>O0(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=$n(c,["scrollTop","scrollLeft"]),d=T0(t)?void 0:h=>a.current=x0(h,r);return u.createElement(t,$e({},f,{ref:d}))});let Pr=!1;const Cn=new Set,wf=()=>{if(!Pr)return!1;let t=yf();for(let e of Cn){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 _t,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 S=0;S<y;++S){let m=-i.tension*(d-f),_=-i.friction*v,E=(m+_)/i.mass;v=v+E*1/1e3,d=d+v*1/1e3}let g=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=g||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||(Cn.delete(e),e.stop(!0))}return Cn.size?mf(wf):Pr=!1,Pr},A0=t=>{Cn.has(t)||Cn.add(t),Pr||(Pr=!0,mf(wf))},D0=t=>{Cn.has(t)&&Cn.delete(t)};function qi(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return qi({range:t,output:e,extrapolate:n});if(Zi&&typeof t.output[0]=="string")return Zi(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=N0(c,o);return I0(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function I0(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 N0(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Jn extends Ms{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Ms&&!(e instanceof Jn)?e.getPayload():Array.isArray(e)?e:[e],this.calc=qi(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=qi(e,n,r)}interpolate(e,n,r){return new Jn(this,e,n,r)}}const Nn=(t,e,n)=>t&&new Jn(t,e,n),j0={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 Sf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Sf(n,e))}class Os extends _t{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&&Sf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Jn(this,e,n,r)}}class B0 extends Ms{constructor(e){super(),this.payload=e.map(n=>new Os(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 Jn(this,e,n)}}let U0=0,V0=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=U0++}update(e){if(!e)return this;const n=No(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=$n(n,["delay","to"]);if(ue.arr(o)||ue.fun(o))this.queue.push($e({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=$e({to:{[c]:f},delay:Fn(i,c)},s),h=a[d.delay]&&a[d.delay].to;a[d.delay]=$e({},a[d.delay],d,{to:$e({},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;ue.obj(s)&&(this.merged=$e({},s,this.merged)),ue.obj(l)&&(this.merged=$e({},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=$n(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=ue.arr(a.to)||ue.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 ue.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),A0(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&D0(this),this}runAsync(e,n){var r=this;e.delay;let i=$n(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(ue.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=$e({},i,No(i.to[l]));ue.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(ue.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=$e({},i,No(c));if(ue.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=$e({},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=$e({},i,this.merged,s),this.hasChanged=!1;let y=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((g,L)=>{let w=L[0],S=L[1],m=g[w]||{};const _=ue.num(S),E=ue.str(S)&&!S.startsWith("#")&&!/\d/.test(S)&&!vf[S],p=ue.arr(S),b=!_&&!p&&!E;let x=ue.und(i[w])?S:i[w],k=_||p||E?S:1,M=Fn(l,w);y&&(k=y.animations[w].parent);let P=m.parent,O=m.interpolation,T=li(y?k.getPayload():k),D,j=S;b&&(j=Zi({range:[0,1],output:[S,S]})(1));let U=O&&O.getValue();const V=!ue.und(P)&&m.animatedValues.some(Z=>!Z.done),q=!ue.equ(j,U),$=!ue.equ(j,m.previous),F=!ue.equ(M,m.config);if(d||$&&q||F){if(_||E)P=O=m.parent||new Os(x);else if(p)P=O=m.parent||new B0(x);else if(b){let Z=m.interpolation&&m.interpolation.calc(m.parent.value);Z=Z!==void 0&&!d?Z:x,m.parent?(P=m.parent,P.setValue(0,!1)):P=new Os(0);const te={output:[Z,S]};m.interpolation?(O=m.interpolation,m.interpolation.updateConfig(te)):O=P.interpolate(te)}return T=li(y?k.getPayload():k),D=li(P.getPayload()),d&&!b&&P.setValue(x,!1),this.hasChanged=!0,D.forEach(Z=>{Z.startPosition=Z.value,Z.lastPosition=Z.value,Z.lastVelocity=V?Z.lastVelocity:void 0,Z.lastTime=V?Z.lastTime:void 0,Z.startTime=yf(),Z.done=!1,Z.animatedStyles.clear()}),Fn(h,w)&&P.setValue(b?k:S,!1),$e({},g,{[w]:$e({},m,{name:w,parent:P,interpolation:O,animatedValues:D,toValues:T,previous:j,config:M,fromValues:li(P.getValue()),immediate:Fn(h,w),initialVelocity:yn(M.velocity,0),clamp:yn(M.clamp,!1),precision:yn(M.precision,.01),tension:yn(M.tension,170),friction:yn(M.friction,26),mass:yn(M.mass,1),duration:M.duration,easing:yn(M.easing,Z=>Z),decay:M.decay})})}else return q?g:(b&&(P.setValue(1,!1),O.updateConfig({output:[j,j]})),P.done=!0,this.hasChanged=!0,$e({},g,{[w]:$e({},g[w],{previous:j})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let g in this.animations)this.interpolations[g]=this.animations[g].interpolation,this.values[g]=this.animations[g].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const F0=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=ue.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 V0,y=i?Fn(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?Fn(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},z0=t=>{const e=ue.fun(t),n=F0(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class $0 extends gf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof _t)&&(e=ra.transform(e)),this.payload=e}}const Ki={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},Mt="[-+]?\\d*\\.?\\d+",Ji=Mt+"%";function ho(){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 H0=new RegExp("rgb"+ho(Mt,Mt,Mt)),W0=new RegExp("rgba"+ho(Mt,Mt,Mt,Mt)),G0=new RegExp("hsl"+ho(Mt,Ji,Ji)),Z0=new RegExp("hsla"+ho(Mt,Ji,Ji,Mt)),q0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,K0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,J0=/^#([0-9a-fA-F]{6})$/,X0=/^#([0-9a-fA-F]{8})$/;function Y0(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=J0.exec(t))?parseInt(e[1]+"ff",16)>>>0:Ki.hasOwnProperty(t)?Ki[t]:(e=H0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|255)>>>0:(e=W0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|$l(e[4]))>>>0:(e=q0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=X0.exec(t))?parseInt(e[1],16)>>>0:(e=K0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=G0.exec(t))?(Fl(zl(e[1]),ui(e[2]),ui(e[3]))|255)>>>0:(e=Z0.exec(t))?(Fl(zl(e[1]),ui(e[2]),ui(e[3]))|$l(e[4]))>>>0:null}function jo(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 Fl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=jo(i,r,t+1/3),s=jo(i,r,t),a=jo(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function jn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function zl(t){return(parseFloat(t)%360+360)%360/360}function $l(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function ui(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Hl(t){let e=Y0(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 ci=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Q0=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,eb=new RegExp(`(${Object.keys(Ki).join("|")})`,"g"),tb=t=>{const e=t.output.map(i=>i.replace(Q0,Hl)).map(i=>i.replace(eb,Hl)),n=e[0].match(ci).map(()=>[]);e.forEach(i=>{i.match(ci).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(ci).map((i,o)=>qi($e({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(ci,()=>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 Tr={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),rb=["Webkit","Ms","Moz","O"];Tr=Object.keys(Tr).reduce((t,e)=>(rb.forEach(n=>t[nb(n,e)]=t[e]),t),Tr);function ib(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Tr.hasOwnProperty(t)&&Tr[t])?e+"px":(""+e).trim()}const Wl={};k0(t=>new $0(t));M0(tb);_0(Ki);C0((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=$n(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=ib(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:Wl[f]||(Wl[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 ob=["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"],sb=S0(R0,!1),ab=sb(ob);function Gl(t,e){return t.map(function(n,r){return n+e[r]})}function Lf(t,e){return t.map(function(n,r){return n-e[r]})}function ks(t){return Math.hypot.apply(Math,t)}function lb(t,e,n){var r=ks(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=ks(t);return{velocities:a,velocity:s,distance:c,direction:l}}function Ps(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function ub(t,e,n){return Math.max(e,Math.min(t,n))}function cb(t,e){return Math.pow(t,e*5)}function Zl(t,e,n){return e===0||Math.abs(e)===1/0?cb(t,n):t*e*n/(e+n*t)}function Rr(t,e,n,r){return r===void 0&&(r=.15),r===0?ub(t,e,n):t<e?-Zl(e-t,n-e,r)+e:t>n?+Zl(t-n,n-e,r)+n:t}function ql(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 fb(t,e,n){return e&&ql(t.prototype,e),n&&ql(t,n),t}function lt(){return lt=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},lt.apply(this,arguments)}function Ef(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function db(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 fi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pb(t,e){if(t){if(typeof t=="string")return Kl(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 Kl(t,e)}}function Kl(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 go(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=pb(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.
129
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function xf(){}function Cf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?xf:e.length===1?e[0]:function(){for(var r,i=go(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function sn(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 di(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 ia(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]=ia(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var hb=180,gb=.15,vb=.5,mb=60,yb={threshold:function(e){return e===void 0&&(e=0),sn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return sn(gb);case!1:return sn(0);default:return sn(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:sn(e)}},_f=lt({},yb,{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 _f.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]]}}),bb=typeof window<"u"&&window.document&&window.document.createElement,wb={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=bb?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}}},Sb=lt({},_f,{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=sn(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=vb),sn(e)},swipeDistance:function(e){return e===void 0&&(e=mb),sn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return hb;case!1:return 0;default:return e}}});function Lb(t){return t===void 0&&(t={}),ia(t,wb)}function Eb(t){return t===void 0&&(t={}),ia(t,Sb)}function xb(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=db(t,["domTarget","eventOptions","window","enabled"]),s=Lb({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=Eb(o),s}function gr(t){return lt({_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:xf,canceled:!1,memo:void 0,args:void 0},t)}function Mf(){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=gr({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=gr({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=gr({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 wn=new Map,Cb=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=lt({},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,g=c.movement,L=this.getInternalMovement(r,this.state),w=v[0]===!1?Jl(L[0],l[0]):v[0],S=v[1]===!1?Jl(L[1],l[1]):v[1],m=this.checkIntentionality([w,S],L);if(m._blocked)return lt({},m,{_movement:L,delta:[0,0]});var _=m._intentional,E=L,p,b;if(_[0]!==!1&&v[0]===!1&&(b=di(o,this.state),p=di(s,this.state),d[0]=b[0],f[0]=p[0]),_[1]!==!1&&v[1]===!1){var x,k;b=(x=b)!=null?x:di(o,this.state),p=(k=p)!=null?k:di(s,this.state),d[1]=b[1],f[1]=p[1]}var M=[_[0]!==!1?L[0]-_[0]:d[0],_[1]!==!1?L[1]-_[1]:d[1]],P=Gl(M,y),O=h?a:[0,0];return M=Xl(f,Gl(M,d),O),lt({},m,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:E,movement:M,values:r,offset:Xl(f,P,O),delta:Lf(M,g)})},e.clean=function(){this.clearTimeout()},fb(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 Jl(t,e){return Math.abs(t)>=e?Ps(t)*e:!1}function Xl(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[Rr(r,l,c,o),Rr(i,d,h,s)]}function Bo(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 _b(t,e,n){var r=t.state.offset,i=n.timeStamp;return lt({},Mf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function Mb(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,lt({},e,{event:n})].concat(i))}}var Ob=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=go(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];Ts(r,v,Mb(y,lt({},n.state.shared,{args:o})))}return n.config.domTarget?Rb(n,r):Ab(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=kf(n.config),i=n.config.eventOptions;r&&Gr(r,Of(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),kb(n)},this.state=Mf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function kb(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];Gr(n,s,r)}t.windowListeners={}}}function Pb(t,e){var n=t.config,r=t.windowListeners;n.window&&(Gr(n.window,r[e],n.eventOptions),delete r[e])}function Tb(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Gr(r.window,i[e],r.eventOptions),Pf(r.window,i[e]=n,r.eventOptions))}function Rb(t,e){var n=t.config,r=t.domListeners,i=kf(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;Gr(i,Of(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,Cf.apply(void 0,f)])}Pf(i,r,o)}function Ab(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]=Cf.apply(void 0,f)}return r}function Of(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function kf(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Ts(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function Pf(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=go(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function Gr(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=go(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Db(t,e,n){n===void 0&&(n={});var r=Nb(t),i=u.useMemo(function(){return new Ob(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?Ib:i.bind}function Ib(){}function Nb(t){var e=new Set;return t.drag&&e.add(wn.get("drag")),t.wheel&&e.add(wn.get("wheel")),t.scroll&&e.add(wn.get("scroll")),t.move&&e.add(wn.get("move")),t.pinch&&e.add(wn.get("pinch")),t.hover&&e.add(wn.get("hover")),e}var jb=function(t){Ef(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return Lf(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,lb(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(Cb);function Tf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Yl(t){var e="buttons"in t?t.buttons:0,n=Tf(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 Ql(t){var e=Tf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var Bb=3,Ub=220,Vb=function(t){Ef(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||(Tb(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(fi(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=Yl(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Ql(i),a=r.getKinematics(s,i),l=Bo(fi(r),i),c=r.state._isTap,f=ks(a._movement);c&&f>=Bb&&(c=!1),r.updateGestureState(lt({},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],g=r.config.swipeVelocity,L=g[0],w=g[1],S=r.config.swipeDistance,m=S[0],_=S[1],E=lt({},Bo(fi(r),i),r.getMovement(r.state.values)),p=[0,0];E.elapsedTime<Ub&&(v!==!1&&Math.abs(a)>L&&Math.abs(f)>m&&(p[0]=Ps(a)),y!==!1&&Math.abs(l)>w&&Math.abs(d)>_&&(p[1]=Ps(l))),r.updateGestureState(lt({},E,{tap:o,swipe:p})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(fi(r)),r.state._delayedEvent=!1,Pb(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=Ql(i);this.updateSharedState(Yl(i)),this.updateGestureState(lt({},_b(this,o,i),Bo(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Ts(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ts(i,o,this.onClick)}},e}(jb);function Fb(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 Ai(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(!Ai(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(!Ai(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)&&!Ai(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function zb(t,e){try{return Ai(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 $b(t,e){e===void 0&&(e={}),wn.set("drag",Vb);var n=u.useRef();return n.current||(n.current=Fb(xb,zb)),Db({drag:t},n.current(e))}/*!
142
+ ***************************************************************************** */var B=function(){return B=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},B.apply(this,arguments)};function Xs(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 pe(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 be(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 Ve(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 qn;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(qn||(qn={}));var ys=De.Start,Ys=De.Stop,Gr=De.Raise,fo=De.Send,Xc=De.Cancel,my=De.NullEvent,Qs=De.Assign;De.After;De.DoneState;var Yc=De.Log,yy=De.Init,bs=De.Invoke;De.ErrorExecution;var Tl=De.ErrorPlatform,by=De.ErrorCustom,Qc=De.Update,wy=De.Choose,Sy=De.Pure,ef=".",Rl={},ws="xstate.guard",Ly="",ii;function ea(t,e,n){n===void 0&&(n=ef);var r=Mr(t,n),i=Mr(e,n);return Me(i)?Me(r)?i===r:!1:Me(r)?r in i:Object.keys(r).every(function(o){return o in i?ea(r[o],i[o]):!1})}function tf(t){try{return Me(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 Ss(t,e){try{return tr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function Ey(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Mr(t,e){if(Ey(t))return t.value;if(tr(t))return Hi(t);if(typeof t!="string")return t;var n=Ss(t,e);return Hi(n)}function Hi(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 wr(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 Al(t,e,n){var r,i,o={};try{for(var s=pe(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 xy=function(t){return function(e){var n,r,i=e;try{for(var o=pe(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 Cy(t,e){return function(n){var r,i,o=n;try{for(var s=pe(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(Me(t))return[[t]];var e=ze(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 ze(t){var e;return(e=[]).concat.apply(e,Ve([],be(t),!1))}function nf(t){return tr(t)?t:[t]}function Ct(t){return t===void 0?[]:nf(t)}function Wi(t,e,n){var r,i;if(Ee(t))return t(e,n.data);var o={};try{for(var s=pe(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];Ee(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 _y(t){return/^(done|error)\./.test(t)}function Dl(t){return!!(t instanceof Promise||t!==null&&(Ee(t)||typeof t=="object")&&Ee(t.then))}function My(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function Oy(t,e){var n,r,i=be([[],[]],2),o=i[0],s=i[1];try{for(var a=pe(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 rf(t,e){return wr(t.states,function(n,r){if(n){var i=(Me(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:rf(n,i)}}})}function Py(t,e){return{current:e,states:rf(t,e)}}function Il(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(Ee(c))d=c(o,e.data,f);else try{for(var h=pe(Object.keys(c)),v=h.next();!v.done;v=h.next()){var y=v.value,g=c[y];d[y]=Ee(g)?g(o,e.data,f):g}}catch(S){a={error:S}}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 ky=function(){};function tr(t){return Array.isArray(t)}function Ee(t){return typeof t=="function"}function Me(t){return typeof t=="string"}function of(t,e){if(t)return Me(t)?{type:ws,name:t,predicate:e?e[t]:void 0}:Ee(t)?{type:ws,name:t.name,predicate:t}:t}function Ty(t){try{return"subscribe"in t&&Ee(t.subscribe)}catch{return!1}}var rn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ii={},ii[rn]=function(){return this},ii[Symbol.observable]=function(){return this};function Kn(t){return!!t&&"__xstatenode"in t}function Ry(t){return!!t&&typeof t.send=="function"}function po(t,e){return Me(t)||typeof t=="number"?B({type:t},e):t}function et(t,e){if(!Me(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=po(t);return B({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function An(t,e){var n=nf(e).map(function(r){return typeof r>"u"||typeof r=="string"||Kn(r)?{target:r,event:t}:B(B({},r),{event:t})});return n}function Ay(t){if(!(t===void 0||t===Ly))return Ct(t)}function sf(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===ws)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 af(t){return typeof t=="string"?{type:t}:t}function Ti(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 oi(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Ls(t){return(t.type===Gr||t.type===fo&&t.to===qn.Internal)&&typeof t.delay!="number"}var zn=et({type:yy});function Es(t,e){return e&&e[t]||void 0}function Vr(t,e){var n;if(Me(t)||typeof t=="number"){var r=Es(t,e);Ee(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Ee(t))n={type:t.name||t.toString(),exec:t};else{var r=Es(t.type,e);if(Ee(r))n=B(B({},t),{exec:r});else if(r){var i=r.type||t.type;n=B(B(B({},r),t),{type:i})}else n=t}return n}var on=function(t,e){if(!t)return[];var n=tr(t)?t:[t];return n.map(function(r){return Vr(r,e)})};function ta(t){var e=Vr(t);return B(B({id:Me(t)?t:e.id},e),{type:e.type})}function Dy(t,e){return{type:Gr,event:typeof t=="function"?t:po(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Iy(t,e,n,r){var i={_event:n},o=et(Ee(t.event)?t.event(e,n.data,i):t.event),s;if(Me(t.delay)){var a=r&&r[t.delay];s=Ee(a)?a(e,n.data,i):a}else s=Ee(t.delay)?t.delay(e,n.data,i):t.delay;return B(B({},t),{type:Gr,_event:o,delay:s})}function Ny(t,e){return{to:e?e.to:void 0,type:fo,event:Ee(t)?t:po(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Ee(t)?t.name:tf(t)}}function jy(t,e,n,r){var i={_event:n},o=et(Ee(t.event)?t.event(e,n.data,i):t.event),s;if(Me(t.delay)){var a=r&&r[t.delay];s=Ee(a)?a(e,n.data,i):a}else s=Ee(t.delay)?t.delay(e,n.data,i):t.delay;var l=Ee(t.to)?t.to(e,n.data,i):t.to;return B(B({},t),{to:l,_event:o,event:o.data,delay:s})}var By=function(t,e,n){return B(B({},t),{value:Me(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},Vy=function(t){return{type:Xc,sendId:t}};function Uy(t){var e=ta(t);return{type:De.Start,activity:e,exec:void 0}}function Fy(t){var e=Ee(t)?t:ta(t);return{type:De.Stop,activity:e,exec:void 0}}function zy(t,e,n){var r=Ee(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 $y=function(t){return{type:Qs,assignment:t}};function Hy(t,e){var n=e?"#".concat(e):"";return"".concat(De.After,"(").concat(t,")").concat(n)}function si(t,e){var n="".concat(De.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ri(t,e){var n="".concat(De.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Sr(t,e){var n="".concat(De.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var Wy=function(t){var e,n,r=[];try{for(var i=pe(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===Qs){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 Gi(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:Wy(i),l=a.length?Il(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(y,g){var S;switch(g.type){case Gr:{var w=Iy(g,l,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,l,r),w}case fo:var L=jy(g,l,r,t.options.delays);return o&&L.to!==qn.Internal&&(y==="entry"?f.push(L):o(L,l,r)),L;case Yc:{var m=By(g,l,r);return o==null||o(m,l,r),m}case wy:{var _=g,E=(S=_.conds.find(function(V){var N=of(V.cond,t.options.guards);return!N||sf(t,N,l,r,o?void 0:e)}))===null||S===void 0?void 0:S.actions;if(!E)return[];var p=be(Gi(t,e,l,r,[{type:y,actions:on(Ct(E),t.options.actions)}],o,s),2),b=p[0],x=p[1];return l=x,c==null||c.push(l),b}case Sy:{var E=g.get(l,r.data);if(!E)return[];var P=be(Gi(t,e,l,r,[{type:y,actions:on(Ct(E),t.options.actions)}],o,s),2),M=P[0],k=P[1];return l=k,c==null||c.push(l),M}case Ys:{var m=zy(g,l,r);return o==null||o(m,n,r),m}case Qs:{l=Il(l,r,[g],o?void 0:e),c==null||c.push(l);break}default:var O=Vr(g,t.options.actions),T=O.exec;if(o)o(O,l,r);else if(T&&c){var D=c.length-1,j=B(B({},O),{exec:function(V){for(var N=[],U=1;U<arguments.length;U++)N[U-1]=arguments[U];T.apply(void 0,Ve([c[D]],be(N),!1))}});O=j}return O}}function h(y){var g,S,w=[];try{for(var L=pe(y.actions),m=L.next();!m.done;m=L.next()){var _=m.value,E=d(y.type,_);E&&(w=w.concat(E))}}catch(p){g={error:p}}finally{try{m&&!m.done&&(S=L.return)&&S.call(L)}finally{if(g)throw g.error}}return f.forEach(function(p){o(p,l,r)}),f.length=0,w}var v=ze(i.map(h));return[v,l]}var Vn=function(t,e){var n=e(t);return n};function lf(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[rn]=function(){return this},e}function Gy(t,e,n,r){var i,o=af(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?Wi(t.data,n,r):void 0,l=s?uf(s,t.id,a):lf(t.id);return l.meta=t,l}function uf(t,e,n){var r=lf(e);if(r.deferred=!0,Kn(t)){var i=r.state=Vn(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Zy(t){try{return typeof t.send=="function"}catch{return!1}}function qy(t){return Zy(t)&&"id"in t}function Ky(t){var e;return B((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[rn]=function(){return this},e),t)}var Zi=function(t){return t.type==="atomic"||t.type==="final"};function cf(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Ur(t){return cf(t).filter(function(e){return e.type!=="history"})}function ff(t){var e=[t];return Zi(t)?e:e.concat(ze(Ur(t).map(ff)))}function Lr(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=xs(f),h=new Set(e);try{for(var v=pe(h),y=v.next();!y.done;y=v.next())for(var g=y.value,S=g.parent;S&&!h.has(S);)h.add(S),S=S.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=xs(h);try{for(var L=pe(h),m=L.next();!m.done;m=L.next()){var g=m.value;if(g.type==="compound"&&(!w.get(g)||!w.get(g).length))d.get(g)?d.get(g).forEach(function(M){return h.add(M)}):g.initialStateNodes.forEach(function(M){return h.add(M)});else if(g.type==="parallel")try{for(var _=(s=void 0,pe(Ur(g))),E=_.next();!E.done;E=_.next()){var p=E.value;h.has(p)||(h.add(p),d.get(p)?d.get(p).forEach(function(M){return h.add(M)}):p.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{m&&!m.done&&(o=L.return)&&o.call(L)}finally{if(i)throw i.error}}try{for(var b=pe(h),x=b.next();!x.done;x=b.next())for(var g=x.value,S=g.parent;S&&!h.has(S);)h.add(S),S=S.parent}catch(P){l={error:P}}finally{try{x&&!x.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}return h}function df(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(Zi(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=df(o,e)}),i}function xs(t){var e,n,r=new Map;try{for(var i=pe(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 Jy(t,e){var n=Lr([t],e);return df(t,xs(n))}function Er(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Xy(t){return Ve([],be(new Set(ze(Ve([],be(t.map(function(e){return e.ownEvents})),!1)))),!1)}function Ai(t,e){return e.type==="compound"?Ur(e).some(function(n){return n.type==="final"&&Er(t,n)}):e.type==="parallel"?Ur(e).every(function(n){return Ai(t,n)}):!1}function Yy(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Nl(t){return new Set(ze(t.map(function(e){return e.tags})))}function pf(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Me(t)||Me(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return pf(t[i],e[i])})}function Qy(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function e0(t,e){var n=t.exec,r=B(B({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var bt=function(){function t(e){var n=this,r;this.actions=[],this.activities=Rl,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||Rl,this.meta=Yy(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 Xy(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=zn;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=zn;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="."),Me(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ve([],be(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=Xs(e,["configuration","transitions","tags","machine"]);return B(B({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return ea(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;ky(!!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}(),t0={deferEvents:!1},jl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=B(B({},t0),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}(),Do=new Map,n0=0,pr={bookId:function(){return"x:".concat(n0++)},register:function(t,e){return Do.set(t,e),t},get:function(t){return Do.get(t)},free:function(t){Do.delete(t)}};function na(){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 r0(){var t=na();if(t&&"__xstate__"in t)return t.__xstate__}function i0(t){if(na()){var e=r0();e&&e.register(t)}}function o0(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=Ky({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var h=Ti(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 s0={sync:!1,autoForward:!1},Je;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Je||(Je={}));var a0=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=Je.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(tr(f))return r.batch(f),r.state;var h=et(po(f,d));if(r.status===Je.Stopped)return r.state;if(r.status!==Je.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.
143
+ 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===qn.Parent||r.parent.id===d),y=v?r.parent:Me(d)?d===qn.Internal?r:r.children.get(d)||pr.get(d):Ry(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!==Je.Stopped||r.parent!==y||r.state.done){var g=B(B({},f),{name:f.name===by?"".concat(Sr(r.id)):f.name,origin:r.sessionId});!h&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([y,g]):y.send(g)}}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||Es(f.type,v),g=Ee(y)?y:y?y.exec:f.exec;if(g)try{return g(d,h.data,r.machine.config.predictableActionArguments?{action:f,_event:h}:{action:f,state:r.state,_event:h})}catch(D){throw r.parent&&r.parent.send({type:"xstate.error",data:D}),D}switch(f.type){case Gr:{var S=f;r.defer(S);break}case fo:var w=f;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,h===zn):r.send(w._event);break;case Xc:r.cancel(f.sendId);break;case ys:{if(r.status!==Je.Running)return;var L=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[L.id||L.type])break;if(L.type===De.Invoke){var m=af(L.src),_=r.machine.options.services?r.machine.options.services[m.type]:void 0,E=L.id,p=L.data,b="autoForward"in L?L.autoForward:!!L.forward;if(!_)return;var x=p?Wi(p,d,h):void 0;if(typeof _=="string")return;var P=Ee(_)?_(d,h.data,{data:x,src:m,meta:L.meta}):_;if(!P)return;var M=void 0;Kn(P)&&(P=x?P.withContext(x):P,M={autoForward:b}),r.spawn(P,E,M)}else r.spawnActivity(L);break}case Ys:{r.stopChild(f.activity.id);break}case Yc:var k=f,O=k.label,T=k.value;O?r.logger(O,T):r.logger(T);break}};var i=B(B({},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 jl({deferEvents:this.options.deferEvents}),this.sessionId=pr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Vn(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=pe(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===zn)&&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=pe(this.eventListeners),y=v.next();!y.done;y=v.next()){var g=y.value;g(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 S=pe(this.listeners),w=S.next();!w.done;w=S.next()){var g=w.value;g(e,e.event)}}catch(P){o={error:P}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var L=pe(this.contextListeners),m=L.next();!m.done;m=L.next()){var _=m.value;_(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){a={error:P}}finally{try{m&&!m.done&&(l=L.return)&&l.call(L)}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}),p=E&&E.doneData?Wi(E.doneData,e.context,n):void 0;this._doneEvent=Ri(this.id,p);try{for(var b=pe(this.doneListeners),x=b.next();!x.done;x=b.next()){var g=x.value;g(this._doneEvent)}}catch(P){c={error:P}}finally{try{x&&!x.done&&(f=b.return)&&f.call(b)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),pr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Je.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Ti(e,n,r);this.listeners.add(o.next),this.status!==Je.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===Je.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===Je.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===Je.Running)return this;this.machine._init(),pr.register(this.sessionId,this),this.initialized=!0,this.status=Je.Running;var r=e===void 0?this.initialState:Vn(this,function(){return Qy(e)?n.machine.resolveState(e):n.machine.resolveState(bt.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,zn)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Ee(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=pe(this.listeners),h=d.next();!h.done;h=d.next()){var v=h.value;this.listeners.delete(v)}}catch(b){e={error:b}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var y=pe(this.stopListeners),g=y.next();!g.done;g=y.next()){var v=g.value;v(),this.stopListeners.delete(v)}}catch(b){r={error:b}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}try{for(var S=pe(this.contextListeners),w=S.next();!w.done;w=S.next()){var v=w.value;this.contextListeners.delete(v)}}catch(b){o={error:b}}finally{try{w&&!w.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var L=pe(this.doneListeners),m=L.next();!m.done;m=L.next()){var v=m.value;this.doneListeners.delete(v)}}catch(b){a={error:b}}finally{try{m&&!m.done&&(l=L.return)&&l.call(L)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Je.Stopped,this._initialState=void 0;try{for(var _=pe(Object.keys(this.delayedEventsMap)),E=_.next();!E.done;E=_.next()){var p=E.value;this.clock.clearTimeout(this.delayedEventsMap[p])}}catch(b){c={error:b}}finally{try{E&&!E.done&&(f=_.return)&&f.call(_)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new jl({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=e._state)===null||r===void 0)&&r.done)){var i=et({type:"xstate.stop"}),o=Vn(e,function(){var s=ze(Ve([],be(e.state.configuration),!1).sort(function(d,h){return h.order-d.order}).map(function(d){return on(d.onExit,e.machine.options.actions)})),a=be(Gi(e.machine,e.state,e.state.context,i,[{type:"exit",actions:s}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),l=a[0],c=a[1],f=new bt({value:e.state.value,context:c,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:l.filter(function(d){return!Ls(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return f.changed=!0,f});e.update(o,i),e._stopChildren(),pr.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Je.NotStarted&&this.options.deferEvents)){if(this.status!==Je.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=et(v);n.forward(y),s=Vn(n,function(){return n.machine.transition(s,y,void 0,r||void 0)}),l.push.apply(l,Ve([],be(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(g){return e0(g,s)})),!1)),a=a||!!s.changed};try{for(var f=pe(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,et(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=et(e);if(i.name.indexOf(Tl)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(Tl)===0}))throw i.data.data;var o=Vn(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=pe(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),Ee(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Je.Running)return uf(e,n);if(Dl(e))return this.spawnPromise(Promise.resolve(e),n);if(Ee(e))return this.spawnCallback(e,n);if(qy(e))return this.spawnActor(e,n);if(Ty(e))return this.spawnObservable(e,n);if(Kn(e))return this.spawnMachine(e,B(B({},r),{id:n}));if(My(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,B(B({},this.options),{parent:this,id:n.id||e.id})),o=B(B({},s0),n);o.sync&&i.onTransition(function(a){r.send(Qc,{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(et(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=o0(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(et(Ri(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Sr(n,l);try{i.send(et(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=Ti(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[rn]=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(et(h,{origin:n}))},f;try{f=e(c,function(h){s.add(h)})}catch(h){this.send(Sr(n,h))}if(Dl(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=Ti(h);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,Ee(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[rn]=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(et(l,{origin:n}))},function(l){i.removeChild(n),i.send(et(Sr(n,l),{origin:n}))},function(){i.removeChild(n),i.send(et(Ri(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[rn]=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[rn]=function(){return this},r))},t.prototype.attachDev=function(){var e=na();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(B(B({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:B({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}i0(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[rn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Je.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=hf,t}();function hf(t,e){var n=new a0(t,e);return n}function l0(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function ai(t){return B(B({type:bs},t),{toJSON:function(){t.onDone,t.onError;var e=Xs(t,["onDone","onError"]);return B(B({},e),{type:bs,src:l0(t.src)})}})}var li="",Cs="#",Io="*",Dn={},In=function(t){return t[0]===Cs},u0=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},c0=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(u0(),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:ef),this.id=this.config.id||Ve([this.machine.key],be(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?wr(this.config.states,function(c,f){var d,h=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,B((d={},d[h.id]=h,d),h.idMap)),h}):Dn;var a=0;function l(c){var f,d;c.order=a++;try{for(var h=pe(cf(c)),v=h.next();!v.done;v=h.next()){var y=v.value;l(y)}}catch(g){f={error:g}}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===li}):li in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Ct(this.config.entry||this.config.onEntry).map(function(c){return Vr(c)}),this.onExit=Ct(this.config.exit||this.config.onExit).map(function(c){return Vr(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Ct(this.config.invoke).map(function(c,f){var d,h;if(Kn(c)){var v=oi(o.id,f);return o.machine.options.services=B((d={},d[v]=c,d),o.machine.options.services),ai({src:v,id:v})}else if(Me(c.src)){var v=c.id||oi(o.id,f);return ai(B(B({},c),{id:v,src:c.src}))}else if(Kn(c.src)||Ee(c.src)){var v=c.id||oi(o.id,f);return o.machine.options.services=B((h={},h[v]=c.src,h),o.machine.options.services),ai(B(B({id:v},c),{src:v}))}else{var y=c.src;return ai(B(B({id:oi(o.id,f)},c),{src:y}))}}),this.activities=Ct(this.config.activities).concat(this.invoke).map(function(c){return ta(c)}),this.transition=this.transition.bind(this),this.tags=Ct(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||ff(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:B(B({},i),e.actions),activities:B(B({},o),e.activities),guards:B(B({},s),e.guards),services:B(B({},a),e.services),delays:B(B({},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 Ee(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:wr(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===li,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===Io});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=Ee(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=Hy(a,e.id);return e.onEntry.push(Ny(l,{delay:o})),e.onExit.push(Vy(l)),l},i=tr(n)?n.map(function(o,s){var a=r(o.delay,s);return B(B({},o),{event:a})}):ze(Object.keys(n).map(function(o,s){var a=n[o],l=Me(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Ct(l).map(function(d){return B(B({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return B(B({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof bt?e.value:Mr(e,this.delimiter);if(Me(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,Ve([],be(ze(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=tf(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof bt?e:bt.create(e),r=Array.from(Lr([],this.getStateNodes(n.value)));return new bt(B(B({},n),{value:this.resolve(n.value),configuration:r,done:Ai(r,this),tags:Nl(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=pe(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=ze(v.map(function(w){return w.transitions})),g=v.some(function(w){return w.transitions.length>0});if(!g)return this.next(n,r);var S=ze(Object.keys(s).map(function(w){return s[w].configuration}));return{transitions:y,exitSet:ze(v.map(function(w){return w.exitSet})),configuration:S,source:n,actions:ze(Object.keys(s).map(function(w){return s[w].actions}))}},t.prototype._transition=function(e,n,r){return Me(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,et(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=pe(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var h=d.value,v=h.cond,y=h.in,g=e.context,S=y?Me(y)&&In(y)?e.matches(Mr(this.getStateNodeById(y).path,this.delimiter)):ea(Mr(y,this.delimiter),xy(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!v||sf(this.machine,v,g,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,`':
144
+ `).concat(_.message))}if(w&&S){h.target!==void 0&&(l=h.target),a.push.apply(a,Ve([],be(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 L=ze(l.map(function(_){return o.getRelativeStateNodes(_,e.historyValue)})),m=!!c.internal;return{transitions:[c],exitSet:m?[]:ze(l.map(function(_){return o.getPotentiallyReenteringNodes(_)})),configuration:L,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?Lr([],this.getStateNodes(s.value)):[],y=new Set;try{for(var g=pe(Array.from(e).sort(function(k,O){return k.order-O.order})),S=g.next();!S.done;S=g.next()){var w=S.value;(!Er(v,w)||Er(r.exitSet,w)||w.parent&&y.has(w.parent))&&y.add(w)}}catch(k){l={error:k}}finally{try{S&&!S.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}try{for(var L=pe(v),m=L.next();!m.done;m=L.next()){var w=m.value;(!Er(e,w)||Er(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(k){f={error:k}}finally{try{m&&!m.done&&(d=L.return)&&d.call(L)}finally{if(f)throw f.error}}r.exitSet.sort(function(k,O){return O.order-k.order});var _=Array.from(y).sort(function(k,O){return k.order-O.order}),E=new Set(r.exitSet),p=ze(_.map(function(k){var O=[];if(k.type!=="final")return O;var T=k.parent;if(!T.parent)return O;O.push(si(k.id,k.doneData),si(T.id,k.doneData?Wi(k.doneData,i,o):void 0));var D=T.parent;return D.type==="parallel"&&Ur(D).every(function(j){return Ai(r.configuration,j)})&&O.push(si(D.id)),O})),b=_.map(function(k){var O=k.onEntry,T=k.activities.map(function(D){return Uy(D)});return{type:"entry",actions:on(a?Ve(Ve([],be(O),!1),be(T),!1):Ve(Ve([],be(T),!1),be(O),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:p.map(function(k){return Dy(k)})}),x=Array.from(E).map(function(k){return{type:"exit",actions:on(Ve(Ve([],be(k.onExit),!1),be(k.activities.map(function(O){return Fy(O)})),!1),h.machine.options.actions)}}),P=x.concat({type:"transition",actions:on(r.actions,this.machine.options.actions)}).concat(b);if(n){var M=on(ze(Ve([],be(e),!1).sort(function(k,O){return O.order-k.order}).map(function(k){return k.onExit})),this.machine.options.actions).filter(function(k){return!Ls(k)});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=et(n),s;if(e instanceof bt)s=r===void 0?e:this.resolveState(bt.from(e,r));else{var a=Me(e)?this.resolve(Hi(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(bt.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!_y(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=Lr([],this.getStateNodes(s.value)),d=c.configuration.length?Lr(f,c.configuration):f;return c.configuration=Ve([],be(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,Ve([],be(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=zn);var d=e.configuration,h=!n||e.transitions.length>0,v=h?e.configuration:n?n.configuration:[],y=Ai(v,this),g=h?Jy(this.machine,d):void 0,S=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),L=n?B({},n.activities):{};try{for(var m=pe(w),_=m.next();!_.done;_=m.next()){var E=_.value;try{for(var p=(l=void 0,pe(E.actions)),b=p.next();!b.done;b=p.next()){var x=b.value;x.type===ys?L[x.activity.id||x.activity.type]=x:x.type===Ys&&(L[x.activity.id||x.activity.type]=!1)}}catch(X){l={error:X}}finally{try{b&&!b.done&&(c=p.return)&&c.call(p)}finally{if(l)throw l.error}}}}catch(X){s={error:X}}finally{try{_&&!_.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}var P=be(Gi(this,n,r,o,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=P[0],k=P[1],O=be(Oy(M,Ls),2),T=O[0],D=O[1],j=M.filter(function(X){var J;return X.type===ys&&((J=X.activity)===null||J===void 0?void 0:J.type)===bs}),V=j.reduce(function(X,J){return X[J.activity.id]=Gy(J.activity,f.machine,k,o),X},n?B({},n.children):{}),N=new bt({value:g||n.value,context:k,_event:o,_sessionid:n?n._sessionid:null,historyValue:g?S?Py(S,g):void 0:n?n.historyValue:void 0,history:!g||e.source?n:void 0,actions:g?D:[],activities:g?L:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:V,done:y,tags:Nl(v),machine:this}),U=r!==k;N.changed=o.name===Qc||U;var q=N.history;q&&delete q.history;var $=!y&&(this._transient||d.some(function(X){return X._transient}));if(!h&&(!$||o.name===li))return N;var F=N;if(!y)for($&&(F=this.resolveRaisedTransition(F,{type:my},o,i));T.length;){var Z=T.shift();F=this.resolveRaisedTransition(F,Z._event,o,i)}var te=F.changed||(q?!!F.actions.length||U||typeof q.value!=typeof F.value||!pf(F.value,q.value):void 0);return F.changed=te,F.history=q,F},t.prototype.getStateNode=function(e){if(In(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=In(e)?e.slice(Cs.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"&&In(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=Ss(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||Dn;switch(this.type){case"parallel":return wr(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):Dn});case"compound":if(Me(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?wr(e,function(o,s){return o?r.getStateNode(s).resolve(o):Dn}):this.initialStateValue||{};default:return e||Dn}},t.prototype.getResolvedPath=function(e){if(In(e)){var n=this.machine.idMap[e.slice(Cs.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return Ss(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=Al(this.states,function(r){return r.initialStateValue||Dn},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=Zi(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;Me(n.target)?e=In(n.target)?Hi(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(Zi(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=ki(this.initialStateValue);return ze(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=be(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:Al(this.states,function(n,r){if(!e)return n.historyValue();var i=Me(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?ze(ki(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=Cy(r.path,"states")(e).current;return Me(o)?[r.getStateNode(o)]:ze(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=ze(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=pe(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,pe(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(!Me(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,`':
145
+ `).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Ay(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Me(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=B(B({},e),{actions:on(Ct(e.actions)),cond:of(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return B(B({},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=Io,a=o[s],l=a===void 0?[]:a,c=Xs(o,[typeof s=="symbol"?s:s+""]);i=ze(Object.keys(c).map(function(L){var m=An(L,c[L]);return m}).concat(An(Io,l)))}var f=this.config.always?An("",this.config.always):[],d=this.config.onDone?An(String(si(this.id)),this.config.onDone):[],h=ze(this.invoke.map(function(L){var m=[];return L.onDone&&m.push.apply(m,Ve([],be(An(String(Ri(L.id)),L.onDone)),!1)),L.onError&&m.push.apply(m,Ve([],be(An(String(Sr(L.id)),L.onError)),!1)),m})),v=this.after,y=ze(Ve(Ve(Ve(Ve([],be(d),!1),be(h),!1),be(i),!1),be(f),!1).map(function(L){return Ct(L).map(function(m){return r.formatTransition(m)})}));try{for(var g=pe(v),S=g.next();!S.done;S=g.next()){var w=S.value;y.push(w)}}catch(L){e={error:L}}finally{try{S&&!S.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}return y},t}();function f0(t,e,n){return n===void 0&&(n=t.context),new c0(t,e,n)}var d0=$y,_s;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(_s||(_s={}));var Or=u.useLayoutEffect;function Bl(t){var e=oe.useRef();return e.current||(e.current={v:t()}),e.current.v}var p0=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},h0=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 g0(t,e){var n,r,i=p0([[],[]],2),o=i[0],s=i[1];try{for(var a=h0(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 hr=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},Vl=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 Ul(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function v0(t){var e=u.useRef([]),n=u.useRef([]);Or(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=hr(g0(a,function(d){return d.exec.__effect===_s.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,Vl([],hr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,Vl([],hr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),Or(function(){for(;n.current.length;){var r=hr(n.current.shift(),2),i=r[0],o=r[1];Ul(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=hr(e.current.shift(),2),i=r[0],o=r[1];Ul(i,o)}})}var Pr=function(){return Pr=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},Pr.apply(this,arguments)},m0=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 y0(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function b0(t,e,n){e===void 0&&(e={});var r=Bl(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=m0(e,["context","guards","actions","activities","services","delays","state"]),h=Bl(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},y=r.withConfig(v,function(){return Pr(Pr({},r.context),i)});return hf(y,Pr({deferEvents:!0},d))});return Or(function(){var v;return n&&(v=h.subscribe(y0(n))),function(){v==null||v.unsubscribe()}},[n]),Or(function(){return h.start(f?bt.create(f):void 0),function(){h.stop()}},[]),Or(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]),v0(h),h}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};function S0(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=b0(t,e,n),i=w0(u.useState(function(){var a=r.machine.initialState;return e.state?bt.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function $e(){return $e=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},$e.apply(this,arguments)}function $n(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 ue={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(ue.str(t)||ue.num(t))return t===e;if(ue.obj(t)&&ue.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 ue.und(n)?t===e:!0}};function L0(t,e){return e===void 0&&(e=!0),n=>(ue.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 E0(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function yn(t,e){return ue.und(t)||ue.nul(t)?e:t}function ui(t){return ue.und(t)?[]:ue.arr(t)?t:[t]}function Fn(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 ue.fun(t)?t(...n):t}function x0(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,$n(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function No(t){const e=x0(t);if(ue.und(e))return $e({to:e},t);const n=Object.keys(t).reduce((r,i)=>ue.und(e[i])?$e({},r,{[i]:t[i]}):r,{});return $e({to:e},n)}function C0(t,e){return e&&(ue.fun(e)?e(t):ue.obj(e)&&(e.current=t)),t}class _t{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 Ms extends _t{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof _t&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof _t&&e.removeChild(this))}}class gf extends _t{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof _t&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof _t&&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 _t)||(n[r]=i instanceof _t?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let ra;function _0(t,e){ra={fn:t,transform:e}}let vf;function M0(t){vf=t}let mf=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,qi;function O0(t){qi=t}let yf=()=>Date.now(),P0=t=>t.current,bf;function k0(t){bf=t}class T0 extends gf{constructor(e,n){super(),this.update=void 0,this.payload=e.style?$e({},e,{style:bf(e.style)}):e,this.update=n,this.attach()}}const R0=t=>ue.fun(t)&&!(t.prototype instanceof u.Component),A0=t=>u.forwardRef((n,r)=>{const i=E0(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(h=>{const v=s.current,y=()=>{let g=!1;a.current&&(g=ra.fn(a.current,s.current.getAnimatedValue())),(!a.current||g===!1)&&i()};s.current=new T0(h,y),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>P0(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=$n(c,["scrollTop","scrollLeft"]),d=R0(t)?void 0:h=>a.current=C0(h,r);return u.createElement(t,$e({},f,{ref:d}))});let kr=!1;const Cn=new Set,wf=()=>{if(!kr)return!1;let t=yf();for(let e of Cn){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 _t,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 L=0;L<y;++L){let m=-i.tension*(d-f),_=-i.friction*v,E=(m+_)/i.mass;v=v+E*1/1e3,d=d+v*1/1e3}let g=i.clamp&&i.tension!==0?c<f?d>f:d<f:!1,S=Math.abs(v)<=i.precision,w=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=g||S&&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||(Cn.delete(e),e.stop(!0))}return Cn.size?mf(wf):kr=!1,kr},D0=t=>{Cn.has(t)||Cn.add(t),kr||(kr=!0,mf(wf))},I0=t=>{Cn.has(t)&&Cn.delete(t)};function Ki(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return Ki({range:t,output:e,extrapolate:n});if(qi&&typeof t.output[0]=="string")return qi(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=j0(c,o);return N0(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function N0(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 j0(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class Jn extends Ms{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof Ms&&!(e instanceof Jn)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Ki(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=Ki(e,n,r)}interpolate(e,n,r){return new Jn(this,e,n,r)}}const Nn=(t,e,n)=>t&&new Jn(t,e,n),B0={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 Sf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>Sf(n,e))}class Os extends _t{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&&Sf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new Jn(this,e,n,r)}}class V0 extends Ms{constructor(e){super(),this.payload=e.map(n=>new Os(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 Jn(this,e,n)}}let U0=0,F0=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=U0++}update(e){if(!e)return this;const n=No(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=$n(n,["delay","to"]);if(ue.arr(o)||ue.fun(o))this.queue.push($e({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=$e({to:{[c]:f},delay:Fn(i,c)},s),h=a[d.delay]&&a[d.delay].to;a[d.delay]=$e({},a[d.delay],d,{to:$e({},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;ue.obj(s)&&(this.merged=$e({},s,this.merged)),ue.obj(l)&&(this.merged=$e({},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=$n(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=ue.arr(a.to)||ue.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 ue.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),D0(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&I0(this),this}runAsync(e,n){var r=this;e.delay;let i=$n(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(ue.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=$e({},i,No(i.to[l]));ue.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(ue.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=$e({},i,No(c));if(ue.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=$e({},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=$e({},i,this.merged,s),this.hasChanged=!1;let y=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((g,S)=>{let w=S[0],L=S[1],m=g[w]||{};const _=ue.num(L),E=ue.str(L)&&!L.startsWith("#")&&!/\d/.test(L)&&!vf[L],p=ue.arr(L),b=!_&&!p&&!E;let x=ue.und(i[w])?L:i[w],P=_||p||E?L:1,M=Fn(l,w);y&&(P=y.animations[w].parent);let k=m.parent,O=m.interpolation,T=ui(y?P.getPayload():P),D,j=L;b&&(j=qi({range:[0,1],output:[L,L]})(1));let V=O&&O.getValue();const U=!ue.und(k)&&m.animatedValues.some(Z=>!Z.done),q=!ue.equ(j,V),$=!ue.equ(j,m.previous),F=!ue.equ(M,m.config);if(d||$&&q||F){if(_||E)k=O=m.parent||new Os(x);else if(p)k=O=m.parent||new V0(x);else if(b){let Z=m.interpolation&&m.interpolation.calc(m.parent.value);Z=Z!==void 0&&!d?Z:x,m.parent?(k=m.parent,k.setValue(0,!1)):k=new Os(0);const te={output:[Z,L]};m.interpolation?(O=m.interpolation,m.interpolation.updateConfig(te)):O=k.interpolate(te)}return T=ui(y?P.getPayload():P),D=ui(k.getPayload()),d&&!b&&k.setValue(x,!1),this.hasChanged=!0,D.forEach(Z=>{Z.startPosition=Z.value,Z.lastPosition=Z.value,Z.lastVelocity=U?Z.lastVelocity:void 0,Z.lastTime=U?Z.lastTime:void 0,Z.startTime=yf(),Z.done=!1,Z.animatedStyles.clear()}),Fn(h,w)&&k.setValue(b?P:L,!1),$e({},g,{[w]:$e({},m,{name:w,parent:k,interpolation:O,animatedValues:D,toValues:T,previous:j,config:M,fromValues:ui(k.getValue()),immediate:Fn(h,w),initialVelocity:yn(M.velocity,0),clamp:yn(M.clamp,!1),precision:yn(M.precision,.01),tension:yn(M.tension,170),friction:yn(M.friction,26),mass:yn(M.mass,1),duration:M.duration,easing:yn(M.easing,Z=>Z),decay:M.decay})})}else return q?g:(b&&(k.setValue(1,!1),O.updateConfig({output:[j,j]})),k.done=!0,this.hasChanged=!0,$e({},g,{[w]:$e({},g[w],{previous:j})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let g in this.animations)this.interpolations[g]=this.animations[g].interpolation,this.values[g]=this.animations[g].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const z0=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=ue.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 F0,y=i?Fn(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?Fn(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},$0=t=>{const e=ue.fun(t),n=z0(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class H0 extends gf{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof _t)&&(e=ra.transform(e)),this.payload=e}}const Ji={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},Mt="[-+]?\\d*\\.?\\d+",Xi=Mt+"%";function ho(){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 W0=new RegExp("rgb"+ho(Mt,Mt,Mt)),G0=new RegExp("rgba"+ho(Mt,Mt,Mt,Mt)),Z0=new RegExp("hsl"+ho(Mt,Xi,Xi)),q0=new RegExp("hsla"+ho(Mt,Xi,Xi,Mt)),K0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,J0=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,X0=/^#([0-9a-fA-F]{6})$/,Y0=/^#([0-9a-fA-F]{8})$/;function Q0(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=X0.exec(t))?parseInt(e[1]+"ff",16)>>>0:Ji.hasOwnProperty(t)?Ji[t]:(e=W0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|255)>>>0:(e=G0.exec(t))?(jn(e[1])<<24|jn(e[2])<<16|jn(e[3])<<8|$l(e[4]))>>>0:(e=K0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=Y0.exec(t))?parseInt(e[1],16)>>>0:(e=J0.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Z0.exec(t))?(Fl(zl(e[1]),ci(e[2]),ci(e[3]))|255)>>>0:(e=q0.exec(t))?(Fl(zl(e[1]),ci(e[2]),ci(e[3]))|$l(e[4]))>>>0:null}function jo(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 Fl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=jo(i,r,t+1/3),s=jo(i,r,t),a=jo(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function jn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function zl(t){return(parseFloat(t)%360+360)%360/360}function $l(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function ci(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Hl(t){let e=Q0(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 fi=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,eb=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,tb=new RegExp(`(${Object.keys(Ji).join("|")})`,"g"),nb=t=>{const e=t.output.map(i=>i.replace(eb,Hl)).map(i=>i.replace(tb,Hl)),n=e[0].match(fi).map(()=>[]);e.forEach(i=>{i.match(fi).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(fi).map((i,o)=>Ki($e({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(fi,()=>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 Tr={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 rb=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),ib=["Webkit","Ms","Moz","O"];Tr=Object.keys(Tr).reduce((t,e)=>(ib.forEach(n=>t[rb(n,e)]=t[e]),t),Tr);function ob(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!(Tr.hasOwnProperty(t)&&Tr[t])?e+"px":(""+e).trim()}const Wl={};k0(t=>new H0(t));O0(nb);M0(Ji);_0((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=$n(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=ob(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:Wl[f]||(Wl[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 sb=["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"],ab=L0(A0,!1),lb=ab(sb);function Gl(t,e){return t.map(function(n,r){return n+e[r]})}function Lf(t,e){return t.map(function(n,r){return n-e[r]})}function Ps(t){return Math.hypot.apply(Math,t)}function ub(t,e,n){var r=Ps(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=Ps(t);return{velocities:a,velocity:s,distance:c,direction:l}}function ks(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function cb(t,e,n){return Math.max(e,Math.min(t,n))}function fb(t,e){return Math.pow(t,e*5)}function Zl(t,e,n){return e===0||Math.abs(e)===1/0?fb(t,n):t*e*n/(e+n*t)}function Rr(t,e,n,r){return r===void 0&&(r=.15),r===0?cb(t,e,n):t<e?-Zl(e-t,n-e,r)+e:t>n?+Zl(t-n,n-e,r)+n:t}function ql(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 db(t,e,n){return e&&ql(t.prototype,e),n&&ql(t,n),t}function lt(){return lt=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},lt.apply(this,arguments)}function Ef(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function pb(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 di(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hb(t,e){if(t){if(typeof t=="string")return Kl(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 Kl(t,e)}}function Kl(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 go(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=hb(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.
146
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function xf(){}function Cf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?xf:e.length===1?e[0]:function(){for(var r,i=go(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function sn(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 pi(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 ia(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]=ia(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var gb=180,vb=.15,mb=.5,yb=60,bb={threshold:function(e){return e===void 0&&(e=0),sn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return sn(vb);case!1:return sn(0);default:return sn(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:sn(e)}},_f=lt({},bb,{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 _f.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]]}}),wb=typeof window<"u"&&window.document&&window.document.createElement,Sb={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=wb?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}}},Lb=lt({},_f,{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=sn(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=mb),sn(e)},swipeDistance:function(e){return e===void 0&&(e=yb),sn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return gb;case!1:return 0;default:return e}}});function Eb(t){return t===void 0&&(t={}),ia(t,Sb)}function xb(t){return t===void 0&&(t={}),ia(t,Lb)}function Cb(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=pb(t,["domTarget","eventOptions","window","enabled"]),s=Eb({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=xb(o),s}function gr(t){return lt({_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:xf,canceled:!1,memo:void 0,args:void 0},t)}function Mf(){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=gr({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=gr({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=gr({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=gr({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 wn=new Map,_b=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=lt({},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,g=c.movement,S=this.getInternalMovement(r,this.state),w=v[0]===!1?Jl(S[0],l[0]):v[0],L=v[1]===!1?Jl(S[1],l[1]):v[1],m=this.checkIntentionality([w,L],S);if(m._blocked)return lt({},m,{_movement:S,delta:[0,0]});var _=m._intentional,E=S,p,b;if(_[0]!==!1&&v[0]===!1&&(b=pi(o,this.state),p=pi(s,this.state),d[0]=b[0],f[0]=p[0]),_[1]!==!1&&v[1]===!1){var x,P;b=(x=b)!=null?x:pi(o,this.state),p=(P=p)!=null?P:pi(s,this.state),d[1]=b[1],f[1]=p[1]}var M=[_[0]!==!1?S[0]-_[0]:d[0],_[1]!==!1?S[1]-_[1]:d[1]],k=Gl(M,y),O=h?a:[0,0];return M=Xl(f,Gl(M,d),O),lt({},m,{intentional:_[0]!==!1||_[1]!==!1,_initial:d,_movement:E,movement:M,values:r,offset:Xl(f,k,O),delta:Lf(M,g)})},e.clean=function(){this.clearTimeout()},db(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 Jl(t,e){return Math.abs(t)>=e?ks(t)*e:!1}function Xl(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[Rr(r,l,c,o),Rr(i,d,h,s)]}function Bo(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 Mb(t,e,n){var r=t.state.offset,i=n.timeStamp;return lt({},Mf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function Ob(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,lt({},e,{event:n})].concat(i))}}var Pb=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=go(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];Ts(r,v,Ob(y,lt({},n.state.shared,{args:o})))}return n.config.domTarget?Ab(n,r):Db(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Pf(n.config),i=n.config.eventOptions;r&&Zr(r,Of(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),kb(n)},this.state=Mf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function kb(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];Zr(n,s,r)}t.windowListeners={}}}function Tb(t,e){var n=t.config,r=t.windowListeners;n.window&&(Zr(n.window,r[e],n.eventOptions),delete r[e])}function Rb(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(Zr(r.window,i[e],r.eventOptions),kf(r.window,i[e]=n,r.eventOptions))}function Ab(t,e){var n=t.config,r=t.domListeners,i=Pf(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;Zr(i,Of(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,Cf.apply(void 0,f)])}kf(i,r,o)}function Db(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]=Cf.apply(void 0,f)}return r}function Of(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function Pf(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Ts(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function kf(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=go(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function Zr(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=go(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Ib(t,e,n){n===void 0&&(n={});var r=jb(t),i=u.useMemo(function(){return new Pb(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?Nb:i.bind}function Nb(){}function jb(t){var e=new Set;return t.drag&&e.add(wn.get("drag")),t.wheel&&e.add(wn.get("wheel")),t.scroll&&e.add(wn.get("scroll")),t.move&&e.add(wn.get("move")),t.pinch&&e.add(wn.get("pinch")),t.hover&&e.add(wn.get("hover")),e}var Bb=function(t){Ef(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return Lf(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,ub(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(_b);function Tf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Yl(t){var e="buttons"in t?t.buttons:0,n=Tf(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 Ql(t){var e=Tf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var Vb=3,Ub=220,Fb=function(t){Ef(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||(Rb(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(di(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=Yl(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Ql(i),a=r.getKinematics(s,i),l=Bo(di(r),i),c=r.state._isTap,f=Ps(a._movement);c&&f>=Vb&&(c=!1),r.updateGestureState(lt({},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],g=r.config.swipeVelocity,S=g[0],w=g[1],L=r.config.swipeDistance,m=L[0],_=L[1],E=lt({},Bo(di(r),i),r.getMovement(r.state.values)),p=[0,0];E.elapsedTime<Ub&&(v!==!1&&Math.abs(a)>S&&Math.abs(f)>m&&(p[0]=ks(a)),y!==!1&&Math.abs(l)>w&&Math.abs(d)>_&&(p[1]=ks(l))),r.updateGestureState(lt({},E,{tap:o,swipe:p})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(di(r)),r.state._delayedEvent=!1,Tb(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=Ql(i);this.updateSharedState(Yl(i)),this.updateGestureState(lt({},Mb(this,o,i),Bo(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Ts(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ts(i,o,this.onClick)}},e}(Bb);function zb(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 Di(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(!Di(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(!Di(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)&&!Di(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function $b(t,e){try{return Di(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 Hb(t,e){e===void 0&&(e={}),wn.set("drag",Fb);var n=u.useRef();return n.current||(n.current=zb(Cb,$b)),Ib({drag:t},n.current(e))}/*!
130
147
  * tabbable 5.3.3
131
148
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
132
- */var Rf=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Xi=Rf.join(","),Af=typeof Element>"u",kn=Af?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rs=!Af&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Df=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(Xi));return n&&kn.call(e,Xi)&&i.unshift(e),i=i.filter(r),i},If=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=kn.call(s,Xi);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},Nf=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},Hb=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},jf=function(e){return e.tagName==="INPUT"},Wb=function(e){return jf(e)&&e.type==="hidden"},Gb=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Zb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},qb=function(e){if(!e.name)return!0;var n=e.form||Rs(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=Zb(i,e.form);return!o||o===e},Kb=function(e){return jf(e)&&e.type==="radio"},Jb=function(e){return Kb(e)&&!qb(e)},eu=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Xb=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=kn.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(kn.call(s,"details:not([open]) *"))return!0;var a=Rs(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=Rs(e);if(f&&!f.shadowRoot&&i(f)===!0)return eu(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 eu(e);return!1},Yb=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 kn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},Yi=function(e,n){return!(n.disabled||Wb(n)||Xb(n,e)||Gb(n)||Yb(n))},As=function(e,n){return!(Jb(n)||Nf(n)<0||!Yi(e,n))},Qb=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ew=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=Nf(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(Hb).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},tw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=If([e],n.includeContainer,{filter:As.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Qb}):r=Df(e,n.includeContainer,As.bind(null,n)),ew(r)},nw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=If([e],n.includeContainer,{filter:Yi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Df(e,n.includeContainer,Yi.bind(null,n)),r},pi=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return kn.call(e,Xi)===!1?!1:As(n,e)},rw=Rf.concat("iframe").join(","),Uo=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return kn.call(e,rw)===!1?!1:Yi(n,e)};/*!
149
+ */var Rf=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Yi=Rf.join(","),Af=typeof Element>"u",Pn=Af?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rs=!Af&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Df=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(Yi));return n&&Pn.call(e,Yi)&&i.unshift(e),i=i.filter(r),i},If=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=Pn.call(s,Yi);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},Nf=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},Wb=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},jf=function(e){return e.tagName==="INPUT"},Gb=function(e){return jf(e)&&e.type==="hidden"},Zb=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},qb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Kb=function(e){if(!e.name)return!0;var n=e.form||Rs(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=qb(i,e.form);return!o||o===e},Jb=function(e){return jf(e)&&e.type==="radio"},Xb=function(e){return Jb(e)&&!Kb(e)},eu=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Yb=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=Pn.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(Pn.call(s,"details:not([open]) *"))return!0;var a=Rs(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=Rs(e);if(f&&!f.shadowRoot&&i(f)===!0)return eu(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 eu(e);return!1},Qb=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 Pn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},Qi=function(e,n){return!(n.disabled||Gb(n)||Yb(n,e)||Zb(n)||Qb(n))},As=function(e,n){return!(Xb(n)||Nf(n)<0||!Qi(e,n))},ew=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},tw=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=Nf(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(Wb).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},nw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=If([e],n.includeContainer,{filter:As.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ew}):r=Df(e,n.includeContainer,As.bind(null,n)),tw(r)},rw=function(e,n){n=n||{};var r;return n.getShadowRoot?r=If([e],n.includeContainer,{filter:Qi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Df(e,n.includeContainer,Qi.bind(null,n)),r},hi=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Pn.call(e,Yi)===!1?!1:As(n,e)},iw=Rf.concat("iframe").join(","),Vo=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Pn.call(e,iw)===!1?!1:Qi(n,e)};/*!
133
150
  * focus-trap 6.9.4
134
151
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
135
- */function tu(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 nu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tu(Object(n),!0).forEach(function(r){iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ru=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()}}}(),ow=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},sw=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},aw=function(e){return e.key==="Tab"||e.keyCode===9},iu=function(e){return setTimeout(e,0)},ou=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vr=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},hi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},lw=function(e,n){var r=(n==null?void 0:n.document)||document,i=nu({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(p,b,x){return p&&p[b]!==void 0?p[b]:i[x||b]},l=function(p){return o.containerGroups.findIndex(function(b){var x=b.container,k=b.tabbableNodes;return x.contains(p)||k.find(function(M){return M===p})})},c=function(p){var b=i[p];if(typeof b=="function"){for(var x=arguments.length,k=new Array(x>1?x-1:0),M=1;M<x;M++)k[M-1]=arguments[M];b=b.apply(void 0,k)}if(b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(p,"` was specified but was not a node, or did not return a node"))}var P=b;if(typeof b=="string"&&(P=r.querySelector(b),!P))throw new Error("`".concat(p,"` as selector refers to no known node"));return P},f=function(){var p=c("initialFocus");if(p===!1)return!1;if(p===void 0)if(l(r.activeElement)>=0)p=r.activeElement;else{var b=o.tabbableGroups[0],x=b&&b.firstTabbableNode;p=x||c("fallbackFocus")}if(!p)throw new Error("Your focus-trap needs to have at least one focusable element");return p},d=function(){if(o.containerGroups=o.containers.map(function(p){var b=tw(p,i.tabbableOptions),x=nw(p,i.tabbableOptions);return{container:p,tabbableNodes:b,focusableNodes:x,firstTabbableNode:b.length>0?b[0]:null,lastTabbableNode:b.length>0?b[b.length-1]:null,nextTabbableNode:function(M){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=x.findIndex(function(T){return T===M});if(!(O<0))return P?x.slice(O+1).find(function(T){return pi(T,i.tabbableOptions)}):x.slice(0,O).reverse().find(function(T){return pi(T,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(p){return p.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(p){if(p!==!1&&p!==r.activeElement){if(!p||!p.focus){E(f());return}p.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=p,ow(p)&&p.select()}},v=function(p){var b=c("setReturnFocus",p);return b||(b===!1?!1:p)},y=function(p){var b=hi(p);if(!(l(b)>=0)){if(vr(i.clickOutsideDeactivates,p)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!Uo(b,i.tabbableOptions)});return}vr(i.allowOutsideClick,p)||p.preventDefault()}},g=function(p){var b=hi(p),x=l(b)>=0;x||b instanceof Document?x&&(o.mostRecentlyFocusedNode=b):(p.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},L=function(p){var b=hi(p);d();var x=null;if(o.tabbableGroups.length>0){var k=l(b),M=k>=0?o.containerGroups[k]:void 0;if(k<0)p.shiftKey?x=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:x=o.tabbableGroups[0].firstTabbableNode;else if(p.shiftKey){var P=ou(o.tabbableGroups,function(N){var V=N.firstTabbableNode;return b===V});if(P<0&&(M.container===b||Uo(b,i.tabbableOptions)&&!pi(b,i.tabbableOptions)&&!M.nextTabbableNode(b,!1))&&(P=k),P>=0){var O=P===0?o.tabbableGroups.length-1:P-1,T=o.tabbableGroups[O];x=T.lastTabbableNode}}else{var D=ou(o.tabbableGroups,function(N){var V=N.lastTabbableNode;return b===V});if(D<0&&(M.container===b||Uo(b,i.tabbableOptions)&&!pi(b,i.tabbableOptions)&&!M.nextTabbableNode(b))&&(D=k),D>=0){var j=D===o.tabbableGroups.length-1?0:D+1,U=o.tabbableGroups[j];x=U.firstTabbableNode}}}else x=c("fallbackFocus");x&&(p.preventDefault(),h(x))},w=function(p){if(sw(p)&&vr(i.escapeDeactivates,p)!==!1){p.preventDefault(),s.deactivate();return}if(aw(p)){L(p);return}},S=function(p){var b=hi(p);l(b)>=0||vr(i.clickOutsideDeactivates,p)||vr(i.allowOutsideClick,p)||(p.preventDefault(),p.stopImmediatePropagation())},m=function(){if(o.active)return ru.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?iu(function(){h(f())}):h(f()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(p){if(o.active)return this;var b=a(p,"onActivate"),x=a(p,"onPostActivate"),k=a(p,"checkCanFocusTrap");k||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,b&&b();var M=function(){k&&d(),m(),x&&x()};return k?(k(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(p){if(!o.active)return this;var b=nu({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},p);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,ru.deactivateTrap(s);var x=a(b,"onDeactivate"),k=a(b,"onPostDeactivate"),M=a(b,"checkCanReturnFocus"),P=a(b,"returnFocus","returnFocusOnDeactivate");x&&x();var O=function(){iu(function(){P&&h(v(o.nodeFocusedBeforeActivation)),k&&k()})};return P&&M?(M(v(o.nodeFocusedBeforeActivation)).then(O,O),this):(O(),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(),m(),this)},updateContainerElements:function(p){var b=[].concat(p).filter(Boolean);return o.containers=b.map(function(x){return typeof x=="string"?r.querySelector(x):x}),o.active&&d(),this}},s.updateContainerElements(e),s};function uw(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 oa=!1;if(typeof window<"u"){var su={get passive(){oa=!0}};window.addEventListener("testPassive",null,su),window.removeEventListener("testPassive",null,su)}var Bf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),an=[],Qi=!1,Uf=-1,Ar=void 0,Dr=void 0,Vf=function(e){return an.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},eo=function(e){var n=e||window.event;return Vf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},cw=function(e){if(Dr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Dr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Ar===void 0&&(Ar=document.body.style.overflow,document.body.style.overflow="hidden")},fw=function(){Dr!==void 0&&(document.body.style.paddingRight=Dr,Dr=void 0),Ar!==void 0&&(document.body.style.overflow=Ar,Ar=void 0)},dw=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},pw=function(e,n){var r=e.targetTouches[0].clientY-Uf;return Vf(e.target)?!1:n&&n.scrollTop===0&&r>0||dw(n)&&r<0?eo(e):(e.stopPropagation(),!0)},hw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!an.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};an=[].concat(uw(an),[r]),Bf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Uf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&pw(i,e)},Qi||(document.addEventListener("touchmove",eo,oa?{passive:!1}:void 0),Qi=!0)):cw(n)}},gw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}an=an.filter(function(n){return n.targetElement!==e}),Bf?(e.ontouchstart=null,e.ontouchmove=null,Qi&&an.length===0&&(document.removeEventListener("touchmove",eo,oa?{passive:!1}:void 0),Qi=!1)):an.length||fw()},_n=[],vw=function(){return _n.some(function(t){return t.activeTargets.length>0})},mw=function(){return _n.some(function(t){return t.skippedTargets.length>0})},au="ResizeObserver loop completed with undelivered notifications.",yw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:au}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=au),window.dispatchEvent(t)},Fr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Fr||(Fr={}));var Mn=function(t){return Object.freeze(t)},bw=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Mn(this)}return t}(),Ff=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,Mn(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}(),sa=function(t){return t instanceof SVGElement&&"getBBox"in t},zf=function(t){if(sa(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)},lu=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)},ww=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},Ir=typeof window<"u"?window:{},gi=new WeakMap,uu=/auto|scroll/,Sw=/^tb|vertical/,Lw=/msie|trident/i.test(Ir.navigator&&Ir.navigator.userAgent),Tt=function(t){return parseFloat(t||"0")},Hn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new bw((n?e:t)||0,(n?t:e)||0)},cu=Mn({devicePixelContentBoxSize:Hn(),borderBoxSize:Hn(),contentBoxSize:Hn(),contentRect:new Ff(0,0,0,0)}),$f=function(t,e){if(e===void 0&&(e=!1),gi.has(t)&&!e)return gi.get(t);if(zf(t))return gi.set(t,cu),cu;var n=getComputedStyle(t),r=sa(t)&&t.ownerSVGElement&&t.getBBox(),i=!Lw&&n.boxSizing==="border-box",o=Sw.test(n.writingMode||""),s=!r&&uu.test(n.overflowY||""),a=!r&&uu.test(n.overflowX||""),l=r?0:Tt(n.paddingTop),c=r?0:Tt(n.paddingRight),f=r?0:Tt(n.paddingBottom),d=r?0:Tt(n.paddingLeft),h=r?0:Tt(n.borderTopWidth),v=r?0:Tt(n.borderRightWidth),y=r?0:Tt(n.borderBottomWidth),g=r?0:Tt(n.borderLeftWidth),L=d+c,w=l+f,S=g+v,m=h+y,_=a?t.offsetHeight-m-t.clientHeight:0,E=s?t.offsetWidth-S-t.clientWidth:0,p=i?L+S:0,b=i?w+m:0,x=r?r.width:Tt(n.width)-p-E,k=r?r.height:Tt(n.height)-b-_,M=x+L+E+S,P=k+w+_+m,O=Mn({devicePixelContentBoxSize:Hn(Math.round(x*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:Hn(M,P,o),contentBoxSize:Hn(x,k,o),contentRect:new Ff(d,l,x,k)});return gi.set(t,O),O},Hf=function(t,e,n){var r=$f(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Fr.DEVICE_PIXEL_CONTENT_BOX:return s;case Fr.BORDER_BOX:return i;default:return o}},Ew=function(){function t(e){var n=$f(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Mn([n.borderBoxSize]),this.contentBoxSize=Mn([n.contentBoxSize]),this.devicePixelContentBoxSize=Mn([n.devicePixelContentBoxSize])}return t}(),Wf=function(t){if(zf(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},xw=function(){var t=1/0,e=[];_n.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new Ew(c.target),d=Wf(c.target);a.push(f),c.lastReportedSize=Hf(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},fu=function(t){_n.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Wf(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Cw=function(){var t=0;for(fu(t);vw();)t=xw(),fu(t);return mw()&&yw(),t>0},Vo,Gf=[],_w=function(){return Gf.splice(0).forEach(function(t){return t()})},Mw=function(t){if(!Vo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return _w()}).observe(n,r),Vo=function(){n.textContent="".concat(e?e--:e++)}}Gf.push(t),Vo()},Ow=function(t){Mw(function(){requestAnimationFrame(t)})},Di=0,kw=function(){return!!Di},Pw=250,Tw={attributes:!0,characterData:!0,childList:!0,subtree:!0},du=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],pu=function(t){return t===void 0&&(t=0),Date.now()+t},Fo=!1,Rw=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=Pw),!Fo){Fo=!0;var r=pu(e);Ow(function(){var i=!1;try{i=Cw()}finally{if(Fo=!1,e=r-pu(),!kw())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,Tw)};document.body?n():Ir.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),du.forEach(function(n){return Ir.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),du.forEach(function(n){return Ir.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ds=new Rw,hu=function(t){!Di&&t>0&&Ds.start(),Di+=t,!Di&&Ds.stop()},Aw=function(t){return!sa(t)&&!ww(t)&&getComputedStyle(t).display==="inline"},Dw=function(){function t(e,n){this.target=e,this.observedBox=n||Fr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Hf(this.target,this.observedBox,!0);return Aw(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Iw=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),vi=new WeakMap,gu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},mi=function(){function t(){}return t.connect=function(e,n){var r=new Iw(e,n);vi.set(e,r)},t.observe=function(e,n,r){var i=vi.get(e),o=i.observationTargets.length===0;gu(i.observationTargets,n)<0&&(o&&_n.push(i),i.observationTargets.push(new Dw(n,r&&r.box)),hu(1),Ds.schedule())},t.unobserve=function(e,n){var r=vi.get(e),i=gu(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&_n.splice(_n.indexOf(r),1),r.observationTargets.splice(i,1),hu(-1))},t.disconnect=function(e){var n=this,r=vi.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Nw=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.");mi.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(!lu(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");mi.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(!lu(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");mi.unobserve(this,e)},t.prototype.disconnect=function(){mi.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ot(){return ot=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},ot.apply(this,arguments)}function Ii(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 Nr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function mr(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 yi(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var jw={box:"border-box"};function zo(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 Nr(function(){if(t.current&&r){var c=new Nw(l);return c.observe(t.current,jw),function(){c.disconnect()}}},[t,l,r]),r?s:0}function it(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var vu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},mu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Bw=c0({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:ot({},vu,mu)}}},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:ot({},vu,mu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ot({},{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:[f0({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(it()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),Uw=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Vw=["velocity"],Fw=["onRest","config"],Zf=j0.default,zw=Zf.tension,bi=Zf.friction,$w=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?Ww:v,g=t.snapPoints,L=g===void 0?Gw:g,w=t.blocking,S=w===void 0||w,m=t.scrollLocking,_=m===void 0||m,E=t.style,p=t.onSpringStart,b=t.onSpringCancel,x=t.onSpringEnd,k=t.reserveScrollBarGap,M=k===void 0?S:k,P=t.expandOnContentDrag,O=P!==void 0&&P,T=Ii(t,Uw),D=function(){var I=u.useState(!1),K=I[0],z=I[1],le=u.useState({}),Re=le[0],me=le[1],Ae=u.useCallback(function(_e){return me(function(Be){var re;return ot({},Be,((re={})[_e]=!1,re))}),function(){me(function(Be){var re;return ot({},Be,((re={})[_e]=!0,re))})}},[]);return u.useEffect(function(){var _e=Object.values(Re);_e.length!==0&&_e.every(Boolean)&&z(!0)},[Re]),{ready:K,registerReady:Ae}}(),j=D.ready,U=D.registerReady,N=u.useRef(!1),V=u.useRef(p),q=u.useRef(b),$=u.useRef(x);u.useEffect(function(){V.current=p,q.current=b,$.current=x},[b,p,x]);var F,Z,te=z0(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),X=te[0],J=te[1],R=u.useRef(null),fe=u.useRef(null),xe=u.useRef(null),H=u.useRef(null),Oe=u.useRef(null),ke=u.useRef(null),se=u.useRef(0),we=u.useRef(),Ne=u.useRef(!1),he=(F=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Z=u.useRef(F==null?void 0:F.matches),u.useDebugValue(Z.current?"reduce":"no-preference"),u.useEffect(function(){var I=function(K){Z.current=K.matches};return F==null||F.addListener(I),function(){return F==null?void 0:F.removeListener(I)}},[F]),Z),Se=function(I){var K=I.targetRef,z=I.enabled,le=I.reserveScrollBarGap,Re=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return Re.current.deactivate(),void(Re.current={activate:function(){},deactivate:function(){}});var me=K.current,Ae=!1;Re.current={activate:function(){Ae||(Ae=!0,hw(me,{allowTouchMove:function(_e){return _e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:le}))},deactivate:function(){Ae&&(Ae=!1,gw(me))}}},[z,K,le]),Re}({targetRef:fe,enabled:j&&_,reserveScrollBarGap:M}),Pe=function(I){var K=I.targetRef,z=I.enabled,le=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return le.current.deactivate(),void(le.current={activate:function(){},deactivate:function(){}});var Re=K.current,me=!1,Ae=[],_e=[];le.current={activate:function(){if(!me){me=!0;var Be=Re.parentNode;document.querySelectorAll("body > *").forEach(function(re){if(re!==Be){var de=re.getAttribute("aria-hidden");de!==null&&de!=="false"||(Ae.push(de),_e.push(re),re.setAttribute("aria-hidden","true"))}})}},deactivate:function(){me&&(me=!1,_e.forEach(function(Be,re){var de=Ae[re];de===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",de)}),Ae=[],_e=[])}}},[K,z]),le}({targetRef:R,enabled:j&&S}),Ce=function(I){var K=I.targetRef,z=I.fallbackRef,le=I.initialFocusRef,Re=I.enabled,me=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Re?"Enabled":"Disabled"),u.useEffect(function(){if(!Re)return me.current.deactivate(),void(me.current={activate:function(){},deactivate:function(){}});var Ae=z.current,_e=lw(K.current,{onActivate:void 0,initialFocus:le?function(){return(le==null?void 0:le.current)||Ae}:void 0,fallbackFocus:Ae,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;me.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(_e.activate()).then(function(){return Promise.resolve(new Promise(function(re){return setTimeout(function(){return re(void 0)},0)})).then(function(){})}))}catch(re){return Promise.reject(re)}},deactivate:function(){Be&&(Be=!1,_e.deactivate())}}},[Re,z,le,K]),me}({targetRef:R,fallbackRef:ke,initialFocusRef:f||void 0,enabled:j&&S&&f!==!1}),Te=function(I){var K=I.getSnapPoints,z=I.heightRef,le=I.lastSnapRef,Re=I.ready,me=function(Ge){var ct=Ge.contentRef,ft=Ge.controlledMaxHeight,Ke=Ge.footerEnabled,Pt=Ge.footerRef,xt=Ge.headerEnabled,dt=Ge.headerRef,Zt=Ge.registerReady,Ut=Ge.resizeSourceRef,nr=u.useMemo(function(){return Zt("contentHeight")},[Zt]),rr=function(qt,pn,hn){var gn=u.useMemo(function(){return pn("maxHeight")},[pn]),vn=u.useState(function(){return yi(qt)||typeof window<"u"?window.innerHeight:0}),sr=vn[0],ar=vn[1],Kt=sr>0,Y=u.useRef(0);return u.useDebugValue(qt?"controlled":"auto"),u.useEffect(function(){Kt&&gn()},[Kt,gn]),Nr(function(){if(qt)return ar(yi(qt)),void(hn.current="maxheightprop");var la=function(){Y.current||(Y.current=requestAnimationFrame(function(){ar(window.innerHeight),hn.current="window",Y.current=0}))};return window.addEventListener("resize",la),ar(window.innerHeight),hn.current="window",gn(),function(){window.removeEventListener("resize",la),cancelAnimationFrame(Y.current)}},[qt,gn,hn]),sr}(ft,Zt,Ut),Pn=zo(dt,{label:"headerHeight",enabled:xt,resizeSourceRef:Ut}),ir=zo(ct,{label:"contentHeight",enabled:!0,resizeSourceRef:Ut}),Tn=zo(Pt,{label:"footerHeight",enabled:Ke,resizeSourceRef:Ut}),dn=Math.min(rr-Pn-Tn,ir)+Pn+Tn;u.useDebugValue("minHeight: "+dn);var or=ir>0;return u.useEffect(function(){or&&nr()},[or,nr]),{maxHeight:rr,minHeight:dn,headerHeight:Pn,footerHeight:Tn}}({contentRef:I.contentRef,controlledMaxHeight:I.controlledMaxHeight,footerEnabled:I.footerEnabled,footerRef:I.footerRef,headerEnabled:I.headerEnabled,headerRef:I.headerRef,registerReady:I.registerReady,resizeSourceRef:I.resizeSourceRef}),Ae=me.maxHeight,_e=me.minHeight,Be=me.headerHeight,re=me.footerHeight,de=function(Ge,ct){var ft=[].concat(Ge).map(yi).reduce(function(dt,Zt){return dt.add(mr(Zt,0,ct)),dt},new Set),Ke=Array.from(ft),Pt=Math.min.apply(Math,Ke);if(Number.isNaN(Pt))throw new TypeError("minSnap is NaN");var xt=Math.max.apply(Math,Ke);if(Number.isNaN(xt))throw new TypeError("maxSnap is NaN");return{snapPoints:Ke,minSnap:Pt,maxSnap:xt}}(Re?K({height:z.current,footerHeight:re,headerHeight:Be,minHeight:_e,maxHeight:Ae}):[0],Ae),st=de.snapPoints,Bt=de.minSnap,rt=de.maxSnap;return u.useDebugValue("minSnap: "+Bt+", maxSnap:"+rt),{minSnap:Bt,maxSnap:rt,findSnap:function(Ge){var ct=yi(typeof Ge=="function"?Ge({footerHeight:re,headerHeight:Be,height:z.current,minHeight:_e,maxHeight:Ae,snapPoints:st,lastSnap:le.current}):Ge);return st.reduce(function(ft,Ke){return Math.abs(Ke-ct)<Math.abs(ft-ct)?Ke:ft},Bt)},maxHeight:Ae}}({contentRef:xe,controlledMaxHeight:h,footerEnabled:!!o,footerRef:Oe,getSnapPoints:L,headerEnabled:s!==!1,headerRef:H,heightRef:se,lastSnapRef:c,ready:j,registerReady:U,resizeSourceRef:we}),ee=Te.minSnap,Ve=Te.maxSnap,Q=Te.maxHeight,qe=Te.findSnap,W=u.useRef(Q),Fe=u.useRef(ee),je=u.useRef(Ve),ut=u.useRef(qe),nt=u.useRef(0);Nr(function(){W.current=Q,je.current=Ve,Fe.current=ee,ut.current=qe,nt.current=qe(y)},[qe,y,Q,Ve,ee]);var ne=u.useCallback(function(I){var K=I.onRest,z=I.config,le=(z=z===void 0?{}:z).velocity,Re=le===void 0?1:le,me=Ii(z,Vw),Ae=Ii(I,Fw);return new Promise(function(_e){return J(ot({},Ae,{config:ot({velocity:Re},me,{mass:1,tension:zw,friction:Math.max(bi,bi+(bi-bi*Re))}),onRest:function(){var Be=[].slice.call(arguments);_e.apply(void 0,Be),K==null||K.apply(void 0,Be)}}))})},[J]),fn=w0(Bw,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(I){return q.current==null?void 0:q.current({type:"SNAP",source:I.snapSource})},[]),onCloseCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"RESIZE",source:we.current})},[]),onOpenEnd:u.useCallback(function(){return $.current==null?void 0:$.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(I,K){return $.current==null?void 0:$.current({type:"SNAP",source:I.snapSource})},[]),onResizeEnd:u.useCallback(function(){return $.current==null?void 0:$.current({type:"RESIZE",source:we.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(I,K){try{return Promise.resolve(V.current==null?void 0:V.current({type:"SNAP",source:K.payload.source||"custom"}))}catch(z){return Promise.reject(z)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(V.current==null?void 0:V.current({type:"RESIZE",source:we.current}))}catch(I){return Promise.reject(I)}},[]),onSnapEnd:u.useCallback(function(I,K){try{return Promise.resolve($.current==null?void 0:$.current({type:"SNAP",source:I.snapSource}))}catch(z){return Promise.reject(z)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"RESIZE",source:we.current}))}catch(I){return Promise.reject(I)}},[]),renderVisuallyHidden:u.useCallback(function(I,K){try{return Promise.resolve(ne({y:nt.current,ready:0,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(z){return Promise.reject(z)}},[ne]),activate:u.useCallback(function(I,K){try{return N.current=!0,Promise.resolve(Promise.all([Se.current.activate(),Ce.current.activate(),Pe.current.activate()])).then(function(){})}catch(z){return Promise.reject(z)}},[Pe,Ce,Se]),deactivate:u.useCallback(function(){try{return Se.current.deactivate(),Ce.current.deactivate(),Pe.current.deactivate(),N.current=!1,Promise.resolve()}catch(I){return Promise.reject(I)}},[Pe,Ce,Se]),openImmediately:u.useCallback(function(){try{return se.current=nt.current,Promise.resolve(ne({y:nt.current,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(I){return Promise.reject(I)}},[ne]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(ne({y:0,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){return se.current=nt.current,Promise.resolve(ne({y:nt.current,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:he.current})).then(function(){})})}catch(I){return Promise.reject(I)}},[ne,he]),snapSmoothly:u.useCallback(function(I,K){try{var z=ut.current(I.y);return se.current=z,c.current=z,Promise.resolve(ne({y:z,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:he.current,config:{velocity:I.velocity}})).then(function(){})}catch(le){return Promise.reject(le)}},[ne,c,he]),resizeSmoothly:u.useCallback(function(){try{var I=ut.current(se.current);return se.current=I,c.current=I,Promise.resolve(ne({y:I,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:we.current!=="element"||he.current})).then(function(){})}catch(K){return Promise.reject(K)}},[ne,c,he]),closeSmoothly:u.useCallback(function(I,K){try{return ne({minSnap:se.current,immediate:!0}),se.current=0,Promise.resolve(ne({y:0,maxHeight:W.current,maxSnap:je.current,immediate:he.current})).then(function(){return Promise.resolve(ne({ready:0,immediate:!0})).then(function(){})})}catch(z){return Promise.reject(z)}},[ne,he])}}),qr=fn[0],Et=fn[1];u.useEffect(function(){j&&Et(a?"OPEN":"CLOSE")},[a,Et,j]),Nr(function(){(Q||Ve||ee)&&Et("RESIZE")},[Q,Ve,ee,Et]),u.useEffect(function(){return function(){Se.current.deactivate(),Ce.current.deactivate(),Pe.current.deactivate()}},[Pe,Ce,Se]),u.useImperativeHandle(e,function(){return{snapTo:function(I,K){var z=K===void 0?{}:K,le=z.velocity,Re=le===void 0?1:le,me=z.source,Ae=me===void 0?"custom":me;Et("SNAP",{payload:{y:ut.current(I),velocity:Re,source:Ae}})},get height(){return se.current}}},[Et]),u.useEffect(function(){var I=fe.current,K=function(le){Ne.current&&le.preventDefault()},z=function(le){I.scrollTop<0&&(requestAnimationFrame(function(){I.style.overflow="hidden",I.scrollTop=0,I.style.removeProperty("overflow")}),le.preventDefault())};return O&&(I.addEventListener("scroll",K),I.addEventListener("touchmove",K),I.addEventListener("touchstart",z)),function(){I.removeEventListener("scroll",K),I.removeEventListener("touchmove",K),I.removeEventListener("touchstart",z)}},[O,fe]);var jt=$b(function(I){var K=I.args,z=(K=K===void 0?[]:K)[0],le=(z=z===void 0?{}:z).closeOnTap,Re=le!==void 0&&le,me=z.isContentDragging,Ae=me!==void 0&&me,_e=I.cancel,Be=I.direction[1],re=I.down,de=I.first,st=I.last,Bt=I.memo,rt=Bt===void 0?X.y.getValue():Bt,Ge=I.tap,ct=I.velocity,ft=-1*I.movement[1];if(!N.current)return _e(),rt;if(d&&Re&&Ge)return _e(),setTimeout(function(){return d()},0),rt;if(Ge)return rt;var Ke=rt+ft,Pt=ft*ct,xt=Math.max(Fe.current,Math.min(je.current,Ke+2*Pt));if(!re&&d&&Be>0&&Ke+Pt<Fe.current/2)return _e(),d(),rt;var dt=re?d||Fe.current!==je.current?Rr(Ke,d?0:Fe.current,je.current,.55):Ke<Fe.current?Rr(Ke,Fe.current,2*je.current,.55):Rr(Ke,Fe.current/2,je.current,.55):xt;return O&&Ae?(dt>=je.current&&(dt=je.current),rt===je.current&&fe.current.scrollTop>0&&(dt=je.current),Ne.current=dt<je.current):Ne.current=!1,de&&Et("DRAG"),st?(Et("SNAP",{payload:{y:dt,velocity:ct>.05?ct:1,source:"dragging"}}),rt):(J({y:dt,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:!0,config:{velocity:ct}}),rt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Fe.current))throw new TypeError("minSnapRef is NaN!!");var Kr=function(I){var K,z=I.spring,le=Nn([z.y,z.maxHeight],function(re,de){return Math.round(mr(de-re,0,16))+"px"}),Re=Nn([z.y,z.minSnap,z.maxSnap],function(re,de,st){return mr(re,de,st)+"px"}),me=Nn([z.y,z.minSnap,z.maxSnap],function(re,de,st){return re<de?de-re+"px":re>st?st-re+"px":"0px"}),Ae=Nn([z.y,z.maxSnap],function(re,de){return re>=de?Math.ceil(re-de):0}),_e=Nn([z.y,z.minSnap],function(re,de){if(!de)return 0;var st=Math.max(de/2-45,0);return mr((re-st)*(1/(Math.min(de/2+45,de)-st)+0),0,1)}),Be=Nn([z.y,z.minSnap],function(re,de){return de?mr(re/de,0,1):0});return(K={})["--rsbs-content-opacity"]=_e,K["--rsbs-backdrop-opacity"]=Be,K["--rsbs-antigap-scale-y"]=Ae,K["--rsbs-overlay-translate-y"]=me,K["--rsbs-overlay-rounded"]=le,K["--rsbs-overlay-h"]=Re,K}({spring:X});return u.createElement(ab.div,ot({},T,{"data-rsbs-root":!0,"data-rsbs-state":Hw.find(qr.matches),"data-rsbs-is-blocking":S,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:R,style:ot({},Kr,E,{opacity:X.ready})}),r,S&&u.createElement("div",ot({key:"backdrop","data-rsbs-backdrop":!0},jt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:ke,onKeyDown:function(I){I.key==="Escape"&&(I.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",ot({key:"header","data-rsbs-header":!0,ref:H},jt()),s),u.createElement("div",ot({key:"scroll","data-rsbs-scroll":!0,ref:fe},O?jt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:xe},n)),o&&u.createElement("div",ot({key:"footer",ref:Oe,"data-rsbs-footer":!0},jt()),o)))}),Hw=["closed","opening","open","closing","dragging","snapping","resizing"];function Ww(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function Gw(t){return t.minHeight}var Zw=["onSpringStart","onSpringEnd","skipInitialTransition"],qf=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Ii(t,Zw),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");Nr(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(gy,{"data-rsbs-portal":!0},u.createElement($w,ot({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const Kf=28,qw="MapGoogle-module__root__Vi-sMl",Kw="MapGoogle-module__mapContainer__OCCTIX",Jw="MapGoogle-module__balloon__4UVhuT",Xw="MapGoogle-module__details__4osNXn",Yw="MapGoogle-module__cluster__5qmRds",Qw="MapGoogle-module__overlay__g-nEoT",eS="MapGoogle-module__mapControl__mzyTwr",tS="MapGoogle-module__geolocationControl__1exHgA",nS="MapGoogle-module__bottomSheet__avcBmY",rS="MapGoogle-module__locationViewContent__xwLeDh",iS="MapGoogle-module__locationViewHeader__maBLv0",oS="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",sS="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",aS="MapGoogle-module__sheetSubmit__rPQG26",Xe={root:qw,mapContainer:Kw,balloon:Jw,details:Xw,cluster:Yw,overlay:Qw,mapControl:eS,geolocationControl:tS,bottomSheet:nS,locationViewContent:rS,locationViewHeader:iS,deliveryDetailsViewContent:oS,deliveryDetailsViewHeader:sS,sheetSubmit:aS},Jf=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>C.jsx(qf,{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-Kf],footer:e?null:C.jsx(Lt,{disabled:o,loading:s,variant:"primary",className:Xe.sheetSubmit,onClick:r,children:C.jsx(xn,{keyName:"choose",ns:"common"})}),sibling:C.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),children:C.jsx("div",{className:Xe.bottomSheet,children:t})}),yu="#000",lS={header:Xe.locationViewHeader,content:Xe.locationViewContent},uS=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=Zr("screenSm"),{palette:l,skipPointInfo:c}=tt(),f=(l==null?void 0:l.primary)||"#fc0",[d,h]=u.useState(null),v=()=>{if(c){n==null||n(i);return}s==null||s(!1),r==null||r(i)},y=()=>{r==null||r(null)},g=()=>{s==null||s(!0),r==null||r(i)},L=()=>{n==null||n(i),s==null||s(!1),r==null||r(null)},w=(o==null?void 0:o.uid)===i.uid,S=Jc({isSelectedPoint:w}),m=u.useMemo(()=>{let p;switch(!0){case(i.type===30&&!w):{p=Vn(yr.PinLocker,f,yu);break}case(i.type!==30&&!w):{p=Vn(yr.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&w):{p=Vn(yr.PinLocker,yu,f);break}case(i.type!==30&&w):{p=Vn(yr.PinPvz,"--owl-color-black");break}}return Wt(p,"Icon url is not defined"),{url:Gs(p)}},[w,f,i.type]),_=u.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),E=w&&S&&!!(d!=null&&d.getVisible());return C.jsxs(Cc,{noClustererRedraw:!0,icon:m,position:_,clusterer:t,options:Kc,onLoad:h,onClick:v,children:[a&&C.jsx(Jf,{minSnapHeight:200,open:E,onDismiss:y,onSubmitClick:L,children:C.jsx(qc,{hideActions:!0,classes:lS,location:i,onClose:y})}),E&&!a&&C.jsx(Tc,{onCloseClick:y,children:C.jsx($m,{...i,hideDetails:e,className:Xe.balloon,onSubmit:L,onDetails:g})})]},i.uid)},cS=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>C.jsx(Ng,{clusterClass:Xe.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.addEventListener("touchstart",ns,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.removeEventListener("touchstart",ns)},children:s=>C.jsx(C.Fragment,{children:i.map(a=>C.jsx(uS,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),fS=u.memo(cS),dS=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=tt(),o=On(Ih),s=Gt(c=>c.location),a=Dt(mc),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return C.jsx(fS,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},pS=u.memo(dS),Xf=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},oe.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),oe.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"}),oe.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),hS="DeliveryBalloon-module__root__Nu90iy",gS="DeliveryBalloon-module__details__eqUTaI",vS="DeliveryBalloon-module__header__JVdyxN",mS="DeliveryBalloon-module__title__-zKKCt",yS="DeliveryBalloon-module__description__no5-ki",bS="DeliveryBalloon-module__actions__C-N0H-",wS="DeliveryBalloon-module__errorVariant__e6uhZl",SS="DeliveryBalloon-module__logo__62gC5h",Yt={root:hS,details:gS,header:vS,title:mS,description:yS,actions:bS,errorVariant:wS,logo:SS},LS=({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 }":C.jsx(xn,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":C.jsx(xn,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":C.jsx(xn,{keyName:"error_description",ns:"courier_balloon"});return C.jsxs("div",{className:ve(Yt.root,n,Yt[`${a}Variant`]),children:[C.jsxs("div",{className:Yt.header,children:[C.jsx(Xf,{className:Yt.logo}),C.jsx("span",{className:Yt.title,children:l?d:f}),r&&C.jsx(Hr,{onClick:o})]}),C.jsx("div",{className:Yt.description,children:l?h:e||"{{ properties.address }}"}),c&&!i&&C.jsx("div",{className:Yt.actions,children:C.jsx(Lt,{id:Ou,as:"button",variant:"primary",className:Yt.details,onClick:s,children:t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"})})})]})},ES="Chip-module__root__zsoSyP",xS="Chip-module__active__BlTSFB",bu={root:ES,active:xS},wu=({active:t,children:e,className:n,...r})=>C.jsx("div",{...r,className:ve(bu.root,n,{[bu.active]:t}),children:e}),CS="TextArea-module__root__8YFknR",_S={root:CS},Su=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=Qf(e,a);return C.jsx("textarea",{...o,ref:l,className:ve(_S.root,t),onBlur:n,onFocus:i,onChange:r})}),MS=({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},OS="DeliveryDetailsView-module__title__azeoUr",kS="DeliveryDetailsView-module__logo__4zZtpM",PS="DeliveryDetailsView-module__header__oDE9He",TS="DeliveryDetailsView-module__content__6P27SY",RS="DeliveryDetailsView-module__section__2M3Qip",AS="DeliveryDetailsView-module__chips__KmYgha",DS="DeliveryDetailsView-module__actions__43XZ-V",IS="DeliveryDetailsView-module__submit__58LKBw",NS="DeliveryDetailsView-module__actionsHidden__SW-67b",jS="DeliveryDetailsView-module__commentSection__GlX1A2",BS="DeliveryDetailsView-module__comment__2pGG6h",pt={title:OS,logo:kS,header:PS,content:TS,section:RS,chips:AS,actions:DS,submit:IS,actionsHidden:NS,commentSection:jS,comment:BS},US=u.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:c}=tt(),{t:f}=Nt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>MS({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=u.useState(!1),[y,g]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),L=u.useCallback(async()=>{v(!0);try{Wt(n.address,"Address is required");const b=await hd({address:n.address,algorithm:10,service:10,language:c||ku});if(!sc(b))return;const x=b==null?void 0:b.data.data,k={...y,address:x};return o==null||o(k),k}finally{v(!1)}},[c,n.address,o,y]);u.useImperativeHandle(s,()=>({submit:L}),[L]);const w=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},S=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=to(l==null?void 0:l.apartment),E=to(l==null?void 0:l.comment);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:ve(pt.header,t==null?void 0:t.header),children:[C.jsx(Hr,{onClick:i}),C.jsxs("div",{className:pt.title,children:[C.jsx(Xf,{className:pt.logo}),C.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),C.jsxs("div",{className:ve(pt.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:pt.section,children:[C.jsxs("span",{children:[f("address"),":"]}),C.jsx("p",{children:n.address})]}),!a&&C.jsxs("section",{className:pt.section,children:[C.jsxs("span",{children:[f("delivery_time"),":"]}),C.jsxs("div",{className:pt.chips,children:[C.jsx(wu,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),C.jsx(wu,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),C.jsxs("section",{className:pt.section,children:[C.jsxs("span",{children:[f("apartment_number"),":"]}),C.jsx(Su,{..._,rows:1,onChange:S})]}),C.jsxs("section",{className:ve(pt.section,pt.commentSection),children:[C.jsxs("span",{children:[f("comment"),":"]}),C.jsx(Su,{...E,className:pt.comment,onChange:m})]})]}),C.jsx("div",{className:ve(pt.actions,{[pt.actionsHidden]:e}),children:C.jsx(Lt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:pt.submit,onClick:L,children:f("choose",{ns:"common"})})})]})}),Yf=u.memo(US),VS={header:Xe.deliveryDetailsViewHeader,content:Xe.deliveryDetailsViewContent},FS=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Jc({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=Zr("screenSm"),g=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),L=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},S=u.useMemo(()=>({url:Gs(Vn(yr.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Ed)}),[]),m=async()=>{var b;try{c(!0);const x=await((b=a.current)==null?void 0:b.submit());if(!x)return;n==null||n(x),o==null||o(!1),i==null||i(null)}finally{c(!1)}},_=C.jsx(LS,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:Xe.balloon,onDetails:L,onClose:w}),E=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return C.jsxs(Cc,{noClustererRedraw:!0,icon:S,position:g,options:Kc,onLoad:v,children:[y&&C.jsxs(Jf,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:w,onSubmitClick:m,children:[f.address&&C.jsx(Yf,{ref:a,hideActions:!0,classes:VS,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&E&&C.jsx(Tc,{onCloseClick:w,children:_})]})},zS=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o}=tt();function s(){switch(o){case"omnic":return uy;case"omnicLight":return cy;default:return}}const a=s(),l=u.useMemo(()=>{var f,d;return{lat:((f=i==null?void 0:i.center)==null?void 0:f[0])??qo[0],lng:((d=i==null?void 0:i.center)==null?void 0:d[1])??qo[1]}},[i==null?void 0:i.center]),c=u.useCallback(async f=>{const{latLng:d}=f;if(!d||r)return;Le.getState().setDetailsOpen(!1),Gt.getState().setSelectedLocation(null);const h=[d.lat(),d.lng()];console.debug("[OmnicLocationsWidget::mapClick]",h);try{await Dt.getState().setPlaceAndPoint(h)}catch{vt.getState().setDeliverPoint({address:null,coords:h})}},[r]);return C.jsx(mg,{zoom:i==null?void 0:i.initialZoom,center:l,mapContainerClassName:ve(Xe.root,e),options:{styles:a,...fy},onClick:c,...n,children:t})},$S=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),oe.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),oe.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),oe.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),oe.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),HS=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)})},WS=t=>{const e=document.createElement("div");e.classList.add(Xe.mapControl),e.classList.add(Xe.geolocationControl),e.innerHTML=gd.renderToString(C.jsx($S,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{Ws(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await Dt.getState().setPlaceAndPoint(o)})})},GS=({className:t})=>{const e=ln(),n=Le(Nu),r=Le(ip),i=On(lc),o=vt(js),{disableGeolocation:s,hideDeliveryTime:a,hideDetails:l,hideMapControls:c,onPointClick:f,roundedCorners:d}=tt(),h=u.useCallback(w=>{console.debug("[OmnicLocationsWidget::loadMap]",w),Le.getState().setMap(w),c||(HS(w),s||WS(w))},[s,c]),v=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Le.getState().setMap(null)},[]),y=u.useCallback(()=>{if(!n)return;const w=n==null?void 0:n.getBounds();w&&(console.debug("[OmnicLocationsWidget::changeBounds]",w),On.getState().loadNext([[w.getSouthWest().lat(),w.getNorthEast().lat()],[w.getSouthWest().lng(),w.getNorthEast().lng()]],e))},[e,n]),g=u.useCallback(async w=>{if(vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(w),!w)return;const S=[w.location.latitude,w.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",S),await Dt.getState().setPlace(S)},[]),L=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]);return C.jsxs("div",{"data-rounded-corners":d,className:ve(Xe.mapContainer,t),children:[C.jsxs(zS,{onIdle:y,onLoad:h,onUnmount:v,onTilesLoaded:L,children:[o&&C.jsx(FS,{hideDeliveryTime:a,hideDetails:l,point:o,setOpenDetails:Le.getState().setDetailsOpen,setDeliveryPoint:vt.getState().setDeliverPoint,onPointClick:f}),C.jsx(pS,{onPointClick:f,onOpenDetails:Le.getState().setDetailsOpen,onPointSelected:g})]}),(i||r)&&C.jsx(yc,{className:Xe.overlay,children:C.jsx(Fi,{})})]})},ZS=u.memo(GS),qS=t=>({google:ZS})[t];function Qf(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const to=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}},KS=()=>{throw new Error("useMediaQuery is a client-only hook")};function JS(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,KS)}const XS="768px",YS="1024px",QS="1280px",eL="1536px",tL={screenSm:XS,screenMd:YS,screenLg:QS,screenXl:eL};function Zr(t){return JS(`(max-width: calc(${tL[t]} - 1px))`)}const nL=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=Le(Nu);u.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),Le.getState().setLoaded())},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),Dt.getState().setPlace(a,[],"country")};if(r){l();return}Ws(async c=>{const{latitude:f,longitude:d}=c.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await Dt.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},ed=wm().use(am()).use(Yv()).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"}),rL=t=>{u.useEffect(()=>{t&&(ed.changeLanguage(t),Ui.setLanguage(t))},[t])},iL=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&uo(`--owl-color-${n}`,r)}}},[t])},oL=t=>{u.useEffect(()=>{t&&t!==void 0&&uo("--owl-button-radius",`${t}px`)},[t])},sL=t=>{u.useEffect(()=>{t&&t!==void 0&&uo("--owl-font",t)},[t])},aL={open:!1},lL=t=>t.open,Ln=cn(t=>({...aL,toggle(e){t(n=>({open:e??!n.open}))}})),uL=t=>{const e=t==="selector";u.useEffect(()=>{e&&Ln.getState().toggle(!0)},[e])},cL=({locale:t})=>{const[e,n]=u.useState(!1);return u.useEffect(()=>{n(!1)},[t]),u.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},fL=({children:t})=>{const{font:e,locale:n,palette:r,radius:i,startScreen:o}=tt();return sL(e),rL(n),iL(r),oL(i),uL(o),C.jsx(C.Fragment,{children:t})},dL=({children:t})=>{const{disableGeolocation:e,map:n}=tt();return Wt(n==null?void 0:n.center,"Map center is required"),Wt(n==null?void 0:n.initialZoom,"Map initial zoom is required"),nL(n.center,n.initialZoom,{disableGeolocation:e}),C.jsx(C.Fragment,{children:t})},pL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},oe.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"})),hL=()=>{Ln.getState().toggle(!0),Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null)},gL="CurrentLocation-module__root__AeQCGT",vL="CurrentLocation-module__icon__459m9q",mL="CurrentLocation-module__text__w-9v28",$o={root:gL,icon:vL,text:mL},td=({className:t})=>{const{t:e}=Nt("current_location"),n=Dt(mc),r=Dt(tg);return C.jsxs("div",{role:"presentation",className:ve($o.root,t),onClick:hL,children:[C.jsx(pL,{className:$o.icon}),C.jsxs("span",{className:$o.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},yL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},oe.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"})),bL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},oe.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"})),wL="Header-module__root__Pe4MYp",SL="Header-module__nav__wtnkmT",LL="Header-module__navItem__-Fy63Z",EL="Header-module__logo__xO2bWO",xr={root:wL,nav:SL,navItem:LL,logo:EL},xL={llama:bL,default:yL},CL=()=>{const{hideLogo:t,logo:e="default"}=tt();if(t)return null;const n=xL[e];return C.jsx("div",{className:xr.logo,children:C.jsx(n,{})})},_L=({className:t})=>{const{t:e}=Nt("header"),{disableDelivery:n}=tt(),r=Le(ep),i=vt(js);u.useEffect(()=>{i?Le.getState().setMode("location_delivery"):Le.getState().setMode("self_pickup")},[i]);const o=()=>{vt.getState().setDeliverPoint(null),Le.getState().setMode("self_pickup")},s=()=>{vt.getState().setDeliverPoint(null),Le.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return C.jsxs("div",{className:ve(xr.root,t),children:[C.jsx(CL,{}),C.jsxs("nav",{className:xr.nav,children:[!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),C.jsx(td,{})]})]})},ML=u.memo(_L),OL={open:!1},Xn=cn(t=>({...OL,toggle(e){Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),kL="Layout-module__root__qzPL-f",PL="Layout-module__headerHidden__JEN-d0",TL="Layout-module__sidebarHidden__x017O3",RL="Layout-module__sidebarOpen__IZnIjs",wi={root:kL,headerHidden:PL,sidebarHidden:TL,sidebarOpen:RL},AL=({children:t})=>{const{hideFilters:e,hideHeader:n}=tt(),r=Xn(i=>i.open);return C.jsx("div",{className:ve(wi.root,{[wi.sidebarOpen]:r,[wi.headerHidden]:n,[wi.sidebarHidden]:e}),children:t})},aa=()=>C.jsx(yc,{children:C.jsx(Fi,{})}),DL=({children:t})=>{const e=On(Nh);return On(lc)&&!e?C.jsx(aa,{}):C.jsx(C.Fragment,{children:t})};var nd={},vo={},rd={exports:{}},IL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",NL=IL,jL=NL;function id(){}function od(){}od.resetWarningCache=id;var BL=function(){function t(r,i,o,s,a,l){if(l!==jL){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:od,resetWarningCache:id};return n.PropTypes=n,n};rd.exports=BL();var UL=rd.exports,mo={},Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.loadGoogleMapScript=Yn.isBrowser=void 0;var sd=typeof window<"u"&&window.document;Yn.isBrowser=sd;var VL=function(e,n){if(!sd||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)})};Yn.loadGoogleMapScript=VL;var yo={};Object.defineProperty(yo,"__esModule",{value:!0});yo.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var FL="https://maps.googleapis.com/maps/api/js";yo.GOOGLE_MAP_SCRIPT_BASE_URL=FL;function Ni(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ni=function(n){return typeof n}:Ni=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ni(t)}Object.defineProperty(mo,"__esModule",{value:!0});mo.default=ZL;var ht=$L(u),Ho=Yn,zL=yo;function ad(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ad=function(i){return i?n:e})(t)}function $L(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||Ni(t)!=="object"&&typeof t!="function")return{default:t};var n=ad(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 Lu(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 Eu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lu(Object(n),!0).forEach(function(r){HL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function HL(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function WL(t,e){if(t==null)return{};var n=GL(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 GL(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 ZL(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,g=WL(l,["types","componentRestrictions","fields","bounds"]),L=t.googleMapsScriptBaseUrl,w=L===void 0?zL.GOOGLE_MAP_SCRIPT_BASE_URL:L,S=t.language,m=(0,ht.useRef)(null),_=(0,ht.useRef)(null),E=(0,ht.useRef)(null),p=(0,ht.useRef)(null),b=S?"&language=".concat(S):"",x="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(b),k=(0,ht.useCallback)(function(){return(0,Ho.loadGoogleMapScript)(w,x)},[w,x]);return(0,ht.useEffect)(function(){var M=Eu(Eu({},g),{},{fields:v,types:f,bounds:y});if(d&&(M.componentRestrictions=d),!(E.current||!m.current||!Ho.isBrowser)){e&&!e.current&&(e.current=m.current);var P=function(){var T;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((T=google.maps)!==null&&T!==void 0&&T.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(m.current,M),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),m.current,E.current)}))};return r?k().then(function(){return P()}):P(),function(){return _.current?_.current.remove():void 0}}},[]),(0,ht.useEffect)(function(){var M;!(ht.default!==null&&ht.default!==void 0&&(M=ht.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&Ho.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,ht.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,ht.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,ht.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,ht.useEffect)(function(){E.current&&E.current.setOptions(g)},[g]),{ref:m,autocompleteRef:E}}function ji(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ji=function(n){return typeof n}:ji=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ji(t)}Object.defineProperty(vo,"__esModule",{value:!0});vo.default=void 0;var Is=KL(u),He=ld(UL),qL=ld(mo);function ld(t){return t&&t.__esModule?t:{default:t}}function ud(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ud=function(i){return i?n:e})(t)}function KL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ji(t)!=="object"&&typeof t!="function")return{default:t};var n=ud(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 no(){return no=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},no.apply(this,arguments)}function JL(t,e){if(t==null)return{};var n=XL(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 XL(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 cd(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=JL(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,qL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return Is.default.createElement("input",no({ref:d},c))}cd.propTypes={apiKey:He.default.string,libraries:He.default.arrayOf(He.default.string),ref:He.default.oneOfType([He.default.func,He.default.shape({current:He.default.any})]),googleMapsScriptBaseUrl:He.default.string,onPlaceSelected:He.default.func,inputAutocompleteValue:He.default.string,options:He.default.shape({componentRestrictions:He.default.object,bounds:He.default.object,location:He.default.object,offset:He.default.number,origin:He.default.object,radius:He.default.number,sessionToken:He.default.object,types:He.default.arrayOf(He.default.string)}),language:He.default.string};var YL=(0,Is.forwardRef)(function(t,e){return Is.default.createElement(cd,no({},t,{refProp:e}))});vo.default=YL;(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(vo),n=r(mo);function r(i){return i&&i.__esModule?i:{default:i}}})(nd);var fd=nd;const QL="Aside-module__root__EotK2f",e1="Aside-module__open__Zwmbs5",t1="Aside-module__overlay__slLdHF",n1="Aside-module__container__28P4wq",Si={root:QL,open:e1,overlay:t1,container:n1},r1=({children:t,className:e,open:n})=>C.jsxs("div",{className:ve(Si.root,e,{[Si.open]:n}),children:[C.jsx("div",{className:Si.overlay}),C.jsx("div",{className:Si.container,children:t})]}),i1="Input-module__root__TF9IiD",o1="Input-module__endAdornment__m40K5R",s1="Input-module__input__505b7i",a1="Input-module__startAdornment__D-sJ0N",l1="Input-module__label__gmqtsf",u1="Input-module__inputContainer__vubIa-",Bn={root:i1,endAdornment:o1,input:s1,startAdornment:a1,label:l1,inputContainer:u1},dd=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=Qf(n,f);return C.jsxs("label",{htmlFor:a.id??c,className:ve(Bn.root,t),children:[r&&C.jsx("span",{className:Bn.label,children:r}),C.jsxs("div",{className:Bn.inputContainer,children:[s&&C.jsx("div",{className:Bn.startAdornment,children:s}),C.jsx("input",{...a,ref:d,id:a.id??c,className:Bn.input,onChange:o,onBlur:i}),e&&C.jsx("div",{className:Bn.endAdornment,children:e})]})]})}),c1="LocationAside-module__submit__CSKcqi",f1="LocationAside-module__container__S1NejR",d1="LocationAside-module__selector__hl74ke",p1="LocationAside-module__label__0Zk8at",h1="LocationAside-module__header__N1wgyn",g1="LocationAside-module__close__VsE88z",Li={submit:c1,container:f1,selector:d1,label:p1,header:h1,close:g1},v1=u.forwardRef((t,e)=>{const{t:n}=Nt(["location_aside","common"]),r=Ln(lL),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=tt(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Ln.getState().toggle(!0),close:()=>Ln.getState().toggle(!1)}),[]);const h=async S=>{Ln.getState().toggle(!1),await Dt.getState().setPlace(S),l==null||l(S),S!=null&&S.formatted_address&&d(S==null?void 0:S.formatted_address)},v=()=>{Ln.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,g=S=>{d(S.target.value)},{ref:L}=fd.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=to(s==null?void 0:s.city);return C.jsx(r1,{open:r,children:C.jsx("div",{ref:c,className:Li.container,children:C.jsxs("div",{className:Li.selector,children:[C.jsxs("div",{className:Li.header,children:[C.jsx("div",{className:Li.label,children:n("choose_city")}),!o&&C.jsx(Hr,{position:"relative",onClick:v})]}),C.jsx(dd,{...w,inputRef:L,value:f,placeholder:n("placeholder"),onChange:g})]})})})}),m1=u.memo(v1),y1=({children:t})=>{const{locale:e}=tt(),{isLoaded:n}=xc({language:e,libraries:Cd,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return n?C.jsx(C.Fragment,{children:t}):C.jsx(aa,{})},b1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.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"})),w1=({className:t})=>{const{t:e}=Nt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=tt(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=async S=>{await Dt.getState().setPlaceAndPoint(S,{ignoreSelection:!0}),i==null||i(S)},{ref:h}=fd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=S=>{a&&Le.getState().setBlurred(!!S.target.value),s(S.target.value)},y=()=>{o&&Le.getState().setBlurred(!0),Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),l(!0)},g=()=>{Le.getState().setBlurred(!1),l(!1)},L=S=>{S.key==="Enter"&&S.preventDefault()},w=to(r==null?void 0:r.address);return C.jsx(dd,{...w,inputRef:h,value:o,className:t,endAdornment:C.jsx(b1,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:L})},S1=({className:t})=>Le(rp)?C.jsx(w1,{className:t}):null,L1=u.memo(S1),E1="DeliveryDetailsModal-module__root__qwKnjX",x1={root:E1},C1=({className:t,location:e,onClose:n,onSubmit:r})=>C.jsx("div",{className:ve(x1.root,t),children:C.jsx(Yf,{location:e,onClose:n,onSubmit:r})}),_1="LocationDetailsModal-module__root__PyRnLM",M1={root:_1},O1=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return C.jsx("div",{className:ve(M1.root,t),children:C.jsx(qc,{location:e,onClose:n,onSubmit:i})})},k1="MapContainer-module__root__1Os6Q-",P1="MapContainer-module__mapWrapper__Cwe7qC",T1="MapContainer-module__wrapperBlurred__04NN2L",R1="MapContainer-module__locationSelector__Pr1zS-",A1="MapContainer-module__filterButton__CW3Qv7",D1="MapContainer-module__sidebarOpen__lGMVrJ",I1="MapContainer-module__filterIcon__T01XsJ",N1="MapContainer-module__details__gM8LWX",At={root:k1,mapWrapper:P1,wrapperBlurred:T1,locationSelector:R1,filterButton:A1,sidebarOpen:D1,filterIcon:I1,details:N1},j1=()=>{const{onPointClick:t}=tt(),e=Le(Bs),n=Gt(sp),r=vt(js),i=u.useCallback(()=>{Le.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),Le.getState().setDetailsOpen(!1),Gt.getState().setSelectedLocation(null),vt.getState().setDeliverPoint(null)},[t]);return C.jsxs(C.Fragment,{children:[(r==null?void 0:r.address)&&e&&C.jsx(C1,{location:r,className:At.details,onClose:i,onSubmit:o}),n&&e&&C.jsx(O1,{location:n,className:At.details,onClose:i,onSubmit:o})]})},B1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},oe.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),oe.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"})),U1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},oe.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),oe.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"})),V1=()=>{const t=Xn(i=>i.open),e=Xn(i=>i.toggle),n=Zr("screenSm"),r=()=>{e(!0)};return C.jsxs("div",{role:"presentation",className:ve(At.filterButton,{[At.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&C.jsx(td,{}),n?C.jsx(U1,{className:At.filterIcon,onClick:r}):C.jsx(B1,{className:At.filterIcon})]})},F1=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=tt(),i=Le(np),o=Le(Bs);return C.jsxs("div",{className:ve(At.root,e),children:[!r&&!o&&C.jsx(L1,{className:At.locationSelector}),!n&&C.jsx(V1,{}),C.jsx("div",{className:ve(At.mapWrapper,{[At.wrapperBlurred]:i}),children:t}),C.jsx(j1,{})]})},z1=u.memo(F1),$1="Separator-module__root__eQtZey",H1={root:$1},Wo=({className:t,...e})=>C.jsx("hr",{className:ve(H1.root,t),...e}),W1="Sidebar-module__root__4j1MA3",G1="Sidebar-module__closeButton__HLXy1c",Z1="Sidebar-module__open__mqQXF6",q1="Sidebar-module__header__Afp6uz",K1="Sidebar-module__typeFilter__GN46u9",J1="Sidebar-module__separator__6I4QoJ",X1="Sidebar-module__withRightPadding__2u1Ina",Y1="Sidebar-module__sheetContent__SaoncI",Q1="Sidebar-module__doneButton__4aeaSD",$t={root:W1,closeButton:G1,open:Z1,header:q1,typeFilter:K1,separator:J1,withRightPadding:X1,sheetContent:Y1,doneButton:Q1},eE=()=>{const{t}=Nt("common"),e=Zr("screenSm"),n=Xn(i=>i.toggle),r=()=>{n(!1)};return C.jsxs("div",{className:$t.header,children:[e&&C.jsx("div",{role:"presentation",className:$t.doneButton,onClick:r,children:t("done")}),!e&&C.jsx(Hr,{className:$t.closeButton,onClick:r})]})},tE="Radio-module__root__7ElY2W",nE="Radio-module__label__c-sYW3",xu={root:tE,label:nE},rE=({className:t,label:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return C.jsxs("label",{htmlFor:i,className:ve(xu.label,o),...s,children:[C.jsx("input",{id:i,type:"radio",className:ve(xu.root,t),...r}),e]})},Wn=t=>C.jsx(rE,{...t,type:"checkbox"}),iE="RadioGroup-module__root__ewZw-x",oE="RadioGroup-module__body__k8BJAs",sE="RadioGroup-module__legend__tcfV7q",Go={root:iE,body:oE,legend:sE},pd=({children:t,className:e,label:n,onChange:r,value:i,...o})=>C.jsxs("div",{className:ve(Go.root,e),...o,children:[n&&C.jsx("span",{className:Go.legend,children:n}),C.jsx("div",{className:Go.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)})]}),aE=({className:t,onChange:e})=>{const{t:n}=Nt("receive_filter"),r=ln(cp);return C.jsxs(pd,{value:r,label:n("title"),className:t,onChange:e,children:[C.jsx(Wn,{name:"receive",value:Ot.DressingRoom,label:n("dressing_room")}),C.jsx(Wn,{name:"receive",value:Ot.CheckOrder,label:n("check_order")}),C.jsx(Wn,{name:"receive",value:Ot.PayByCash,label:n("pay_by_cash")})]})},lE=u.memo(aE),uE=({className:t,onChange:e})=>{const{t:n}=Nt("send_filter"),r=ln(up);return C.jsxs(pd,{className:t,value:r,label:n("title"),onChange:e,children:[C.jsx(Wn,{name:"send",value:kt.Return,label:n("sending_returns")}),C.jsx(Wn,{name:"send",value:kt.Shipping,label:n("shipping")}),C.jsx(Wn,{name:"send",value:kt.Payment,label:n("payment")})]})},cE=u.memo(uE),fE="TypeFilter-module__root__WH5EQV",dE="TypeFilter-module__button__f0mSfo",Ei={root:fE,button:dE},pE=({className:t,onChange:e,value:n})=>{const{t:r}=Nt("type_filter"),i=o=>()=>e==null?void 0:e(o);return C.jsxs("div",{className:ve(Ei.root,t),children:[C.jsx(Lt,{className:Ei.button,variant:n===zt.All?"primary":"secondary",onClick:i(zt.All),children:r("all")}),C.jsx(Lt,{className:Ei.button,variant:n===zt.PostOffice?"primary":"secondary",onClick:i(zt.PostOffice),children:r("post_office")}),C.jsx(Lt,{className:Ei.button,variant:n===zt.PickPoint?"primary":"secondary",onClick:i(zt.PickPoint),children:r("pick_point")})]})},hE=({className:t,onChange:e})=>{const n=ln(lp);return C.jsx(pE,{value:n,className:t,onChange:e})},gE=u.memo(hE),vE=({className:t})=>{const e=Zr("screenSm"),n=Xn(l=>l.open),r=u.useCallback(l=>ln.getState().setFilter({type:l}),[]),i=u.useCallback(l=>ln.getState().setFilter({send:l}),[]),o=u.useCallback(l=>ln.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>Xn.getState().toggle(!1),[]),a=C.jsxs(C.Fragment,{children:[C.jsx(eE,{}),C.jsxs("div",{className:$t.withRightPadding,children:[C.jsx(gE,{className:$t.typeFilter,onChange:r}),C.jsx(Wo,{className:$t.separator}),C.jsx(lE,{onChange:o}),C.jsx(Wo,{}),C.jsx(cE,{onChange:i}),C.jsx(Wo,{})]})]});return e?C.jsx(qf,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Kf,onDismiss:s,children:C.jsx("div",{className:$t.sheetContent,children:a})}):C.jsx("div",{className:ve($t.root,t,{[$t.open]:n}),children:a})},mE="App-module__map__Kf-2JS",yE="App-module__sidebar__ORIzGk",bE="App-module__header__bgP9DA",Zo={map:mE,sidebar:yE,header:bE},wE=({config:t,options:e})=>{const n=Xh(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;Wt(r,"INN is required"),Yh(r,e),Wt(a==null?void 0:a.provider,"Map provider is required");const l=qS(a.provider);jh();const c=cL({locale:s});return C.jsx(Pu.Provider,{value:n,children:C.jsx(dL,{children:C.jsx(fL,{children:C.jsx(Lm,{tolgee:ed,fallback:C.jsx(aa,{}),children:c&&C.jsx(y1,{children:C.jsx(DL,{children:C.jsxs(AL,{children:[!o&&C.jsx(ML,{className:Zo.header}),!i&&C.jsx(vE,{className:Zo.sidebar}),C.jsx(z1,{className:Zo.map,children:C.jsx(l,{})}),C.jsx(m1,{})]})})})})})})})},hd=async t=>Br.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Ot;exports.ESendFilter=kt;exports.ETypeFilter=zt;exports.Widget=wE;exports.createPointsIterator=ts;exports.fetchPointsRequest=es;exports.fromHoursMinutesToMinutes=fp;exports.fromMinutesToHoursMinutes=dp;exports.getAddressFormGeocode=is;exports.getBoundsFromPoint=pp;exports.getCurrentPosition=Ws;exports.getNormalizedAddress=hd;exports.getPropertyValue=ac;exports.isCoordinates=rs;exports.isDeliveryPoint=Ah;exports.isHttpSuccess=sc;exports.isPlaceId=oc;exports.replaceSvgCurrentColor=Vn;exports.setWidgetCSSProperty=uo;exports.stopImmediatePropagation=ns;exports.svgStringToBase64URL=Gs;
152
+ */function tu(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 nu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tu(Object(n),!0).forEach(function(r){ow(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ow(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ru=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()}}}(),sw=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},aw=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},lw=function(e){return e.key==="Tab"||e.keyCode===9},iu=function(e){return setTimeout(e,0)},ou=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},vr=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},gi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},uw=function(e,n){var r=(n==null?void 0:n.document)||document,i=nu({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(p,b,x){return p&&p[b]!==void 0?p[b]:i[x||b]},l=function(p){return o.containerGroups.findIndex(function(b){var x=b.container,P=b.tabbableNodes;return x.contains(p)||P.find(function(M){return M===p})})},c=function(p){var b=i[p];if(typeof b=="function"){for(var x=arguments.length,P=new Array(x>1?x-1:0),M=1;M<x;M++)P[M-1]=arguments[M];b=b.apply(void 0,P)}if(b===!0&&(b=void 0),!b){if(b===void 0||b===!1)return b;throw new Error("`".concat(p,"` was specified but was not a node, or did not return a node"))}var k=b;if(typeof b=="string"&&(k=r.querySelector(b),!k))throw new Error("`".concat(p,"` as selector refers to no known node"));return k},f=function(){var p=c("initialFocus");if(p===!1)return!1;if(p===void 0)if(l(r.activeElement)>=0)p=r.activeElement;else{var b=o.tabbableGroups[0],x=b&&b.firstTabbableNode;p=x||c("fallbackFocus")}if(!p)throw new Error("Your focus-trap needs to have at least one focusable element");return p},d=function(){if(o.containerGroups=o.containers.map(function(p){var b=nw(p,i.tabbableOptions),x=rw(p,i.tabbableOptions);return{container:p,tabbableNodes:b,focusableNodes:x,firstTabbableNode:b.length>0?b[0]:null,lastTabbableNode:b.length>0?b[b.length-1]:null,nextTabbableNode:function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=x.findIndex(function(T){return T===M});if(!(O<0))return k?x.slice(O+1).find(function(T){return hi(T,i.tabbableOptions)}):x.slice(0,O).reverse().find(function(T){return hi(T,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(p){return p.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(p){if(p!==!1&&p!==r.activeElement){if(!p||!p.focus){E(f());return}p.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=p,sw(p)&&p.select()}},v=function(p){var b=c("setReturnFocus",p);return b||(b===!1?!1:p)},y=function(p){var b=gi(p);if(!(l(b)>=0)){if(vr(i.clickOutsideDeactivates,p)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!Vo(b,i.tabbableOptions)});return}vr(i.allowOutsideClick,p)||p.preventDefault()}},g=function(p){var b=gi(p),x=l(b)>=0;x||b instanceof Document?x&&(o.mostRecentlyFocusedNode=b):(p.stopImmediatePropagation(),h(o.mostRecentlyFocusedNode||f()))},S=function(p){var b=gi(p);d();var x=null;if(o.tabbableGroups.length>0){var P=l(b),M=P>=0?o.containerGroups[P]:void 0;if(P<0)p.shiftKey?x=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:x=o.tabbableGroups[0].firstTabbableNode;else if(p.shiftKey){var k=ou(o.tabbableGroups,function(N){var U=N.firstTabbableNode;return b===U});if(k<0&&(M.container===b||Vo(b,i.tabbableOptions)&&!hi(b,i.tabbableOptions)&&!M.nextTabbableNode(b,!1))&&(k=P),k>=0){var O=k===0?o.tabbableGroups.length-1:k-1,T=o.tabbableGroups[O];x=T.lastTabbableNode}}else{var D=ou(o.tabbableGroups,function(N){var U=N.lastTabbableNode;return b===U});if(D<0&&(M.container===b||Vo(b,i.tabbableOptions)&&!hi(b,i.tabbableOptions)&&!M.nextTabbableNode(b))&&(D=P),D>=0){var j=D===o.tabbableGroups.length-1?0:D+1,V=o.tabbableGroups[j];x=V.firstTabbableNode}}}else x=c("fallbackFocus");x&&(p.preventDefault(),h(x))},w=function(p){if(aw(p)&&vr(i.escapeDeactivates,p)!==!1){p.preventDefault(),s.deactivate();return}if(lw(p)){S(p);return}},L=function(p){var b=gi(p);l(b)>=0||vr(i.clickOutsideDeactivates,p)||vr(i.allowOutsideClick,p)||(p.preventDefault(),p.stopImmediatePropagation())},m=function(){if(o.active)return ru.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?iu(function(){h(f())}):h(f()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",L,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},_=function(){if(o.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",L,!0),r.removeEventListener("keydown",w,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(p){if(o.active)return this;var b=a(p,"onActivate"),x=a(p,"onPostActivate"),P=a(p,"checkCanFocusTrap");P||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,b&&b();var M=function(){P&&d(),m(),x&&x()};return P?(P(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(p){if(!o.active)return this;var b=nu({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},p);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,_(),o.active=!1,o.paused=!1,ru.deactivateTrap(s);var x=a(b,"onDeactivate"),P=a(b,"onPostDeactivate"),M=a(b,"checkCanReturnFocus"),k=a(b,"returnFocus","returnFocusOnDeactivate");x&&x();var O=function(){iu(function(){k&&h(v(o.nodeFocusedBeforeActivation)),P&&P()})};return k&&M?(M(v(o.nodeFocusedBeforeActivation)).then(O,O),this):(O(),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(),m(),this)},updateContainerElements:function(p){var b=[].concat(p).filter(Boolean);return o.containers=b.map(function(x){return typeof x=="string"?r.querySelector(x):x}),o.active&&d(),this}},s.updateContainerElements(e),s};function cw(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 oa=!1;if(typeof window<"u"){var su={get passive(){oa=!0}};window.addEventListener("testPassive",null,su),window.removeEventListener("testPassive",null,su)}var Bf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),an=[],eo=!1,Vf=-1,Ar=void 0,Dr=void 0,Uf=function(e){return an.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},to=function(e){var n=e||window.event;return Uf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},fw=function(e){if(Dr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Dr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Ar===void 0&&(Ar=document.body.style.overflow,document.body.style.overflow="hidden")},dw=function(){Dr!==void 0&&(document.body.style.paddingRight=Dr,Dr=void 0),Ar!==void 0&&(document.body.style.overflow=Ar,Ar=void 0)},pw=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},hw=function(e,n){var r=e.targetTouches[0].clientY-Vf;return Uf(e.target)?!1:n&&n.scrollTop===0&&r>0||pw(n)&&r<0?to(e):(e.stopPropagation(),!0)},gw=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!an.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};an=[].concat(cw(an),[r]),Bf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Vf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&hw(i,e)},eo||(document.addEventListener("touchmove",to,oa?{passive:!1}:void 0),eo=!0)):fw(n)}},vw=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}an=an.filter(function(n){return n.targetElement!==e}),Bf?(e.ontouchstart=null,e.ontouchmove=null,eo&&an.length===0&&(document.removeEventListener("touchmove",to,oa?{passive:!1}:void 0),eo=!1)):an.length||dw()},_n=[],mw=function(){return _n.some(function(t){return t.activeTargets.length>0})},yw=function(){return _n.some(function(t){return t.skippedTargets.length>0})},au="ResizeObserver loop completed with undelivered notifications.",bw=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:au}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=au),window.dispatchEvent(t)},Fr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Fr||(Fr={}));var Mn=function(t){return Object.freeze(t)},ww=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Mn(this)}return t}(),Ff=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,Mn(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}(),sa=function(t){return t instanceof SVGElement&&"getBBox"in t},zf=function(t){if(sa(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)},lu=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)},Sw=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},Ir=typeof window<"u"?window:{},vi=new WeakMap,uu=/auto|scroll/,Lw=/^tb|vertical/,Ew=/msie|trident/i.test(Ir.navigator&&Ir.navigator.userAgent),Tt=function(t){return parseFloat(t||"0")},Hn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new ww((n?e:t)||0,(n?t:e)||0)},cu=Mn({devicePixelContentBoxSize:Hn(),borderBoxSize:Hn(),contentBoxSize:Hn(),contentRect:new Ff(0,0,0,0)}),$f=function(t,e){if(e===void 0&&(e=!1),vi.has(t)&&!e)return vi.get(t);if(zf(t))return vi.set(t,cu),cu;var n=getComputedStyle(t),r=sa(t)&&t.ownerSVGElement&&t.getBBox(),i=!Ew&&n.boxSizing==="border-box",o=Lw.test(n.writingMode||""),s=!r&&uu.test(n.overflowY||""),a=!r&&uu.test(n.overflowX||""),l=r?0:Tt(n.paddingTop),c=r?0:Tt(n.paddingRight),f=r?0:Tt(n.paddingBottom),d=r?0:Tt(n.paddingLeft),h=r?0:Tt(n.borderTopWidth),v=r?0:Tt(n.borderRightWidth),y=r?0:Tt(n.borderBottomWidth),g=r?0:Tt(n.borderLeftWidth),S=d+c,w=l+f,L=g+v,m=h+y,_=a?t.offsetHeight-m-t.clientHeight:0,E=s?t.offsetWidth-L-t.clientWidth:0,p=i?S+L:0,b=i?w+m:0,x=r?r.width:Tt(n.width)-p-E,P=r?r.height:Tt(n.height)-b-_,M=x+S+E+L,k=P+w+_+m,O=Mn({devicePixelContentBoxSize:Hn(Math.round(x*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:Hn(M,k,o),contentBoxSize:Hn(x,P,o),contentRect:new Ff(d,l,x,P)});return vi.set(t,O),O},Hf=function(t,e,n){var r=$f(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case Fr.DEVICE_PIXEL_CONTENT_BOX:return s;case Fr.BORDER_BOX:return i;default:return o}},xw=function(){function t(e){var n=$f(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Mn([n.borderBoxSize]),this.contentBoxSize=Mn([n.contentBoxSize]),this.devicePixelContentBoxSize=Mn([n.devicePixelContentBoxSize])}return t}(),Wf=function(t){if(zf(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Cw=function(){var t=1/0,e=[];_n.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new xw(c.target),d=Wf(c.target);a.push(f),c.lastReportedSize=Hf(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},fu=function(t){_n.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Wf(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},_w=function(){var t=0;for(fu(t);mw();)t=Cw(),fu(t);return yw()&&bw(),t>0},Uo,Gf=[],Mw=function(){return Gf.splice(0).forEach(function(t){return t()})},Ow=function(t){if(!Uo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Mw()}).observe(n,r),Uo=function(){n.textContent="".concat(e?e--:e++)}}Gf.push(t),Uo()},Pw=function(t){Ow(function(){requestAnimationFrame(t)})},Ii=0,kw=function(){return!!Ii},Tw=250,Rw={attributes:!0,characterData:!0,childList:!0,subtree:!0},du=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],pu=function(t){return t===void 0&&(t=0),Date.now()+t},Fo=!1,Aw=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=Tw),!Fo){Fo=!0;var r=pu(e);Pw(function(){var i=!1;try{i=_w()}finally{if(Fo=!1,e=r-pu(),!kw())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,Rw)};document.body?n():Ir.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),du.forEach(function(n){return Ir.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),du.forEach(function(n){return Ir.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ds=new Aw,hu=function(t){!Ii&&t>0&&Ds.start(),Ii+=t,!Ii&&Ds.stop()},Dw=function(t){return!sa(t)&&!Sw(t)&&getComputedStyle(t).display==="inline"},Iw=function(){function t(e,n){this.target=e,this.observedBox=n||Fr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Hf(this.target,this.observedBox,!0);return Dw(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Nw=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),mi=new WeakMap,gu=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},yi=function(){function t(){}return t.connect=function(e,n){var r=new Nw(e,n);mi.set(e,r)},t.observe=function(e,n,r){var i=mi.get(e),o=i.observationTargets.length===0;gu(i.observationTargets,n)<0&&(o&&_n.push(i),i.observationTargets.push(new Iw(n,r&&r.box)),hu(1),Ds.schedule())},t.unobserve=function(e,n){var r=mi.get(e),i=gu(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&_n.splice(_n.indexOf(r),1),r.observationTargets.splice(i,1),hu(-1))},t.disconnect=function(e){var n=this,r=mi.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),jw=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.");yi.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(!lu(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");yi.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(!lu(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");yi.unobserve(this,e)},t.prototype.disconnect=function(){yi.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function ot(){return ot=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},ot.apply(this,arguments)}function Ni(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 Nr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function mr(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 bi(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var Bw={box:"border-box"};function zo(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 Nr(function(){if(t.current&&r){var c=new jw(l);return c.observe(t.current,Bw),function(){c.disconnect()}}},[t,l,r]),r?s:0}function it(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var vu={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},mu={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Vw=f0({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:ot({},vu,mu)}}},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:ot({},vu,mu)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:ot({},{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:[d0({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(it()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(it()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(it()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),Uw=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Fw=["velocity"],zw=["onRest","config"],Zf=B0.default,$w=Zf.tension,wi=Zf.friction,Hw=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?Gw:v,g=t.snapPoints,S=g===void 0?Zw:g,w=t.blocking,L=w===void 0||w,m=t.scrollLocking,_=m===void 0||m,E=t.style,p=t.onSpringStart,b=t.onSpringCancel,x=t.onSpringEnd,P=t.reserveScrollBarGap,M=P===void 0?L:P,k=t.expandOnContentDrag,O=k!==void 0&&k,T=Ni(t,Uw),D=function(){var I=u.useState(!1),K=I[0],z=I[1],le=u.useState({}),Re=le[0],me=le[1],Ae=u.useCallback(function(_e){return me(function(Be){var re;return ot({},Be,((re={})[_e]=!1,re))}),function(){me(function(Be){var re;return ot({},Be,((re={})[_e]=!0,re))})}},[]);return u.useEffect(function(){var _e=Object.values(Re);_e.length!==0&&_e.every(Boolean)&&z(!0)},[Re]),{ready:K,registerReady:Ae}}(),j=D.ready,V=D.registerReady,N=u.useRef(!1),U=u.useRef(p),q=u.useRef(b),$=u.useRef(x);u.useEffect(function(){U.current=p,q.current=b,$.current=x},[b,p,x]);var F,Z,te=$0(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),X=te[0],J=te[1],R=u.useRef(null),fe=u.useRef(null),xe=u.useRef(null),H=u.useRef(null),Oe=u.useRef(null),Pe=u.useRef(null),se=u.useRef(0),we=u.useRef(),Ne=u.useRef(!1),he=(F=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),Z=u.useRef(F==null?void 0:F.matches),u.useDebugValue(Z.current?"reduce":"no-preference"),u.useEffect(function(){var I=function(K){Z.current=K.matches};return F==null||F.addListener(I),function(){return F==null?void 0:F.removeListener(I)}},[F]),Z),Se=function(I){var K=I.targetRef,z=I.enabled,le=I.reserveScrollBarGap,Re=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return Re.current.deactivate(),void(Re.current={activate:function(){},deactivate:function(){}});var me=K.current,Ae=!1;Re.current={activate:function(){Ae||(Ae=!0,gw(me,{allowTouchMove:function(_e){return _e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:le}))},deactivate:function(){Ae&&(Ae=!1,vw(me))}}},[z,K,le]),Re}({targetRef:fe,enabled:j&&_,reserveScrollBarGap:M}),ke=function(I){var K=I.targetRef,z=I.enabled,le=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(z?"Enabled":"Disabled"),u.useEffect(function(){if(!z)return le.current.deactivate(),void(le.current={activate:function(){},deactivate:function(){}});var Re=K.current,me=!1,Ae=[],_e=[];le.current={activate:function(){if(!me){me=!0;var Be=Re.parentNode;document.querySelectorAll("body > *").forEach(function(re){if(re!==Be){var de=re.getAttribute("aria-hidden");de!==null&&de!=="false"||(Ae.push(de),_e.push(re),re.setAttribute("aria-hidden","true"))}})}},deactivate:function(){me&&(me=!1,_e.forEach(function(Be,re){var de=Ae[re];de===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",de)}),Ae=[],_e=[])}}},[K,z]),le}({targetRef:R,enabled:j&&L}),Ce=function(I){var K=I.targetRef,z=I.fallbackRef,le=I.initialFocusRef,Re=I.enabled,me=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Re?"Enabled":"Disabled"),u.useEffect(function(){if(!Re)return me.current.deactivate(),void(me.current={activate:function(){},deactivate:function(){}});var Ae=z.current,_e=uw(K.current,{onActivate:void 0,initialFocus:le?function(){return(le==null?void 0:le.current)||Ae}:void 0,fallbackFocus:Ae,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;me.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(_e.activate()).then(function(){return Promise.resolve(new Promise(function(re){return setTimeout(function(){return re(void 0)},0)})).then(function(){})}))}catch(re){return Promise.reject(re)}},deactivate:function(){Be&&(Be=!1,_e.deactivate())}}},[Re,z,le,K]),me}({targetRef:R,fallbackRef:Pe,initialFocusRef:f||void 0,enabled:j&&L&&f!==!1}),Te=function(I){var K=I.getSnapPoints,z=I.heightRef,le=I.lastSnapRef,Re=I.ready,me=function(Ge){var ct=Ge.contentRef,ft=Ge.controlledMaxHeight,Ke=Ge.footerEnabled,kt=Ge.footerRef,xt=Ge.headerEnabled,dt=Ge.headerRef,Zt=Ge.registerReady,Vt=Ge.resizeSourceRef,nr=u.useMemo(function(){return Zt("contentHeight")},[Zt]),rr=function(qt,pn,hn){var gn=u.useMemo(function(){return pn("maxHeight")},[pn]),vn=u.useState(function(){return bi(qt)||typeof window<"u"?window.innerHeight:0}),sr=vn[0],ar=vn[1],Kt=sr>0,Y=u.useRef(0);return u.useDebugValue(qt?"controlled":"auto"),u.useEffect(function(){Kt&&gn()},[Kt,gn]),Nr(function(){if(qt)return ar(bi(qt)),void(hn.current="maxheightprop");var la=function(){Y.current||(Y.current=requestAnimationFrame(function(){ar(window.innerHeight),hn.current="window",Y.current=0}))};return window.addEventListener("resize",la),ar(window.innerHeight),hn.current="window",gn(),function(){window.removeEventListener("resize",la),cancelAnimationFrame(Y.current)}},[qt,gn,hn]),sr}(ft,Zt,Vt),kn=zo(dt,{label:"headerHeight",enabled:xt,resizeSourceRef:Vt}),ir=zo(ct,{label:"contentHeight",enabled:!0,resizeSourceRef:Vt}),Tn=zo(kt,{label:"footerHeight",enabled:Ke,resizeSourceRef:Vt}),dn=Math.min(rr-kn-Tn,ir)+kn+Tn;u.useDebugValue("minHeight: "+dn);var or=ir>0;return u.useEffect(function(){or&&nr()},[or,nr]),{maxHeight:rr,minHeight:dn,headerHeight:kn,footerHeight:Tn}}({contentRef:I.contentRef,controlledMaxHeight:I.controlledMaxHeight,footerEnabled:I.footerEnabled,footerRef:I.footerRef,headerEnabled:I.headerEnabled,headerRef:I.headerRef,registerReady:I.registerReady,resizeSourceRef:I.resizeSourceRef}),Ae=me.maxHeight,_e=me.minHeight,Be=me.headerHeight,re=me.footerHeight,de=function(Ge,ct){var ft=[].concat(Ge).map(bi).reduce(function(dt,Zt){return dt.add(mr(Zt,0,ct)),dt},new Set),Ke=Array.from(ft),kt=Math.min.apply(Math,Ke);if(Number.isNaN(kt))throw new TypeError("minSnap is NaN");var xt=Math.max.apply(Math,Ke);if(Number.isNaN(xt))throw new TypeError("maxSnap is NaN");return{snapPoints:Ke,minSnap:kt,maxSnap:xt}}(Re?K({height:z.current,footerHeight:re,headerHeight:Be,minHeight:_e,maxHeight:Ae}):[0],Ae),st=de.snapPoints,Bt=de.minSnap,rt=de.maxSnap;return u.useDebugValue("minSnap: "+Bt+", maxSnap:"+rt),{minSnap:Bt,maxSnap:rt,findSnap:function(Ge){var ct=bi(typeof Ge=="function"?Ge({footerHeight:re,headerHeight:Be,height:z.current,minHeight:_e,maxHeight:Ae,snapPoints:st,lastSnap:le.current}):Ge);return st.reduce(function(ft,Ke){return Math.abs(Ke-ct)<Math.abs(ft-ct)?Ke:ft},Bt)},maxHeight:Ae}}({contentRef:xe,controlledMaxHeight:h,footerEnabled:!!o,footerRef:Oe,getSnapPoints:S,headerEnabled:s!==!1,headerRef:H,heightRef:se,lastSnapRef:c,ready:j,registerReady:V,resizeSourceRef:we}),ee=Te.minSnap,Ue=Te.maxSnap,Q=Te.maxHeight,qe=Te.findSnap,W=u.useRef(Q),Fe=u.useRef(ee),je=u.useRef(Ue),ut=u.useRef(qe),nt=u.useRef(0);Nr(function(){W.current=Q,je.current=Ue,Fe.current=ee,ut.current=qe,nt.current=qe(y)},[qe,y,Q,Ue,ee]);var ne=u.useCallback(function(I){var K=I.onRest,z=I.config,le=(z=z===void 0?{}:z).velocity,Re=le===void 0?1:le,me=Ni(z,Fw),Ae=Ni(I,zw);return new Promise(function(_e){return J(ot({},Ae,{config:ot({velocity:Re},me,{mass:1,tension:$w,friction:Math.max(wi,wi+(wi-wi*Re))}),onRest:function(){var Be=[].slice.call(arguments);_e.apply(void 0,Be),K==null||K.apply(void 0,Be)}}))})},[J]),fn=S0(Vw,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(I){return q.current==null?void 0:q.current({type:"SNAP",source:I.snapSource})},[]),onCloseCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return q.current==null?void 0:q.current({type:"RESIZE",source:we.current})},[]),onOpenEnd:u.useCallback(function(){return $.current==null?void 0:$.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(I,K){return $.current==null?void 0:$.current({type:"SNAP",source:I.snapSource})},[]),onResizeEnd:u.useCallback(function(){return $.current==null?void 0:$.current({type:"RESIZE",source:we.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(I,K){try{return Promise.resolve(U.current==null?void 0:U.current({type:"SNAP",source:K.payload.source||"custom"}))}catch(z){return Promise.reject(z)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(U.current==null?void 0:U.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(U.current==null?void 0:U.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(U.current==null?void 0:U.current({type:"RESIZE",source:we.current}))}catch(I){return Promise.reject(I)}},[]),onSnapEnd:u.useCallback(function(I,K){try{return Promise.resolve($.current==null?void 0:$.current({type:"SNAP",source:I.snapSource}))}catch(z){return Promise.reject(z)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"OPEN"}))}catch(I){return Promise.reject(I)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"CLOSE"}))}catch(I){return Promise.reject(I)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"RESIZE",source:we.current}))}catch(I){return Promise.reject(I)}},[]),renderVisuallyHidden:u.useCallback(function(I,K){try{return Promise.resolve(ne({y:nt.current,ready:0,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(z){return Promise.reject(z)}},[ne]),activate:u.useCallback(function(I,K){try{return N.current=!0,Promise.resolve(Promise.all([Se.current.activate(),Ce.current.activate(),ke.current.activate()])).then(function(){})}catch(z){return Promise.reject(z)}},[ke,Ce,Se]),deactivate:u.useCallback(function(){try{return Se.current.deactivate(),Ce.current.deactivate(),ke.current.deactivate(),N.current=!1,Promise.resolve()}catch(I){return Promise.reject(I)}},[ke,Ce,Se]),openImmediately:u.useCallback(function(){try{return se.current=nt.current,Promise.resolve(ne({y:nt.current,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(I){return Promise.reject(I)}},[ne]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(ne({y:0,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:!0})).then(function(){return se.current=nt.current,Promise.resolve(ne({y:nt.current,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:nt.current,immediate:he.current})).then(function(){})})}catch(I){return Promise.reject(I)}},[ne,he]),snapSmoothly:u.useCallback(function(I,K){try{var z=ut.current(I.y);return se.current=z,c.current=z,Promise.resolve(ne({y:z,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:he.current,config:{velocity:I.velocity}})).then(function(){})}catch(le){return Promise.reject(le)}},[ne,c,he]),resizeSmoothly:u.useCallback(function(){try{var I=ut.current(se.current);return se.current=I,c.current=I,Promise.resolve(ne({y:I,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:we.current!=="element"||he.current})).then(function(){})}catch(K){return Promise.reject(K)}},[ne,c,he]),closeSmoothly:u.useCallback(function(I,K){try{return ne({minSnap:se.current,immediate:!0}),se.current=0,Promise.resolve(ne({y:0,maxHeight:W.current,maxSnap:je.current,immediate:he.current})).then(function(){return Promise.resolve(ne({ready:0,immediate:!0})).then(function(){})})}catch(z){return Promise.reject(z)}},[ne,he])}}),Kr=fn[0],Et=fn[1];u.useEffect(function(){j&&Et(a?"OPEN":"CLOSE")},[a,Et,j]),Nr(function(){(Q||Ue||ee)&&Et("RESIZE")},[Q,Ue,ee,Et]),u.useEffect(function(){return function(){Se.current.deactivate(),Ce.current.deactivate(),ke.current.deactivate()}},[ke,Ce,Se]),u.useImperativeHandle(e,function(){return{snapTo:function(I,K){var z=K===void 0?{}:K,le=z.velocity,Re=le===void 0?1:le,me=z.source,Ae=me===void 0?"custom":me;Et("SNAP",{payload:{y:ut.current(I),velocity:Re,source:Ae}})},get height(){return se.current}}},[Et]),u.useEffect(function(){var I=fe.current,K=function(le){Ne.current&&le.preventDefault()},z=function(le){I.scrollTop<0&&(requestAnimationFrame(function(){I.style.overflow="hidden",I.scrollTop=0,I.style.removeProperty("overflow")}),le.preventDefault())};return O&&(I.addEventListener("scroll",K),I.addEventListener("touchmove",K),I.addEventListener("touchstart",z)),function(){I.removeEventListener("scroll",K),I.removeEventListener("touchmove",K),I.removeEventListener("touchstart",z)}},[O,fe]);var jt=Hb(function(I){var K=I.args,z=(K=K===void 0?[]:K)[0],le=(z=z===void 0?{}:z).closeOnTap,Re=le!==void 0&&le,me=z.isContentDragging,Ae=me!==void 0&&me,_e=I.cancel,Be=I.direction[1],re=I.down,de=I.first,st=I.last,Bt=I.memo,rt=Bt===void 0?X.y.getValue():Bt,Ge=I.tap,ct=I.velocity,ft=-1*I.movement[1];if(!N.current)return _e(),rt;if(d&&Re&&Ge)return _e(),setTimeout(function(){return d()},0),rt;if(Ge)return rt;var Ke=rt+ft,kt=ft*ct,xt=Math.max(Fe.current,Math.min(je.current,Ke+2*kt));if(!re&&d&&Be>0&&Ke+kt<Fe.current/2)return _e(),d(),rt;var dt=re?d||Fe.current!==je.current?Rr(Ke,d?0:Fe.current,je.current,.55):Ke<Fe.current?Rr(Ke,Fe.current,2*je.current,.55):Rr(Ke,Fe.current/2,je.current,.55):xt;return O&&Ae?(dt>=je.current&&(dt=je.current),rt===je.current&&fe.current.scrollTop>0&&(dt=je.current),Ne.current=dt<je.current):Ne.current=!1,de&&Et("DRAG"),st?(Et("SNAP",{payload:{y:dt,velocity:ct>.05?ct:1,source:"dragging"}}),rt):(J({y:dt,ready:1,maxHeight:W.current,maxSnap:je.current,minSnap:Fe.current,immediate:!0,config:{velocity:ct}}),rt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(Fe.current))throw new TypeError("minSnapRef is NaN!!");var Jr=function(I){var K,z=I.spring,le=Nn([z.y,z.maxHeight],function(re,de){return Math.round(mr(de-re,0,16))+"px"}),Re=Nn([z.y,z.minSnap,z.maxSnap],function(re,de,st){return mr(re,de,st)+"px"}),me=Nn([z.y,z.minSnap,z.maxSnap],function(re,de,st){return re<de?de-re+"px":re>st?st-re+"px":"0px"}),Ae=Nn([z.y,z.maxSnap],function(re,de){return re>=de?Math.ceil(re-de):0}),_e=Nn([z.y,z.minSnap],function(re,de){if(!de)return 0;var st=Math.max(de/2-45,0);return mr((re-st)*(1/(Math.min(de/2+45,de)-st)+0),0,1)}),Be=Nn([z.y,z.minSnap],function(re,de){return de?mr(re/de,0,1):0});return(K={})["--rsbs-content-opacity"]=_e,K["--rsbs-backdrop-opacity"]=Be,K["--rsbs-antigap-scale-y"]=Ae,K["--rsbs-overlay-translate-y"]=me,K["--rsbs-overlay-rounded"]=le,K["--rsbs-overlay-h"]=Re,K}({spring:X});return u.createElement(lb.div,ot({},T,{"data-rsbs-root":!0,"data-rsbs-state":Ww.find(Kr.matches),"data-rsbs-is-blocking":L,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:R,style:ot({},Jr,E,{opacity:X.ready})}),r,L&&u.createElement("div",ot({key:"backdrop","data-rsbs-backdrop":!0},jt({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:Pe,onKeyDown:function(I){I.key==="Escape"&&(I.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",ot({key:"header","data-rsbs-header":!0,ref:H},jt()),s),u.createElement("div",ot({key:"scroll","data-rsbs-scroll":!0,ref:fe},O?jt({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:xe},n)),o&&u.createElement("div",ot({key:"footer",ref:Oe,"data-rsbs-footer":!0},jt()),o)))}),Ww=["closed","opening","open","closing","dragging","snapping","resizing"];function Gw(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function Zw(t){return t.minHeight}var qw=["onSpringStart","onSpringEnd","skipInitialTransition"],qf=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Ni(t,qw),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");Nr(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(vy,{"data-rsbs-portal":!0},u.createElement(Hw,ot({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:h,onSpringEnd:v}))):null});const Kf=28,Kw="MapGoogle-module__root__Vi-sMl",Jw="MapGoogle-module__mapContainer__OCCTIX",Xw="MapGoogle-module__balloon__4UVhuT",Yw="MapGoogle-module__details__4osNXn",Qw="MapGoogle-module__cluster__5qmRds",e1="MapGoogle-module__overlay__g-nEoT",t1="MapGoogle-module__mapControl__mzyTwr",n1="MapGoogle-module__geolocationControl__1exHgA",r1="MapGoogle-module__bottomSheet__avcBmY",i1="MapGoogle-module__locationViewContent__xwLeDh",o1="MapGoogle-module__locationViewHeader__maBLv0",s1="MapGoogle-module__deliveryDetailsViewContent__wH-RCe",a1="MapGoogle-module__deliveryDetailsViewHeader__4AKoBe",l1="MapGoogle-module__sheetSubmit__rPQG26",Xe={root:Kw,mapContainer:Jw,balloon:Xw,details:Yw,cluster:Qw,overlay:e1,mapControl:t1,geolocationControl:n1,bottomSheet:r1,locationViewContent:i1,locationViewHeader:o1,deliveryDetailsViewContent:s1,deliveryDetailsViewHeader:a1,sheetSubmit:l1},Jf=({children:t,hideFooter:e,minSnapHeight:n,onSubmitClick:r,open:i,submitDisabled:o,submitLoading:s,...a})=>C.jsx(qf,{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-Kf],footer:e?null:C.jsx(Lt,{disabled:o,loading:s,variant:"primary",className:Xe.sheetSubmit,onClick:r,children:C.jsx(xn,{keyName:"choose",ns:"common"})}),sibling:C.jsx("div",{role:"presentation","data-rsbs-backdrop":"true",onClick:l=>{var c;l.stopPropagation(),l.preventDefault(),(c=a.onDismiss)==null||c.call(a)}}),children:C.jsx("div",{className:Xe.bottomSheet,children:t})}),yu="#000",u1={header:Xe.locationViewHeader,content:Xe.locationViewContent},c1=({clusterer:t,hideDetails:e,onPointClick:n,onPointSelected:r,point:i,selectedPoint:o,setOpenDetails:s})=>{const a=qr("screenSm"),{iconType:l,palette:c,skipPointInfo:f}=tt(),d=(c==null?void 0:c.primary)||"#fc0",h=l==="omni-llama"?yr.PinLlama:yr.PinOmnic,[v,y]=u.useState(null),g=()=>{if(f){n==null||n(i);return}s==null||s(!1),r==null||r(i)},S=()=>{r==null||r(null)},w=()=>{s==null||s(!0),r==null||r(i)},L=()=>{n==null||n(i),s==null||s(!1),r==null||r(null)},m=(o==null?void 0:o.uid)===i.uid,_=Jc({isSelectedPoint:m}),E=u.useMemo(()=>{let x;switch(!0){case(i.type===30&&!m):{x=Un(h,d,yu);break}case(i.type!==30&&!m):{x=Un(yr.PinPvz,"--owl-color-grey-80");break}case(i.type===30&&m):{x=Un(h,yu,d);break}case(i.type!==30&&m):{x=Un(yr.PinPvz,"--owl-color-black");break}}return Wt(x,"Icon url is not defined"),{url:Gs(x)}},[m,d,h,i.type]),p=u.useMemo(()=>({lat:i.location.latitude,lng:i.location.longitude}),[i.location.latitude,i.location.longitude]),b=m&&_&&!!(v!=null&&v.getVisible());return C.jsxs(Cc,{noClustererRedraw:!0,icon:E,position:p,clusterer:t,options:Kc,onLoad:y,onClick:g,children:[a&&C.jsx(Jf,{minSnapHeight:200,open:b,onDismiss:S,onSubmitClick:L,children:C.jsx(qc,{hideActions:!0,classes:u1,location:i,onClose:S})}),b&&!a&&C.jsx(Tc,{onCloseClick:S,children:C.jsx(Hm,{...i,hideDetails:e,className:Xe.balloon,onSubmit:L,onDetails:w})})]},i.uid)},f1=({hideDetails:t,onOpenDetails:e,onPointClick:n,onPointSelected:r,points:i,selectedPoint:o})=>C.jsx(Ng,{clusterClass:Xe.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.addEventListener("touchstart",ns,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Xe.cluster);for(const a of s)a.removeEventListener("touchstart",ns)},children:s=>C.jsx(C.Fragment,{children:i.map(a=>C.jsx(c1,{point:a,clusterer:s,hideDetails:t,selectedPoint:o,setOpenDetails:e,onPointClick:n,onPointSelected:r},a.uid))})}),d1=u.memo(f1),p1=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{hideDetails:r,locale:i}=tt(),o=On(Ih),s=Gt(c=>c.location),a=Dt(mc),l=JSON.stringify([o.length,i,a==null?void 0:a.place_id]);return C.jsx(d1,{points:o,hideDetails:r,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},h1=u.memo(p1),Xf=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},oe.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),oe.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"}),oe.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),g1="DeliveryBalloon-module__root__Nu90iy",v1="DeliveryBalloon-module__details__eqUTaI",m1="DeliveryBalloon-module__header__JVdyxN",y1="DeliveryBalloon-module__title__-zKKCt",b1="DeliveryBalloon-module__description__no5-ki",w1="DeliveryBalloon-module__actions__C-N0H-",S1="DeliveryBalloon-module__errorVariant__e6uhZl",L1="DeliveryBalloon-module__logo__62gC5h",Yt={root:g1,details:v1,header:m1,title:y1,description:b1,actions:w1,errorVariant:S1,logo:L1},E1=({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 }":C.jsx(xn,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":C.jsx(xn,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":C.jsx(xn,{keyName:"error_description",ns:"courier_balloon"});return C.jsxs("div",{className:ve(Yt.root,n,Yt[`${a}Variant`]),children:[C.jsxs("div",{className:Yt.header,children:[C.jsx(Xf,{className:Yt.logo}),C.jsx("span",{className:Yt.title,children:l?d:f}),r&&C.jsx(Wr,{onClick:o})]}),C.jsx("div",{className:Yt.description,children:l?h:e||"{{ properties.address }}"}),c&&!i&&C.jsx("div",{className:Yt.actions,children:C.jsx(Lt,{id:Ou,as:"button",variant:"primary",className:Yt.details,onClick:s,children:t?"{ details }":C.jsx(xn,{keyName:"details",ns:"common"})})})]})},x1="Chip-module__root__zsoSyP",C1="Chip-module__active__BlTSFB",bu={root:x1,active:C1},wu=({active:t,children:e,className:n,...r})=>C.jsx("div",{...r,className:ve(bu.root,n,{[bu.active]:t}),children:e}),_1="TextArea-module__root__8YFknR",M1={root:_1},Su=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=Qf(e,a);return C.jsx("textarea",{...o,ref:l,className:ve(M1.root,t),onBlur:n,onFocus:i,onChange:r})}),O1=({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},P1="DeliveryDetailsView-module__title__azeoUr",k1="DeliveryDetailsView-module__logo__4zZtpM",T1="DeliveryDetailsView-module__header__oDE9He",R1="DeliveryDetailsView-module__content__6P27SY",A1="DeliveryDetailsView-module__section__2M3Qip",D1="DeliveryDetailsView-module__chips__KmYgha",I1="DeliveryDetailsView-module__actions__43XZ-V",N1="DeliveryDetailsView-module__submit__58LKBw",j1="DeliveryDetailsView-module__actionsHidden__SW-67b",B1="DeliveryDetailsView-module__commentSection__GlX1A2",V1="DeliveryDetailsView-module__comment__2pGG6h",pt={title:P1,logo:k1,header:T1,content:R1,section:A1,chips:D1,actions:I1,submit:N1,actionsHidden:j1,commentSection:B1,comment:V1},U1=u.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:c}=tt(),{t:f}=Nt(["details_modal","courier_balloon","common"]),d=u.useMemo(()=>O1({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=u.useState(!1),[y,g]=u.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),S=u.useCallback(async()=>{v(!0);try{Wt(n.address,"Address is required");const b=await hd({address:n.address,algorithm:10,service:10,language:c||Pu});if(!sc(b))return;const x=b==null?void 0:b.data.data,P={...y,address:x};return o==null||o(P),P}finally{v(!1)}},[c,n.address,o,y]);u.useImperativeHandle(s,()=>({submit:S}),[S]);const w=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},L=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=no(l==null?void 0:l.apartment),E=no(l==null?void 0:l.comment);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:ve(pt.header,t==null?void 0:t.header),children:[C.jsx(Wr,{onClick:i}),C.jsxs("div",{className:pt.title,children:[C.jsx(Xf,{className:pt.logo}),C.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),C.jsxs("div",{className:ve(pt.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:pt.section,children:[C.jsxs("span",{children:[f("address"),":"]}),C.jsx("p",{children:n.address})]}),!a&&C.jsxs("section",{className:pt.section,children:[C.jsxs("span",{children:[f("delivery_time"),":"]}),C.jsxs("div",{className:pt.chips,children:[C.jsx(wu,{active:y.delivery_time==="8:00-13:00",onClick:w("8:00-13:00"),children:"8:00 - 13:00"}),C.jsx(wu,{active:y.delivery_time==="14:00-22:00",onClick:w("14:00-22:00"),children:"14:00 - 22:00"})]})]}),C.jsxs("section",{className:pt.section,children:[C.jsxs("span",{children:[f("apartment_number"),":"]}),C.jsx(Su,{..._,rows:1,onChange:L})]}),C.jsxs("section",{className:ve(pt.section,pt.commentSection),children:[C.jsxs("span",{children:[f("comment"),":"]}),C.jsx(Su,{...E,className:pt.comment,onChange:m})]})]}),C.jsx("div",{className:ve(pt.actions,{[pt.actionsHidden]:e}),children:C.jsx(Lt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:pt.submit,onClick:S,children:f("choose",{ns:"common"})})})]})}),Yf=u.memo(U1),F1={header:Xe.deliveryDetailsViewHeader,content:Xe.deliveryDetailsViewContent},z1=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Jc({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=qr("screenSm"),g=u.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),S=()=>{o==null||o(!0)},w=()=>{i==null||i(null)},L=u.useMemo(()=>({url:Gs(Un(yr.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Ed)}),[]),m=async()=>{var b;try{c(!0);const x=await((b=a.current)==null?void 0:b.submit());if(!x)return;n==null||n(x),o==null||o(!1),i==null||i(null)}finally{c(!1)}},_=C.jsx(E1,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:Xe.balloon,onDetails:S,onClose:w}),E=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return C.jsxs(Cc,{noClustererRedraw:!0,icon:L,position:g,options:Kc,onLoad:v,children:[y&&C.jsxs(Jf,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:w,onSubmitClick:m,children:[f.address&&C.jsx(Yf,{ref:a,hideActions:!0,classes:F1,location:r,onChange:d,onClose:w}),!f.address&&_]}),!y&&E&&C.jsx(Tc,{onCloseClick:w,children:_})]})},$1=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s}=tt(),a=s==null?void 0:s.primary;function l(){switch(o){case"omnic":return cy;case"omnic-light":return fy(a);default:return}}const c=l(),f=u.useMemo(()=>{var h,v;return{lat:((h=i==null?void 0:i.center)==null?void 0:h[0])??qo[0],lng:((v=i==null?void 0:i.center)==null?void 0:v[1])??qo[1]}},[i==null?void 0:i.center]),d=u.useCallback(async h=>{const{latLng:v}=h;if(!v||r)return;Le.getState().setDetailsOpen(!1),Gt.getState().setSelectedLocation(null);const y=[v.lat(),v.lng()];console.debug("[OmnicLocationsWidget::mapClick]",y);try{await Dt.getState().setPlaceAndPoint(y)}catch{vt.getState().setDeliverPoint({address:null,coords:y})}},[r]);return C.jsx(mg,{zoom:i==null?void 0:i.initialZoom,center:f,mapContainerClassName:ve(Xe.root,e),options:{styles:c,...dy},onClick:d,...n,children:t})},H1=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),oe.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),oe.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),oe.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),oe.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),W1=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)})},G1=t=>{const e=document.createElement("div");e.classList.add(Xe.mapControl),e.classList.add(Xe.geolocationControl),e.innerHTML=gd.renderToString(C.jsx(H1,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{Ws(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await Dt.getState().setPlaceAndPoint(o)})})},Z1=({className:t})=>{const e=ln(),n=Le(Nu),r=Le(ip),i=On(lc),o=vt(js),{disableGeolocation:s,hideDeliveryTime:a,hideDetails:l,hideMapControls:c,onPointClick:f}=tt(),d=u.useCallback(S=>{console.debug("[OmnicLocationsWidget::loadMap]",S),Le.getState().setMap(S),c||(W1(S),s||G1(S))},[s,c]),h=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),Le.getState().setMap(null)},[]),v=u.useCallback(()=>{if(!n)return;const S=n==null?void 0:n.getBounds();S&&(console.debug("[OmnicLocationsWidget::changeBounds]",S),On.getState().loadNext([[S.getSouthWest().lat(),S.getNorthEast().lat()],[S.getSouthWest().lng(),S.getNorthEast().lng()]],e))},[e,n]),y=u.useCallback(async S=>{if(vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(S),!S)return;const w=[S.location.latitude,S.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",w),await Dt.getState().setPlace(w)},[]),g=u.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]);return C.jsxs("div",{className:ve(Xe.mapContainer,t),children:[C.jsxs($1,{onIdle:v,onLoad:d,onUnmount:h,onTilesLoaded:g,children:[o&&C.jsx(z1,{hideDeliveryTime:a,hideDetails:l,point:o,setOpenDetails:Le.getState().setDetailsOpen,setDeliveryPoint:vt.getState().setDeliverPoint,onPointClick:f}),C.jsx(h1,{onPointClick:f,onOpenDetails:Le.getState().setDetailsOpen,onPointSelected:y})]}),(i||r)&&C.jsx(yc,{className:Xe.overlay,children:C.jsx(zi,{})})]})},q1=u.memo(Z1),K1=t=>({google:q1})[t];function Qf(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const no=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}},J1=()=>{throw new Error("useMediaQuery is a client-only hook")};function X1(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,J1)}const Y1="768px",Q1="1024px",eS="1280px",tS="1536px",nS={screenSm:Y1,screenMd:Q1,screenLg:eS,screenXl:tS};function qr(t){return X1(`(max-width: calc(${nS[t]} - 1px))`)}const rS=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=Le(Nu);u.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),Le.getState().setLoaded())},[i]);const o=t[0],s=t[1];u.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),Dt.getState().setPlace(a,[],"country")};if(r){l();return}Ws(async c=>{const{latitude:f,longitude:d}=c.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await Dt.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},ed=Sm().use(lm()).use(Qv()).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"}),iS=t=>{u.useEffect(()=>{t&&(ed.changeLanguage(t),Ui.setLanguage(t))},[t])},oS=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Hr(`--owl-color-${n}`,r)}}},[t])},sS=t=>{u.useEffect(()=>{t&&t!==void 0&&Hr("--owl-button-radius",`${t}px`)},[t])},aS=t=>{u.useEffect(()=>{t&&t!==void 0&&Hr("--owl-font",t)},[t])},lS={open:!1},uS=t=>t.open,Ln=cn(t=>({...lS,toggle(e){t(n=>({open:e??!n.open}))}})),cS=t=>{const e=t==="selector";u.useEffect(()=>{e&&Ln.getState().toggle(!0)},[e])},fS=({locale:t})=>{const[e,n]=u.useState(!1);return u.useEffect(()=>{n(!1)},[t]),u.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},dS=t=>{u.useEffect(()=>{t==="sharp"&&Hr("--owl-radius","0")},[t])},pS=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=tt();return aS(n),iS(r),oS(i),sS(o),cS(s),dS(e),C.jsx(C.Fragment,{children:t})},hS=({children:t})=>{const{disableGeolocation:e,map:n}=tt();return Wt(n==null?void 0:n.center,"Map center is required"),Wt(n==null?void 0:n.initialZoom,"Map initial zoom is required"),rS(n.center,n.initialZoom,{disableGeolocation:e}),C.jsx(C.Fragment,{children:t})},gS=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},oe.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"})),vS=()=>{Ln.getState().toggle(!0),Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null)},mS="CurrentLocation-module__root__AeQCGT",yS="CurrentLocation-module__icon__459m9q",bS="CurrentLocation-module__text__w-9v28",$o={root:mS,icon:yS,text:bS},td=({className:t})=>{const{t:e}=Nt("current_location"),n=Dt(mc),r=Dt(tg);return C.jsxs("div",{role:"presentation",className:ve($o.root,t),onClick:vS,children:[C.jsx(gS,{className:$o.icon}),C.jsxs("span",{className:$o.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},wS=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},oe.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"})),SS=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},oe.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"})),LS="Header-module__root__Pe4MYp",ES="Header-module__nav__wtnkmT",xS="Header-module__navItem__-Fy63Z",CS="Header-module__logo__xO2bWO",xr={root:LS,nav:ES,navItem:xS,logo:CS},_S={llama:SS,default:wS},MS=()=>{const{hideLogo:t,logo:e="default"}=tt();if(t)return null;const n=_S[e];return C.jsx("div",{className:xr.logo,children:C.jsx(n,{})})},OS=({className:t})=>{const{t:e}=Nt("header"),{disableDelivery:n}=tt(),r=Le(ep),i=vt(js);u.useEffect(()=>{i?Le.getState().setMode("location_delivery"):Le.getState().setMode("self_pickup")},[i]);const o=()=>{vt.getState().setDeliverPoint(null),Le.getState().setMode("self_pickup")},s=()=>{vt.getState().setDeliverPoint(null),Le.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return C.jsxs("div",{className:ve(xr.root,t),children:[C.jsx(MS,{}),C.jsxs("nav",{className:xr.nav,children:[!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&C.jsx(Lt,{as:"link",className:xr.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),C.jsx(td,{})]})]})},PS=u.memo(OS),kS={open:!1},Xn=cn(t=>({...kS,toggle(e){Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),TS="Layout-module__root__qzPL-f",RS="Layout-module__headerHidden__JEN-d0",AS="Layout-module__sidebarHidden__x017O3",DS="Layout-module__sidebarOpen__IZnIjs",Si={root:TS,headerHidden:RS,sidebarHidden:AS,sidebarOpen:DS},IS=({children:t})=>{const{hideFilters:e,hideHeader:n}=tt(),r=Xn(i=>i.open);return C.jsx("div",{className:ve(Si.root,{[Si.sidebarOpen]:r,[Si.headerHidden]:n,[Si.sidebarHidden]:e}),children:t})},aa=()=>C.jsx(yc,{children:C.jsx(zi,{})}),NS=({children:t})=>{const e=On(Nh);return On(lc)&&!e?C.jsx(aa,{}):C.jsx(C.Fragment,{children:t})};var nd={},vo={},rd={exports:{}},jS="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",BS=jS,VS=BS;function id(){}function od(){}od.resetWarningCache=id;var US=function(){function t(r,i,o,s,a,l){if(l!==VS){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:od,resetWarningCache:id};return n.PropTypes=n,n};rd.exports=US();var FS=rd.exports,mo={},Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.loadGoogleMapScript=Yn.isBrowser=void 0;var sd=typeof window<"u"&&window.document;Yn.isBrowser=sd;var zS=function(e,n){if(!sd||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)})};Yn.loadGoogleMapScript=zS;var yo={};Object.defineProperty(yo,"__esModule",{value:!0});yo.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var $S="https://maps.googleapis.com/maps/api/js";yo.GOOGLE_MAP_SCRIPT_BASE_URL=$S;function ji(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ji=function(n){return typeof n}:ji=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ji(t)}Object.defineProperty(mo,"__esModule",{value:!0});mo.default=KS;var ht=WS(u),Ho=Yn,HS=yo;function ad(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ad=function(i){return i?n:e})(t)}function WS(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ji(t)!=="object"&&typeof t!="function")return{default:t};var n=ad(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 Lu(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 Eu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lu(Object(n),!0).forEach(function(r){GS(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function GS(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ZS(t,e){if(t==null)return{};var n=qS(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 qS(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 KS(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,g=ZS(l,["types","componentRestrictions","fields","bounds"]),S=t.googleMapsScriptBaseUrl,w=S===void 0?HS.GOOGLE_MAP_SCRIPT_BASE_URL:S,L=t.language,m=(0,ht.useRef)(null),_=(0,ht.useRef)(null),E=(0,ht.useRef)(null),p=(0,ht.useRef)(null),b=L?"&language=".concat(L):"",x="".concat(w,"?libraries=").concat(o,"&key=").concat(r).concat(b),P=(0,ht.useCallback)(function(){return(0,Ho.loadGoogleMapScript)(w,x)},[w,x]);return(0,ht.useEffect)(function(){var M=Eu(Eu({},g),{},{fields:v,types:f,bounds:y});if(d&&(M.componentRestrictions=d),!(E.current||!m.current||!Ho.isBrowser)){e&&!e.current&&(e.current=m.current);var k=function(){var T;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((T=google.maps)!==null&&T!==void 0&&T.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(m.current,M),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),m.current,E.current)}))};return r?P().then(function(){return k()}):k(),function(){return _.current?_.current.remove():void 0}}},[]),(0,ht.useEffect)(function(){var M;!(ht.default!==null&&ht.default!==void 0&&(M=ht.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&Ho.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,ht.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,ht.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,ht.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,ht.useEffect)(function(){E.current&&E.current.setOptions(g)},[g]),{ref:m,autocompleteRef:E}}function Bi(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bi=function(n){return typeof n}:Bi=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bi(t)}Object.defineProperty(vo,"__esModule",{value:!0});vo.default=void 0;var Is=XS(u),He=ld(FS),JS=ld(mo);function ld(t){return t&&t.__esModule?t:{default:t}}function ud(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ud=function(i){return i?n:e})(t)}function XS(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||Bi(t)!=="object"&&typeof t!="function")return{default:t};var n=ud(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 ro(){return ro=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},ro.apply(this,arguments)}function YS(t,e){if(t==null)return{};var n=QS(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 QS(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 cd(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=YS(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,JS.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return Is.default.createElement("input",ro({ref:d},c))}cd.propTypes={apiKey:He.default.string,libraries:He.default.arrayOf(He.default.string),ref:He.default.oneOfType([He.default.func,He.default.shape({current:He.default.any})]),googleMapsScriptBaseUrl:He.default.string,onPlaceSelected:He.default.func,inputAutocompleteValue:He.default.string,options:He.default.shape({componentRestrictions:He.default.object,bounds:He.default.object,location:He.default.object,offset:He.default.number,origin:He.default.object,radius:He.default.number,sessionToken:He.default.object,types:He.default.arrayOf(He.default.string)}),language:He.default.string};var eL=(0,Is.forwardRef)(function(t,e){return Is.default.createElement(cd,ro({},t,{refProp:e}))});vo.default=eL;(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(vo),n=r(mo);function r(i){return i&&i.__esModule?i:{default:i}}})(nd);var fd=nd;const tL="Aside-module__root__EotK2f",nL="Aside-module__open__Zwmbs5",rL="Aside-module__overlay__slLdHF",iL="Aside-module__container__28P4wq",Li={root:tL,open:nL,overlay:rL,container:iL},oL=({children:t,className:e,open:n})=>C.jsxs("div",{className:ve(Li.root,e,{[Li.open]:n}),children:[C.jsx("div",{className:Li.overlay}),C.jsx("div",{className:Li.container,children:t})]}),sL="Input-module__locationSearchRoot__svh-f9",aL="Input-module__endAdornment__m40K5R",lL="Input-module__input__505b7i",uL="Input-module__startAdornment__D-sJ0N",cL="Input-module__locationSearchInput__2YK1MG",fL="Input-module__label__gmqtsf",dL="Input-module__inputContainer__vubIa-",Bn={locationSearchRoot:sL,endAdornment:aL,input:lL,startAdornment:uL,locationSearchInput:cL,label:fL,inputContainer:dL},dd=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=Qf(n,f);return C.jsxs("label",{htmlFor:a.id??c,className:ve(Bn.locationSearchRoot,t),children:[r&&C.jsx("span",{className:Bn.label,children:r}),C.jsxs("div",{className:Bn.inputContainer,children:[s&&C.jsx("div",{className:Bn.startAdornment,children:s}),C.jsx("input",{...a,ref:d,id:a.id??c,className:Bn.locationSearchInput,onChange:o,onBlur:i}),e&&C.jsx("div",{className:Bn.endAdornment,children:e})]})]})}),pL="LocationAside-module__submit__CSKcqi",hL="LocationAside-module__container__S1NejR",gL="LocationAside-module__selector__hl74ke",vL="LocationAside-module__label__0Zk8at",mL="LocationAside-module__header__N1wgyn",yL="LocationAside-module__close__VsE88z",Ei={submit:pL,container:hL,selector:gL,label:vL,header:mL,close:yL},bL=u.forwardRef((t,e)=>{const{t:n}=Nt(["location_aside","common"]),r=Ln(uS),{country:i,hideCloseButtonOnLocationScreen:o,inputs:s,onCloseLocationSelector:a,onLocationSelect:l}=tt(),c=u.useRef(null),[f,d]=u.useState("");u.useImperativeHandle(e,()=>({open:()=>Ln.getState().toggle(!0),close:()=>Ln.getState().toggle(!1)}),[]);const h=async L=>{Ln.getState().toggle(!1),await Dt.getState().setPlace(L),l==null||l(L),L!=null&&L.formatted_address&&d(L==null?void 0:L.formatted_address)},v=()=>{Ln.getState().toggle(!1),a==null||a()},y=i?{componentRestrictions:{country:i}}:void 0,g=L=>{d(L.target.value)},{ref:S}=fd.usePlacesWidget({libraries:["places"],options:y,onPlaceSelected:h,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),w=no(s==null?void 0:s.city);return C.jsx(oL,{open:r,children:C.jsx("div",{ref:c,className:Ei.container,children:C.jsxs("div",{className:Ei.selector,children:[C.jsxs("div",{className:Ei.header,children:[C.jsx("div",{className:Ei.label,children:n("choose_city")}),!o&&C.jsx(Wr,{position:"relative",onClick:v})]}),C.jsx(dd,{...w,inputRef:S,value:f,placeholder:n("placeholder"),onChange:g})]})})})}),wL=u.memo(bL),SL=({children:t})=>{const{locale:e}=tt(),{isLoaded:n}=xc({language:e,libraries:Cd,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return n?C.jsx(C.Fragment,{children:t}):C.jsx(aa,{})},LL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},oe.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"})),EL=({className:t})=>{const{t:e}=Nt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=tt(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=[],f=n?{componentRestrictions:{country:n},types:c}:{types:c},d=async L=>{await Dt.getState().setPlaceAndPoint(L,{ignoreSelection:!0}),i==null||i(L)},{ref:h}=fd.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=L=>{a&&Le.getState().setBlurred(!!L.target.value),s(L.target.value)},y=()=>{o&&Le.getState().setBlurred(!0),Le.getState().setDetailsOpen(!1),vt.getState().setDeliverPoint(null),Gt.getState().setSelectedLocation(null),l(!0)},g=()=>{Le.getState().setBlurred(!1),l(!1)},S=L=>{L.key==="Enter"&&L.preventDefault()},w=no(r==null?void 0:r.address);return C.jsx(dd,{...w,inputRef:h,value:o,className:t,endAdornment:C.jsx(LL,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:S})},xL=({className:t})=>Le(rp)?C.jsx(EL,{className:t}):null,CL=u.memo(xL),_L="DeliveryDetailsModal-module__root__qwKnjX",ML={root:_L},OL=({className:t,location:e,onClose:n,onSubmit:r})=>C.jsx("div",{className:ve(ML.root,t),children:C.jsx(Yf,{location:e,onClose:n,onSubmit:r})}),PL="LocationDetailsModal-module__root__PyRnLM",kL={root:PL},TL=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return C.jsx("div",{className:ve(kL.root,t),children:C.jsx(qc,{location:e,onClose:n,onSubmit:i})})},RL="MapContainer-module__root__1Os6Q-",AL="MapContainer-module__mapWrapper__Cwe7qC",DL="MapContainer-module__wrapperBlurred__04NN2L",IL="MapContainer-module__locationSelector__Pr1zS-",NL="MapContainer-module__filterButton__CW3Qv7",jL="MapContainer-module__sidebarOpen__lGMVrJ",BL="MapContainer-module__filterIcon__T01XsJ",VL="MapContainer-module__details__gM8LWX",At={root:RL,mapWrapper:AL,wrapperBlurred:DL,locationSelector:IL,filterButton:NL,sidebarOpen:jL,filterIcon:BL,details:VL},UL=()=>{const{onPointClick:t}=tt(),e=Le(Bs),n=Gt(sp),r=vt(js),i=u.useCallback(()=>{Le.getState().setDetailsOpen(!1)},[]),o=u.useCallback(s=>{t==null||t(s),Le.getState().setDetailsOpen(!1),Gt.getState().setSelectedLocation(null),vt.getState().setDeliverPoint(null)},[t]);return C.jsxs(C.Fragment,{children:[(r==null?void 0:r.address)&&e&&C.jsx(OL,{location:r,className:At.details,onClose:i,onSubmit:o}),n&&e&&C.jsx(TL,{location:n,className:At.details,onClose:i,onSubmit:o})]})},FL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},oe.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),oe.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"})),zL=t=>oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},oe.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),oe.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"})),$L=()=>{const t=Xn(i=>i.open),e=Xn(i=>i.toggle),n=qr("screenSm"),r=()=>{e(!0)};return C.jsxs("div",{role:"presentation",className:ve(At.filterButton,{[At.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&C.jsx(td,{}),n?C.jsx(zL,{className:At.filterIcon,onClick:r}):C.jsx(FL,{className:At.filterIcon})]})},HL=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=tt(),i=Le(np),o=Le(Bs);return C.jsxs("div",{className:ve(At.root,e),children:[!r&&!o&&C.jsx(CL,{className:At.locationSelector}),!n&&C.jsx($L,{}),C.jsx("div",{className:ve(At.mapWrapper,{[At.wrapperBlurred]:i}),children:t}),C.jsx(UL,{})]})},WL=u.memo(HL),GL="Separator-module__root__eQtZey",ZL={root:GL},Wo=({className:t,...e})=>C.jsx("hr",{className:ve(ZL.root,t),...e}),qL="Sidebar-module__root__4j1MA3",KL="Sidebar-module__closeButton__HLXy1c",JL="Sidebar-module__open__mqQXF6",XL="Sidebar-module__header__Afp6uz",YL="Sidebar-module__typeFilter__GN46u9",QL="Sidebar-module__separator__6I4QoJ",eE="Sidebar-module__withRightPadding__2u1Ina",tE="Sidebar-module__sheetContent__SaoncI",nE="Sidebar-module__doneButton__4aeaSD",$t={root:qL,closeButton:KL,open:JL,header:XL,typeFilter:YL,separator:QL,withRightPadding:eE,sheetContent:tE,doneButton:nE},rE=()=>{const{t}=Nt("common"),e=qr("screenSm"),n=Xn(i=>i.toggle),r=()=>{n(!1)};return C.jsxs("div",{className:$t.header,children:[e&&C.jsx("div",{role:"presentation",className:$t.doneButton,onClick:r,children:t("done")}),!e&&C.jsx(Wr,{className:$t.closeButton,onClick:r})]})},iE="Radio-module__root__7ElY2W",oE="Radio-module__label__c-sYW3",xu={root:iE,label:oE},sE=({className:t,label:e,labelProps:n={},...r})=>{const i=u.useId(),{className:o,...s}=n;return C.jsxs("label",{htmlFor:i,className:ve(xu.label,o),...s,children:[C.jsx("input",{id:i,type:"radio",className:ve(xu.root,t),...r}),e]})},Wn=t=>C.jsx(sE,{...t,type:"checkbox"}),aE="RadioGroup-module__root__ewZw-x",lE="RadioGroup-module__body__k8BJAs",uE="RadioGroup-module__legend__tcfV7q",Go={root:aE,body:lE,legend:uE},pd=({children:t,className:e,label:n,onChange:r,value:i,...o})=>C.jsxs("div",{className:ve(Go.root,e),...o,children:[n&&C.jsx("span",{className:Go.legend,children:n}),C.jsx("div",{className:Go.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)})]}),cE=({className:t,onChange:e})=>{const{t:n}=Nt("receive_filter"),r=ln(cp);return C.jsxs(pd,{value:r,label:n("title"),className:t,onChange:e,children:[C.jsx(Wn,{name:"receive",value:Ot.DressingRoom,label:n("dressing_room")}),C.jsx(Wn,{name:"receive",value:Ot.CheckOrder,label:n("check_order")}),C.jsx(Wn,{name:"receive",value:Ot.PayByCash,label:n("pay_by_cash")})]})},fE=u.memo(cE),dE=({className:t,onChange:e})=>{const{t:n}=Nt("send_filter"),r=ln(up);return C.jsxs(pd,{className:t,value:r,label:n("title"),onChange:e,children:[C.jsx(Wn,{name:"send",value:Pt.Return,label:n("sending_returns")}),C.jsx(Wn,{name:"send",value:Pt.Shipping,label:n("shipping")}),C.jsx(Wn,{name:"send",value:Pt.Payment,label:n("payment")})]})},pE=u.memo(dE),hE="TypeFilter-module__root__WH5EQV",gE="TypeFilter-module__button__f0mSfo",xi={root:hE,button:gE},vE=({className:t,onChange:e,value:n})=>{const{t:r}=Nt("type_filter"),i=o=>()=>e==null?void 0:e(o);return C.jsxs("div",{className:ve(xi.root,t),children:[C.jsx(Lt,{className:xi.button,variant:n===zt.All?"primary":"secondary",onClick:i(zt.All),children:r("all")}),C.jsx(Lt,{className:xi.button,variant:n===zt.PostOffice?"primary":"secondary",onClick:i(zt.PostOffice),children:r("post_office")}),C.jsx(Lt,{className:xi.button,variant:n===zt.PickPoint?"primary":"secondary",onClick:i(zt.PickPoint),children:r("pick_point")})]})},mE=({className:t,onChange:e})=>{const n=ln(lp);return C.jsx(vE,{value:n,className:t,onChange:e})},yE=u.memo(mE),bE=({className:t})=>{const e=qr("screenSm"),n=Xn(l=>l.open),r=u.useCallback(l=>ln.getState().setFilter({type:l}),[]),i=u.useCallback(l=>ln.getState().setFilter({send:l}),[]),o=u.useCallback(l=>ln.getState().setFilter({receive:l}),[]),s=u.useCallback(()=>Xn.getState().toggle(!1),[]),a=C.jsxs(C.Fragment,{children:[C.jsx(rE,{}),C.jsxs("div",{className:$t.withRightPadding,children:[C.jsx(yE,{className:$t.typeFilter,onChange:r}),C.jsx(Wo,{className:$t.separator}),C.jsx(fE,{onChange:o}),C.jsx(Wo,{}),C.jsx(pE,{onChange:i}),C.jsx(Wo,{})]})]});return e?C.jsx(qf,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Kf,onDismiss:s,children:C.jsx("div",{className:$t.sheetContent,children:a})}):C.jsx("div",{className:ve($t.root,t,{[$t.open]:n}),children:a})},wE="App-module__map__Kf-2JS",SE="App-module__sidebar__ORIzGk",LE="App-module__header__bgP9DA",Zo={map:wE,sidebar:SE,header:LE},EE=({config:t,options:e})=>{const n=Xh(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;Wt(r,"INN is required"),Yh(r,e),Wt(a==null?void 0:a.provider,"Map provider is required");const l=K1(a.provider);jh();const c=fS({locale:s});return C.jsx(ku.Provider,{value:n,children:C.jsx(hS,{children:C.jsx(pS,{children:C.jsx(Em,{tolgee:ed,fallback:C.jsx(aa,{}),children:c&&C.jsx(SL,{children:C.jsx(NS,{children:C.jsxs(IS,{children:[!o&&C.jsx(PS,{className:Zo.header}),!i&&C.jsx(bE,{className:Zo.sidebar}),C.jsx(WL,{className:Zo.map,children:C.jsx(l,{})}),C.jsx(wL,{})]})})})})})})})},hd=async t=>Br.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=Ot;exports.ESendFilter=Pt;exports.ETypeFilter=zt;exports.Widget=EE;exports.createPointsIterator=ts;exports.fetchPointsRequest=es;exports.fromHoursMinutesToMinutes=fp;exports.fromMinutesToHoursMinutes=dp;exports.getAddressFormGeocode=is;exports.getBoundsFromPoint=pp;exports.getCurrentPosition=Ws;exports.getNormalizedAddress=hd;exports.getPropertyValue=ac;exports.isCoordinates=rs;exports.isDeliveryPoint=Ah;exports.isHttpSuccess=sc;exports.isPlaceId=oc;exports.replaceSvgCurrentColor=Un;exports.setWidgetCSSProperty=Hr;exports.stopImmediatePropagation=ns;exports.svgStringToBase64URL=Gs;