var Kj=Object.defineProperty;var qj=(ot,Mt,_n)=>Mt in ot?Kj(ot,Mt,{enumerable:!0,configurable:!0,writable:!0,value:_n}):ot[Mt]=_n;var yd=(ot,Mt,_n)=>qj(ot,typeof Mt!="symbol"?Mt+"":Mt,_n);(function(){"use strict";var ot=typeof document<"u"?document.currentScript:null;function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _n={exports:{}},wi={},La={exports:{}},Pe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vd;function lx(){if(vd)return Pe;vd=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=y&&j[y]||j["@@iterator"],typeof j=="function"?j:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function C(j,B,se){this.props=j,this.context=B,this.refs=S,this.updater=se||k}C.prototype.isReactComponent={},C.prototype.setState=function(j,B){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,B,"setState")},C.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function R(){}R.prototype=C.prototype;function I(j,B,se){this.props=j,this.context=B,this.refs=S,this.updater=se||k}var z=I.prototype=new R;z.constructor=I,b(z,C.prototype),z.isPureReactComponent=!0;var H=Array.isArray,$=Object.prototype.hasOwnProperty,K={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function E(j,B,se){var oe,ge={},ke=null,U=null;if(B!=null)for(oe in B.ref!==void 0&&(U=B.ref),B.key!==void 0&&(ke=""+B.key),B)$.call(B,oe)&&!V.hasOwnProperty(oe)&&(ge[oe]=B[oe]);var le=arguments.length-2;if(le===1)ge.children=se;else if(1>>1,se=Y[B];if(0>>1;Bo(ke,j))Uo(le,ke)?(Y[B]=le,Y[U]=j,B=U):(Y[B]=ke,Y[ge]=j,B=ge);else if(Uo(le,j))Y[B]=le,Y[U]=j,B=U;else break e}}return q}function o(Y,q){var j=Y.sortIndex-q.sortIndex;return j!==0?j:Y.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],h=[],g=1,y=null,v=3,k=!1,b=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z(Y){for(var q=r(h);q!==null;){if(q.callback===null)s(h);else if(q.startTime<=Y)s(h),q.sortIndex=q.expirationTime,t(p,q);else break;q=r(h)}}function H(Y){if(S=!1,z(Y),!b)if(r(p)!==null)b=!0,Se($);else{var q=r(h);q!==null&&X(H,q.startTime-Y)}}function $(Y,q){b=!1,S&&(S=!1,R(E),E=-1),k=!0;var j=v;try{for(z(q),y=r(p);y!==null&&(!(y.expirationTime>q)||Y&&!Z());){var B=y.callback;if(typeof B=="function"){y.callback=null,v=y.priorityLevel;var se=B(y.expirationTime<=q);q=e.unstable_now(),typeof se=="function"?y.callback=se:y===r(p)&&s(p),z(q)}else s(p);y=r(p)}if(y!==null)var oe=!0;else{var ge=r(h);ge!==null&&X(H,ge.startTime-q),oe=!1}return oe}finally{y=null,v=j,k=!1}}var K=!1,V=null,E=-1,T=5,M=-1;function Z(){return!(e.unstable_now()-MY||125B?(Y.sortIndex=j,t(h,Y),r(p)===null&&Y===r(h)&&(S?(R(E),E=-1):S=!0,X(H,j-B))):(Y.sortIndex=se,t(p,Y),b||k||(b=!0,Se($))),Y},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(Y){var q=v;return function(){var j=v;v=q;try{return Y.apply(this,arguments)}finally{v=j}}}}(_a)),_a}var Ed;function dx(){return Ed||(Ed=1,Aa.exports=fx()),Aa.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Td;function px(){if(Td)return Ct;Td=1;var e=Si(),t=dx();function r(n){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function v(n){return p.call(y,n)?!0:p.call(g,n)?!1:h.test(n)?y[n]=!0:(g[n]=!0,!1)}function k(n,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function b(n,i,a,c){if(i===null||typeof i>"u"||k(n,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function S(n,i,a,c,d,m,x){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=a,this.propertyName=n,this.type=i,this.sanitizeURL=m,this.removeEmptyString=x}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){C[n]=new S(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var i=n[0];C[i]=new S(i,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){C[n]=new S(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){C[n]=new S(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){C[n]=new S(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){C[n]=new S(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){C[n]=new S(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){C[n]=new S(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){C[n]=new S(n,5,!1,n.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function I(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var i=n.replace(R,I);C[i]=new S(i,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var i=n.replace(R,I);C[i]=new S(i,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var i=n.replace(R,I);C[i]=new S(i,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){C[n]=new S(n,1,!1,n.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){C[n]=new S(n,1,!1,n.toLowerCase(),null,!0,!0)});function z(n,i,a,c){var d=C.hasOwnProperty(i)?C[i]:null;(d!==null?d.type!==0:c||!(2O||d[x]!==m[O]){var A=` `+d[x].replace(" at new "," at ");return n.displayName&&A.includes("")&&(A=A.replace("",n.displayName)),A}while(1<=x&&0<=O);break}}}finally{oe=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?se(n):""}function ke(n){switch(n.tag){case 5:return se(n.type);case 16:return se("Lazy");case 13:return se("Suspense");case 19:return se("SuspenseList");case 0:case 2:case 15:return n=ge(n.type,!1),n;case 11:return n=ge(n.type.render,!1),n;case 1:return n=ge(n.type,!0),n;default:return""}}function U(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case V:return"Fragment";case K:return"Portal";case T:return"Profiler";case E:return"StrictMode";case G:return"Suspense";case ee:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Z:return(n.displayName||"Context")+".Consumer";case M:return(n._context.displayName||"Context")+".Provider";case D:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case fe:return i=n.displayName||null,i!==null?i:U(n.type)||"Memo";case Se:i=n._payload,n=n._init;try{return U(n(i))}catch{}}return null}function le(n){var i=n.type;switch(n.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=i.render,n=n.displayName||n.name||"",i.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(i);case 8:return i===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function te(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ue(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Oe(n){var i=ue(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,i),c=""+n[i];if(!n.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,m=a.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return d.call(this)},set:function(x){c=""+x,m.call(this,x)}}),Object.defineProperty(n,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(x){c=""+x},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ve(n){n._valueTracker||(n._valueTracker=Oe(n))}function Ae(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return n&&(c=ue(n)?n.checked?"true":"false":n.value),n=c,n!==a?(i.setValue(n),!0):!1}function _e(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Re(n,i){var a=i.checked;return j({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function De(n,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=te(i.value!=null?i.value:a),n._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Ce(n,i){i=i.checked,i!=null&&z(n,"checked",i,!1)}function kt(n,i){Ce(n,i);var a=te(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}i.hasOwnProperty("value")?ze(n,i.type,a):i.hasOwnProperty("defaultValue")&&ze(n,i.type,te(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(n.defaultChecked=!!i.defaultChecked)}function Te(n,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+n._wrapperState.initialValue,a||i===n.value||(n.value=i),n.defaultValue=i}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function ze(n,i,a){(i!=="number"||_e(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var Pt=Array.isArray;function Nt(n,i,a,c){if(n=n.options,i){i={};for(var d=0;d"+i.valueOf().toString()+"",i=bt.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;i.firstChild;)n.appendChild(i.firstChild)}});function Fn(n,i){if(i){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=i;return}}n.textContent=i}var qt={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},Gt=["Webkit","ms","Moz","O"];Object.keys(qt).forEach(function(n){Gt.forEach(function(i){i=i+n.charAt(0).toUpperCase()+n.substring(1),qt[i]=qt[n]})});function Vn(n,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||qt.hasOwnProperty(n)&&qt[n]?(""+i).trim():i+"px"}function qi(n,i){n=n.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,d=Vn(a,i[a],c);a==="float"&&(a="cssFloat"),c?n.setProperty(a,d):n[a]=d}}var ZO=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bc(n,i){if(i){if(ZO[n]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(r(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(r(61))}if(i.style!=null&&typeof i.style!="object")throw Error(r(62))}}function jc(n,i){if(n.indexOf("-")===-1)return typeof i.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lc=null;function Rc(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ac=null,Xr=null,Qr=null;function Ty(n){if(n=gs(n)){if(typeof Ac!="function")throw Error(r(280));var i=n.stateNode;i&&(i=Ho(i),Ac(n.stateNode,n.type,i))}}function Cy(n){Xr?Qr?Qr.push(n):Qr=[n]:Xr=n}function Py(){if(Xr){var n=Xr,i=Qr;if(Qr=Xr=null,Ty(n),i)for(n=0;n>>=0,n===0?32:31-(ub(n)/cb|0)|0}var Oo=64,bo=4194304;function Zi(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function jo(n,i){var a=n.pendingLanes;if(a===0)return 0;var c=0,d=n.suspendedLanes,m=n.pingedLanes,x=a&268435455;if(x!==0){var O=x&~d;O!==0?c=Zi(O):(m&=x,m!==0&&(c=Zi(m)))}else x=a&~d,x!==0?c=Zi(x):m!==0&&(c=Zi(m));if(c===0)return 0;if(i!==0&&i!==c&&(i&d)===0&&(d=c&-c,m=i&-i,d>=m||d===16&&(m&4194240)!==0))return i;if((c&4)!==0&&(c|=a&16),i=n.entangledLanes,i!==0)for(n=n.entanglements,i&=c;0a;a++)i.push(n);return i}function Ji(n,i,a){n.pendingLanes|=i,i!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,i=31-on(i),n[i]=a}function hb(n,i){var a=n.pendingLanes&~i;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=i,n.mutableReadLanes&=i,n.entangledLanes&=i,i=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0=as),ev=" ",tv=!1;function nv(n,i){switch(n){case"keyup":return $b.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rv(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ei=!1;function Ub(n,i){switch(n){case"compositionend":return rv(i);case"keypress":return i.which!==32?null:(tv=!0,ev);case"textInput":return n=i.data,n===ev&&tv?null:n;default:return null}}function Hb(n,i){if(ei)return n==="compositionend"||!Xc&&nv(n,i)?(n=qy(),Mo=Uc=Hn=null,ei=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=cv(a)}}function dv(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?dv(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function pv(){for(var n=window,i=_e();i instanceof n.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)n=i.contentWindow;else break;i=_e(n.document)}return i}function Jc(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}function ej(n){var i=pv(),a=n.focusedElem,c=n.selectionRange;if(i!==a&&a&&a.ownerDocument&&dv(a.ownerDocument.documentElement,a)){if(c!==null&&Jc(a)){if(i=c.start,n=c.end,n===void 0&&(n=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(n,a.value.length);else if(n=(i=a.ownerDocument||document)&&i.defaultView||window,n.getSelection){n=n.getSelection();var d=a.textContent.length,m=Math.min(c.start,d);c=c.end===void 0?m:Math.min(c.end,d),!n.extend&&m>c&&(d=c,c=m,m=d),d=fv(a,m);var x=fv(a,c);d&&x&&(n.rangeCount!==1||n.anchorNode!==d.node||n.anchorOffset!==d.offset||n.focusNode!==x.node||n.focusOffset!==x.offset)&&(i=i.createRange(),i.setStart(d.node,d.offset),n.removeAllRanges(),m>c?(n.addRange(i),n.extend(x.node,x.offset)):(i.setEnd(x.node,x.offset),n.addRange(i)))}}for(i=[],n=a;n=n.parentNode;)n.nodeType===1&&i.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,ti=null,ef=null,fs=null,tf=!1;function hv(n,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tf||ti==null||ti!==_e(c)||(c=ti,"selectionStart"in c&&Jc(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),fs&&cs(fs,c)||(fs=c,c=$o(ef,"onSelect"),0oi||(n.current=hf[oi],hf[oi]=null,oi--)}function Fe(n,i){oi++,hf[oi]=n.current,n.current=i}var Gn={},mt=qn(Gn),jt=qn(!1),Tr=Gn;function ai(n,i){var a=n.type.contextTypes;if(!a)return Gn;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var d={},m;for(m in a)d[m]=i[m];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=d),d}function Lt(n){return n=n.childContextTypes,n!=null}function Yo(){$e(jt),$e(mt)}function jv(n,i,a){if(mt.current!==Gn)throw Error(r(168));Fe(mt,i),Fe(jt,a)}function Lv(n,i,a){var c=n.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var d in c)if(!(d in i))throw Error(r(108,le(n)||"Unknown",d));return j({},a,c)}function Ko(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Gn,Tr=mt.current,Fe(mt,n),Fe(jt,jt.current),!0}function Rv(n,i,a){var c=n.stateNode;if(!c)throw Error(r(169));a?(n=Lv(n,i,Tr),c.__reactInternalMemoizedMergedChildContext=n,$e(jt),$e(mt),Fe(mt,n)):$e(jt),Fe(jt,a)}var Pn=null,qo=!1,mf=!1;function Av(n){Pn===null?Pn=[n]:Pn.push(n)}function dj(n){qo=!0,Av(n)}function Xn(){if(!mf&&Pn!==null){mf=!0;var n=0,i=Ie;try{var a=Pn;for(Ie=1;n>=x,d-=x,On=1<<32-on(i)+d|a<Ee?(ct=we,we=null):ct=we.sibling;var Le=Q(N,we,F[Ee],ae);if(Le===null){we===null&&(we=ct);break}n&&we&&Le.alternate===null&&i(N,we),_=m(Le,_,Ee),xe===null?ye=Le:xe.sibling=Le,xe=Le,we=ct}if(Ee===F.length)return a(N,we),We&&Pr(N,Ee),ye;if(we===null){for(;EeEe?(ct=we,we=null):ct=we.sibling;var sr=Q(N,we,Le.value,ae);if(sr===null){we===null&&(we=ct);break}n&&we&&sr.alternate===null&&i(N,we),_=m(sr,_,Ee),xe===null?ye=sr:xe.sibling=sr,xe=sr,we=ct}if(Le.done)return a(N,we),We&&Pr(N,Ee),ye;if(we===null){for(;!Le.done;Ee++,Le=F.next())Le=re(N,Le.value,ae),Le!==null&&(_=m(Le,_,Ee),xe===null?ye=Le:xe.sibling=Le,xe=Le);return We&&Pr(N,Ee),ye}for(we=c(N,we);!Le.done;Ee++,Le=F.next())Le=ce(we,N,Ee,Le.value,ae),Le!==null&&(n&&Le.alternate!==null&&we.delete(Le.key===null?Ee:Le.key),_=m(Le,_,Ee),xe===null?ye=Le:xe.sibling=Le,xe=Le);return n&&we.forEach(function(Yj){return i(N,Yj)}),We&&Pr(N,Ee),ye}function Je(N,_,F,ae){if(typeof F=="object"&&F!==null&&F.type===V&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case $:e:{for(var ye=F.key,xe=_;xe!==null;){if(xe.key===ye){if(ye=F.type,ye===V){if(xe.tag===7){a(N,xe.sibling),_=d(xe,F.props.children),_.return=N,N=_;break e}}else if(xe.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Se&&Yv(ye)===xe.type){a(N,xe.sibling),_=d(xe,F.props),_.ref=ys(N,xe,F),_.return=N,N=_;break e}a(N,xe);break}else i(N,xe);xe=xe.sibling}F.type===V?(_=Mr(F.props.children,N.mode,ae,F.key),_.return=N,N=_):(ae=ka(F.type,F.key,F.props,null,N.mode,ae),ae.ref=ys(N,_,F),ae.return=N,N=ae)}return x(N);case K:e:{for(xe=F.key;_!==null;){if(_.key===xe)if(_.tag===4&&_.stateNode.containerInfo===F.containerInfo&&_.stateNode.implementation===F.implementation){a(N,_.sibling),_=d(_,F.children||[]),_.return=N,N=_;break e}else{a(N,_);break}else i(N,_);_=_.sibling}_=dd(F,N.mode,ae),_.return=N,N=_}return x(N);case Se:return xe=F._init,Je(N,_,xe(F._payload),ae)}if(Pt(F))return he(N,_,F,ae);if(q(F))return me(N,_,F,ae);ra(N,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,_!==null&&_.tag===6?(a(N,_.sibling),_=d(_,F),_.return=N,N=_):(a(N,_),_=fd(F,N.mode,ae),_.return=N,N=_),x(N)):a(N,_)}return Je}var pi=Kv(!0),qv=Kv(!1),vs={},wn=qn(vs),xs=qn(vs),ws=qn(vs);function br(n){if(n===vs)throw Error(r(174));return n}function jf(n,i){switch(Fe(ws,i),Fe(xs,n),Fe(wn,vs),n=i.nodeType,n){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:at(null,"");break;default:n=n===8?i.parentNode:i,i=n.namespaceURI||null,n=n.tagName,i=at(i,n)}$e(wn),Fe(wn,i)}function hi(){$e(wn),$e(xs),$e(ws)}function Gv(n){br(ws.current);var i=br(wn.current),a=at(i,n.type);i!==a&&(Fe(xs,n),Fe(wn,a))}function Lf(n){xs.current===n&&($e(wn),$e(xs))}var He=qn(0);function ia(n){for(var i=n;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Rf=[];function Af(){for(var n=0;na?a:4,n(!0);var c=_f.transition;_f.transition={};try{n(!1),i()}finally{Ie=a,_f.transition=c}}function p0(){return Jt().memoizedState}function gj(n,i,a){var c=nr(n);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},h0(n))m0(i,a);else if(a=zv(n,i,a,c),a!==null){var d=Tt();dn(a,n,c,d),g0(a,i,c)}}function yj(n,i,a){var c=nr(n),d={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(h0(n))m0(i,d);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var x=i.lastRenderedState,O=m(x,a);if(d.hasEagerState=!0,d.eagerState=O,an(O,x)){var A=i.interleaved;A===null?(d.next=d,Cf(i)):(d.next=A.next,A.next=d),i.interleaved=d;return}}catch{}finally{}a=zv(n,i,d,c),a!==null&&(d=Tt(),dn(a,n,c,d),g0(a,i,c))}}function h0(n){var i=n.alternate;return n===Ye||i!==null&&i===Ye}function m0(n,i){Ss=oa=!0;var a=n.pending;a===null?i.next=i:(i.next=a.next,a.next=i),n.pending=i}function g0(n,i,a){if((a&4194240)!==0){var c=i.lanes;c&=n.pendingLanes,a|=c,i.lanes=a,Fc(n,a)}}var ua={readContext:Zt,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},vj={readContext:Zt,useCallback:function(n,i){return Sn().memoizedState=[n,i===void 0?null:i],n},useContext:Zt,useEffect:s0,useImperativeHandle:function(n,i,a){return a=a!=null?a.concat([n]):null,aa(4194308,4,l0.bind(null,i,n),a)},useLayoutEffect:function(n,i){return aa(4194308,4,n,i)},useInsertionEffect:function(n,i){return aa(4,2,n,i)},useMemo:function(n,i){var a=Sn();return i=i===void 0?null:i,n=n(),a.memoizedState=[n,i],n},useReducer:function(n,i,a){var c=Sn();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:i},c.queue=n,n=n.dispatch=gj.bind(null,Ye,n),[c.memoizedState,n]},useRef:function(n){var i=Sn();return n={current:n},i.memoizedState=n},useState:r0,useDebugValue:Vf,useDeferredValue:function(n){return Sn().memoizedState=n},useTransition:function(){var n=r0(!1),i=n[0];return n=mj.bind(null,n[1]),Sn().memoizedState=n,[i,n]},useMutableSource:function(){},useSyncExternalStore:function(n,i,a){var c=Ye,d=Sn();if(We){if(a===void 0)throw Error(r(407));a=a()}else{if(a=i(),ut===null)throw Error(r(349));(jr&30)!==0||Zv(c,i,a)}d.memoizedState=a;var m={value:a,getSnapshot:i};return d.queue=m,s0(e0.bind(null,c,m,n),[n]),c.flags|=2048,Ts(9,Jv.bind(null,c,m,a,i),void 0,null),a},useId:function(){var n=Sn(),i=ut.identifierPrefix;if(We){var a=bn,c=On;a=(c&~(1<<32-on(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=ks++,0<\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=x.createElement(a,{is:c.is}):(n=x.createElement(a),a==="select"&&(x=n,c.multiple?x.multiple=!0:c.size&&(x.size=c.size))):n=x.createElementNS(n,a),n[xn]=i,n[ms]=c,_0(n,i,!1,!1),i.stateNode=n;e:{switch(x=jc(a,c),a){case"dialog":Be("cancel",n),Be("close",n),d=c;break;case"iframe":case"object":case"embed":Be("load",n),d=c;break;case"video":case"audio":for(d=0;dvi&&(i.flags|=128,c=!0,Cs(m,!1),i.lanes=4194304)}else{if(!c)if(n=ia(x),n!==null){if(i.flags|=128,c=!0,a=n.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),Cs(m,!0),m.tail===null&&m.tailMode==="hidden"&&!x.alternate&&!We)return yt(i),null}else 2*Ze()-m.renderingStartTime>vi&&a!==1073741824&&(i.flags|=128,c=!0,Cs(m,!1),i.lanes=4194304);m.isBackwards?(x.sibling=i.child,i.child=x):(a=m.last,a!==null?a.sibling=x:i.child=x,m.last=x)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Ze(),i.sibling=null,a=He.current,Fe(He,c?a&1|2:a&1),i):(yt(i),null);case 22:case 23:return ld(),c=i.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?($t&1073741824)!==0&&(yt(i),i.subtreeFlags&6&&(i.flags|=8192)):yt(i),null;case 24:return null;case 25:return null}throw Error(r(156,i.tag))}function Pj(n,i){switch(yf(i),i.tag){case 1:return Lt(i.type)&&Yo(),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return hi(),$e(jt),$e(mt),Af(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 5:return Lf(i),null;case 13:if($e(He),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));ci()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return $e(He),null;case 4:return hi(),null;case 10:return Ef(i.type._context),null;case 22:case 23:return ld(),null;case 24:return null;default:return null}}var da=!1,vt=!1,Oj=typeof WeakSet=="function"?WeakSet:Set,de=null;function gi(n,i){var a=n.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){qe(n,i,c)}else a.current=null}function Xf(n,i,a){try{a()}catch(c){qe(n,i,c)}}var I0=!1;function bj(n,i){if(lf=Ao,n=pv(),Jc(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var d=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var x=0,O=-1,A=-1,W=0,J=0,re=n,Q=null;t:for(;;){for(var ce;re!==a||d!==0&&re.nodeType!==3||(O=x+d),re!==m||c!==0&&re.nodeType!==3||(A=x+c),re.nodeType===3&&(x+=re.nodeValue.length),(ce=re.firstChild)!==null;)Q=re,re=ce;for(;;){if(re===n)break t;if(Q===a&&++W===d&&(O=x),Q===m&&++J===c&&(A=x),(ce=re.nextSibling)!==null)break;re=Q,Q=re.parentNode}re=ce}a=O===-1||A===-1?null:{start:O,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(uf={focusedElem:n,selectionRange:a},Ao=!1,de=i;de!==null;)if(i=de,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,de=n;else for(;de!==null;){i=de;try{var he=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var me=he.memoizedProps,Je=he.memoizedState,N=i.stateNode,_=N.getSnapshotBeforeUpdate(i.elementType===i.type?me:un(i.type,me),Je);N.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var F=i.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ae){qe(i,i.return,ae)}if(n=i.sibling,n!==null){n.return=i.return,de=n;break}de=i.return}return he=I0,I0=!1,he}function Ps(n,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&n)===n){var m=d.destroy;d.destroy=void 0,m!==void 0&&Xf(i,a,m)}d=d.next}while(d!==c)}}function pa(n,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&n)===n){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function Qf(n){var i=n.ref;if(i!==null){var a=n.stateNode;switch(n.tag){case 5:n=a;break;default:n=a}typeof i=="function"?i(n):i.current=n}}function N0(n){var i=n.alternate;i!==null&&(n.alternate=null,N0(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&(delete i[xn],delete i[ms],delete i[pf],delete i[cj],delete i[fj])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function z0(n){return n.tag===5||n.tag===3||n.tag===4}function F0(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||z0(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Zf(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(n,i):a.insertBefore(n,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(n,a)):(i=a,i.appendChild(n)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Uo));else if(c!==4&&(n=n.child,n!==null))for(Zf(n,i,a),n=n.sibling;n!==null;)Zf(n,i,a),n=n.sibling}function Jf(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?a.insertBefore(n,i):a.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(Jf(n,i,a),n=n.sibling;n!==null;)Jf(n,i,a),n=n.sibling}var dt=null,cn=!1;function Jn(n,i,a){for(a=a.child;a!==null;)V0(n,i,a),a=a.sibling}function V0(n,i,a){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Po,a)}catch{}switch(a.tag){case 5:vt||gi(a,i);case 6:var c=dt,d=cn;dt=null,Jn(n,i,a),dt=c,cn=d,dt!==null&&(cn?(n=dt,a=a.stateNode,n.nodeType===8?n.parentNode.removeChild(a):n.removeChild(a)):dt.removeChild(a.stateNode));break;case 18:dt!==null&&(cn?(n=dt,a=a.stateNode,n.nodeType===8?df(n.parentNode,a):n.nodeType===1&&df(n,a),is(n)):df(dt,a.stateNode));break;case 4:c=dt,d=cn,dt=a.stateNode.containerInfo,cn=!0,Jn(n,i,a),dt=c,cn=d;break;case 0:case 11:case 14:case 15:if(!vt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var m=d,x=m.destroy;m=m.tag,x!==void 0&&((m&2)!==0||(m&4)!==0)&&Xf(a,i,x),d=d.next}while(d!==c)}Jn(n,i,a);break;case 1:if(!vt&&(gi(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(O){qe(a,i,O)}Jn(n,i,a);break;case 21:Jn(n,i,a);break;case 22:a.mode&1?(vt=(c=vt)||a.memoizedState!==null,Jn(n,i,a),vt=c):Jn(n,i,a);break;default:Jn(n,i,a)}}function B0(n){var i=n.updateQueue;if(i!==null){n.updateQueue=null;var a=n.stateNode;a===null&&(a=n.stateNode=new Oj),i.forEach(function(c){var d=Nj.bind(null,n,c);a.has(c)||(a.add(c),c.then(d,d))})}}function fn(n,i){var a=i.deletions;if(a!==null)for(var c=0;cd&&(d=x),c&=~m}if(c=d,c=Ze()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Lj(c/1960))-c,10n?16:n,tr===null)var c=!1;else{if(n=tr,tr=null,va=0,(je&6)!==0)throw Error(r(331));var d=je;for(je|=4,de=n.current;de!==null;){var m=de,x=m.child;if((de.flags&16)!==0){var O=m.deletions;if(O!==null){for(var A=0;AZe()-nd?Ar(n,0):td|=a),_t(n,i)}function ex(n,i){i===0&&((n.mode&1)===0?i=1:(i=bo,bo<<=1,(bo&130023424)===0&&(bo=4194304)));var a=Tt();n=jn(n,i),n!==null&&(Ji(n,i,a),_t(n,a))}function Ij(n){var i=n.memoizedState,a=0;i!==null&&(a=i.retryLane),ex(n,a)}function Nj(n,i){var a=0;switch(n.tag){case 13:var c=n.stateNode,d=n.memoizedState;d!==null&&(a=d.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(i),ex(n,a)}var tx;tx=function(n,i,a){if(n!==null)if(n.memoizedProps!==i.pendingProps||jt.current)Rt=!0;else{if((n.lanes&a)===0&&(i.flags&128)===0)return Rt=!1,Tj(n,i,a);Rt=(n.flags&131072)!==0}else Rt=!1,We&&(i.flags&1048576)!==0&&_v(i,Xo,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;fa(n,i),n=i.pendingProps;var d=ai(i,mt.current);di(i,a),d=Df(null,i,c,n,d,a);var m=If();return i.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Lt(c)?(m=!0,Ko(i)):m=!1,i.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Pf(i),d.updater=na,i.stateNode=d,d._reactInternals=i,bf(i,c,n,a),i=Uf(null,i,c,!0,m,a)):(i.tag=0,We&&m&&gf(i),Et(null,i,d,a),i=i.child),i;case 16:c=i.elementType;e:{switch(fa(n,i),n=i.pendingProps,d=c._init,c=d(c._payload),i.type=c,d=i.tag=Fj(c),n=un(c,n),d){case 0:i=Wf(null,i,c,n,a);break e;case 1:i=O0(null,i,c,n,a);break e;case 11:i=k0(null,i,c,n,a);break e;case 14:i=E0(null,i,c,un(c.type,n),a);break e}throw Error(r(306,c,""))}return i;case 0:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:un(c,d),Wf(n,i,c,d,a);case 1:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:un(c,d),O0(n,i,c,d,a);case 3:e:{if(b0(i),n===null)throw Error(r(387));c=i.pendingProps,m=i.memoizedState,d=m.element,Fv(n,i),ta(i,c,null,a);var x=i.memoizedState;if(c=x.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){d=mi(Error(r(423)),i),i=j0(n,i,c,a,d);break e}else if(c!==d){d=mi(Error(r(424)),i),i=j0(n,i,c,a,d);break e}else for(Bt=Kn(i.stateNode.containerInfo.firstChild),Vt=i,We=!0,ln=null,a=qv(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ci(),c===d){i=Rn(n,i,a);break e}Et(n,i,c,a)}i=i.child}return i;case 5:return Gv(i),n===null&&xf(i),c=i.type,d=i.pendingProps,m=n!==null?n.memoizedProps:null,x=d.children,cf(c,d)?x=null:m!==null&&cf(c,m)&&(i.flags|=32),P0(n,i),Et(n,i,x,a),i.child;case 6:return n===null&&xf(i),null;case 13:return L0(n,i,a);case 4:return jf(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=pi(i,null,c,a):Et(n,i,c,a),i.child;case 11:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:un(c,d),k0(n,i,c,d,a);case 7:return Et(n,i,i.pendingProps,a),i.child;case 8:return Et(n,i,i.pendingProps.children,a),i.child;case 12:return Et(n,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,d=i.pendingProps,m=i.memoizedProps,x=d.value,Fe(Zo,c._currentValue),c._currentValue=x,m!==null)if(an(m.value,x)){if(m.children===d.children&&!jt.current){i=Rn(n,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var O=m.dependencies;if(O!==null){x=m.child;for(var A=O.firstContext;A!==null;){if(A.context===c){if(m.tag===1){A=Ln(-1,a&-a),A.tag=2;var W=m.updateQueue;if(W!==null){W=W.shared;var J=W.pending;J===null?A.next=A:(A.next=J.next,J.next=A),W.pending=A}}m.lanes|=a,A=m.alternate,A!==null&&(A.lanes|=a),Tf(m.return,a,i),O.lanes|=a;break}A=A.next}}else if(m.tag===10)x=m.type===i.type?null:m.child;else if(m.tag===18){if(x=m.return,x===null)throw Error(r(341));x.lanes|=a,O=x.alternate,O!==null&&(O.lanes|=a),Tf(x,a,i),x=m.sibling}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===i){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}Et(n,i,d.children,a),i=i.child}return i;case 9:return d=i.type,c=i.pendingProps.children,di(i,a),d=Zt(d),c=c(d),i.flags|=1,Et(n,i,c,a),i.child;case 14:return c=i.type,d=un(c,i.pendingProps),d=un(c.type,d),E0(n,i,c,d,a);case 15:return T0(n,i,i.type,i.pendingProps,a);case 17:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:un(c,d),fa(n,i),i.tag=1,Lt(c)?(n=!0,Ko(i)):n=!1,di(i,a),Uv(i,c,d),bf(i,c,d,a),Uf(null,i,c,!0,n,a);case 19:return A0(n,i,a);case 22:return C0(n,i,a)}throw Error(r(156,i.tag))};function nx(n,i){return My(n,i)}function zj(n,i,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(n,i,a,c){return new zj(n,i,a,c)}function cd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Fj(n){if(typeof n=="function")return cd(n)?1:0;if(n!=null){if(n=n.$$typeof,n===D)return 11;if(n===fe)return 14}return 2}function ir(n,i){var a=n.alternate;return a===null?(a=tn(n.tag,i,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=i,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&14680064,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,i=n.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a}function ka(n,i,a,c,d,m){var x=2;if(c=n,typeof n=="function")cd(n)&&(x=1);else if(typeof n=="string")x=5;else e:switch(n){case V:return Mr(a.children,d,m,i);case E:x=8,d|=8;break;case T:return n=tn(12,a,i,d|2),n.elementType=T,n.lanes=m,n;case G:return n=tn(13,a,i,d),n.elementType=G,n.lanes=m,n;case ee:return n=tn(19,a,i,d),n.elementType=ee,n.lanes=m,n;case X:return Ea(a,d,m,i);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case M:x=10;break e;case Z:x=9;break e;case D:x=11;break e;case fe:x=14;break e;case Se:x=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return i=tn(x,a,i,d),i.elementType=n,i.type=c,i.lanes=m,i}function Mr(n,i,a,c){return n=tn(7,n,c,i),n.lanes=a,n}function Ea(n,i,a,c){return n=tn(22,n,c,i),n.elementType=X,n.lanes=a,n.stateNode={isHidden:!1},n}function fd(n,i,a){return n=tn(6,n,null,i),n.lanes=a,n}function dd(n,i,a){return i=tn(4,n.children!==null?n.children:[],n.key,i),i.lanes=a,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}function Vj(n,i,a,c,d){this.tag=i,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=c,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function pd(n,i,a,c,d,m,x,O,A){return n=new Vj(n,i,a,O,A),i===1?(i=1,m===!0&&(i|=8)):i=0,m=tn(3,null,null,i),n.current=m,m.stateNode=n,m.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pf(m),n}function Bj(n,i,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ra.exports=px(),Ra.exports}var Pd;function mx(){if(Pd)return Rs;Pd=1;var e=hx();return Rs.createRoot=e.createRoot,Rs.hydrateRoot=e.hydrateRoot,Rs}var gx=mx(),L=Si();const ie=Mt(L),Ma=L.createContext({});function Dr(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}const Od=typeof window<"u",bd=Od?L.useLayoutEffect:L.useEffect,As=L.createContext(null);function Da(e,t){e.indexOf(t)===-1&&e.push(t)}function _s(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const pn=(e,t,r)=>r>t?t:r{};const En={},jd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ld(e){return typeof e=="object"&&e!==null}const Rd=e=>/^0[^.\s]+$/u.test(e);function Ad(e){let t;return()=>(t===void 0&&(t=e()),t)}const Wt=e=>e,yx=(e,t)=>r=>t(e(r)),ki=(...e)=>e.reduce(yx),Ei=(e,t,r)=>{const s=t-e;return s===0?1:(r-e)/s};class Na{constructor(){this.subscriptions=[]}add(t){return Da(this.subscriptions,t),()=>_s(this.subscriptions,t)}notify(t,r,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,s);else for(let l=0;le*1e3,Ut=e=>e/1e3;function _d(e,t){return t?e*(1e3/t):0}const Md=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,vx=1e-7,xx=12;function wx(e,t,r,s,o){let l,u,f=0;do u=t+(r-t)/2,l=Md(u,s,o)-e,l>0?r=u:t=u;while(Math.abs(l)>vx&&++fwx(l,0,1,e,r);return l=>l===0||l===1?l:Md(o(l),t,s)}const Dd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Id=e=>t=>1-e(1-t),Nd=Ti(.33,1.53,.69,.99),za=Id(Nd),zd=Dd(za),Fd=e=>(e*=2)<1?.5*za(e):.5*(2-Math.pow(2,-10*(e-1))),Fa=e=>1-Math.sin(Math.acos(e)),Vd=Id(Fa),Bd=Dd(Fa),Sx=Ti(.42,0,1,1),kx=Ti(0,0,.58,1),$d=Ti(.42,0,.58,1),Ex=e=>Array.isArray(e)&&typeof e[0]!="number",Wd=e=>Array.isArray(e)&&typeof e[0]=="number",Tx={linear:Wt,easeIn:Sx,easeInOut:$d,easeOut:kx,circIn:Fa,circInOut:Bd,circOut:Vd,backIn:za,backInOut:zd,backOut:Nd,anticipate:Fd},Cx=e=>typeof e=="string",Ud=e=>{if(Wd(e)){Ia(e.length===4);const[t,r,s,o]=e;return Ti(t,r,s,o)}else if(Cx(e))return Tx[e];return e},Ms=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Px(e,t){let r=new Set,s=new Set,o=!1,l=!1;const u=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function p(g){u.has(g)&&(h.schedule(g),e()),g(f)}const h={schedule:(g,y=!1,v=!1)=>{const b=v&&o?r:s;return y&&u.add(g),b.has(g)||b.add(g),g},cancel:g=>{s.delete(g),u.delete(g)},process:g=>{if(f=g,o){l=!0;return}o=!0,[r,s]=[s,r],r.forEach(p),r.clear(),o=!1,l&&(l=!1,h.process(g))}};return h}const Ox=40;function Hd(e,t){let r=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,u=Ms.reduce((z,H)=>(z[H]=Px(l),z),{}),{setup:f,read:p,resolveKeyframes:h,preUpdate:g,update:y,preRender:v,render:k,postRender:b}=u,S=()=>{const z=En.useManualTiming?o.timestamp:performance.now();r=!1,En.useManualTiming||(o.delta=s?1e3/60:Math.max(Math.min(z-o.timestamp,Ox),1)),o.timestamp=z,o.isProcessing=!0,f.process(o),p.process(o),h.process(o),g.process(o),y.process(o),v.process(o),k.process(o),b.process(o),o.isProcessing=!1,r&&t&&(s=!1,e(S))},C=()=>{r=!0,s=!0,o.isProcessing||e(S)};return{schedule:Ms.reduce((z,H)=>{const $=u[H];return z[H]=(K,V=!1,E=!1)=>(r||C(),$.schedule(K,V,E)),z},{}),cancel:z=>{for(let H=0;H(Ds===void 0&&xt.set(ft.isProcessing||En.useManualTiming?ft.timestamp:performance.now()),Ds),set:e=>{Ds=e,queueMicrotask(bx)}},Yd=e=>t=>typeof t=="string"&&t.startsWith(e),Kd=Yd("--"),jx=Yd("var(--"),Ba=e=>jx(e)?Lx.test(e.split("/*")[0].trim()):!1,Lx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qd(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ir={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ci={...Ir,transform:e=>pn(0,1,e)},Is={...Ir,default:1},Pi=e=>Math.round(e*1e5)/1e5,$a=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Rx(e){return e==null}const Ax=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wa=(e,t)=>r=>!!(typeof r=="string"&&Ax.test(r)&&r.startsWith(e)||t&&!Rx(r)&&Object.prototype.hasOwnProperty.call(r,t)),Gd=(e,t,r)=>s=>{if(typeof s!="string")return s;const[o,l,u,f]=s.match($a);return{[e]:parseFloat(o),[t]:parseFloat(l),[r]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},_x=e=>pn(0,255,e),Ua={...Ir,transform:e=>Math.round(_x(e))},or={test:Wa("rgb","red"),parse:Gd("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:s=1})=>"rgba("+Ua.transform(e)+", "+Ua.transform(t)+", "+Ua.transform(r)+", "+Pi(Ci.transform(s))+")"};function Mx(e){let t="",r="",s="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),s=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),s=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,s+=s,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const Ha={test:Wa("#"),parse:Mx,transform:or.transform},Oi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Dn=Oi("deg"),mn=Oi("%"),pe=Oi("px"),Dx=Oi("vh"),Ix=Oi("vw"),Xd={...mn,parse:e=>mn.parse(e)/100,transform:e=>mn.transform(e*100)},Nr={test:Wa("hsl","hue"),parse:Gd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:s=1})=>"hsla("+Math.round(e)+", "+mn.transform(Pi(t))+", "+mn.transform(Pi(r))+", "+Pi(Ci.transform(s))+")"},et={test:e=>or.test(e)||Ha.test(e)||Nr.test(e),parse:e=>or.test(e)?or.parse(e):Nr.test(e)?Nr.parse(e):Ha.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?or.transform(e):Nr.transform(e),getAnimatableNone:e=>{const t=et.parse(e);return t.alpha=0,et.transform(t)}},Nx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zx(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match($a))==null?void 0:t.length)||0)+(((r=e.match(Nx))==null?void 0:r.length)||0)>0}const Qd="number",Zd="color",Fx="var",Vx="var(",Jd="${}",Bx=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function bi(e){const t=e.toString(),r=[],s={color:[],number:[],var:[]},o=[];let l=0;const f=t.replace(Bx,p=>(et.test(p)?(s.color.push(l),o.push(Zd),r.push(et.parse(p))):p.startsWith(Vx)?(s.var.push(l),o.push(Fx),r.push(p)):(s.number.push(l),o.push(Qd),r.push(parseFloat(p))),++l,Jd)).split(Jd);return{values:r,split:f,indexes:s,types:o}}function ep(e){return bi(e).values}function tp(e){const{split:t,types:r}=bi(e),s=t.length;return o=>{let l="";for(let u=0;utypeof e=="number"?0:et.test(e)?et.getAnimatableNone(e):e;function Wx(e){const t=ep(e);return tp(e)(t.map($x))}const nn={test:zx,parse:ep,createTransformer:tp,getAnimatableNone:Wx};function Ya(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Ux({hue:e,saturation:t,lightness:r,alpha:s}){e/=360,t/=100,r/=100;let o=0,l=0,u=0;if(!t)o=l=u=r;else{const f=r<.5?r*(1+t):r+t-r*t,p=2*r-f;o=Ya(p,f,e+1/3),l=Ya(p,f,e),u=Ya(p,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:s}}function Ns(e,t){return r=>r>0?t:e}const Ue=(e,t,r)=>e+(t-e)*r,Ka=(e,t,r)=>{const s=e*e,o=r*(t*t-s)+s;return o<0?0:Math.sqrt(o)},Hx=[Ha,or,Nr],Yx=e=>Hx.find(t=>t.test(e));function np(e){const t=Yx(e);if(!t)return!1;let r=t.parse(e);return t===Nr&&(r=Ux(r)),r}const rp=(e,t)=>{const r=np(e),s=np(t);if(!r||!s)return Ns(e,t);const o={...r};return l=>(o.red=Ka(r.red,s.red,l),o.green=Ka(r.green,s.green,l),o.blue=Ka(r.blue,s.blue,l),o.alpha=Ue(r.alpha,s.alpha,l),or.transform(o))},qa=new Set(["none","hidden"]);function Kx(e,t){return qa.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function qx(e,t){return r=>Ue(e,t,r)}function Ga(e){return typeof e=="number"?qx:typeof e=="string"?Ba(e)?Ns:et.test(e)?rp:Qx:Array.isArray(e)?ip:typeof e=="object"?et.test(e)?rp:Gx:Ns}function ip(e,t){const r=[...e],s=r.length,o=e.map((l,u)=>Ga(l)(l,t[u]));return l=>{for(let u=0;u{for(const l in s)r[l]=s[l](o);return r}}function Xx(e,t){const r=[],s={color:0,var:0,number:0};for(let o=0;o{const r=nn.createTransformer(t),s=bi(e),o=bi(t);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?qa.has(e)&&!o.values.length||qa.has(t)&&!s.values.length?Kx(e,t):ki(ip(Xx(s,o),o.values),r):Ns(e,t)};function sp(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Ue(e,t,r):Ga(e)(e,t)}const Zx=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Ve.update(t,r),stop:()=>Mn(t),now:()=>ft.isProcessing?ft.timestamp:xt.now()}},op=(e,t,r=10)=>{let s="";const o=Math.max(Math.round(t/r),2);for(let l=0;l=zs?1/0:t}function Jx(e,t=100,r){const s=r({...e,keyframes:[0,t]}),o=Math.min(Xa(s),zs);return{type:"keyframes",ease:l=>s.next(o*l).value/t,duration:Ut(o)}}const ew=5;function ap(e,t,r){const s=Math.max(t-ew,0);return _d(r-e(s),t-s)}const Ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Qa=.001;function tw({duration:e=Ke.duration,bounce:t=Ke.bounce,velocity:r=Ke.velocity,mass:s=Ke.mass}){let o,l,u=1-t;u=pn(Ke.minDamping,Ke.maxDamping,u),e=pn(Ke.minDuration,Ke.maxDuration,Ut(e)),u<1?(o=h=>{const g=h*u,y=g*e,v=g-r,k=Za(h,u),b=Math.exp(-y);return Qa-v/k*b},l=h=>{const y=h*u*e,v=y*r+r,k=Math.pow(u,2)*Math.pow(h,2)*e,b=Math.exp(-y),S=Za(Math.pow(h,2),u);return(-o(h)+Qa>0?-1:1)*((v-k)*b)/S}):(o=h=>{const g=Math.exp(-h*e),y=(h-r)*e+1;return-Qa+g*y},l=h=>{const g=Math.exp(-h*e),y=(r-h)*(e*e);return g*y});const f=5/e,p=rw(o,l,f);if(e=hn(e),isNaN(p))return{stiffness:Ke.stiffness,damping:Ke.damping,duration:e};{const h=Math.pow(p,2)*s;return{stiffness:h,damping:u*2*Math.sqrt(s*h),duration:e}}}const nw=12;function rw(e,t,r){let s=r;for(let o=1;oe[r]!==void 0)}function ow(e){let t={velocity:Ke.velocity,stiffness:Ke.stiffness,damping:Ke.damping,mass:Ke.mass,isResolvedFromDuration:!1,...e};if(!lp(e,sw)&&lp(e,iw))if(t.velocity=0,e.visualDuration){const r=e.visualDuration,s=2*Math.PI/(r*1.2),o=s*s,l=2*pn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ke.mass,stiffness:o,damping:l}}else{const r=tw({...e,velocity:0});t={...t,...r,mass:Ke.mass},t.isResolvedFromDuration=!0}return t}function ji(e=Ke.visualDuration,t=Ke.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:o}=r;const l=r.keyframes[0],u=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:p,damping:h,mass:g,duration:y,velocity:v,isResolvedFromDuration:k}=ow({...r,velocity:-Ut(r.velocity||0)}),b=v||0,S=h/(2*Math.sqrt(p*g)),C=u-l,R=Ut(Math.sqrt(p/g)),I=Math.abs(C)<5;s||(s=I?Ke.restSpeed.granular:Ke.restSpeed.default),o||(o=I?Ke.restDelta.granular:Ke.restDelta.default);let z;if(S<1){const $=Za(R,S);z=K=>{const V=Math.exp(-S*R*K);return u-V*((b+S*R*C)/$*Math.sin($*K)+C*Math.cos($*K))}}else if(S===1)z=$=>u-Math.exp(-R*$)*(C+(b+R*C)*$);else{const $=R*Math.sqrt(S*S-1);z=K=>{const V=Math.exp(-S*R*K),E=Math.min($*K,300);return u-V*((b+S*R*C)*Math.sinh(E)+$*C*Math.cosh(E))/$}}const H={calculatedDuration:k&&y||null,next:$=>{const K=z($);if(k)f.done=$>=y;else{let V=$===0?b:0;S<1&&(V=$===0?hn(b):ap(z,$,K));const E=Math.abs(V)<=s,T=Math.abs(u-K)<=o;f.done=E&&T}return f.value=f.done?u:K,f},toString:()=>{const $=Math.min(Xa(H),zs),K=op(V=>H.next($*V).value,$,30);return $+"ms "+K},toTransition:()=>{}};return H}ji.applyToOptions=e=>{const t=Jx(e,100,ji);return e.ease=t.ease,e.duration=hn(t.duration),e.type="keyframes",e};function Ja({keyframes:e,velocity:t=0,power:r=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:f,max:p,restDelta:h=.5,restSpeed:g}){const y=e[0],v={done:!1,value:y},k=E=>f!==void 0&&Ep,b=E=>f===void 0?p:p===void 0||Math.abs(f-E)-S*Math.exp(-E/s),z=E=>R+I(E),H=E=>{const T=I(E),M=z(E);v.done=Math.abs(T)<=h,v.value=v.done?R:M};let $,K;const V=E=>{k(v.value)&&($=E,K=ji({keyframes:[v.value,b(v.value)],velocity:ap(z,E,v.value),damping:o,stiffness:l,restDelta:h,restSpeed:g}))};return V(0),{calculatedDuration:null,next:E=>{let T=!1;return!K&&$===void 0&&(T=!0,H(E),V(E)),$!==void 0&&E>=$?K.next(E-$):(!T&&H(E),v)}}}function aw(e,t,r){const s=[],o=r||En.mix||sp,l=e.length-1;for(let u=0;ut[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=aw(t,s,o),p=f.length,h=g=>{if(u&&g1)for(;yh(pn(e[0],e[l-1],g)):h}function uw(e,t){const r=e[e.length-1];for(let s=1;s<=t;s++){const o=Ei(0,t,s);e.push(Ue(r,1,o))}}function cw(e){const t=[0];return uw(t,e.length-1),t}function fw(e,t){return e.map(r=>r*t)}function dw(e,t){return e.map(()=>t||$d).splice(0,e.length-1)}function Li({duration:e=300,keyframes:t,times:r,ease:s="easeInOut"}){const o=Ex(s)?s.map(Ud):Ud(s),l={done:!1,value:t[0]},u=fw(r&&r.length===t.length?r:cw(t),e),f=lw(u,t,{ease:Array.isArray(o)?o:dw(t,o)});return{calculatedDuration:e,next:p=>(l.value=f(p),l.done=p>=e,l)}}const pw=e=>e!==null;function el(e,{repeat:t,repeatType:r="loop"},s,o=1){const l=e.filter(pw),f=o<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||s===void 0?l[f]:s}const hw={decay:Ja,inertia:Ja,tween:Li,keyframes:Li,spring:ji};function up(e){typeof e.type=="string"&&(e.type=hw[e.type])}class tl{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const mw=e=>e/100;class nl extends tl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,o;const{motionValue:r}=this.options;r&&r.updatedAt!==xt.now()&&this.tick(xt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(s=this.options).onStop)==null||o.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;up(t);const{type:r=Li,repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=t;let{keyframes:f}=t;const p=r||Li;p!==Li&&typeof f[0]!="number"&&(this.mixKeyframes=ki(mw,sp(f[0],f[1])),f=[0,100]);const h=p({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=p({...t,keyframes:[...f].reverse(),velocity:-u})),h.calculatedDuration===null&&(h.calculatedDuration=Xa(h));const{calculatedDuration:g}=h;this.calculatedDuration=g,this.resolvedDuration=g+o,this.totalDuration=this.resolvedDuration*(s+1)-o,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:s,totalDuration:o,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:f,calculatedDuration:p}=this;if(this.startTime===null)return s.next(0);const{delay:h=0,keyframes:g,repeat:y,repeatType:v,repeatDelay:k,type:b,onUpdate:S,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const R=this.currentTime-h*(this.playbackSpeed>=0?1:-1),I=this.playbackSpeed>=0?R<0:R>o;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let z=this.currentTime,H=s;if(y){const E=Math.min(this.currentTime,o)/f;let T=Math.floor(E),M=E%1;!M&&E>=1&&(M=1),M===1&&T--,T=Math.min(T,y+1),!!(T%2)&&(v==="reverse"?(M=1-M,k&&(M-=k/f)):v==="mirror"&&(H=u)),z=pn(0,1,M)*f}const $=I?{done:!1,value:g[0]}:H.next(z);l&&($.value=l($.value));let{done:K}=$;!I&&p!==null&&(K=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&K);return V&&b!==Ja&&($.value=el(g,this.options,C,this.speed)),S&&S($.value),V&&this.finish(),$}then(t,r){return this.finished.then(t,r)}get duration(){return Ut(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(this.currentTime)}set time(t){var r;t=hn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(xt.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ut(this.currentTime))}play(){var o,l;if(this.isStopped)return;const{driver:t=Zx,startTime:r}=this.options;this.driver||(this.driver=t(u=>this.tick(u))),(l=(o=this.options).onPlay)==null||l.call(o);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=r??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(xt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function gw(e){for(let t=1;te*180/Math.PI,rl=e=>{const t=ar(Math.atan2(e[1],e[0]));return il(t)},yw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rl,rotateZ:rl,skewX:e=>ar(Math.atan(e[1])),skewY:e=>ar(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},il=e=>(e=e%360,e<0&&(e+=360),e),cp=rl,fp=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),dp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fp,scaleY:dp,scale:e=>(fp(e)+dp(e))/2,rotateX:e=>il(ar(Math.atan2(e[6],e[5]))),rotateY:e=>il(ar(Math.atan2(-e[2],e[0]))),rotateZ:cp,rotate:cp,skewX:e=>ar(Math.atan(e[4])),skewY:e=>ar(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sl(e){return e.includes("scale")?1:0}function ol(e,t){if(!e||e==="none")return sl(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,o;if(r)s=vw,o=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=yw,o=f}if(!o)return sl(t);const l=s[t],u=o[1].split(",").map(ww);return typeof l=="function"?l(u):u[l]}const xw=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return ol(r,t)};function ww(e){return parseFloat(e.trim())}const zr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fr=new Set(zr),pp=e=>e===Ir||e===pe,Sw=new Set(["x","y","z"]),kw=zr.filter(e=>!Sw.has(e));function Ew(e){const t=[];return kw.forEach(r=>{const s=e.getValue(r);s!==void 0&&(t.push([r,s.get()]),s.set(r.startsWith("scale")?1:0))}),t}const In={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ol(t,"x"),y:(e,{transform:t})=>ol(t,"y")};In.translateX=In.x,In.translateY=In.y;const lr=new Set;let al=!1,ll=!1,ul=!1;function hp(){if(ll){const e=Array.from(lr).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),r=new Map;t.forEach(s=>{const o=Ew(s);o.length&&(r.set(s,o),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const o=r.get(s);o&&o.forEach(([l,u])=>{var f;(f=s.getValue(l))==null||f.set(u)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}ll=!1,al=!1,lr.forEach(e=>e.complete(ul)),lr.clear()}function mp(){lr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ll=!0)})}function Tw(){ul=!0,mp(),hp(),ul=!1}class cl{constructor(t,r,s,o,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=s,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(lr.add(this),al||(al=!0,Ve.read(mp),Ve.resolveKeyframes(hp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:s,motionValue:o}=this;if(t[0]===null){const l=o==null?void 0:o.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(s&&r){const f=s.readValue(r,u);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=u),o&&l===void 0&&o.set(t[0])}gw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),lr.delete(this)}cancel(){this.state==="scheduled"&&(lr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Cw=e=>e.startsWith("--");function Pw(e,t,r){Cw(t)?e.style.setProperty(t,r):e.style[t]=r}const Ow={};function gp(e,t){const r=Ad(e);return()=>Ow[t]??r()}const bw=gp(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),yp=gp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ri=([e,t,r,s])=>`cubic-bezier(${e}, ${t}, ${r}, ${s})`,vp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ri([0,.65,.55,1]),circOut:Ri([.55,0,1,.45]),backIn:Ri([.31,.01,.66,-.59]),backOut:Ri([.33,1.53,.69,.99])};function xp(e,t){if(e)return typeof e=="function"?yp()?op(e,t):"ease-out":Wd(e)?Ri(e):Array.isArray(e)?e.map(r=>xp(r,t)||vp.easeOut):vp[e]}function jw(e,t,r,{delay:s=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:f="easeOut",times:p}={},h=void 0){const g={[t]:r};p&&(g.offset=p);const y=xp(f,o);Array.isArray(y)&&(g.easing=y);const v={delay:s,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(g,v)}function wp(e){return typeof e=="function"&&"applyToOptions"in e}function Lw({type:e,...t}){return wp(e)&&yp()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Sp extends tl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:s,keyframes:o,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:f,onComplete:p}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,Ia(typeof t.type!="string");const h=Lw(t);this.animation=jw(r,s,o,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const g=el(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(g):Pw(r,s,g),this.animation.cancel()}p==null||p(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,s,o;const t=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((o=(s=this.animation).commitStyles)==null||o.call(s))}get duration(){var r,s;const t=((s=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:s.call(r).duration)||0;return Ut(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&bw()?(this.animation.timeline=t,Wt):r(this)}}const kp={anticipate:Fd,backInOut:zd,circInOut:Bd};function Rw(e){return e in kp}function Aw(e){typeof e.ease=="string"&&Rw(e.ease)&&(e.ease=kp[e.ease])}const fl=10;class _w extends Sp{constructor(t){Aw(t),up(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:s,onComplete:o,element:l,...u}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new nl({...u,autoplay:!1}),p=Math.max(fl,xt.now()-this.startTime),h=pn(0,fl,p-fl);r.setWithVelocity(f.sample(Math.max(0,p-h)).value,f.sample(p).value,h),f.stop()}}const Ep=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nn.test(e)||e==="0")&&!e.startsWith("url("));function Mw(e){const t=e[0];if(e.length===1)return!0;for(let r=0;rObject.hasOwnProperty.call(Element.prototype,"animate"));function zw(e){var g;const{motionValue:t,name:r,repeatDelay:s,repeatType:o,damping:l,type:u}=e;if(!(((g=t==null?void 0:t.owner)==null?void 0:g.current)instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:h}=t.owner.getProps();return Nw()&&r&&Iw.has(r)&&(r!=="transform"||!h)&&!p&&!s&&o!=="mirror"&&l!==0&&u!=="inertia"}const Fw=40;class Vw extends tl{constructor({autoplay:t=!0,delay:r=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",keyframes:f,name:p,motionValue:h,element:g,...y}){var b;super(),this.stop=()=>{var S,C;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(C=this.keyframeResolver)==null||C.cancel()},this.createdAt=xt.now();const v={autoplay:t,delay:r,type:s,repeat:o,repeatDelay:l,repeatType:u,name:p,motionValue:h,element:g,...y},k=(g==null?void 0:g.KeyframeResolver)||cl;this.keyframeResolver=new k(f,(S,C,R)=>this.onKeyframesResolved(S,C,v,!R),p,h,g),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,r,s,o){var C,R;this.keyframeResolver=void 0;const{name:l,type:u,velocity:f,delay:p,isHandoff:h,onUpdate:g}=s;this.resolvedAt=xt.now(),Dw(t,l,u,f)||((En.instantAnimations||!p)&&(g==null||g(el(t,s,r))),t[0]=t[t.length-1],dl(s),s.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Fw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...s,keyframes:t},k=!h&&zw(v),b=(R=(C=v.motionValue)==null?void 0:C.owner)==null?void 0:R.current,S=k?new _w({...v,element:b}):new nl(v);S.finished.then(()=>{this.notifyFinished()}).catch(Wt),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Tw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Tp(e,t,r,s=0,o=1){const l=Array.from(e).sort((h,g)=>h.sortNodePosition(g)).indexOf(t),u=e.size,f=(u-1)*s;return typeof r=="function"?r(l,u):o===1?l*s:f-l*s}const Bw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $w(e){const t=Bw.exec(e);if(!t)return[,];const[,r,s,o]=t;return[`--${r??s}`,o]}function Cp(e,t,r=1){const[s,o]=$w(e);if(!s)return;const l=window.getComputedStyle(t).getPropertyValue(s);if(l){const u=l.trim();return jd(u)?parseFloat(u):u}return Ba(o)?Cp(o,t,r+1):o}const Ww={type:"spring",stiffness:500,damping:25,restSpeed:10},Uw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hw={type:"keyframes",duration:.8},Yw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kw=(e,{keyframes:t})=>t.length>2?Hw:Fr.has(e)?e.startsWith("scale")?Uw(t[1]):Ww:Yw,qw=e=>e!==null;function Gw(e,{repeat:t,repeatType:r="loop"},s){const o=e.filter(qw),l=t&&r!=="loop"&&t%2===1?0:o.length-1;return o[l]}function Pp(e,t){if(e!=null&&e.inherit&&t){const{inherit:r,...s}=e;return{...t,...s}}return e}function pl(e,t){const r=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return r!==e?Pp(r,e):r}function Xw({when:e,delay:t,delayChildren:r,staggerChildren:s,staggerDirection:o,repeat:l,repeatType:u,repeatDelay:f,from:p,elapsed:h,...g}){return!!Object.keys(g).length}const hl=(e,t,r,s={},o,l)=>u=>{const f=pl(s,e)||{},p=f.delay||s.delay||0;let{elapsed:h=0}=s;h=h-hn(p);const g={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:o};Xw(f)||Object.assign(g,Kw(e,g)),g.duration&&(g.duration=hn(g.duration)),g.repeatDelay&&(g.repeatDelay=hn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(dl(g),g.delay===0&&(y=!0)),(En.instantAnimations||En.skipAnimations||o!=null&&o.shouldSkipAnimations)&&(y=!0,dl(g),g.delay=0),g.allowFlatten=!f.type&&!f.ease,y&&!l&&t.get()!==void 0){const v=Gw(g.keyframes,f);if(v!==void 0){Ve.update(()=>{g.onUpdate(v),g.onComplete()});return}}return f.isSync?new nl(g):new Vw(g)};function Op(e){const t=[{},{}];return e==null||e.values.forEach((r,s)=>{t[0][s]=r.get(),t[1][s]=r.getVelocity()}),t}function ml(e,t,r,s){if(typeof t=="function"){const[o,l]=Op(s);t=t(r!==void 0?r:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=Op(s);t=t(r!==void 0?r:e.custom,o,l)}return t}function Vr(e,t,r){const s=e.getProps();return ml(s,t,r!==void 0?r:s.custom,e)}const bp=new Set(["width","height","top","left","right","bottom",...zr]),jp=30,Qw=e=>!isNaN(parseFloat(e));class Zw{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var l;const o=xt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Qw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Na);const s=this.events[t].add(r);return t==="change"?()=>{s(),Ve.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,s){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>jp)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,jp);return _d(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ur(e,t){return new Zw(e,t)}const gl=e=>Array.isArray(e);function Jw(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ur(r))}function e1(e){return gl(e)?e[e.length-1]||0:e}function t1(e,t){const r=Vr(e,t);let{transitionEnd:s={},transition:o={},...l}=r||{};l={...l,...s};for(const u in l){const f=e1(l[u]);Jw(e,u,f)}}const ht=e=>!!(e&&e.getVelocity);function n1(e){return!!(ht(e)&&e.add)}function yl(e,t){const r=e.getValue("willChange");if(n1(r))return r.add(t);if(!r&&En.WillChange){const s=new En.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function vl(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Lp="data-"+vl("framerAppearId");function Rp(e){return e.props[Lp]}function r1({protectedKeys:e,needsAnimating:t},r){const s=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,s}function Ap(e,t,{delay:r=0,transitionOverride:s,type:o}={}){let{transition:l,transitionEnd:u,...f}=t;const p=e.getDefaultTransition();l=l?Pp(l,p):p;const h=l==null?void 0:l.reduceMotion;s&&(l=s);const g=[],y=o&&e.animationState&&e.animationState.getState()[o];for(const v in f){const k=e.getValue(v,e.latestValues[v]??null),b=f[v];if(b===void 0||y&&r1(y,v))continue;const S={delay:r,...pl(l||{},v)},C=k.get();if(C!==void 0&&!k.isAnimating&&!Array.isArray(b)&&b===C&&!S.velocity)continue;let R=!1;if(window.MotionHandoffAnimation){const H=Rp(e);if(H){const $=window.MotionHandoffAnimation(H,v,Ve);$!==null&&(S.startTime=$,R=!0)}}yl(e,v);const I=h??e.shouldReduceMotion;k.start(hl(v,k,b,I&&bp.has(v)?{type:!1}:S,e,R));const z=k.animation;z&&g.push(z)}if(u){const v=()=>Ve.update(()=>{u&&t1(e,u)});g.length?Promise.all(g).then(v):v()}return g}function xl(e,t,r={}){var p;const s=Vr(e,t,r.type==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(o=r.transitionOverride);const l=s?()=>Promise.all(Ap(e,s,r)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:g=0,staggerChildren:y,staggerDirection:v}=o;return i1(e,t,h,g,y,v,r)}:()=>Promise.resolve(),{when:f}=o;if(f){const[h,g]=f==="beforeChildren"?[l,u]:[u,l];return h().then(()=>g())}else return Promise.all([l(),u(r.delay)])}function i1(e,t,r=0,s=0,o=0,l=1,u){const f=[];for(const p of e.variantChildren)p.notify("AnimationStart",t),f.push(xl(p,t,{...u,delay:r+(typeof s=="function"?0:s)+Tp(e.variantChildren,p,s,o,l)}).then(()=>p.notify("AnimationComplete",t)));return Promise.all(f)}function s1(e,t,r={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const o=t.map(l=>xl(e,l,r));s=Promise.all(o)}else if(typeof t=="string")s=xl(e,t,r);else{const o=typeof t=="function"?Vr(e,t,r.custom):t;s=Promise.all(Ap(e,o,r))}return s.then(()=>{e.notify("AnimationComplete",t)})}const o1={test:e=>e==="auto",parse:e=>e},_p=e=>t=>t.test(e),Mp=[Ir,pe,mn,Dn,Ix,Dx,o1],Dp=e=>Mp.find(_p(e));function a1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Rd(e):!0}const l1=new Set(["brightness","contrast","saturate","opacity"]);function u1(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=r.match($a)||[];if(!s)return e;const o=r.replace(s,"");let l=l1.has(t)?1:0;return s!==r&&(l*=100),t+"("+l+o+")"}const c1=/\b([a-z-]*)\(.*?\)/gu,wl={...nn,getAnimatableNone:e=>{const t=e.match(c1);return t?t.map(u1).join(" "):e}},Sl={...nn,getAnimatableNone:e=>{const t=nn.parse(e);return nn.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Ip={...Ir,transform:Math.round},kl={borderWidth:pe,borderTopWidth:pe,borderRightWidth:pe,borderBottomWidth:pe,borderLeftWidth:pe,borderRadius:pe,borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomRightRadius:pe,borderBottomLeftRadius:pe,width:pe,maxWidth:pe,height:pe,maxHeight:pe,top:pe,right:pe,bottom:pe,left:pe,inset:pe,insetBlock:pe,insetBlockStart:pe,insetBlockEnd:pe,insetInline:pe,insetInlineStart:pe,insetInlineEnd:pe,padding:pe,paddingTop:pe,paddingRight:pe,paddingBottom:pe,paddingLeft:pe,paddingBlock:pe,paddingBlockStart:pe,paddingBlockEnd:pe,paddingInline:pe,paddingInlineStart:pe,paddingInlineEnd:pe,margin:pe,marginTop:pe,marginRight:pe,marginBottom:pe,marginLeft:pe,marginBlock:pe,marginBlockStart:pe,marginBlockEnd:pe,marginInline:pe,marginInlineStart:pe,marginInlineEnd:pe,fontSize:pe,backgroundPositionX:pe,backgroundPositionY:pe,...{rotate:Dn,rotateX:Dn,rotateY:Dn,rotateZ:Dn,scale:Is,scaleX:Is,scaleY:Is,scaleZ:Is,skew:Dn,skewX:Dn,skewY:Dn,distance:pe,translateX:pe,translateY:pe,translateZ:pe,x:pe,y:pe,z:pe,perspective:pe,transformPerspective:pe,opacity:Ci,originX:Xd,originY:Xd,originZ:pe},zIndex:Ip,fillOpacity:Ci,strokeOpacity:Ci,numOctaves:Ip},f1={...kl,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:wl,WebkitFilter:wl,mask:Sl,WebkitMask:Sl},Np=e=>f1[e],d1=new Set([wl,Sl]);function zp(e,t){let r=Np(e);return d1.has(r)||(r=nn),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const p1=new Set(["auto","none","0"]);function h1(e,t,r){let s=0,o;for(;s{t.getValue(p).set(h)}),this.resolveNoneKeyframes()}}const g1=new Set(["opacity","clipPath","filter","transform"]);function y1(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r==null?void 0:r[e])??s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(s=>s!=null)}const Fp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function El(e){return Ld(e)&&"offsetHeight"in e}const{schedule:Tl}=Hd(queueMicrotask,!1),rn={x:!1,y:!1};function Vp(){return rn.x||rn.y}function v1(e){return e==="x"||e==="y"?rn[e]?null:(rn[e]=!0,()=>{rn[e]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}function Bp(e,t){const r=y1(e),s=new AbortController,o={passive:!0,...t,signal:s.signal};return[r,o,()=>s.abort()]}function x1(e){return!(e.pointerType==="touch"||Vp())}function w1(e,t,r={}){const[s,o,l]=Bp(e,r);return s.forEach(u=>{let f=!1,p=!1,h;const g=()=>{u.removeEventListener("pointerleave",b)},y=C=>{h&&(h(C),h=void 0),g()},v=C=>{f=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),p&&(p=!1,y(C))},k=()=>{f=!0,window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",v,o)},b=C=>{if(C.pointerType!=="touch"){if(f){p=!0;return}y(C)}},S=C=>{if(!x1(C))return;p=!1;const R=t(u,C);typeof R=="function"&&(h=R,u.addEventListener("pointerleave",b,o))};u.addEventListener("pointerenter",S,o),u.addEventListener("pointerdown",k,o)}),l}const $p=(e,t)=>t?e===t?!0:$p(e,t.parentElement):!1,Cl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,S1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function k1(e){return S1.has(e.tagName)||e.isContentEditable===!0}const E1=new Set(["INPUT","SELECT","TEXTAREA"]);function T1(e){return E1.has(e.tagName)||e.isContentEditable===!0}const Fs=new WeakSet;function Wp(e){return t=>{t.key==="Enter"&&e(t)}}function Pl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const C1=(e,t)=>{const r=e.currentTarget;if(!r)return;const s=Wp(()=>{if(Fs.has(r))return;Pl(r,"down");const o=Wp(()=>{Pl(r,"up")}),l=()=>Pl(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",s,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",s),t)};function Up(e){return Cl(e)&&!Vp()}const Hp=new WeakSet;function P1(e,t,r={}){const[s,o,l]=Bp(e,r),u=f=>{const p=f.currentTarget;if(!Up(f)||Hp.has(f))return;Fs.add(p),r.stopPropagation&&Hp.add(f);const h=t(p,f),g=(k,b)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),Fs.has(p)&&Fs.delete(p),Up(k)&&typeof h=="function"&&h(k,{success:b})},y=k=>{g(k,p===window||p===document||r.useGlobalTarget||$p(p,k.target))},v=k=>{g(k,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return s.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",u,o),El(f)&&(f.addEventListener("focus",h=>C1(h,o)),!k1(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function Yp(e){return Ld(e)&&"ownerSVGElement"in e}function O1(e){return Yp(e)&&e.tagName==="svg"}const b1=[...Mp,et,nn],j1=e=>b1.find(_p(e)),Kp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Br=()=>({x:Kp(),y:Kp()}),qp=()=>({min:0,max:0}),nt=()=>({x:qp(),y:qp()}),L1=new WeakMap;function Vs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ai(e){return typeof e=="string"||Array.isArray(e)}const Ol=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bl=["initial",...Ol];function Bs(e){return Vs(e.animate)||bl.some(t=>Ai(e[t]))}function Gp(e){return!!(Bs(e)||e.variants)}function R1(e,t,r){for(const s in t){const o=t[s],l=r[s];if(ht(o))e.addValue(s,o);else if(ht(l))e.addValue(s,ur(o,{owner:e}));else if(l!==o)if(e.hasValue(s)){const u=e.getValue(s);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=e.getStaticValue(s);e.addValue(s,ur(u!==void 0?u:o,{owner:e}))}}for(const s in r)t[s]===void 0&&e.removeValue(s);return t}const jl={current:null},Xp={current:!1},A1=typeof window<"u";function _1(){if(Xp.current=!0,!!A1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jl.current=e.matches;e.addEventListener("change",t),t()}else jl.current=!1}const Qp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let $s={};function Zp(e){$s=e}function M1(){return $s}class D1{scrapeMotionValuesFromProps(t,r,s){return{}}constructor({parent:t,props:r,presenceContext:s,reducedMotionConfig:o,skipAnimations:l,blockInitialAnimation:u,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=cl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const k=xt.now();this.renderScheduledAtthis.bindToMotionValue(l,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Xp.current||_1(),this.shouldReduceMotion=jl.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Mn(this.notifyUpdate),Mn(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const s=this.features[r];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&g1.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:f,times:p,ease:h,duration:g}=r.accelerate,y=new Sp({element:this.current,name:t,keyframes:f,times:p,ease:h,duration:hn(g)}),v=u(y);this.valueSubscriptions.set(t,()=>{v(),y.cancel()});return}const s=Fr.has(t);s&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Ve.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),l&&l(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in $s){const r=$s[t];if(!r)continue;const{isEnabled:s,Feature:o}=r;if(!this.features[t]&&o&&s(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let s=0;sr.variantChildren.delete(t)}addValue(t,r){const s=this.values.get(t);r!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&r!==void 0&&(s=ur(r===null?void 0:r,{owner:this}),this.addValue(t,s)),s}readValue(t,r){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(jd(s)||Rd(s))?s=parseFloat(s):!j1(s)&&nn.test(r)&&(s=zp(t,r)),this.setBaseTarget(t,ht(s)?s.get():s)),ht(s)?s.get():s}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var l;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const u=ml(this.props,r,(l=this.presenceContext)==null?void 0:l.custom);u&&(s=u[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ht(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Na),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Tl.render(this.render)}}class Jp extends D1{constructor(){super(...arguments),this.KeyframeResolver=m1}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const s=t.style;return s?s[r]:void 0}removeValueFromRenderState(t,{vars:r,style:s}){delete r[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ht(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Nn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function eh({top:e,left:t,right:r,bottom:s}){return{x:{min:t,max:r},y:{min:e,max:s}}}function I1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function N1(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:s.y,right:s.x}}function Ll(e){return e===void 0||e===1}function Rl({scale:e,scaleX:t,scaleY:r}){return!Ll(e)||!Ll(t)||!Ll(r)}function cr(e){return Rl(e)||th(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function th(e){return nh(e.x)||nh(e.y)}function nh(e){return e&&e!=="0%"}function Ws(e,t,r){const s=e-r,o=t*s;return r+o}function rh(e,t,r,s,o){return o!==void 0&&(e=Ws(e,o,s)),Ws(e,r,s)+t}function Al(e,t=0,r=1,s,o){e.min=rh(e.min,t,r,s,o),e.max=rh(e.max,t,r,s,o)}function ih(e,{x:t,y:r}){Al(e.x,t.translate,t.scale,t.originPoint),Al(e.y,r.translate,r.scale,r.originPoint)}const sh=.999999999999,oh=1.0000000000001;function z1(e,t,r,s=!1){const o=r.length;if(!o)return;t.x=t.y=1;let l,u;for(let f=0;fsh&&(t.x=1),t.ysh&&(t.y=1)}function $r(e,t){e.min=e.min+t,e.max=e.max+t}function ah(e,t,r,s,o=.5){const l=Ue(e.min,e.max,o);Al(e,t,r,l,s)}function Wr(e,t){ah(e.x,t.x,t.scaleX,t.scale,t.originX),ah(e.y,t.y,t.scaleY,t.scale,t.originY)}function lh(e,t){return eh(N1(e.getBoundingClientRect(),t))}function F1(e,t,r){const s=lh(e,r),{scroll:o}=t;return o&&($r(s.x,o.offset.x),$r(s.y,o.offset.y)),s}const V1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},B1=zr.length;function $1(e,t,r){let s="",o=!0;for(let l=0;l{if(!t.target)return e;if(typeof e=="string")if(pe.test(e))e=parseFloat(e);else return e;const r=ch(e,t.target.x),s=ch(e,t.target.y);return`${r}% ${s}%`}},W1={correct:(e,{treeScale:t,projectionDelta:r})=>{const s=e,o=nn.parse(e);if(o.length>5)return s;const l=nn.createTransformer(e),u=typeof o[0]!="number"?1:0,f=r.x.scale*t.x,p=r.y.scale*t.y;o[0+u]/=f,o[1+u]/=p;const h=Ue(f,p,.5);return typeof o[2+u]=="number"&&(o[2+u]/=h),typeof o[3+u]=="number"&&(o[3+u]/=h),l(o)}},Ml={borderRadius:{..._i,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_i,borderTopRightRadius:_i,borderBottomLeftRadius:_i,borderBottomRightRadius:_i,boxShadow:W1};function fh(e,{layout:t,layoutId:r}){return Fr.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ml[e]||e==="opacity")}function Dl(e,t,r){var u;const s=e.style,o=t==null?void 0:t.style,l={};if(!s)return l;for(const f in s)(ht(s[f])||o&&ht(o[f])||fh(f,e)||((u=r==null?void 0:r.getValue(f))==null?void 0:u.liveStyle)!==void 0)&&(l[f]=s[f]);return l}function U1(e){return window.getComputedStyle(e)}class H1 extends Jp{constructor(){super(...arguments),this.type="html",this.renderInstance=uh}readValueFromInstance(t,r){var s;if(Fr.has(r))return(s=this.projection)!=null&&s.isProjecting?sl(r):xw(t,r);{const o=U1(t),l=(Kd(r)?o.getPropertyValue(r):o[r])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(t,{transformPagePoint:r}){return lh(t,r)}build(t,r,s){_l(t,r,s.transformTemplate)}scrapeMotionValuesFromProps(t,r,s){return Dl(t,r,s)}}const Y1={offset:"stroke-dashoffset",array:"stroke-dasharray"},K1={offset:"strokeDashoffset",array:"strokeDasharray"};function q1(e,t,r=1,s=0,o=!0){e.pathLength=1;const l=o?Y1:K1;e[l.offset]=`${-s}`,e[l.array]=`${t} ${r}`}const G1=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dh(e,{attrX:t,attrY:r,attrScale:s,pathLength:o,pathSpacing:l=1,pathOffset:u=0,...f},p,h,g){if(_l(e,f,h),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete y.transformBox);for(const k of G1)y[k]!==void 0&&(v[k]=y[k],delete y[k]);t!==void 0&&(y.x=t),r!==void 0&&(y.y=r),s!==void 0&&(y.scale=s),o!==void 0&&q1(y,o,l,u,!1)}const ph=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),hh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function X1(e,t,r,s){uh(e,t,void 0,s);for(const o in t.attrs)e.setAttribute(ph.has(o)?o:vl(o),t.attrs[o])}function mh(e,t,r){const s=Dl(e,t,r);for(const o in e)if(ht(e[o])||ht(t[o])){const l=zr.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=e[o]}return s}class Q1 extends Jp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Fr.has(r)){const s=Np(r);return s&&s.default||0}return r=ph.has(r)?r:vl(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,s){return mh(t,r,s)}build(t,r,s){dh(t,r,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,r,s,o){X1(t,r,s,o)}mount(t){this.isSVGTag=hh(t.tagName),super.mount(t)}}const Z1=bl.length;function gh(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?gh(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;rPromise.all(t.map(({animation:r,options:s})=>s1(e,r,s)))}function nS(e){let t=tS(e),r=vh(),s=!0;const o=p=>(h,g)=>{var v;const y=Vr(e,g,p==="exit"?(v=e.presenceContext)==null?void 0:v.custom:void 0);if(y){const{transition:k,transitionEnd:b,...S}=y;h={...h,...S,...b}}return h};function l(p){t=p(e)}function u(p){const{props:h}=e,g=gh(e.parent)||{},y=[],v=new Set;let k={},b=1/0;for(let C=0;Cb&&H,T=!1;const M=Array.isArray(z)?z:[z];let Z=M.reduce(o(R),{});$===!1&&(Z={});const{prevResolvedValues:D={}}=I,G={...D,...Z},ee=X=>{E=!0,v.has(X)&&(T=!0,v.delete(X)),I.needsAnimating[X]=!0;const Y=e.getValue(X);Y&&(Y.liveStyle=!1)};for(const X in G){const Y=Z[X],q=D[X];if(k.hasOwnProperty(X))continue;let j=!1;gl(Y)&&gl(q)?j=!yh(Y,q):j=Y!==q,j?Y!=null?ee(X):v.add(X):Y!==void 0&&v.has(X)?ee(X):I.protectedKeys[X]=!0}I.prevProp=z,I.prevResolvedValues=Z,I.isActive&&(k={...k,...Z}),s&&e.blockInitialAnimation&&(E=!1);const fe=K&&V;E&&(!fe||T)&&y.push(...M.map(X=>{const Y={type:R};if(typeof X=="string"&&s&&!fe&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,j=Vr(q,X);if(q.enteringChildren&&j){const{delayChildren:B}=j.transition||{};Y.delay=Tp(q.enteringChildren,e,B)}}return{animation:X,options:Y}}))}if(v.size){const C={};if(typeof h.initial!="boolean"){const R=Vr(e,Array.isArray(h.initial)?h.initial[0]:h.initial);R&&R.transition&&(C.transition=R.transition)}v.forEach(R=>{const I=e.getBaseTarget(R),z=e.getValue(R);z&&(z.liveStyle=!0),C[R]=I??null}),y.push({animation:C})}let S=!!y.length;return s&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(S=!1),s=!1,S?t(y):Promise.resolve()}function f(p,h){var y;if(r[p].isActive===h)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(v=>{var k;return(k=v.animationState)==null?void 0:k.setActive(p,h)}),r[p].isActive=h;const g=u(p);for(const v in r)r[v].protectedKeys={};return g}return{animateChanges:u,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=vh()}}}function rS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yh(t,e):!1}function fr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vh(){return{animate:fr(!0),whileInView:fr(),whileHover:fr(),whileTap:fr(),whileDrag:fr(),whileFocus:fr(),exit:fr()}}function xh(e,t){e.min=t.min,e.max=t.max}function sn(e,t){xh(e.x,t.x),xh(e.y,t.y)}function wh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Sh=1e-4,iS=1-Sh,sS=1+Sh,kh=.01,oS=0-kh,aS=0+kh;function wt(e){return e.max-e.min}function lS(e,t,r){return Math.abs(e-t)<=r}function Eh(e,t,r,s=.5){e.origin=s,e.originPoint=Ue(t.min,t.max,e.origin),e.scale=wt(r)/wt(t),e.translate=Ue(r.min,r.max,e.origin)-e.originPoint,(e.scale>=iS&&e.scale<=sS||isNaN(e.scale))&&(e.scale=1),(e.translate>=oS&&e.translate<=aS||isNaN(e.translate))&&(e.translate=0)}function Mi(e,t,r,s){Eh(e.x,t.x,r.x,s?s.originX:void 0),Eh(e.y,t.y,r.y,s?s.originY:void 0)}function Th(e,t,r){e.min=r.min+t.min,e.max=e.min+wt(t)}function uS(e,t,r){Th(e.x,t.x,r.x),Th(e.y,t.y,r.y)}function Ch(e,t,r){e.min=t.min-r.min,e.max=e.min+wt(t)}function Us(e,t,r){Ch(e.x,t.x,r.x),Ch(e.y,t.y,r.y)}function Ph(e,t,r,s,o){return e-=t,e=Ws(e,1/r,s),o!==void 0&&(e=Ws(e,1/o,s)),e}function cS(e,t=0,r=1,s=.5,o,l=e,u=e){if(mn.test(t)&&(t=parseFloat(t),t=Ue(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=Ue(l.min,l.max,s);e===l&&(f-=t),e.min=Ph(e.min,t,r,f,o),e.max=Ph(e.max,t,r,f,o)}function Oh(e,t,[r,s,o],l,u){cS(e,t[r],t[s],t[o],t.scale,l,u)}const fS=["x","scaleX","originX"],dS=["y","scaleY","originY"];function bh(e,t,r,s){Oh(e.x,t,fS,r?r.x:void 0,s?s.x:void 0),Oh(e.y,t,dS,r?r.y:void 0,s?s.y:void 0)}function jh(e){return e.translate===0&&e.scale===1}function Lh(e){return jh(e.x)&&jh(e.y)}function Rh(e,t){return e.min===t.min&&e.max===t.max}function pS(e,t){return Rh(e.x,t.x)&&Rh(e.y,t.y)}function Ah(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _h(e,t){return Ah(e.x,t.x)&&Ah(e.y,t.y)}function Mh(e){return wt(e.x)/wt(e.y)}function Dh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ht(e){return[e("x"),e("y")]}function hS(e,t,r){let s="";const o=e.x.translate/t.x,l=e.y.translate/t.y,u=(r==null?void 0:r.z)||0;if((o||l||u)&&(s=`translate3d(${o}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:g,rotateX:y,rotateY:v,skewX:k,skewY:b}=r;h&&(s=`perspective(${h}px) ${s}`),g&&(s+=`rotate(${g}deg) `),y&&(s+=`rotateX(${y}deg) `),v&&(s+=`rotateY(${v}deg) `),k&&(s+=`skewX(${k}deg) `),b&&(s+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,p=e.y.scale*t.y;return(f!==1||p!==1)&&(s+=`scale(${f}, ${p})`),s||"none"}const Ih=["TopLeft","TopRight","BottomLeft","BottomRight"],mS=Ih.length,Nh=e=>typeof e=="string"?parseFloat(e):e,zh=e=>typeof e=="number"||pe.test(e);function gS(e,t,r,s,o,l){o?(e.opacity=Ue(0,r.opacity??1,yS(s)),e.opacityExit=Ue(t.opacity??1,0,vS(s))):l&&(e.opacity=Ue(t.opacity??1,r.opacity??1,s));for(let u=0;ust?1:r(Ei(e,t,s))}function xS(e,t,r){const s=ht(e)?e:ur(e);return s.start(hl("",s,t,r)),s.animation}function Di(e,t,r,s={passive:!0}){return e.addEventListener(t,r,s),()=>e.removeEventListener(t,r)}const wS=(e,t)=>e.depth-t.depth;class SS{constructor(){this.children=[],this.isDirty=!1}add(t){Da(this.children,t),this.isDirty=!0}remove(t){_s(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(wS),this.isDirty=!1,this.children.forEach(t)}}function kS(e,t){const r=xt.now(),s=({timestamp:o})=>{const l=o-r;l>=t&&(Mn(s),e(l-t))};return Ve.setup(s,!0),()=>Mn(s)}function Hs(e){return ht(e)?e.get():e}class ES{constructor(){this.members=[]}add(t){Da(this.members,t);for(let r=this.members.length-1;r>=0;r--){const s=this.members[r];if(s===t||s===this.lead||s===this.prevLead)continue;const o=s.instance;o&&o.isConnected===!1&&s.isPresent!==!1&&!s.snapshot&&_s(this.members,s)}t.scheduleRender()}remove(t){if(_s(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let s;for(let o=r;o>=0;o--){const l=this.members[o],u=l.instance;if(l.isPresent!==!1&&(!u||u.isConnected!==!1)){s=l;break}}return s?(this.promote(s),!0):!1}promote(t,r){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender();const o=s.options.layoutDependency,l=t.options.layoutDependency;if(!(o!==void 0&&l!==void 0&&o===l)){const p=s.instance;p&&p.isConnected===!1&&!s.snapshot||(t.resumeFrom=s,r&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:f}=t.options;f===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:s}=t;r.onExitComplete&&r.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Ys={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Il=["","X","Y","Z"],TS=1e3;let CS=0;function Nl(e,t,r,s){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Bh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=Rp(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Ve,!(o||l))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Bh(s)}function $h({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(u={},f=t==null?void 0:t()){this.id=CS++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(bS),this.nodes.forEach(AS),this.nodes.forEach(_S),this.nodes.forEach(jS)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let p=0;pthis.root.updateBlockedByResize=!1;Ve.read(()=>{y=window.innerWidth}),e(u,()=>{const k=window.innerWidth;k!==y&&(y=k,this.root.updateBlockedByResize=!0,g&&g(),g=kS(v,250),Ys.hasAnimatedSinceResize&&(Ys.hasAnimatedSinceResize=!1,this.nodes.forEach(Hh)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||p)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:k})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||zS,{onLayoutAnimationStart:S,onLayoutAnimationComplete:C}=h.getProps(),R=!this.targetLayout||!_h(this.targetLayout,k),I=!y&&v;if(this.options.layoutRoot||this.resumeFrom||I||y&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const z={...pl(b,"layout"),onPlay:S,onComplete:C};(h.shouldReduceMotion||this.options.layoutRoot)&&(z.delay=0,z.type=!1),this.startAnimation(z),this.setAnimationOrigin(g,I)}else y||Hh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=k})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Mn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(MS),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!wt(this.snapshot.measuredBox.x)&&!wt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p{const $=H/1e3;Yh(y.x,u.x,$),Yh(y.y,u.y,$),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Us(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IS(this.relativeTarget,this.relativeTargetOrigin,v,$),z&&pS(this.relativeTarget,z)&&(this.isProjectionDirty=!1),z||(z=nt()),sn(z,this.relativeTarget)),S&&(this.animationValues=g,gS(g,h,this.latestValues,$,I,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=$},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){var f,p,h;this.notifyListeners("animationStart"),(f=this.currentAnimation)==null||f.stop(),(h=(p=this.resumingFrom)==null?void 0:p.currentAnimation)==null||h.stop(),this.pendingAnimation&&(Mn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ve.update(()=>{Ys.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ur(0)),this.motionValue.jump(0,!1),this.currentAnimation=xS(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),u.onUpdate&&u.onUpdate(g)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(TS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:f,target:p,layout:h,latestValues:g}=u;if(!(!f||!p||!h)){if(this!==u&&this.layout&&h&&Qh(this.options.animationType,this.layout.layoutBox,h.layoutBox)){p=this.target||nt();const y=wt(this.layout.layoutBox.x);p.x.min=u.target.x.min,p.x.max=p.x.min+y;const v=wt(this.layout.layoutBox.y);p.y.min=u.target.y.min,p.y.max=p.y.min+v}sn(f,p),Wr(f,g),Mi(this.projectionDeltaWithTransform,this.layoutCorrected,f,g)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new ES),this.sharedNodes.get(u).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var f;const{layoutId:u}=this.options;return u?((f=this.getStack())==null?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:u}=this.options;return u?(f=this.getStack())==null?void 0:f.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:p}={}){const h=this.getStack();h&&h.promote(this,p),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let f=!1;const{latestValues:p}=u;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(f=!0),!f)return;const h={};p.z&&Nl("z",u,h,this.animationValues);for(let g=0;g{var f;return(f=u.currentAnimation)==null?void 0:f.stop()}),this.root.nodes.forEach(Wh),this.root.sharedNodes.clear()}}}function PS(e){e.updateLayout()}function OS(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:l}=e.options,u=t.source!==e.layout.source;l==="size"?Ht(y=>{const v=u?t.measuredBox[y]:t.layoutBox[y],k=wt(v);v.min=s[y].min,v.max=v.min+k}):Qh(l,t.layoutBox,s)&&Ht(y=>{const v=u?t.measuredBox[y]:t.layoutBox[y],k=wt(s[y]);v.max=v.min+k,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+k)});const f=Br();Mi(f,s,t.layoutBox);const p=Br();u?Mi(p,e.applyTransform(o,!0),t.measuredBox):Mi(p,s,t.layoutBox);const h=!Lh(f);let g=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:v,layout:k}=y;if(v&&k){const b=nt();Us(b,t.layoutBox,v.layoutBox);const S=nt();Us(S,s,k.layoutBox),_h(b,S)||(g=!0),y.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=b,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:p,layoutDelta:f,hasLayoutChanged:h,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function bS(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function jS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LS(e){e.clearSnapshot()}function Wh(e){e.clearMeasurements()}function Uh(e){e.isLayoutDirty=!1}function RS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AS(e){e.resolveTargetDelta()}function _S(e){e.calcProjection()}function MS(e){e.resetSkewAndRotation()}function DS(e){e.removeLeadSnapshot()}function Yh(e,t,r){e.translate=Ue(t.translate,0,r),e.scale=Ue(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Kh(e,t,r,s){e.min=Ue(t.min,r.min,s),e.max=Ue(t.max,r.max,s)}function IS(e,t,r,s){Kh(e.x,t.x,r.x,s),Kh(e.y,t.y,r.y,s)}function NS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zS={duration:.45,ease:[.4,0,.1,1]},qh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gh=qh("applewebkit/")&&!qh("chrome/")?Math.round:Wt;function Xh(e){e.min=Gh(e.min),e.max=Gh(e.max)}function FS(e){Xh(e.x),Xh(e.y)}function Qh(e,t,r){return e==="position"||e==="preserve-aspect"&&!lS(Mh(t),Mh(r),.2)}function VS(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const BS=$h({attachResizeListener:(e,t)=>Di(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),zl={current:void 0},Zh=$h({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zl.current){const e=new BS({});e.mount(window),e.setOptions({layoutScroll:!0}),zl.current=e}return zl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ur=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Jh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $S(...e){return t=>{let r=!1;const s=e.map(o=>{const l=Jh(o,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let o=0;o{const{width:v,height:k,top:b,left:S,right:C,bottom:R}=f.current;if(t||!u.current||!v||!k)return;const I=r==="left"?`left: ${S}`:`right: ${C}`,z=s==="bottom"?`bottom: ${R}`:`top: ${b}`;u.current.dataset.motionPopId=l;const H=document.createElement("style");p&&(H.nonce=p);const $=o??document.head;return $.appendChild(H),H.sheet&&H.sheet.insertRule(` [data-motion-pop-id="${l}"] { position: absolute !important; width: ${v}px !important; height: ${k}px !important; ${I}px !important; ${z}px !important; } `),()=>{$.contains(H)&&$.removeChild(H)}},[t]),w.jsx(US,{isPresent:t,childRef:u,sizeRef:f,children:L.cloneElement(e,{ref:g})})}const YS=({children:e,initial:t,isPresent:r,onExitComplete:s,custom:o,presenceAffectsLayout:l,mode:u,anchorX:f,anchorY:p,root:h})=>{const g=Dr(KS),y=L.useId();let v=!0,k=L.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:r,custom:o,onExitComplete:b=>{g.set(b,!0);for(const S of g.values())if(!S)return;s&&s()},register:b=>(g.set(b,!1),()=>g.delete(b))}),[r,g,s]);return l&&v&&(k={...k}),L.useMemo(()=>{g.forEach((b,S)=>g.set(S,!1))},[r]),L.useEffect(()=>{!r&&!g.size&&s&&s()},[r]),u==="popLayout"&&(e=w.jsx(HS,{isPresent:r,anchorX:f,anchorY:p,root:h,children:e})),w.jsx(As.Provider,{value:k,children:e})};function KS(){return new Map}function em(e=!0){const t=L.useContext(As);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:s,register:o}=t,l=L.useId();L.useEffect(()=>{if(e)return o(l)},[e]);const u=L.useCallback(()=>e&&s&&s(l),[l,s,e]);return!r&&s?[!1,u]:[!0]}const Ks=e=>e.key||"";function tm(e){const t=[];return L.Children.forEach(e,r=>{L.isValidElement(r)&&t.push(r)}),t}const Dt=({children:e,custom:t,initial:r=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:l="sync",propagate:u=!1,anchorX:f="left",anchorY:p="top",root:h})=>{const[g,y]=em(u),v=L.useMemo(()=>tm(e),[e]),k=u&&!g?[]:v.map(Ks),b=L.useRef(!0),S=L.useRef(v),C=Dr(()=>new Map),R=L.useRef(new Set),[I,z]=L.useState(v),[H,$]=L.useState(v);bd(()=>{b.current=!1,S.current=v;for(let E=0;E{const T=Ks(E),M=u&&!g?!1:v===H||k.includes(T),Z=()=>{if(R.current.has(T))return;if(R.current.add(T),C.has(T))C.set(T,!0);else return;let D=!0;C.forEach(G=>{G||(D=!1)}),D&&(V==null||V(),$(S.current),u&&(y==null||y()),s&&s())};return w.jsx(YS,{isPresent:M,initial:!b.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:l,root:h,onExitComplete:M?void 0:Z,anchorX:f,anchorY:p,children:E},T)})})},nm=L.createContext({strict:!1}),rm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let im=!1;function qS(){if(im)return;const e={};for(const t in rm)e[t]={isEnabled:r=>rm[t].some(s=>!!r[s])};Zp(e),im=!0}function sm(){return qS(),M1()}function GS(e){const t=sm();for(const r in e)t[r]={...t[r],...e[r]};Zp(t)}const XS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function qs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XS.has(e)}let om=e=>!qs(e);function am(e){typeof e=="function"&&(om=t=>t.startsWith("on")?!qs(t):e(t))}try{am(require("@emotion/is-prop-valid").default)}catch{}function QS(e,t,r){const s={};for(const o in e)o==="values"&&typeof e.values=="object"||(om(o)||r===!0&&qs(o)||!t&&!qs(o)||e.draggable&&o.startsWith("onDrag"))&&(s[o]=e[o]);return s}function ZS({children:e,isValidProp:t,...r}){t&&am(t),r={...L.useContext(Ur),...r},r.isStatic=Dr(()=>r.isStatic);const s=L.useMemo(()=>r,[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion,r.skipAnimations]);return w.jsx(Ur.Provider,{value:s,children:e})}const Gs=L.createContext({});function JS(e,t){if(Bs(e)){const{initial:r,animate:s}=e;return{initial:r===!1||Ai(r)?r:void 0,animate:Ai(s)?s:void 0}}return e.inherit!==!1?t:{}}function ek(e){const{initial:t,animate:r}=JS(e,L.useContext(Gs));return L.useMemo(()=>({initial:t,animate:r}),[lm(t),lm(r)])}function lm(e){return Array.isArray(e)?e.join(" "):e}const Fl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function um(e,t,r){for(const s in t)!ht(t[s])&&!fh(s,r)&&(e[s]=t[s])}function tk({transformTemplate:e},t){return L.useMemo(()=>{const r=Fl();return _l(r,t,e),Object.assign({},r.vars,r.style)},[t])}function nk(e,t){const r=e.style||{},s={};return um(s,r,e),Object.assign(s,tk(e,t)),s}function rk(e,t){const r={},s=nk(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=s,r}const cm=()=>({...Fl(),attrs:{}});function ik(e,t,r,s){const o=L.useMemo(()=>{const l=cm();return dh(l,t,hh(s),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};um(l,e.style,e),o.style={...l,...o.style}}return o}const sk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vl(e){return typeof e!="string"||e.includes("-")?!1:!!(sk.indexOf(e)>-1||/[A-Z]/u.test(e))}function ok(e,t,r,{latestValues:s},o,l=!1,u){const p=(u??Vl(e)?ik:rk)(t,s,o,e),h=QS(t,typeof e=="string",l),g=e!==L.Fragment?{...h,...p,ref:r}:{},{children:y}=t,v=L.useMemo(()=>ht(y)?y.get():y,[y]);return L.createElement(e,{...g,children:v})}function ak({scrapeMotionValuesFromProps:e,createRenderState:t},r,s,o){return{latestValues:lk(r,s,o,e),renderState:t()}}function lk(e,t,r,s){const o={},l=s(e,{});for(const v in l)o[v]=Hs(l[v]);let{initial:u,animate:f}=e;const p=Bs(e),h=Gp(e);t&&h&&!p&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let g=r?r.initial===!1:!1;g=g||u===!1;const y=g?f:u;if(y&&typeof y!="boolean"&&!Vs(y)){const v=Array.isArray(y)?y:[y];for(let k=0;k(t,r)=>{const s=L.useContext(Gs),o=L.useContext(As),l=()=>ak(e,t,s,o);return r?l():Dr(l)},uk=fm({scrapeMotionValuesFromProps:Dl,createRenderState:Fl}),ck=fm({scrapeMotionValuesFromProps:mh,createRenderState:cm}),fk=Symbol.for("motionComponentSymbol");function dk(e,t,r){const s=L.useRef(r);L.useInsertionEffect(()=>{s.current=r});const o=L.useRef(null);return L.useCallback(l=>{var f;l&&((f=e.onMount)==null||f.call(e,l)),t&&(l?t.mount(l):t.unmount());const u=s.current;if(typeof u=="function")if(l){const p=u(l);typeof p=="function"&&(o.current=p)}else o.current?(o.current(),o.current=null):u(l);else u&&(u.current=l)},[t])}const dm=L.createContext({});function Ii(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pk(e,t,r,s,o,l){var z,H;const{visualElement:u}=L.useContext(Gs),f=L.useContext(nm),p=L.useContext(As),h=L.useContext(Ur),g=h.reducedMotion,y=h.skipAnimations,v=L.useRef(null),k=L.useRef(!1);s=s||f.renderer,!v.current&&s&&(v.current=s(e,{visualState:t,parent:u,props:r,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g,skipAnimations:y,isSVG:l}),k.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,S=L.useContext(dm);b&&!b.projection&&o&&(b.type==="html"||b.type==="svg")&&hk(v.current,r,o,S);const C=L.useRef(!1);L.useInsertionEffect(()=>{b&&C.current&&b.update(r,p)});const R=r[Lp],I=L.useRef(!!R&&!((z=window.MotionHandoffIsComplete)!=null&&z.call(window,R))&&((H=window.MotionHasOptimisedAnimation)==null?void 0:H.call(window,R)));return bd(()=>{k.current=!0,b&&(C.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),I.current&&b.animationState&&b.animationState.animateChanges())}),L.useEffect(()=>{b&&(!I.current&&b.animationState&&b.animationState.animateChanges(),I.current&&(queueMicrotask(()=>{var $;($=window.MotionHandoffMarkAsComplete)==null||$.call(window,R)}),I.current=!1),b.enteringChildren=void 0)}),b}function hk(e,t,r,s){const{layoutId:o,layout:l,drag:u,dragConstraints:f,layoutScroll:p,layoutRoot:h,layoutCrossfade:g}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:pm(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||f&&Ii(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,crossfade:g,layoutScroll:p,layoutRoot:h})}function pm(e){if(e)return e.options.allowProjection!==!1?e.projection:pm(e.parent)}function Bl(e,{forwardMotionProps:t=!1,type:r}={},s,o){s&&GS(s);const l=r?r==="svg":Vl(e),u=l?ck:uk;function f(h,g){let y;const v={...L.useContext(Ur),...h,layoutId:mk(h)},{isStatic:k}=v,b=ek(h),S=u(h,k);if(!k&&Od){gk();const C=yk(v);y=C.MeasureLayout,b.visualElement=pk(e,S,v,o,C.ProjectionNode,l)}return w.jsxs(Gs.Provider,{value:b,children:[y&&b.visualElement?w.jsx(y,{visualElement:b.visualElement,...v}):null,ok(e,h,dk(S,b.visualElement,g),S,k,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const p=L.forwardRef(f);return p[fk]=e,p}function mk({layoutId:e}){const t=L.useContext(Ma).id;return t&&e!==void 0?t+"-"+e:e}function gk(e,t){L.useContext(nm).strict}function yk(e){const t=sm(),{drag:r,layout:s}=t;if(!r&&!s)return{};const o={...r,...s};return{MeasureLayout:r!=null&&r.isEnabled(e)||s!=null&&s.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function vk(e,t){if(typeof Proxy>"u")return Bl;const r=new Map,s=(l,u)=>Bl(l,u,e,t),o=(l,u)=>s(l,u);return new Proxy(o,{get:(l,u)=>u==="create"?s:(r.has(u)||r.set(u,Bl(u,void 0,e,t)),r.get(u))})}const xk=(e,t)=>t.isSVG??Vl(e)?new Q1(t):new H1(t,{allowProjection:e!==L.Fragment});class wk extends Nn{constructor(t){super(t),t.animationState||(t.animationState=nS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Sk=0;class kk extends Nn{constructor(){super(...arguments),this.id=Sk++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ek={animation:{Feature:wk},exit:{Feature:kk}};function Ni(e){return{point:{x:e.pageX,y:e.pageY}}}const Tk=e=>t=>Cl(t)&&e(t,Ni(t));function zi(e,t,r,s){return Di(e,t,Tk(r),s)}const hm=({current:e})=>e?e.ownerDocument.defaultView:null,mm=(e,t)=>Math.abs(e-t);function Ck(e,t){const r=mm(e.x,t.x),s=mm(e.y,t.y);return Math.sqrt(r**2+s**2)}const gm=new Set(["auto","scroll"]);class ym{constructor(t,r,{transformPagePoint:s,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=Wl(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,S=Ck(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!S)return;const{point:C}=k,{timestamp:R}=ft;this.history.push({...C,timestamp:R});const{onStart:I,onMove:z}=this.handlers;b||(I&&I(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),z&&z(this.lastMoveEvent,k)},this.handlePointerMove=(k,b)=>{this.lastMoveEvent=k,this.lastMoveEventInfo=$l(b,this.transformPagePoint),Ve.update(this.updatePoint,!0)},this.handlePointerUp=(k,b)=>{this.end();const{onEnd:S,onSessionEnd:C,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const I=Wl(k.type==="pointercancel"?this.lastMoveEventInfo:$l(b,this.transformPagePoint),this.history);this.startEvent&&S&&S(k,I),C&&C(k,I)},!Cl(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=s,this.distanceThreshold=u,this.contextWindow=o||window;const p=Ni(t),h=$l(p,this.transformPagePoint),{point:g}=h,{timestamp:y}=ft;this.history=[{...g,timestamp:y}];const{onSessionStart:v}=r;v&&v(t,Wl(h,this.history)),this.removeListeners=ki(zi(this.contextWindow,"pointermove",this.handlePointerMove),zi(this.contextWindow,"pointerup",this.handlePointerUp),zi(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let r=t.parentElement;for(;r;){const s=getComputedStyle(r);(gm.has(s.overflowX)||gm.has(s.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const s=t===window,o=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:o.x-r.x,y:o.y-r.y};l.x===0&&l.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,o),Ve.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Mn(this.updatePoint)}}function $l(e,t){return t?{point:t(e.point)}:e}function vm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wl({point:e},t){return{point:e,delta:vm(e,xm(t)),offset:vm(e,Pk(t)),velocity:Ok(t,.1)}}function Pk(e){return e[0]}function xm(e){return e[e.length-1]}function Ok(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,s=null;const o=xm(e);for(;r>=0&&(s=e[r],!(o.timestamp-s.timestamp>hn(t)));)r--;if(!s)return{x:0,y:0};const l=Ut(o.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-s.x)/l,y:(o.y-s.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function bk(e,{min:t,max:r},s){return t!==void 0&&er&&(e=s?Ue(r,e,s.max):Math.min(e,r)),e}function wm(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function jk(e,{top:t,left:r,bottom:s,right:o}){return{x:wm(e.x,r,o),y:wm(e.y,t,s)}}function Sm(e,t){let r=t.min-e.min,s=t.max-e.max;return t.max-t.mins?r=Ei(t.min,t.max-s,e.min):s>o&&(r=Ei(e.min,e.max-o,t.min)),pn(0,1,r)}function Ak(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Ul=.35;function _k(e=Ul){return e===!1?e=0:e===!0&&(e=Ul),{x:km(e,"left","right"),y:km(e,"top","bottom")}}function km(e,t,r){return{min:Em(e,t),max:Em(e,r)}}function Em(e,t){return typeof e=="number"?e:e[t]||0}const Mk=new WeakMap;class Dk{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:s}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=y=>{r?(this.stopAnimation(),this.snapToCursor(Ni(y).point)):this.pauseAnimation()},u=(y,v)=>{this.stopAnimation();const{drag:k,dragPropagation:b,onDragStart:S}=this.getProps();if(k&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=v1(k),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ht(R=>{let I=this.getAxisMotionValue(R).get()||0;if(mn.test(I)){const{projection:z}=this.visualElement;if(z&&z.layout){const H=z.layout.layoutBox[R];H&&(I=wt(H)*(parseFloat(I)/100))}}this.originPoint[R]=I}),S&&Ve.postRender(()=>S(y,v)),yl(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:k,dragDirectionLock:b,onDirectionLock:S,onDrag:C}=this.getProps();if(!k&&!this.openDragLock)return;const{offset:R}=v;if(b&&this.currentDirection===null){this.currentDirection=Ik(R),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",v.point,R),this.updateAxis("y",v.point,R),this.visualElement.render(),C&&C(y,v)},p=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Ht(y=>{var v;return this.getAnimationState(y)==="paused"&&((v=this.getAxisMotionValue(y).animation)==null?void 0:v.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new ym(t,{onSessionStart:l,onStart:u,onMove:f,onSessionEnd:p,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:s,contextWindow:hm(this.visualElement),element:this.visualElement.current})}stop(t,r){const s=t||this.latestPointerEvent,o=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!s)return;const{velocity:u}=o;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&Ve.postRender(()=>f(s,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,s){const{drag:o}=this.getProps();if(!s||!Xs(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(u=bk(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){var l;const{dragConstraints:t,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(l=this.visualElement.projection)==null?void 0:l.layout,o=this.constraints;t&&Ii(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=jk(s.layoutBox,t):this.constraints=!1,this.elastic=_k(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Ht(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=Ak(s.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Ii(t))return!1;const s=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=F1(s,o.root,this.visualElement.getTransformPagePoint());let u=Lk(o.layout.layoutBox,l);if(r){const f=r(I1(u));this.hasMutatedConstraints=!!f,f&&(u=eh(f))}return u}startAnimation(t){const{drag:r,dragMomentum:s,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),p=this.constraints||{},h=Ht(g=>{if(!Xs(g,r,this.currentDirection))return;let y=p&&p[g]||{};u&&(y={min:0,max:0});const v=o?200:1e6,k=o?40:1e7,b={type:"inertia",velocity:s?t[g]:0,bounceStiffness:v,bounceDamping:k,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(g,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const s=this.getAxisMotionValue(t);return yl(this.visualElement,t),s.start(hl(t,s,0,r,this.visualElement,!1))}stopAnimation(){Ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ht(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),o=s[r];return o||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Ht(r=>{const{drag:s}=this.getProps();if(!Xs(r,s,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(r);if(o&&o.layout){const{min:u,max:f}=o.layout.layoutBox[r],p=l.get()||0;l.set(t[r]-Ue(u,f,.5)+p)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:s}=this.visualElement;if(!Ii(r)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ht(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const p=f.get();o[u]=Rk({min:p,max:p},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Ht(u=>{if(!Xs(u,t,null))return;const f=this.getAxisMotionValue(u),{min:p,max:h}=this.constraints[u];f.set(Ue(p,h,o[u]))})}addListeners(){if(!this.visualElement.current)return;Mk.set(this.visualElement,this);const t=this.visualElement.current,r=zi(t,"pointerdown",p=>{const{drag:h,dragListener:g=!0}=this.getProps(),y=p.target,v=y!==t&&T1(y);h&&g&&!v&&this.start(p)}),s=()=>{const{dragConstraints:p}=this.getProps();Ii(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ve.read(s);const u=Di(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",({delta:p,hasLayoutChanged:h})=>{this.isDragging&&h&&(Ht(g=>{const y=this.getAxisMotionValue(g);y&&(this.originPoint[g]+=p[g].translate,y.set(y.get()+p[g].translate))}),this.visualElement.render())});return()=>{u(),r(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=Ul,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:s,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:f}}}function Xs(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Ik(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Nk extends Nn{constructor(t){super(t),this.removeGroupControls=Wt,this.removeListeners=Wt,this.controls=new Dk(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Tm=e=>(t,r)=>{e&&Ve.postRender(()=>e(t,r))};class zk extends Nn{constructor(){super(...arguments),this.removePointerDownListener=Wt}onPointerDown(t){this.session=new ym(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:Tm(t),onStart:Tm(r),onMove:s,onEnd:(l,u)=>{delete this.session,o&&Ve.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=zi(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Hl=!1;class Fk extends L.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:s,layoutId:o}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),s&&s.register&&o&&s.register(l),Hl&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ys.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:s,drag:o,isPresent:l}=this.props,{projection:u}=s;return u&&(u.isPresent=l,t.layoutDependency!==r&&u.setOptions({...u.options,layoutDependency:r}),Hl=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||Ve.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Tl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:s}=this.props,{projection:o}=t;Hl=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cm(e){const[t,r]=em(),s=L.useContext(Ma);return w.jsx(Fk,{...e,layoutGroup:s,switchLayoutGroup:L.useContext(dm),isPresent:t,safeToRemove:r})}const Vk={pan:{Feature:zk},drag:{Feature:Nk,ProjectionNode:Zh,MeasureLayout:Cm}};function Pm(e,t,r){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,l=s[o];l&&Ve.postRender(()=>l(t,Ni(t)))}class Bk extends Nn{mount(){const{current:t}=this.node;t&&(this.unmount=w1(t,(r,s)=>(Pm(this.node,s,"Start"),o=>Pm(this.node,o,"End"))))}unmount(){}}class $k extends Nn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ki(Di(this.node.current,"focus",()=>this.onFocus()),Di(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Om(e,t,r){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),l=s[o];l&&Ve.postRender(()=>l(t,Ni(t)))}class Wk extends Nn{mount(){const{current:t}=this.node;t&&(this.unmount=P1(t,(r,s)=>(Om(this.node,s,"Start"),(o,{success:l})=>Om(this.node,o,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Yl=new WeakMap,Kl=new WeakMap,Uk=e=>{const t=Yl.get(e.target);t&&t(e)},Hk=e=>{e.forEach(Uk)};function Yk({root:e,...t}){const r=e||document;Kl.has(r)||Kl.set(r,{});const s=Kl.get(r),o=JSON.stringify(t);return s[o]||(s[o]=new IntersectionObserver(Hk,{root:e,...t})),s[o]}function Kk(e,t,r){const s=Yk(t);return Yl.set(e,r),s.observe(e),()=>{Yl.delete(e),s.unobserve(e)}}const qk={some:0,all:1};class Gk extends Nn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:s,amount:o="some",once:l}=t,u={root:r?r.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:qk[o]},f=p=>{const{isIntersecting:h}=p;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:g,onViewportLeave:y}=this.node.getProps(),v=h?g:y;v&&v(p)};return Kk(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Xk(t,r))&&this.startObserver()}unmount(){}}function Xk({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Qk={...Ek,...{inView:{Feature:Gk},tap:{Feature:Wk},focus:{Feature:$k},hover:{Feature:Bk}},...Vk,...{layout:{ProjectionNode:Zh,MeasureLayout:Cm}}},Ne=vk(Qk,xk);function bm(e){const t=Dr(()=>ur(e)),{isStatic:r}=L.useContext(Ur);if(r){const[,s]=L.useState(e);L.useEffect(()=>t.on("change",s),[])}return t}class Zk{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,r){this.componentControls.forEach(s=>{s.start(t.nativeEvent||t,r)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const Jk=()=>new Zk;function eE(){return Dr(Jk)}var ql={exports:{}},Gl,jm;function tE(){if(jm)return Gl;jm=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gl=e,Gl}var Xl,Lm;function nE(){if(Lm)return Xl;Lm=1;var e=tE();function t(){}function r(){}return r.resetWarningCache=t,Xl=function(){function s(u,f,p,h,g,y){if(y!==e){var v=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 v.name="Invariant Violation",v}}s.isRequired=s;function o(){return s}var l={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:o,element:s,elementType:s,instanceOf:o,node:s,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return l.PropTypes=l,l},Xl}var Rm;function rE(){return Rm||(Rm=1,ql.exports=nE()()),ql.exports}var iE=rE();const ne=Mt(iE);function Ql(){return Ql=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function oE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Zl=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=sE(e,["color","size"]);return ie.createElement("svg",Ql({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),ie.createElement("polyline",{points:"19 12 12 19 5 12"}))});Zl.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Zl.displayName="ArrowDown";function Jl(){return Jl=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function lE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var eu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=aE(e,["color","size"]);return ie.createElement("svg",Jl({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),ie.createElement("polyline",{points:"12 19 5 12 12 5"}))});eu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},eu.displayName="ArrowLeft";function tu(){return tu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function cE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var nu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=uE(e,["color","size"]);return ie.createElement("svg",tu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),ie.createElement("polyline",{points:"12 5 19 12 12 19"}))});nu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},nu.displayName="ArrowRight";function ru(){return ru=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function dE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var iu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=fE(e,["color","size"]);return ie.createElement("svg",ru({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),ie.createElement("polyline",{points:"7 7 17 7 17 17"}))});iu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},iu.displayName="ArrowUpRight";function su(){return su=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function hE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var ou=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=pE(e,["color","size"]);return ie.createElement("svg",su({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("polyline",{points:"15 18 9 12 15 6"}))});ou.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},ou.displayName="ChevronLeft";function au(){return au=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function gE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Qs=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=mE(e,["color","size"]);return ie.createElement("svg",au({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("circle",{cx:"12",cy:"12",r:"10"}),ie.createElement("polyline",{points:"12 6 12 12 16 14"}))});Qs.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Qs.displayName="Clock";function lu(){return lu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function vE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var uu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=yE(e,["color","size"]);return ie.createElement("svg",lu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("circle",{cx:"12",cy:"12",r:"10"}),ie.createElement("line",{x1:"22",y1:"12",x2:"18",y2:"12"}),ie.createElement("line",{x1:"6",y1:"12",x2:"2",y2:"12"}),ie.createElement("line",{x1:"12",y1:"6",x2:"12",y2:"2"}),ie.createElement("line",{x1:"12",y1:"22",x2:"12",y2:"18"}))});uu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},uu.displayName="Crosshair";function cu(){return cu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function wE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var fu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=xE(e,["color","size"]);return ie.createElement("svg",cu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"}))});fu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},fu.displayName="Facebook";function du(){return du=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function kE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var pu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=SE(e,["color","size"]);return ie.createElement("svg",du({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),ie.createElement("path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"}),ie.createElement("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5"}))});pu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},pu.displayName="Instagram";function hu(){return hu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function TE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var mu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=EE(e,["color","size"]);return ie.createElement("svg",hu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),ie.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),ie.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),ie.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),ie.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),ie.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"}))});mu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},mu.displayName="List";function gu(){return gu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function PE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var yu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=CE(e,["color","size"]);return ie.createElement("svg",gu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),ie.createElement("polyline",{points:"22,6 12,13 2,6"}))});yu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},yu.displayName="Mail";function vu(){return vu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function bE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var xu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=OE(e,["color","size"]);return ie.createElement("svg",vu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),ie.createElement("circle",{cx:"12",cy:"10",r:"3"}))});xu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},xu.displayName="MapPin";function wu(){return wu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function LE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Su=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=jE(e,["color","size"]);return ie.createElement("svg",wu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("polyline",{points:"15 3 21 3 21 9"}),ie.createElement("polyline",{points:"9 21 3 21 3 15"}),ie.createElement("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),ie.createElement("line",{x1:"3",y1:"21",x2:"10",y2:"14"}))});Su.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Su.displayName="Maximize2";function ku(){return ku=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function AE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Eu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=RE(e,["color","size"]);return ie.createElement("svg",ku({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}))});Eu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Eu.displayName="Maximize";function Tu(){return Tu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function ME(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Cu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=_E(e,["color","size"]);return ie.createElement("svg",Tu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("polyline",{points:"4 14 10 14 10 20"}),ie.createElement("polyline",{points:"20 10 14 10 14 4"}),ie.createElement("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),ie.createElement("line",{x1:"3",y1:"21",x2:"10",y2:"14"}))});Cu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Cu.displayName="Minimize2";function Pu(){return Pu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function IE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Ou=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=DE(e,["color","size"]);return ie.createElement("svg",Pu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))});Ou.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Ou.displayName="Minus";function bu(){return bu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function zE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Fi=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=NE(e,["color","size"]);return ie.createElement("svg",bu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("polygon",{points:"3 11 22 2 13 21 11 13 3 11"}))});Fi.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Fi.displayName="Navigation";function ju(){return ju=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function VE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Lu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=FE(e,["color","size"]);return ie.createElement("svg",ju({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"}))});Lu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Lu.displayName="Phone";function Ru(){return Ru=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function $E(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Au=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=BE(e,["color","size"]);return ie.createElement("svg",Ru({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),ie.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))});Au.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Au.displayName="Plus";function _u(){return _u=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function UE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Mu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=WE(e,["color","size"]);return ie.createElement("svg",_u({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("polyline",{points:"17 1 21 5 17 9"}),ie.createElement("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),ie.createElement("polyline",{points:"7 23 3 19 7 15"}),ie.createElement("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"}))});Mu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Mu.displayName="Repeat";function Du(){return Du=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function YE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Iu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=HE(e,["color","size"]);return ie.createElement("svg",Du({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("circle",{cx:"11",cy:"11",r:"8"}),ie.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});Iu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Iu.displayName="Search";function Nu(){return Nu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function qE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var zu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=KE(e,["color","size"]);return ie.createElement("svg",Nu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),ie.createElement("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),ie.createElement("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),ie.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),ie.createElement("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),ie.createElement("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),ie.createElement("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),ie.createElement("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),ie.createElement("line",{x1:"17",y1:"16",x2:"23",y2:"16"}))});zu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},zu.displayName="Sliders";function Fu(){return Fu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function XE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var dr=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=GE(e,["color","size"]);return ie.createElement("svg",Fu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ie.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});dr.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},dr.displayName="X";function Vu(){return Vu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function ZE(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,l;for(l=0;l=0)&&(r[o]=e[o]);return r}var Bu=L.forwardRef(function(e,t){var r=e.color,s=r===void 0?"currentColor":r,o=e.size,l=o===void 0?24:o,u=QE(e,["color","size"]);return ie.createElement("svg",Vu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u),ie.createElement("path",{d:"M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"}),ie.createElement("polygon",{points:"9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"}))});Bu.propTypes={color:ne.string,size:ne.oneOfType([ne.string,ne.number])},Bu.displayName="Youtube";const JE={},Am=e=>{let t;const r=new Set,s=(g,y)=>{const v=typeof g=="function"?g(t):g;if(!Object.is(v,t)){const k=t;t=y??(typeof v!="object"||v===null)?v:Object.assign({},t,v),r.forEach(b=>b(t,k))}},o=()=>t,p={setState:s,getState:o,getInitialState:()=>h,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(JE?"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."),r.clear()}},h=t=e(s,o,p);return p},eT=e=>e?Am(e):Am;var $u={exports:{}},Wu={},Uu={exports:{}},Hu={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _m;function tT(){if(_m)return Hu;_m=1;var e=Si();function t(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var r=typeof Object.is=="function"?Object.is:t,s=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function f(y,v){var k=v(),b=s({inst:{value:k,getSnapshot:v}}),S=b[0].inst,C=b[1];return l(function(){S.value=k,S.getSnapshot=v,p(S)&&C({inst:S})},[y,k,v]),o(function(){return p(S)&&C({inst:S}),y(function(){p(S)&&C({inst:S})})},[y]),u(k),k}function p(y){var v=y.getSnapshot;y=y.value;try{var k=v();return!r(y,k)}catch{return!0}}function h(y,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Hu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,Hu}var Mm;function nT(){return Mm||(Mm=1,Uu.exports=tT()),Uu.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Dm;function rT(){if(Dm)return Wu;Dm=1;var e=Si(),t=nT();function r(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var s=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,f=e.useMemo,p=e.useDebugValue;return Wu.useSyncExternalStoreWithSelector=function(h,g,y,v,k){var b=l(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=f(function(){function R(K){if(!I){if(I=!0,z=K,K=v(K),k!==void 0&&S.hasValue){var V=S.value;if(k(V,K))return H=V}return H=K}if(V=H,s(z,K))return V;var E=v(K);return k!==void 0&&k(V,E)?V:(z=K,H=E)}var I=!1,z,H,$=y===void 0?null:y;return[function(){return R(g())},$===null?void 0:function(){return R($())}]},[g,y,v,k]);var C=o(h,b[0],b[1]);return u(function(){S.hasValue=!0,S.value=C},[C]),p(C),C},Wu}var Im;function iT(){return Im||(Im=1,$u.exports=rT()),$u.exports}var sT=iT();const oT=Mt(sT),{useDebugValue:aT}=ie,{useSyncExternalStoreWithSelector:lT}=oT,uT=e=>e;function cT(e,t=uT,r){const s=lT(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return aT(s),s}var Zs=Symbol("NOT_FOUND");function fT(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function dT(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function pT(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(s=>typeof s=="function"?`function ${s.name||"unnamed"}()`:typeof s).join(", ");throw new TypeError(`${t}[${r}]`)}}var Nm=e=>Array.isArray(e)?e:[e];function hT(e){const t=Array.isArray(e[0])?e[0]:e;return pT(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function mT(e,t){const r=[],{length:s}=e;for(let o=0;ot(f,h.key));if(p>-1){const h=r[p];return p>0&&(r.splice(p,1),r.unshift(h)),h.value}return Zs}function o(f,p){s(f)===Zs&&(r.unshift({key:f,value:p}),r.length>e&&r.pop())}function l(){return r}function u(){r=[]}return{get:s,put:o,getEntries:l,clear:u}}var vT=(e,t)=>e===t;function xT(e){return function(r,s){if(r===null||s===null||r.length!==s.length)return!1;const{length:o}=r;for(let l=0;ll(k.value,g));v&&(g=v.value,f!==0&&f--)}p.put(arguments,g)}return g}return h.clearCache=()=>{p.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var wT=class{constructor(e){this.value=e}deref(){return this.value}},ST=typeof WeakRef<"u"?WeakRef:wT,kT=0,Fm=1;function Js(){return{s:kT,v:void 0,o:null,p:null}}function Vm(e,t={}){let r=Js();const{resultEqualityCheck:s}=t;let o,l=0;function u(){var y;let f=r;const{length:p}=arguments;for(let v=0,k=p;v{r=Js(),u.resetResultsCount()},u.resultsCount=()=>l,u.resetResultsCount=()=>{l=0},u}function Bm(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,s=(...o)=>{let l=0,u=0,f,p={},h=o.pop();typeof h=="object"&&(p=h,h=o.pop()),fT(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const g={...r,...p},{memoize:y,memoizeOptions:v=[],argsMemoize:k=Vm,argsMemoizeOptions:b=[]}=g,S=Nm(v),C=Nm(b),R=hT(o),I=y(function(){return l++,h.apply(null,arguments)},...S),z=k(function(){u++;const $=mT(R,arguments);return f=I.apply(null,$),f},...C);return Object.assign(z,{resultFunc:h,memoizedResultFunc:I,dependencies:R,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:y,argsMemoize:k})};return Object.assign(s,{withTypes:()=>s}),s}var ET=Bm(Vm),TT=Object.assign((e,t=ET)=>{dT(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),s=r.map(l=>e[l]);return t(s,(...l)=>l.reduce((u,f,p)=>(u[r[p]]=f,u),{}))},{withTypes:()=>TT});const Yt=(e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},CT=e=>{var t;return(t=e==null?void 0:e.split(/[#?]/)[0].split(".").pop())==null?void 0:t.trim().toLowerCase()},$m=(e,t="desc")=>!e||typeof e[t]!="string"?"":e[t].replace(/{{(\w+)}}/gi,(r,s)=>{const o=e[s.toLowerCase()];return typeof o=="string"?o:""}),PT=e=>{if(!e)return"#fff";e=e.replace("#","");const t=e.match(/.{2}/g);if(!t)return"#fff";const[r,s,o]=t.map(f=>parseInt(f,16));return(.299*r+.587*s+.114*o)/255>.8?"#000":"#fff"},OT=(e,t="_self")=>{const r=document.createElement("a");r.href=e,r.target=t,t==="_blank"&&(r.rel="noopener noreferrer"),document.body.appendChild(r),r.click(),document.body.removeChild(r)},bT=e=>{if(!e)return"";const t=document.createElement("div");return t.innerHTML=e,t.textContent||""},eo=(e,t)=>Math.round(e*100)===Math.round(t*100),jT=(e,t,r,s,o)=>{const[l,u,f,p]=o,h=(f-l)*r,g=(p-u)*s;if(h<=0||g<=0)return{scale:1,x:.5,y:.5};const y=Math.min(e/r,t/s),k=Math.min(e/h,t/g)/y,b=(l+f)/2,S=(u+p)/2;return{scale:Yt(k,4),x:Yt(b,4),y:Yt(S,4)}},LT=(e,t)=>{const r=new Set(t);e.classList.forEach(s=>{r.has(s)||e.classList.remove(s)})},Yu=e=>e.split(",").map(t=>t.trim()).filter(Boolean),RT=e=>Array.from(new Set(e)).join(","),AT=(e,t)=>e.indexOf(t)>=0?e.filter(s=>s!==t):[...e,t],Ku=(e,t)=>!e||!t?!1:e===t?!0:e.includes(",")?Yu(e).includes(t):!1,to=(e,t,r)=>{if(e&&t)for(const s of Yu(t)){const o=e.querySelector(`#${CSS.escape(s)}`);o&&r(o)}},Wm=(e,t)=>r=>{var s;return r.title?(s=`${t(r,"title")} ${t(r,"about")} ${_T(r==null?void 0:r.tags)}`)==null?void 0:s.toLowerCase().normalize("NFD").includes(e.toLowerCase().normalize("NFD")):!0},_T=e=>e?Array.isArray(e)?e.join(" "):e:"",Um=(e,t)=>r=>{var o;if(!e)return!0;const s=(o=t(r,"title"))==null?void 0:o.trim().charAt(0).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase();return e==="#"?/^[0-9]/.test(s):s===e},Hm=e=>t=>{let r=t.group;return typeof r=="string"&&(r=r.split(",").map(s=>s.trim())),Array.isArray(r)&&r.some(s=>e.includes(s))},Ym=(e,t,r)=>s=>e?e.every(o=>{try{const l=t[o.id];if(!l)return!0;const u=r[o.id];return u===void 0?!0:l(s,u)}catch(l){return console.error(`Error applying filter ${o.id}:`,l),!0}}):!0,MT=e=>{const t={};return e.forEach(r=>{let s=r.group;s&&(typeof s=="string"&&(s=s.split(",").map(o=>o.trim())),Array.isArray(s)&&s.forEach(o=>{t[o]=(t[o]||0)+1}))}),t},DT=(e,t)=>{const r={};return e.forEach(s=>{if(!s.title)return;const o=s.title.charAt(0).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase(),l=/^[0-9]/.test(o)?"#":o;r[l]=(r[l]||0)+1}),r},IT=(e,t,r,s,o,l)=>{var h,g;let u=t;(h=e.settings)!=null&&h.filterByLayer&&(u=u.filter(y=>y.layer===o)),r!=null&&r.search&&(u=u.filter(Wm(r.search,l))),(g=e.filters)!=null&&g.length&&(u=u.filter(Ym(e.filters,s,r??{})));const f=r!=null&&r.group&&r.group.length?u.filter(Hm(r.group)):u,p=r!=null&&r.alphabetic?u.filter(Um(r.alphabetic,l)):u;return{groups:MT(p),alphabetic:DT(f)}},be=Bm({memoize:zm,argsMemoize:zm}),pr=e=>e.data,Km=e=>e.csv,no=e=>e.location,NT=e=>e.hovered,hr=e=>e.layer,qu=e=>e.lang,zT=e=>e.estPos,Hr=e=>e.filters,FT=e=>e.theme,VT=e=>e.paths,BT=e=>e.pos.scale,Gu=e=>{var t;return(t=pr(e))==null?void 0:t.samples},Xu=e=>{var t;return(t=pr(e))==null?void 0:t.locations},Ge=e=>{var t;return(t=pr(e))==null?void 0:t.settings},qm=e=>{var t;return(t=pr(e))==null?void 0:t.layers},$T=e=>{var t;return(t=pr(e))==null?void 0:t.routes},WT=e=>{var t;return(t=pr(e))==null?void 0:t.filters},UT=e=>{var t;return(t=Ge(e))==null?void 0:t.language},HT=e=>{var t;return(t=Ge(e))==null?void 0:t.csvMerge},Gm=e=>{var t;return(t=Ge(e))==null?void 0:t.localization},Xm=e=>Ge(e).geo,Qm=e=>Ge(e).extent,Vi=e=>Ge(e).mapWidth,Qu=e=>Ge(e).mapHeight,YT=e=>Ge(e).maxZoom,KT=e=>Ge(e).hoverTooltip,Zm=e=>t=>t.location===e,Jm=e=>t=>t.hovered===e,Bi=e=>e.containerWidth,$i=e=>e.containerHeight,qT=e=>e.containerHeight>0?e.containerWidth/e.containerHeight:1,ro=be(Vi,Qu,(e,t)=>e>0?e/t:1),Zu=be(Vi,Qu,(e,t)=>({width:e,height:t})),eg=be(Bi,$i,Vi,Qu,(e,t,r,s)=>Yt(Math.min(t/s,e/r),4)),GT=be(Xm,Qm,Vi,(e,t,r)=>{if(!e||!t)return;const s=t[2]-t[0],o=t[1]*Math.PI/180,l=r/s*360/(2*Math.PI),u=l/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)));return{deltaLon:s,mapWidth:l,mapOffsetY:u}}),XT=be(Xm,Qm,Zu,GT,(e,t,r,s)=>o=>{if(!o||!e||!t||!s)return;const l=o[0]*Math.PI/180;return[(o[1]-t[0])*(r.width/s.deltaLon)/r.width,(r.height-(s.mapWidth/2*Math.log((1+Math.sin(l))/(1-Math.sin(l)))-s.mapOffsetY))/r.height]}),QT=be(Gu,Xu,(e,t)=>(e==null?void 0:e.find(r=>r.id==="def"))||(t==null?void 0:t.find(r=>r.id==="def"))),ZT=be(Gu,Xu,QT,(e,t,r)=>(s,o="sample")=>(e==null?void 0:e.find(l=>l.id===(s==null?void 0:s[o])))||(t==null?void 0:t.find(l=>l.id===(s==null?void 0:s[o])))||s&&r),JT=be(XT,zT,(e,t)=>r=>{var s;return{coord:r&&(r.coord||((s=t[r.id])==null?void 0:s.coord)||e(r.latlon))}}),io=be(Xu,Km,HT,(e,t,r)=>{const s=e??[],o=t??[];if(!r){const u=new Set(s.map(f=>f.id));return[...s,...o.filter(f=>!u.has(f.id))]}const l=new Map;for(const u of s)l.set(u.id,u);for(const u of o){const f=l.get(u.id);l.set(u.id,f?{...f,...u}:u)}return Array.from(l.values())}),eC={id:""},mr=be(io,e=>t=>e.find(r=>r.id===t)??eC);be(Km,e=>t=>!t||!e?null:e.find(r=>r.id===t)??null),be(Gu,e=>(t="def")=>e==null?void 0:e.find(r=>r.id===t));const gr=be(JT,ZT,(e,t)=>(r,s="sample")=>{const o={...e(r),...t(r,s),...r};return o&&(o.desc=$m(o,"desc"),o.about=$m(o,"about")),o}),tC=(e=[],t,r)=>{const s=r??new Set(e.filter(l=>!l.disable).map(l=>l.id)),o=t.layer;return!o||Array.isArray(o)&&o.length===0?!0:Array.isArray(o)?o.some(l=>s.has(l)):s.has(o)},so=be(qm,io,gr,(e,t,r)=>{const s=new Set(e==null?void 0:e.filter(o=>!o.disable).map(o=>o.id));return t.filter(o=>o.sample!=="true").map(o=>r(o)).filter(o=>o!==void 0).filter(o=>o.disable!==!0).filter(o=>tC(e,o,s))}),oo=(e,t)=>{const r=e.layer;return!r||r.length===0||(Array.isArray(r)?r.includes(t):r===t)},tg=be(Gm,qu,UT,(e,t,r)=>(s,o)=>{if(!s)return"";const l=typeof s[o]=="string"?s[o]:"";if(!e||t===r)return l;const u=s[`${o}_${t}`];return typeof u=="string"?u:l}),nC=e=>{if(e.logic)try{return new Function("l","value",`return !value || ${e.logic} ? true : false`)}catch(t){const r=t instanceof SyntaxError?t.message:t;console.error(r);return}},rC={},ng=be(WT,e=>e!=null&&e.length?Object.fromEntries(e.filter(t=>!t.disable).map(t=>[t.id,nC(t)])):rC),iC=e=>e,sC=be(e=>e.data.settings.filterByLayer,hr,(e,t)=>e?r=>r.filter(s=>oo(s,t)):iC),rg=be(sC,e=>{var t;return(t=Hr(e))==null?void 0:t.search},e=>{var t;return(t=Hr(e))==null?void 0:t.group},e=>{var t;return(t=Hr(e))==null?void 0:t.alphabetic},e=>{var t;return(t=e.data)==null?void 0:t.filters},Hr,ng,tg,(e,t,r,s,o,l,u,f)=>p=>{let h=p;return h=e(h),t&&(h=h.filter(Wm(t,f))),r&&(h=h.filter(Hm(r))),s&&(h=h.filter(Um(s,f))),o&&o.length&&(h=h.filter(Ym(o,u,l??{}))),h}),ig=be(e=>Ge(e).ordered,e=>t=>e?[...t].sort((r,s)=>r.title?s.title?r.title.localeCompare(s.title):-1:1):t),sg=be(so,rg,ig,(e,t,r)=>{const s=e.filter(l=>l.ignoreMapFilters===!0);let o=e.filter(l=>l.ignoreMapFilters!==!0);return o=t(o),r([...s,...o])}),og=be(so,rg,ig,(e,t,r)=>(e=e.filter(s=>s.hide!==!0),e=t(e),r(e))),ag=be(sg,hr,(e,t)=>e.filter(r=>oo(r,t))),lg=be(qm,e=>t=>e.find(r=>r.id===t&&!r.disable)||e.find(r=>!r.disable)),ao=be(Hr,e=>Object.values(e??{}).filter(t=>t||Array.isArray(t)&&(t==null?void 0:t.length)>0).length),Wi=be(FT,e=>(t,r)=>{const s=`${r}_dark`,o=e==="dark"?t[s]??t[r]:t[r]??t[s];return typeof o=="string"?o:void 0}),oC=be(pr,Hr,ng,hr,so,tg,(e,t,r,s,o,l)=>IT(e,o,t,r,s,l)),aC=e=>(e.layers=e.levels,delete e.levels,e.layers.forEach(t=>{"map"in t&&(t.file=t.map,delete t.map),"title"in t&&(t.name=t.title,delete t.title)}),e.settings={mapWidth:e.mapwidth,mapHeight:e.mapheight,resetButton:"bottom-right",zoomButtons:"bottom-right",layerSwitcher:"top-right",zoom:!0,maxZoom:3},delete e.mapwidth,delete e.mapheight,e.breakpoints=[{container:600,below:9e3,name:"all-screens"},{portrait:!0,name:"mobile",below:480}],e.locations||(e.locations=e.layers.map(t=>t.locations).flat().map(t=>({layer:e.layers.find(r=>r.locations.includes(t)).id,...t})),e.layers.forEach(t=>delete t.locations)),e.locations.forEach(t=>{"description"in t&&(t.desc=t.description,delete t.description),"x"in t&&"y"in t&&(t.coord=[parseFloat(t.x),parseFloat(t.y)],delete t.x,delete t.y),"fill"in t&&(t.color=t.fill,delete t.fill)}),e),lC=e=>{var t;((t=e==null?void 0:e.settings)==null?void 0:t.hoverAbout)===!0&&(delete e.settings.hoverAbout,e.settings.showAboutIn=Array.from(new Set(e.settings.showAboutIn??[]).add("hover")))},uC=e=>{var t;((t=e==null?void 0:e.settings)==null?void 0:t.thumbnails)===!0&&(delete e.settings.thumbnails,e.settings.showThumbIn=Array.from(new Set(e.settings.showThumbIn??[]).add("directory")))},cC=e=>{e.settings&&(e.settings.animations===!0?e.settings.animations="full":e.settings.animations===!1&&(e.settings.animations="reduced"))},fC=e=>(lC(e),uC(e),cC(e),e),lo="1h",dC="button",pC="dynamic",hC={settings:{mapWidth:0,mapHeight:0,maxZoom:0},layers:[],breakpoints:[]},Ju={scale:1,x:.5,y:.5},mC=(e,t)=>({init:!1,initSettings:{},initStore:r=>{t().init||e({init:!0,initSettings:r})},focusStack:[],pushFocus:r=>{e({focusStack:[...t().focusStack,r]})},popFocus:()=>{const r=[...t().focusStack],s=r.pop();if(e({focusStack:r}),!s)return;const o=document.getElementById(s);o==null||o.focus()},selectedVector:null,setSelectedVector:r=>e({selectedVector:r}),routesEditing:!1,setRoutesEditing:r=>e({routesEditing:r}),theme:"light",setTheme:r=>e({theme:r}),lang:"en",setLang:r=>e({lang:r}),legendToggle:{},setLegendToggle:(r,s)=>e(o=>({legendToggle:{...o.legendToggle,[r]:s}})),from:null,to:null,setFrom:r=>e({from:r,to:t().to===r?null:t().to}),setTo:r=>e({to:r,from:t().from===r?null:t().from}),setAny:r=>{!t().to||t().from?t().setTo(r):t().setFrom(r),e({routesOpened:!0})},routesAccessible:!1,setRoutesAccessible:r=>e({routesAccessible:r}),routesOpened:!1,setRoutesOpened:r=>e({routesOpened:r}),paths:[],setPaths:r=>e({paths:r}),animatedPath:!1,setAnimatedPath:r=>{const s=t().paths[r];e({animatedPath:r,layer:s?s[0].layer:t().layer})},setFixedFrom:r=>{e(s=>{var o;return{from:r,data:{...s.data,settings:{...s.data.settings,wayfindingFixedFrom:r??void 0},locations:(o=s.data.locations)==null?void 0:o.map(l=>l.id!==r?l:{...l,disable:!1})}}})},initArea:void 0,setInitArea:r=>{e(s=>({data:{...s.data,settings:{...s.data.settings,initArea:r}}}))},areaSelectorActive:!1,toggleAreaSelector:r=>e(s=>({areaSelectorActive:typeof r=="boolean"?r:!s.areaSelectorActive})),outerSettings:void 0,setOuterSettings:r=>e({outerSettings:r}),loading:!0,dataLoaded:!1,initLocation:null,setInitLocation:r=>e({initLocation:r}),initLocationResolved:!1,resolveInitLocation:()=>e({initLocationResolved:!0}),error:void 0,admin:!1,hovered:!1,fitScale:1,containerWidth:0,containerHeight:0,setContainerSize:(r,s)=>e({containerWidth:r,containerHeight:s}),offset:{w:0,h:0},setOffset:r=>e(s=>({offset:{...s.offset,...r}})),markerOffsets:{},setMarkerOffset:(r,s)=>e(o=>({markerOffsets:{...o.markerOffsets,[r]:s}})),pos:Ju,initPos:Ju,setInitPos:r=>e({initPos:r}),initPosResolved:!1,resolveInitPos:r=>{e({pos:r,initPosResolved:!0})},target:Ju,location:void 0,transition:{duration:0},breakpoint:void 0,dragging:!1,sidebarClosed:!1,portrait:!1,layer:"",setLayer:r=>e({layer:r}),filters:{},filtersOpened:!1,estPos:{},newLocation:!1,legacyRoutes:null,data:hC,csv:[],containerMessage:null,setContainerMessage:r=>e({containerMessage:r}),customFields:[],setCustomFields:r=>e({customFields:r}),setData:r=>e(s=>({data:{...s.data,...r}})),setAdmin:r=>e({admin:r}),fetchData:async r=>{if(typeof r=="object"&&r!==null){t().process(r);return}if(typeof r=="string"&&r.trim().charAt(0)==="{"){t().process(JSON.parse(r));return}try{const o=await(await fetch(r)).json();e({source:r}),t().process(o)}catch(s){console.error("An error occurred while fetching map data: ",s),e({loading:!1,error:"Couldn't fetch map data.",data:{}})}},process:r=>{var u,f,p,h;const s=r.layers?r:aC(r);fC(s);const o={...s.settings,...t().initSettings,...t().outerSettings},l=s.filters?Object.fromEntries(s.filters.filter(g=>!g.disable).map(g=>[g.id,g.default])):{};e({loading:!1,data:{...s,settings:o},layer:(o==null?void 0:o.layer)||(s==null?void 0:s.layers[0].id),sidebarClosed:(o==null?void 0:o.sidebarClosed)&&(o==null?void 0:o.toggleSidebar),filters:l,filtersOpened:(o==null?void 0:o.filtersOpened)&&!(o!=null&&o.sidebarClosed)||!1,legendToggle:(u=s.legend)==null?void 0:u.reduce((g,y)=>(y.action==="togglecss"&&y.default===!0&&(g[y.id]=!1),g),{}),routesOpened:((f=s==null?void 0:s.settings)==null?void 0:f.wayfindingOpened)||!1}),(!((p=s==null?void 0:s.settings)!=null&&p.csv)||!((h=s==null?void 0:s.settings)!=null&&h.csvEnabled))&&e({dataLoaded:!0})},fetchCsv:async r=>{var s,o,l,u;if(!((o=(s=t().data)==null?void 0:s.settings)!=null&&o.csvEnabled)||!((u=(l=t().data)==null?void 0:l.settings)!=null&&u.csv))return!1;try{const f=await r;e({csv:f})}catch(f){console.error("An error occured while fetching the CSV file: ",f),e({csv:[]})}finally{e({dataLoaded:!0})}},setCsv:r=>e({csv:r}),setHovered:r=>e({hovered:r}),setTarget:r=>e(s=>({target:{...s.target,...r}})),setPos:r=>e({pos:r}),setTransition:r=>e({transition:r}),setDragging:r=>e({dragging:r}),setBreakpoint:r=>e({breakpoint:r}),setEstPos:r=>e({estPos:r}),setLegacyRoutes:r=>e({legacyRoutes:r}),setNewLocation:(r,s=!1)=>{if(!r){e({newLocation:!1});return}if(!s){e({newLocation:r});return}const o=t().newLocation,l=o?Yu(o):[],u=AT(l,r);e({newLocation:u.length?RT(u):!1})},switchLayer:r=>{var l,u;const s=lg(t()),o=t().layer;((l=s(o))!=null&&l.switchReset||(u=s(r))!=null&&u.switchReset)&&t().closeLocation(!0),e({layer:r})},clearFilters:()=>e(r=>({search:"",filtersOpened:!1,filters:Object.keys(r.filters??{}).reduce((s,o)=>({...s,[o]:!1}),{})})),setSearch:r=>e(s=>({filters:{...s.filters,search:r}})),toggleGroup:(r,s,o=!1)=>e(l=>{var f,p,h;let u;return o?u=s?[]:[r.name]:u=s?(p=(f=l.filters)==null?void 0:f.group)==null?void 0:p.filter(g=>g!==r.name):(h=l.filters)!=null&&h.group?[...l.filters.group,r.name]:[r.name],{filters:{...l.filters,group:u&&u.length>0?u:void 0}}}),setFilter:(r,s)=>e(o=>({filters:{...o.filters,[r]:s}})),openLocation:(r,s=.8)=>{var p;const l=mr(t())(r??"");if(l.disable&&!t().admin)return;if(l.action==="link"&&l.id!==t().initLocation&&l.link){const h=cg(l,"link",t().lang,(p=t().data.settings)==null?void 0:p.localization);h&&OT(h,l.target);return}if(l.action==="switch"&&!t().admin){t().switchLayer(l.switch),t().setTarget({scale:1});return}const f=gr(t())(l);e(h=>{var g,y;return{location:f==null?void 0:f.id,newLocation:!1,transition:{duration:s},layer:(()=>{const v=h.layer,k=f==null?void 0:f.layer;return!k||Array.isArray(k)&&k.length===0?v:Array.isArray(k)?v&&k.includes(v)?v:k[0]:k!==v?k:v})(),target:{scale:(f==null?void 0:f.zoom)||t().data.settings.maxZoom,x:(g=f==null?void 0:f.coord)==null?void 0:g[0],y:(y=f==null?void 0:f.coord)==null?void 0:y[1]},sidebarClosed:h.sidebarClosed?(f==null?void 0:f.action)!=="sidebar":!1}})},closeLocation:(r=!1)=>{(r||t().data.settings.closeReset)&&(t().setTransition({duration:.4}),t().setTarget(t().initPos)),e({location:void 0,newLocation:!1})},updateLocation:(r,s)=>{e(o=>{var l;return{data:{...o.data,locations:(l=o.data.locations)==null?void 0:l.map(u=>u.id===r?{...u,...s}:u)}}})},toggleSidebar:r=>e(s=>({location:void 0,filtersOpened:!1,transition:{duration:0},sidebarClosed:r===void 0?!s.sidebarClosed:!r})),toggleFilters:r=>e(s=>({sidebarClosed:!1,filtersOpened:r===void 0?!s.filtersOpened:r})),setHasRoute:r=>e(()=>({hasRoute:r})),hasRoute:()=>!1}),gC=()=>eT()((...e)=>({...mC(...e)})),ug=L.createContext(null),P=e=>{const t=L.useContext(ug);if(t===null)throw new Error("no provider");return cT(t,e)},It=()=>{const e=P(qu),t=P(o=>o.data.translations),r=P(o=>o.data.settings.localization);return L.useMemo(()=>o=>{if(!r)return o;const l=t==null?void 0:t.find(u=>u.orig===o);return(l==null?void 0:l[e])||(l==null?void 0:l.en)||o},[e,t,r])},cg=(e,t,r,s)=>{if(!e||typeof e!="object")return e;if(!t||!s)return e[t];const o=`${String(t)}_${r}`,l=e;return o in l?l[o]:e[t]},yr=()=>{const e=P(qu),t=P(Gm);return L.useMemo(()=>function(s,o){return cg(s,o,e,t)},[e,t])};var yC=e=>typeof e!="string"?{}:e.split(/ ?; ?/).reduce((t,r)=>{const[s,o]=r.split(/ ?: ?/).map((l,u)=>u===0?l.replace(/\s+/g,""):l.trim());if(s&&o){const l=s.replace(/(\w)-(\w)/g,(f,p,h)=>`${p}${h.toUpperCase()}`);let u=o.trim();Number.isNaN(Number(o))||(u=Number(o)),t[s.startsWith("-")?s:l]=u}return t},{});function vC(e=6){const t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let r="";for(let s=e;s>0;--s)r+=t[Math.round(Math.random()*(t.length-1))];return r}var xC=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],fg={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function wC(e,t){var l;const{key:r,level:s,...o}=t;switch(e.nodeType){case 1:return L.createElement(kC(e.nodeName),SC(e,r),dg(e.childNodes,s,o));case 3:{const u=((l=e.nodeValue)==null?void 0:l.toString())??"";if(!o.allowWhiteSpaces&&/^\s+$/.test(u)&&!/[\u00A0\u202F]/.test(u))return null;if(!e.parentNode)return u;const f=e.parentNode.nodeName.toLowerCase();return xC.includes(f)?(/\S/.test(u)&&console.warn(`A textNode is not allowed inside '${f}'. Your text "${u}" will be ignored`),null):u}case 8:return null;case 11:return dg(e.childNodes,s,t);default:return null}}function SC(e,t){const r={key:t};if(e instanceof Element){const s=e.getAttribute("class");s&&(r.className=s),[...e.attributes].forEach(o=>{switch(o.name){case"class":break;case"style":r[o.name]=yC(o.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":r[fg[o.name]||o.name]=!0;break;default:r[fg[o.name]||o.name]=o.value}})}return r}function dg(e,t,r){const s=[...e].map((o,l)=>uo(o,{...r,index:l,level:t+1})).filter(Boolean);return s.length?s:null}function kC(e){return/[a-z]+[A-Z]+[a-z]+/.test(e)?e:e.toLowerCase()}function pg(e,t={}){return typeof e=="string"?EC(e,t):e instanceof Node?uo(e,t):null}function uo(e,t={}){if(!e||!(e instanceof Node))return null;const{actions:r=[],index:s=0,level:o=0,randomKey:l}=t;let u=e,f=`${o}-${s}`;const p=[];return l&&o===0&&(f=`${vC()}-${f}`),Array.isArray(r)&&r.forEach(h=>{h.condition(u,f,o)&&(typeof h.pre=="function"&&(u=h.pre(u,f,o),u instanceof Node||(u=e)),typeof h.post=="function"&&p.push(h.post(u,f,o)))}),p.length?p:wC(u,{key:f,level:o,...t})}function EC(e,t={}){if(!e||typeof e!="string")return null;const{includeAllNodes:r=!1,nodeOnly:s=!1,selector:o="body > *",type:l="text/html"}=t;try{const f=new DOMParser().parseFromString(e,l);if(r){const{childNodes:h}=f.body;return s?h:[...h].map(g=>uo(g,t))}const p=f.querySelector(o)||f.body.childNodes[0];if(!(p instanceof Node))throw new TypeError("Error parsing input");return s?p:uo(p,t)}catch{}return null}var TC=Object.defineProperty,CC=(e,t,r)=>t in e?TC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,co=(e,t,r)=>CC(e,typeof t!="symbol"?t+"":t,r),hg="react-inlinesvg",mg=10,Me={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function PC(e){return e[Math.floor(Math.random()*e.length)]}function fo(){var e;return!!(typeof window<"u"&&((e=window.document)!=null&&e.createElement))}function OC(){return RC()&&typeof window<"u"&&window!==null}function bC(e,...t){const r={};for(const s in e)({}).hasOwnProperty.call(e,s)&&(t.includes(s)||(r[s]=e[s]));return r}function jC(e){const t="abcdefghijklmnopqrstuvwxyz",s=`${t}${t.toUpperCase()}1234567890`;let o="";for(let l=0;l299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(l=>o.includes(l)))throw new Error(`Content type isn't valid: ${o}`);return r.text()}function LC(e=1){return new Promise(t=>{setTimeout(t,e*1e3)})}function RC(){if(!document)return!1;const e=document.createElement("div");e.innerHTML="";const t=e.firstChild;return!!t&&t.namespaceURI==="http://www.w3.org/2000/svg"}var AC=class{constructor(){co(this,"cacheApi"),co(this,"cacheStore"),co(this,"subscribers",[]),co(this,"isReady",!1),this.cacheStore=new Map;let e=hg,t=!1;fo()&&(e=window.REACT_INLINESVG_CACHE_NAME??hg,t=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),t?caches.open(e).then(r=>{this.cacheApi=r}).catch(r=>{console.error(`Failed to open cache: ${r.message}`)}).finally(()=>{this.isReady=!0,this.subscribers.forEach(r=>r())}):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,t){var r;return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,t):this.fetchAndAddToInternalCache(e,t)),((r=this.cacheStore.get(e))==null?void 0:r.content)??""}set(e,t){this.cacheStore.set(e,t)}isCached(e){var t;return((t=this.cacheStore.get(e))==null?void 0:t.status)===Me.LOADED}async fetchAndAddToInternalCache(e,t){const r=this.cacheStore.get(e);if((r==null?void 0:r.status)===Me.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:Me.IDLE}),await this.fetchAndAddToInternalCache(e,t)});return}if(!(r!=null&&r.content)){this.cacheStore.set(e,{content:"",status:Me.LOADING});try{const s=await gg(e,t);this.cacheStore.set(e,{content:s,status:Me.LOADED})}catch(s){throw this.cacheStore.set(e,{content:"",status:Me.FAILED}),s}}}async fetchAndAddToPersistentCache(e,t){var o,l,u;const r=this.cacheStore.get(e);if((r==null?void 0:r.status)===Me.LOADED)return;if((r==null?void 0:r.status)===Me.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:Me.IDLE}),await this.fetchAndAddToPersistentCache(e,t)});return}this.cacheStore.set(e,{content:"",status:Me.LOADING});const s=await((o=this.cacheApi)==null?void 0:o.match(e));if(s){const f=await s.text();this.cacheStore.set(e,{content:f,status:Me.LOADED});return}try{await((l=this.cacheApi)==null?void 0:l.add(new Request(e,t)));const f=await((u=this.cacheApi)==null?void 0:u.match(e)),p=await(f==null?void 0:f.text())??"";this.cacheStore.set(e,{content:p,status:Me.LOADED})}catch(f){throw this.cacheStore.set(e,{content:"",status:Me.FAILED}),f}}async handleLoading(e,t){var s;let r=0;for(;((s=this.cacheStore.get(e))==null?void 0:s.status)===Me.LOADING&&r=mg&&await t()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([e,t])=>({[e]:t}))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){const e=await this.cacheApi.keys();for(const t of e)await this.cacheApi.delete(t)}this.cacheStore.clear()}};function yg(e){const t=L.useRef(void 0);return L.useEffect(()=>{t.current=e}),t.current}function _C(e){const{baseURL:t,content:r,description:s,handleError:o,hash:l,preProcessor:u,title:f,uniquifyIDs:p=!1}=e;try{const h=MC(r,u),g=pg(h,{nodeOnly:!0});if(!g||!(g instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const y=vg(g,{baseURL:t,hash:l,uniquifyIDs:p});if(s){const v=y.querySelector("desc");v!=null&&v.parentNode&&v.parentNode.removeChild(v);const k=document.createElementNS("http://www.w3.org/2000/svg","desc");k.innerHTML=s,y.prepend(k)}if(typeof f<"u"){const v=y.querySelector("title");if(v!=null&&v.parentNode&&v.parentNode.removeChild(v),f){const k=document.createElementNS("http://www.w3.org/2000/svg","title");k.innerHTML=f,y.prepend(k)}}return y}catch(h){return o(h)}}function MC(e,t){return t?t(e):e}function vg(e,t){const{baseURL:r="",hash:s,uniquifyIDs:o}=t,l=["id","href","xlink:href","xlink:role","xlink:arcrole"],u=["href","xlink:href"],f=(p,h)=>u.includes(p)&&(h?!h.includes("#"):!1);return o&&[...e.children].forEach(p=>{var h;if((h=p.attributes)!=null&&h.length){const g=Object.values(p.attributes).map(y=>{const v=y,k=/url\((.*?)\)/.exec(y.value);return k!=null&&k[1]&&(v.value=y.value.replace(k[0],`url(${r}${k[1]}__${s})`)),v});l.forEach(y=>{const v=g.find(k=>k.name===y);v&&!f(y,v.value)&&(v.value=`${v.value}__${s}`)})}return p.children.length?vg(p,t):p}),e}var Yr;function DC(e){const{cacheRequests:t=!0,children:r=null,description:s,fetchOptions:o,innerRef:l,loader:u=null,onError:f,onLoad:p,src:h,title:g,uniqueHash:y}=e,[v,k]=L.useReducer((ee,fe)=>({...ee,...fe}),{content:"",element:null,isCached:t&&Yr.isCached(e.src),status:Me.IDLE}),{content:b,element:S,isCached:C,status:R}=v,I=yg(e),z=yg(v),H=L.useRef(y??jC(8)),$=L.useRef(!1),K=L.useRef(!1),V=L.useCallback(ee=>{$.current&&(k({status:ee.message==="Browser does not support SVG"?Me.UNSUPPORTED:Me.FAILED}),f==null||f(ee))},[f]),E=L.useCallback((ee,fe=!1)=>{$.current&&k({content:ee,isCached:fe,status:Me.LOADED})},[]),T=L.useCallback(async()=>{const ee=await gg(h,o);E(ee)},[o,E,h]),M=L.useCallback(()=>{try{const ee=_C({...e,handleError:V,hash:H.current,content:b}),fe=pg(ee);if(!fe||!L.isValidElement(fe))throw new Error("Could not convert the src to a React element");k({element:fe,status:Me.READY})}catch(ee){V(new Error(ee.message))}},[b,V,e]),Z=L.useCallback(async()=>{const ee=/^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(h);let fe;if(ee?fe=ee[1]?window.atob(ee[2]):decodeURIComponent(ee[2]):h.includes("{$.current&&k({content:"",element:null,isCached:!1,status:Me.LOADING})},[]);L.useEffect(()=>{if($.current=!0,!fo()||K.current)return()=>{};try{if(R===Me.IDLE){if(!OC())throw new Error("Browser does not support SVG");if(!h)throw new Error("Missing src");D()}}catch(ee){V(ee)}return K.current=!0,()=>{$.current=!1}},[]),L.useEffect(()=>{if(fo()&&I)if(I.src!==h){if(!h){V(new Error("Missing src"));return}D()}else(I.title!==g||I.description!==s)&&M()},[s,M,V,D,I,h,g]),L.useEffect(()=>{z&&(z.status!==Me.LOADING&&R===Me.LOADING&&Z(),z.status!==Me.LOADED&&R===Me.LOADED&&M(),z.status!==Me.READY&&R===Me.READY&&(p==null||p(h,C)))},[Z,M,C,p,z,h,R]);const G=bC(e,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return fo()?S?L.cloneElement(S,{ref:l,...G}):[Me.UNSUPPORTED,Me.FAILED].includes(R)?r:u:u}function ec(e){Yr||(Yr=new AC);const{loader:t}=e,r=L.useRef(!1),[s,o]=L.useState(Yr.isReady);return L.useEffect(()=>{r.current||(Yr.onReady(()=>{o(!0)}),r.current=!0)},[]),s?ie.createElement(DC,{...e}):t}const tc=({className:e,src:t,alt:r})=>t!=null&&t.toLowerCase().includes(".svg")?w.jsx(ec,{src:t,className:e}):w.jsx("img",{src:t,alt:r,className:e});var nc={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */var xg;function IC(){return xg||(xg=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var l="",u=0;u{const e=P(s=>s.data),r=(P(s=>s.filtersOpened)||e.settings.filtersAlwaysVisible)&&e.filters&&e.filters.length>0;return w.jsxs("div",{className:Xe("mapplic-search-filter",{opened:r}),children:[w.jsx($C,{}),w.jsx(Dt,{initial:!1,children:r&&w.jsx(HC,{})})]})},$C=()=>{const e=P(g=>g.data.settings),t=P(g=>g.data.filters),r=P(g=>g.toggleFilters),s=P(g=>g.toggleSidebar),o=P(g=>g.setSearch),l=P(g=>g.filtersOpened),u=P(ao),f=P(g=>g.sidebarClosed),p=P(g=>{var y;return(y=g.filters)==null?void 0:y.search}),h=It();return w.jsxs("div",{className:"mapplic-search-bar",children:[w.jsxs("label",{className:"mapplic-search",children:[w.jsx(Iu,{size:16}),w.jsx("input",{type:"text",placeholder:h("Search"),spellCheck:!1,onFocus:()=>{f&&s(!0)},onChange:g=>o(g.target.value),value:p||""}),p&&w.jsx("button",{type:"button",onClick:()=>o(""),children:w.jsx(dr,{size:12})})]}),w.jsx(WC,{value:!l,active:!!(t!=null&&t.length)&&!e.filtersAlwaysVisible,children:w.jsxs("button",{"aria-label":h("Toggle filters"),"aria-pressed":l,type:"button",onClick:()=>r(),children:[w.jsx(zu,{size:16}),w.jsx(UC,{nr:u})]})})]})},WC=({children:e,value:t,active:r})=>r?w.jsxs("div",{className:"mapplic-switch",children:[t&&w.jsx("div",{className:"mapplic-switch-background"}),e]}):null,UC=({nr:e})=>{if(!(e<1))return w.jsx("small",{className:"mapplic-count",children:e})},HC=()=>{const e=P(s=>s.data.filters),t=P(s=>{var o;return(o=s.filters)==null?void 0:o.search}),r=P(ao);return e?w.jsxs(Ne.div,{className:"mapplic-filters",...Tn,children:[w.jsx("div",{className:"mapplic-filters-body",children:e.map(s=>w.jsx(KC,{f:s},s.id))}),w.jsx(Dt,{initial:!1,children:(r>0||t)&&w.jsx(YC,{})})]},"filters"):null},YC=()=>{const e=P(og),t=P(o=>o.clearFilters),r=P(o=>o.toggleFilters),s=It();return w.jsx(Ne.div,{...Tn,children:w.jsxs("div",{className:"mapplic-filters-footer",children:[w.jsxs("button",{className:"mapplic-filters-count",onClick:()=>r(!1),children:[w.jsx("b",{children:e.length})," ",s("results"),w.jsx(Zl,{size:12})]}),w.jsxs("button",{className:"mapplic-filters-clear",type:"button",onClick:t,children:[s("Clear"),w.jsx(dr,{size:12})]})]})})},Sg=["#",...Array.from({length:26},(e,t)=>String.fromCharCode(65+t))],KC=({f:e})=>{var u,f;const t=P(p=>p.filters),r=P(p=>p.setFilter),s=P(oC),o=P(p=>p.data.groups)??[],l=yr();if(!e.disable)switch(e.type){case"tags":return w.jsx(rc,{filter:e,list:o,renderItem:(p,h,g)=>{var y;return w.jsx(QC,{index:h,length:o.length,text:l(p,"title")||p.name,group:p,disableClick:g,count:(y=s==null?void 0:s.groups)==null?void 0:y[p.name],single:e.single,active:Array.isArray(t==null?void 0:t.group)&&(t==null?void 0:t.group.includes(p.name))},p.name)}});case"alphabetic":return w.jsx(rc,{filter:e,list:Sg,gap:2,renderItem:(p,h,g)=>{var y;return w.jsx(XC,{index:h,length:Sg.length,text:p,onClick:g?()=>{}:()=>{r("alphabetic",(t==null?void 0:t.alphabetic)===p?void 0:p)},count:(y=s==null?void 0:s.alphabetic)==null?void 0:y[p],active:(t==null?void 0:t.alphabetic)===p},p)}});case"checkbox":return w.jsx(GC,{id:e==null?void 0:e.id,text:l(e,"name"),checked:!!(t!=null&&t[e.id])||!1,onChange:()=>r(e.id,!(t!=null&&t[e.id]))});case"dropdown":return w.jsx("label",{className:"mapplic-dropdown-filter","data-filter":e==null?void 0:e.id,children:w.jsx("select",{value:t==null?void 0:t[e.id],onChange:p=>r(e.id,p.target.value),children:(u=e.value)==null?void 0:u.split(";").map(p=>{const h=p.split(":");return w.jsx("option",{value:h[0],children:h[1]},p)})})});case"toggle":return w.jsx(rc,{filter:e,list:(f=e.value)==null?void 0:f.split(";").map(p=>{const[h,g]=p.split(":");return{value:h,text:g}}),renderItem:(p,h,g)=>{var y;return w.jsx(ZC,{index:h,length:((y=e.value)==null?void 0:y.split(";").length)??0,text:p.text,disableClick:g,onClick:()=>r(e.id,p.value),active:!(t!=null&&t[e.id])&&p.value===""||(t==null?void 0:t[e.id])===p.value},p.value+p.text)}});default:return null}},qC=e=>"key"in e,GC=({id:e,text:t,checked:r,onChange:s})=>{const o=l=>{(qC(l)&&(l.key==="Enter"||l.key==" ")||l.type==="click")&&(l.preventDefault(),s(!r))};return w.jsxs("label",{className:"mapplic-toggle","data-filter":e,tabIndex:0,onKeyDown:o,onClick:o,"aria-pressed":r,role:"checkbox",children:[w.jsx("span",{children:t}),w.jsxs("div",{className:"mapplic-toggle-switch",children:[w.jsx("input",{type:"checkbox",checked:r,readOnly:!0}),w.jsx("span",{})]})]})},rc=({filter:e,list:t,gap:r="4px",renderItem:s})=>{const o=yr(),[l,u]=L.useState({left:0,right:0}),[f,p]=L.useState(!1),[h,g]=L.useState(e.inline),y=L.useRef(null),v=L.useRef(null),k=e.toggleLayout?"button":"div",b=e.toggleLayout&&e.showName?h:e.inline;return L.useEffect(()=>{const S=()=>{if(y.current&&v.current){const C=y.current.offsetWidth,R=v.current.scrollWidth;u({left:-(R-C),right:0})}};return S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[t,b]),w.jsxs("div",{className:"mapplic-chip-filter",children:[e.showName&&w.jsxs(k,{className:"mapplic-filter-name",type:"button",onClick:e.toggleLayout?()=>g(!b):void 0,children:[o(e,"name"),e.toggleLayout&&w.jsx(Ne.div,{animate:{rotate:b?0:90},initial:!1,transition:{duration:.2},children:w.jsx(nu,{size:12})})]}),w.jsx("div",{ref:y,style:{width:"100%",overflow:"hidden"},children:w.jsx(Ne.div,{drag:b?"x":!1,animate:{x:b?void 0:0},transition:{type:"spring",duration:.3,bounce:0},ref:v,dragConstraints:l,"data-filter":e==null?void 0:e.id,style:{flexWrap:b?"nowrap":"wrap",gap:r},whileTap:{cursor:"grabbing"},onDragStart:()=>p(!0),onDragEnd:()=>setTimeout(()=>p(!1),50),className:"mapplic-chips",tabIndex:-1,children:w.jsx(Dt,{mode:"popLayout",initial:!1,children:t&&t.filter(S=>{if(typeof S=="object"&&S!==null&&"hide"in S&&"name"in S){const C=S;return!C.hide&&(!Array.isArray(e.include)||e.include.includes(C.name))}return!0}).map((S,C)=>s(S,C,f))})})})]})},po=.2,ic={hidden:([e,t])=>({opacity:0,scale:.8,transition:{duration:.2,delay:t>1?Math.min(e*(po/(t-1)),po):0}}),visible:([e,t])=>({opacity:1,scale:1,transition:{duration:.2,delay:t>1?Math.min(e*(po/(t-1)),po):0}}),exit:{opacity:0,scale:.8,transition:{duration:.2}}},XC=L.forwardRef(({text:e,color:t,onClick:r,index:s,length:o,active:l,count:u},f)=>w.jsx(Ne.button,{ref:f,layout:!0,initial:"hidden",animate:"visible",exit:"exit",variants:ic,custom:[s,o],"aria-pressed":l,className:Xe("mapplic-az-item",{"mapplic-active":l}),style:t?{"--mapplic-chip-color":t}:void 0,onClick:()=>r(l),disabled:!u,type:"button",children:w.jsx("span",{children:e})})),QC=L.forwardRef(({text:e,group:t,disableClick:r,index:s,length:o,active:l,count:u,single:f},p)=>{const h=P(k=>k.toggleGroup),y=P(Wi)(t,"color"),v=L.useCallback(()=>{r||h(t,l,!!f)},[r,h,t,l,f]);return w.jsxs(Ne.button,{ref:p,layout:!0,disabled:!u,initial:"hidden",animate:"visible",exit:"exit",variants:ic,custom:[s,o],"aria-pressed":l,className:Xe("mapplic-chip",{"mapplic-active":l}),style:y?{"--mapplic-chip-color":y}:void 0,onClick:v,type:"button",children:[t.icon&&w.jsx(tc,{src:t.icon,alt:e}),w.jsx("span",{children:e})]})}),ZC=L.forwardRef(({text:e,disableClick:t,index:r,length:s,active:o,onClick:l},u)=>w.jsx(Ne.button,{ref:u,layout:!0,initial:"hidden",animate:"visible",exit:"exit",variants:ic,custom:[r,s],"aria-pressed":o,className:Xe("mapplic-chip",{"mapplic-active":o}),onClick:t?void 0:l,type:"button",children:w.jsx("span",{children:e})})),eL="modulepreload",tL=function(e,t){return new URL(e,t).href},nL={},ho=function(t,r,s){let o=Promise.resolve();function l(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})},kg=e=>{const[t,r]=L.useState(!1);return w.jsx("img",{...e,onLoad:s=>{var o;(o=e.onLoad)==null||o.call(e,s),r(!0)},style:{...e.style,opacity:t?1:0,transition:"opacity 200ms ease-out"}})},Eg=({location:e,size:t="base",initial:r=!0})=>{const s=P(l=>l.data.settings.imageAsThumb),o=()=>{var l;return s&&e.image?w.jsx(kg,{src:e.image,alt:""}):e.thumb?e.thumb.length<=3?w.jsx("span",{children:e.thumb.toUpperCase()}):w.jsx(kg,{src:e.thumb,alt:""}):w.jsx("span",{children:r?(l=e.title)==null?void 0:l.charAt(0):e==null?void 0:e.title})};return w.jsx("div",{className:`mapplic-thumbnail ${t}`,children:o()})},sc=({location:e,size:t="base",thumb:r=!1,about:s=!1})=>{const o=yr(),l=t==="base"?"h4":"span",u=t==="base"?"h5":"span",f=s&&e.about&&t!=="sm";return w.jsxs("div",{className:Xe("mapplic-snap",t,{"has-thumb":r}),children:[r&&w.jsx(Eg,{location:e,size:f?"base":"sm"}),w.jsxs("div",{className:"mapplic-snap-content",children:[w.jsx(l,{className:"mapplic-location-title",tabIndex:-1,children:o(e,"title")}),f&&w.jsx(u,{className:"mapplic-location-about",dangerouslySetInnerHTML:{__html:o(e,"about")||""}})]})]})},vr=(e,t,r)=>{for(let s=0;sString(o))=>{for(const o of r){const l=vr(e,t,s(o));if(l)return{newIndex:l.newIndex,parsed:o}}},oc=(e,t,r,s)=>{const o=[];let l=r(e,t);for(;l!==void 0&&t{const t=oc(e,0,n2,t2);if(!(t!=null&&t.parsed.length)||t.newIndex!==e.length)throw new Error("Cannot parse input");return t.parsed},t2=(e,t)=>{if(e[t]!==";")return;let r=t+1;for(;e.length>r&&e[r]===" ";)r++;return{parsed:void 0,newIndex:r}},n2=(e,t)=>{const r=i2(e,t);if(!r)return;const s=vr(e,r.newIndex," ");let o;return s&&(o=r2(e,s.newIndex)),{newIndex:(o==null?void 0:o.newIndex)??r.newIndex,parsed:{selectorSequence:r.parsed,ruleModifier:o==null?void 0:o.parsed}}},r2=(e,t)=>Tg(e,t,JC),i2=(e,t)=>{const r=s2(e,t);return r||o2(e,t)},s2=(e,t)=>{const r=a2(e,t),s=(r==null?void 0:r.newIndex)??t,o=vr(e,s," "),l=u2(e,(o==null?void 0:o.newIndex)??t);if(!(!r&&!l))return{newIndex:(l==null?void 0:l.newIndex)??(r==null?void 0:r.newIndex)??t,parsed:{weekdaySelector:r==null?void 0:r.parsed,timeSelector:l==null?void 0:l.parsed}}},o2=(e,t)=>{if(e.substring(t).startsWith(ac))return{newIndex:t+ac.length,parsed:ac}},a2=(e,t)=>{const r=oc(e,t,l2,",");if(!(r.parsed.length<=0))return{newIndex:r.newIndex,parsed:r.parsed}},l2=(e,t)=>{const r=Cg(e,t);if(!r)return;const s=vr(e,r.newIndex,"-");let o;if(!(s&&(o=Cg(e,s.newIndex),!o)))return{newIndex:(o==null?void 0:o.newIndex)??r.newIndex,parsed:{day:r.parsed,until:o==null?void 0:o.parsed}}},Cg=(e,t)=>Tg(e,t,gn),u2=(e,t)=>{const r=oc(e,t,c2,",");if(r.parsed.length)return r},c2=(e,t)=>{const r=Pg(e,t);if(!r)return;const s=vr(e,r.newIndex,"-");if(!s)return;const o=Pg(e,s.newIndex);if(o)return{newIndex:o.newIndex,parsed:{from:r.parsed,to:o.parsed}}},Pg=(e,t)=>{const r=f2(e,t);if(!r)return;const s=vr(e,r.newIndex,":");if(!s)return;const o=d2(e,s.newIndex);if(o)return{newIndex:o.newIndex,parsed:{hour:r.parsed,minute:o.parsed}}},f2=(e,t)=>{if(/^[0-2][0-9]/.test(e.substring(t))){const r=parseInt(e.substring(t,t+2));if(r<=24)return{newIndex:t+2,parsed:r}}},d2=(e,t)=>{if(/^[0-5][0-9]/.test(e.substring(t))){const r=parseInt(e.substring(t,t+2));if(r<=59)return{newIndex:t+2,parsed:r}}},p2=e=>e.map(t=>[t.day,t.until].filter(Boolean).join("-")).join(","),h2=e=>e.map(Og).join(","),Og=e=>`${lc(e.from)}-${lc(e.to)}`,lc=e=>`${bg(e.hour)}:${bg(e.minute)}`,bg=e=>String(e).padStart(2,"0"),jg=e=>{if(e.length!==1)return!1;const t=e[0];if(t.selectorSequence==="24/7")return!0;if(t.selectorSequence.timeSelector!==void 0){const r=h2(t.selectorSequence.timeSelector);if(r!=="00:00-23:59"&&r!=="00:00-24:00"&&r!=="00:00-00:00")return!1}if(t.selectorSequence.weekdaySelector!==void 0){const r=p2(t.selectorSequence.weekdaySelector);if(r!=="Mo-Su"&&r!=="Mo Tu We Th Fr Sa Su")return!1}return!0};function m2(e,t){const r=w2(t);return"formatToParts"in r?y2(r,e):v2(r,e)}const g2={year:0,month:1,day:2,hour:3,minute:4,second:5};function y2(e,t){try{const r=e.formatToParts(t),s=[];for(let o=0;o=0?l:1e3+l,s-o}function E2(e,t,r){let o=e.getTime()-t;const l=pc(new Date(o),r);if(t===l)return t;o-=l-t;const u=pc(new Date(o),r);return l===u?l:Math.max(l,u)}function Ag(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const _g={};function T2(e){if(_g[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),_g[e]=!0,!0}catch{return!1}}function Mg(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const Dg=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,hc=36e5,Ig=6e4,C2=2,St={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Dg};function mc(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const r=t.additionalDigits==null?C2:Number(t.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const s=P2(e),{year:o,restDateString:l}=O2(s.date,r),u=b2(l,o);if(u===null||isNaN(u.getTime()))return new Date(NaN);if(u){const f=u.getTime();let p=0,h;if(s.time&&(p=j2(s.time),p===null||isNaN(p)))return new Date(NaN);if(s.timeZone||t.timeZone){if(h=dc(s.timeZone||t.timeZone,new Date(f+p)),isNaN(h))return new Date(NaN)}else h=Mg(new Date(f+p)),h=Mg(new Date(f+p+h));return new Date(f+p+h)}else return new Date(NaN)}function P2(e){const t={};let r=St.dateTimePattern.exec(e),s;if(r?(t.date=r[1],s=r[3]):(r=St.datePattern.exec(e),r?(t.date=r[1],s=r[2]):(t.date=null,s=e)),s){const o=St.timeZone.exec(s);o?(t.time=s.replace(o[1],""),t.timeZone=o[1].trim()):t.time=s}return t}function O2(e,t){if(e){const r=St.YYY[t],s=St.YYYYY[t];let o=St.YYYY.exec(e)||s.exec(e);if(o){const l=o[1];return{year:parseInt(l,10),restDateString:e.slice(l.length)}}if(o=St.YY.exec(e)||r.exec(e),o){const l=o[1];return{year:parseInt(l,10)*100,restDateString:e.slice(l.length)}}}return{year:null}}function b2(e,t){if(t===null)return null;let r,s,o;if(!e||!e.length)return r=new Date(0),r.setUTCFullYear(t),r;let l=St.MM.exec(e);if(l)return r=new Date(0),s=parseInt(l[1],10)-1,Fg(t,s)?(r.setUTCFullYear(t,s),r):new Date(NaN);if(l=St.DDD.exec(e),l){r=new Date(0);const u=parseInt(l[1],10);return A2(t,u)?(r.setUTCFullYear(t,0,u),r):new Date(NaN)}if(l=St.MMDD.exec(e),l){r=new Date(0),s=parseInt(l[1],10)-1;const u=parseInt(l[2],10);return Fg(t,s,u)?(r.setUTCFullYear(t,s,u),r):new Date(NaN)}if(l=St.Www.exec(e),l)return o=parseInt(l[1],10)-1,Vg(o)?Ng(t,o):new Date(NaN);if(l=St.WwwD.exec(e),l){o=parseInt(l[1],10)-1;const u=parseInt(l[2],10)-1;return Vg(o,u)?Ng(t,o,u):new Date(NaN)}return null}function j2(e){let t,r,s=St.HH.exec(e);if(s)return t=parseFloat(s[1].replace(",",".")),gc(t)?t%24*hc:NaN;if(s=St.HHMM.exec(e),s)return t=parseInt(s[1],10),r=parseFloat(s[2].replace(",",".")),gc(t,r)?t%24*hc+r*Ig:NaN;if(s=St.HHMMSS.exec(e),s){t=parseInt(s[1],10),r=parseInt(s[2],10);const o=parseFloat(s[3].replace(",","."));return gc(t,r,o)?t%24*hc+r*Ig+o*1e3:NaN}return null}function Ng(e,t,r){t=t||0,r=r||0;const s=new Date(0);s.setUTCFullYear(e,0,4);const o=s.getUTCDay()||7,l=t*7+r+1-o;return s.setUTCDate(s.getUTCDate()+l),s}const L2=[31,28,31,30,31,30,31,31,30,31,30,31],R2=[31,29,31,30,31,30,31,31,30,31,30,31];function zg(e){return e%400===0||e%4===0&&e%100!==0}function Fg(e,t,r){if(t<0||t>11)return!1;if(r!=null){if(r<1)return!1;const s=zg(e);if(s&&r>R2[t]||!s&&r>L2[t])return!1}return!0}function A2(e,t){if(t<1)return!1;const r=zg(e);return!(r&&t>366||!r&&t>365)}function Vg(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function gc(e,t,r){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||r!=null&&(r<0||r>=60))}function Kr(e,t,r){e=mc(e,r);const s=dc(t,e,!0),o=new Date(e.getTime()-s),l=new Date(0);return l.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),l.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),l}function _2(e,t,r){if(typeof e=="string"&&!e.match(Dg))return mc(e,{...r,timeZone:t});e=mc(e,r);const s=cc(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),o=dc(t,new Date(s));return new Date(s+o)}const M2=(e,t,r,s=60*60*1e3,o=60*60*1e3)=>{const u=D2(e,t,r).map((y,v)=>({index:v,status:y})),f=u.find(y=>y.status.kind==="active")??u.find(y=>y.status.kind==="inactive"&&y.status.isActiveToday),p=u.sort((y,v)=>Wg(y.status,v.status)).find(y=>y.status.type==="open"),h=p?e[p.index]:void 0;return{liveStatus:h&&p?I2(h,t,p.status,s,o,r):{status:"closed"},highlightedIndex:f==null?void 0:f.index}},D2=(e,t,r)=>{let s;const o=[];for(let l=e.length-1;l>=0;l--){const u=e[l],f=!u.ruleModifier||u.ruleModifier==="open"?"open":"closed",p={...N2(u,t,r,s),type:f};o.unshift(p),s===void 0&&p.kind==="active"&&(s=p)}return o},I2=(e,t,r,s,o,l)=>{if(r.type==="open"&&r.kind==="active"){if(e.selectorSequence==="24/7")return{status:"open"};if(r.msUntilInactive===1/0)return{status:"open"};{const u=new Date(l.getTime()+r.msUntilInactive),f=Kr(u,t),p=Kr(l,t);return{status:r.msUntilInactive>o?"open":"closing",statusChangeAt:{time:{hour:f.getHours(),minute:f.getMinutes()},...f.getDay()!=p.getDay()&&{day:$g[f.getDay()]}}}}}else if(r.type==="open"&&r.kind==="inactive"){if(r.msUntilActive===1/0)return{status:"closed"};{const u=new Date(l.getTime()+r.msUntilActive),f=Kr(u,t),p=Kr(l,t);return{status:r.msUntilActive>s?"closed":"opening",statusChangeAt:{time:{hour:f.getHours(),minute:f.getMinutes()},...f.getDay()!=p.getDay()&&{day:$g[f.getDay()]}}}}}return{status:"closed"}},N2=(e,t,r,s)=>e.selectorSequence==="24/7"?s?{kind:"inactive",isActiveToday:!0,msUntilActive:s.msUntilInactive}:{kind:"active",msUntilInactive:1/0}:z2(e.selectorSequence,t,r,s),z2=(e,t,r,s)=>{const[o,l]=F2(e,t,r,s);return B2(o,r,l)},F2=(e,t,r,s)=>{const o=new Date(r);s?o.setTime(o.getTime()+s.msUntilInactive):o.setDate(o.getDate()-1);const l=new Date(o);l.setDate(o.getDate()+(e.weekdaySelector?8:2));const u=[];let f=!1;const p=new Date(o),h=e.timeSelector??[{from:{hour:0,minute:0},to:{hour:0,minute:0}}];for(;p<=l;){if(!e.weekdaySelector||e.weekdaySelector.some(g=>V2(p,g,t))){f=f||p.getDate()===r.getDate();const g=h.map(y=>U2(y,t,p));if(u.push(...g),!e.timeSelector&&u.length>1){const[y,v]=u[u.length-2],[k,b]=u[u.length-1];v.getTime()===k.getTime()&&u.splice(u.length-2,2,[y,b])}}p.setDate(p.getDate()+1)}return[u,f]},Bg={Mo:1,Tu:2,We:3,Th:4,Fr:5,Sa:6,Su:0},$g={1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa",0:"Su"},V2=(e,t,r)=>{const o=Kr(e,r).getDay(),l=Bg[t.day];if(!t.until)return o===l;const u=Bg[t.until];return l<=u?o>=l&&o<=u:o>=l||o<=u},B2=(e,t,r)=>{const o=e.filter(([,l])=>l.getTime()>t.getTime()).map(l=>$2(l,t,r));return o.length?o.reduce(W2):{kind:"inactive",isActiveToday:!1,msUntilActive:1/0}},$2=(e,t,r)=>{const[s,o]=e,l=s.getTime(),u=o.getTime(),f=t.getTime();return l<=f&&fWg(e,t)<=0?e:t,Wg=(e,t)=>e.kind==="active"&&t.kind==="inactive"?-1:e.kind==="inactive"&&t.kind==="active"?1:e.kind==="active"&&t.kind==="active"?t.msUntilInactive-e.msUntilInactive:e.kind==="inactive"&&t.kind==="inactive"?e.msUntilActive-t.msUntilActive:0,U2=(e,t,r)=>{const s=Ug(e.from,t,r),o=Ug(e.to,t,r);return s.getTime()>=o.getTime()&&o.setDate(o.getDate()+1),[s,o]},Ug=(e,t,r)=>{const s=Kr(r,t),o=new Date(s);return o.setHours(e.hour),o.setMinutes(e.minute),o.setSeconds(0),o.setMilliseconds(0),_2(o,t)},Hg=e=>{if(!e.until)return[e.day];const t=gn.indexOf(e.until);let r=gn.indexOf(e.day);const s=[];for(;r!==t;)s.push(gn[r]),r+=1,r%=gn.length;return s.push(gn[t]),s},H2=e=>{const t=gn.map(()=>{});for(const[u,f]of e.entries()){if(f.selectorSequence==="24/7"||!f.selectorSequence.weekdaySelector)return e;for(const p of f.selectorSequence.weekdaySelector)Hg(p).map(h=>{t[gn.indexOf(h)]=u})}t.push(0);let r=-1,s;const o=[];for(const[u,f]of t.entries())if(f===void 0&&s===void 0)s=u,u>0&&(r=t[u-1]??0);else if(f!==void 0&&s!==void 0){const p=u-1;o.push([s,p,r]),s=void 0}const l=[...e];for(const[u,f,p]of o.reverse()){const g={selectorSequence:{weekdaySelector:[{day:gn[u],...u!==f&&{until:gn[f]}}]},ruleModifier:"closed"};l.splice(p+1,0,g)}return l},Y2=be(e=>{var t;return(t=Ge(e))==null?void 0:t.liveOpeningHours},e=>{var t;return(t=Ge(e))==null?void 0:t.timezone},e=>{var t;return((t=Ge(e))==null?void 0:t.openingNotice)??lo},e=>{var t;return((t=Ge(e))==null?void 0:t.closingNotice)??lo},e=>{var t;return((t=Ge(e))==null?void 0:t.weekStart)??pC},(e,t)=>t,(e,t,r,s,o,l)=>{if(!l)return null;try{const u=e2(l),f=H2(u);if(!(t&&e)){const k=qg(f,o);return{openingHours:Kg(f,k)}}const p=Yg[r??lo],h=Yg[s??lo],g=M2(f,t,new Date,p,h),y=qg(f,o,g),v=g.highlightedIndex&&(g.highlightedIndex+f.length-y)%f.length;return{openingHours:Kg(f,y),liveOpeningHours:{...g,highlightedIndex:v}}}catch{const u=l.split(";").map(f=>f.trim());return u.length===1?u[0]:u}}),Yg={"1h":60*60*1e3,"15m":15*60*1e3,"30m":30*60*1e3},Kg=(e,t)=>[...e.slice(t),...e.slice(0,t)],qg=(e,t,r)=>{if(t==="dynamic"&&(r!=null&&r.highlightedIndex))return r.highlightedIndex;if(t!=="dynamic"){const s=t==="monday"?"Mo":"Su",o=e.findIndex(l=>{var u;return l.selectorSequence!=="24/7"&&((u=l.selectorSequence.weekdaySelector)==null?void 0:u.some(f=>Hg(f).includes(s)))});return o!==-1?o:0}return 0},K2={open:["Open","until"],opening:["Opening","at"],closed:["Closed","until"],closing:["Closing","at"]},q2={open:void 0,closed:"Closed",off:"Closed"},G2=({openingHours:e,fixed:t=!1,active:r,onToggle:s})=>{const o=typeof e=="string",l=r||t,u=!o&&!t,f=()=>{var h;const p=(h=window.getSelection)==null?void 0:h.call(window);return p?p.type==="Range"&&p.toString().trim().length>0:!1};return w.jsx("div",{role:u?"button":void 0,tabIndex:u?0:-1,"aria-expanded":u?l:void 0,className:Xe("mapplic-opening-hours",{active:l}),onKeyDown:p=>{u&&(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),s())},onClickCapture:p=>{if(u){if(f()){p.preventDefault(),p.stopPropagation();return}s()}},children:w.jsx(Dt,{initial:!1,children:l?w.jsx(Ne.div,{style:{overflow:"hidden"},...Tn,children:w.jsx(X2,{openingHours:e})},"content"):w.jsx(Ne.div,{style:{overflow:"hidden"},...Tn,children:w.jsx(Q2,{openingHours:e})},"caption")})})},X2=({openingHours:e})=>typeof e=="string"?e:Array.isArray(e)?e.map((t,r)=>w.jsx("div",{children:t},r)):w.jsx(J2,{liveOpeningHours:e.liveOpeningHours,openingHours:e.openingHours}),Q2=({openingHours:e})=>{const t=It();if(e&&!Array.isArray(e)&&typeof e!="string"&&e.liveOpeningHours)return w.jsx(Z2,{openingHours:e.openingHours,liveOpeningHours:e.liveOpeningHours});const r=typeof e=="string"?e:t("Hours");return w.jsxs("div",{className:"mapplic-opening-hours-indicator",children:[w.jsx(Qs,{size:12}),w.jsx("span",{children:r})]})},yc=({status:e})=>e?w.jsx("span",{className:Xe("mapplic-opening-status-dot",e)}):null,Z2=({liveOpeningHours:e,openingHours:t,type:r="row"})=>{const s=It(),[o,l]=K2[e.liveStatus.status];let u=!1,f=null;if(r==="row")if(jg(t))f=s("24/7");else{const p=e.liveStatus.statusChangeAt;p&&(u=!0,f=`${p.day?`${p.day} `:""}${lc(p.time)}`)}return w.jsxs("div",{className:"mapplic-opening-status-indicator",children:[w.jsxs("div",{className:Xe("mapplic-opening-status-tag",e.liveStatus.status),children:[w.jsx(yc,{status:e.liveStatus.status}),r!=="dot"&&w.jsx("span",{children:s(o)})]}),r==="row"&&f&&w.jsxs(w.Fragment,{children:[u&&` ${s(l)} `,w.jsx("span",{style:{fontWeight:"bold"},children:f})]})]})},J2=({liveOpeningHours:e,openingHours:t})=>w.jsx("dl",{className:"mapplic-opening-hours-table",children:t.map((r,s)=>{const o=s===(e==null?void 0:e.highlightedIndex)?e.liveStatus.status:void 0;return w.jsx(eP,{rule:r,status:o},s)})}),eP=({rule:e,status:t})=>{const r=It(),s=u=>{var f,p;if(jg([u])||u.selectorSequence==="24/7")return[`${r("Mo")}-${r("Su")}`,r("Open")];{const h=(f=u.selectorSequence.timeSelector)==null?void 0:f.reduce((y,v)=>(y&&(y+=", "),y+=Og(v),y),"");return[((p=u.selectorSequence.weekdaySelector)==null?void 0:p.reduce((y,v)=>(y&&(y+=", "),y+=r(v.day),v.until&&(y+=`-${r(v.until)}`),y),""))??`${r("Mo")}-${r("Su")}`,h||u.ruleModifier&&q2[u.ruleModifier]||"00:00-24:00"]}},[o,l]=s(e);return w.jsxs(w.Fragment,{children:[w.jsxs("dt",{className:Xe(t,{today:t}),children:[t&&w.jsx(yc,{status:t}),w.jsx("span",{children:o})]}),w.jsx("dd",{children:l.split(", ").map((u,f)=>w.jsx("div",{children:u},f))})]})},vc=({children:e,transition:t=zC})=>{const r=P(s=>Ge(s).animations??"full");return w.jsx(ZS,{...r==="full"?t:VC,children:e})},tP=ie.lazy(()=>ho(()=>Promise.resolve().then(()=>MO),void 0,ot&&ot.tagName.toUpperCase()==="SCRIPT"&&ot.src||new URL("mapplic.js",document.baseURI).href)),Gg=({location:e})=>{const t=P(V=>V.data.settings),r=P(V=>V.closeLocation),s=P(V=>V.clearFilters),o=P(V=>V.setSearch),l=P(V=>V.popFocus),u=P(V=>V.initLocation),f=P(V=>V.initLocationResolved),p=P(V=>Y2(V,e.hours)),h=P(V=>V.hasRoute),g=P(V=>V.data.settings.wayfindingFixedFrom),[y,v]=L.useState(!1),k=L.useRef(null);P(qT);const b=It(),S=yr();L.useEffect(()=>{var V;return f&&((V=k.current)==null||V.focus()),()=>{l()}},[]);const C=()=>{v(V=>V==="hours"?!1:"hours")},R=()=>{v(!1)},I=h(e.id)&&e.id!==g,z=t.hoursDisplay??dC,H=!!(e.link||e.hours&&z==="button"||e.phone||e.email||e.facebook||e.instagram||e.youtube||I),$=!!(e.hours&&z==="inline"||e.desc||y),K=typeof p=="object"&&p!==null&&!Array.isArray(p)&&p.liveOpeningHours?p.liveOpeningHours.liveStatus.status:void 0;return w.jsxs(w.Fragment,{children:[e.image&&w.jsx("div",{className:"mapplic-popup-image",children:w.jsx("img",{src:e.image,alt:e==null?void 0:e.title},e.image)}),w.jsxs("div",{role:"dialog",className:"mapplic-popup-content",tabIndex:-1,ref:k,children:[w.jsx(sc,{location:e,about:!0}),w.jsx("button",{type:"button","aria-label":"Close",className:"mapplic-popup-close",onClick:()=>r(),children:w.jsx(dr,{size:12,"aria-hidden":"true",focusable:"false"})}),Array.isArray(e.tags)&&e.tags.length>0&&w.jsx("div",{className:"mapplic-popup-tags",children:e.tags.map(V=>w.jsx("button",{type:"button",onClick:()=>{s(),o(V)},children:V},V))}),($||H)&&w.jsx(vc,{transition:FC,children:w.jsx("div",{className:"mapplic-popup-body",children:w.jsxs(Dt,{initial:!1,children:[p!==null&&(z==="inline"||y==="hours")&&w.jsx(Ne.div,{...Tn,children:w.jsx(G2,{openingHours:p,fixed:z==="button"&&y==="hours",active:y==="hours",onToggle:C})},"hours"),e.desc&&w.jsx(nP,{collapsed:!!y,content:S(e,"desc")||"",onToggle:R}),y==="phone"&&w.jsx(Ne.div,{...Tn,children:w.jsx("div",{className:"mapplic-popup-detail",children:w.jsx(Xg,{content:e.phone,prefix:"tel:"})})},"phone"),y==="email"&&w.jsx(Ne.div,{...Tn,children:w.jsx("div",{className:"mapplic-popup-detail",children:w.jsx(Xg,{content:e.email,prefix:"mailto:"})})},"email")]})})}),H&&w.jsxs("div",{className:"mapplic-popup-footer",children:[w.jsxs("div",{className:"mapplic-popup-actions",children:[t.wayfinding&&I&&w.jsx(L.Suspense,{fallback:null,children:w.jsx(tP,{id:e.id})}),w.jsx(wc,{location:e,field:"phone",details:y,setDetails:v,children:w.jsx(Lu,{size:16})}),w.jsx(wc,{location:e,field:"email",details:y,setDetails:v,children:w.jsx(yu,{size:16})}),z==="button"&&w.jsxs(wc,{location:e,field:"hours",details:y,setDetails:v,children:[w.jsx(yc,{status:K}),w.jsx(Qs,{size:16})]}),w.jsx(xc,{location:e,field:"facebook",children:w.jsx(fu,{size:16})}),w.jsx(xc,{location:e,field:"instagram",children:w.jsx(pu,{size:16})}),w.jsx(xc,{location:e,field:"youtube",children:w.jsx(Bu,{size:16})}),e.gmaps&&w.jsx("a",{href:e.gmaps,className:"mapplic-button mapplic-button-icon",target:"_blank",rel:"noreferrer",children:w.jsx(xu,{size:16})})]}),e.link&&(e.id!==u||t.enableAllLinks)&&w.jsxs("a",{href:S(e,"link"),target:e.target||"_blank",style:{...(e==null?void 0:e.color)&&{backgroundColor:e==null?void 0:e.color}},className:"mapplic-popup-link mapplic-button primary",rel:"noreferrer",children:[w.jsx("span",{children:S(e,"more")||b("More")}),w.jsx(iu,{size:16})]})]})]})]})},nP=({content:e,collapsed:t,onToggle:r})=>{const s=t?bT(e):"";return w.jsx("div",{role:t?"button":void 0,tabIndex:t?-1:0,"aria-expanded":t?void 0:"true",onKeyDown:o=>{t&&(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r())},onClickCapture:o=>{t&&(o.preventDefault(),o.stopPropagation(),r())},children:w.jsx(Dt,{initial:!1,children:t?w.jsx(Ne.div,{className:"mapplic-popup-desc collapsed",style:{overflow:"hidden"},...Tn,children:s},"desc-collapsed"):w.jsx(Ne.div,{className:"mapplic-popup-desc",dangerouslySetInnerHTML:{__html:e},style:{overflow:"hidden"},...Tn},"desc")})})},Xg=({content:e,prefix:t="",...r})=>e==null?void 0:e.split(",").map(s=>w.jsx("a",{href:`${t}${s.trim()}`,...r,children:s.trim()},s)),xc=({location:e,field:t,children:r})=>{const s=e[t];return s?w.jsx("a",{href:s,className:`mapplic-button mapplic-button-icon mapplic-action-${t}`,target:"_blank",rel:"noreferrer",children:r}):null},wc=({location:e,field:t,details:r,setDetails:s,children:o})=>e[t]?w.jsx("button",{className:Xe(`mapplic-button mapplic-button-icon mapplic-action-${t}`,{"mapplic-active":r===t}),onClick:()=>s(l=>l===t?!1:t),children:o}):null,rP=({location:e,...t})=>{const r=P(Jm(e.id)),s=P(g=>g.setHovered),o=P(Zm(e.id)),l=P(g=>g.openLocation),u=P(g=>g.breakpoint),f=P(g=>g.pushFocus),p=`dir:${e.id}`,h=g=>{g.preventDefault(),l(e.id),f(p)};return w.jsx("li",{"data-location":e.id,"data-group":e==null?void 0:e.group,children:w.jsx("button",{...t,id:p,type:"button",className:Xe("mapplic-dir-item",`mapplic-${u==null?void 0:u.type}-item`,{"mapplic-highlight":r,"mapplic-active":o}),onClick:h,onMouseEnter:()=>s(e.id),onTouchStart:()=>s(e.id),onMouseLeave:()=>s(!1),onTouchEnd:()=>s(!1),children:w.jsx(iP,{location:e,type:u==null?void 0:u.type})})})},iP=({location:e,type:t="list"})=>{const r=P(u=>{var f;return(f=u.data.settings.showThumbIn)==null?void 0:f.includes("directory")}),s=P(u=>{var f;return(f=u.filters)==null?void 0:f.search}),o=yr(),l=u=>s?u==null?void 0:u.replace(new RegExp(s,"gi"),f=>`${f}`):u;return w.jsxs(w.Fragment,{children:[r&&w.jsx(Eg,{location:e,initial:t!=="grid"}),w.jsxs("div",{className:"mapplic-item-body",children:[w.jsx("h3",{dangerouslySetInnerHTML:{__html:l(o(e,"title"))||""}}),(e==null?void 0:e.about)&&w.jsx("h4",{dangerouslySetInnerHTML:{__html:o(e,"about")||""}})]})]})},sP={initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2}},Sc=({locations:e,groupId:t,group:r})=>{const s=P(b=>b.breakpoint),o=P(b=>{var S;return(S=b.data.settings)==null?void 0:S.directoryCounts}),l=P(b=>{var S;return(S=b.data.settings)==null?void 0:S.collapsibleGroups}),u=P(gr),f=It(),[p,h]=L.useState(!0);if(e.length<1)return null;const g=!!r,v=(g?r.title??r.name:t??"")||void 0,k=l?"button":"div";return w.jsxs("div",{className:"mapplic-dir-group","aria-label":v,children:[t&&w.jsxs(k,{className:"mapplic-dir-group-title",...l&&{type:"button",onClick:()=>{h(b=>!b)}},children:[g?w.jsxs("div",{className:"mapplic-chip",style:r!=null&&r.color?{"--mapplic-chip-color":r.color}:void 0,children:[(r==null?void 0:r.icon)&&w.jsx(tc,{src:r.icon,alt:r.name}),w.jsx("span",{children:r.title??r.name})]}):t,w.jsxs("div",{className:"mapplic-dir-group-title-info",children:[o&&w.jsx("span",{className:"mapplic-dir-group-count",children:e.length}),l&&w.jsx(ou,{size:16,className:p?"opened":void 0})]})]}),w.jsx(Dt,{initial:!1,children:(p||!l)&&w.jsx(Ne.ul,{"aria-label":f("Location list"),className:Xe("mapplic-dir-items",s&&`mapplic-${s==null?void 0:s.type}-items`),style:{gridTemplateColumns:s!=null&&s.column?`repeat(${s.column}, 1fr)`:"100%"},...sP,children:e.map(b=>w.jsx(rP,{location:u(b)},b.id))})}),w.jsx("div",{className:"mapplic-dir-divider"})]})},oP=()=>{const[e,t]=L.useState(0),r=P(y=>y.data.settings.filters),s=P(y=>y.sidebarClosed),o=P(y=>y.location),l=P(mr),u=P(gr),f=o?l(o):void 0,p=f?u(f):void 0,h=o&&p&&p.action=="sidebar",g={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}};return w.jsx("div",{className:"mapplic-sidebar",children:w.jsx(Dt,{mode:"wait",children:h?w.jsx(Ne.div,{className:"mapplic-sidebar-popup",...g,children:w.jsx(Gg,{location:p})}):w.jsxs(w.Fragment,{children:[r&&w.jsx(vc,{children:w.jsx(BC,{})}),!s&&w.jsx(aP,{scrollPosition:e,setScrollPosition:t})]})})})},aP=({scrollPosition:e,setScrollPosition:t})=>{const r=L.useRef(null),s=P(og),o=L.useCallback(()=>{var u;const l=((u=r.current)==null?void 0:u.scrollTop)??0;t==null||t(l)},[t]);return L.useEffect(()=>{const l=r.current;if(l)return l.scrollTop=e,l.addEventListener("scroll",o,{passive:!0}),()=>{l.removeEventListener("scroll",o)}},[e,o]),w.jsx("div",{className:"mapplic-dir",ref:r,children:w.jsx(cP,{locations:s})})},lP=(e,t,r)=>{if(!e.length)return[];const s=e.reduce((o,l)=>{let u=t(l);return u==null||Array.isArray(u)&&u.length===0?u=[r]:typeof u=="string"&&(u=[u]),u.forEach(f=>{const p=f&&f.trim()!==""?f:r;o[p]=o[p]??[],o[p].push(l)}),o},{});return Object.entries(s).sort(([o],[l])=>o===r?1:l===r?-1:o.localeCompare(l))},uP=(e,t)=>{if(!(t!=null&&t.length))return e;const r=new Map(e),s=t.filter(l=>!l.hide).map(l=>{const u=r.get(l.name);return u!=null&&u.length?[l.name,u]:null}).filter(l=>!!l),o=e.filter(([l])=>!t.some(u=>u.name===l));return[...s,...o]},cP=({locations:e})=>{const t=P(h=>{var g;return(g=h.filters)==null?void 0:g.search}),r=P(h=>h.data.settings.groupBy),s=P(h=>h.data.groups),o=P(ao),l=It();if(e.length<1)return w.jsx("i",{className:"mapplic-empty-message",children:l("No results found.")});if(!(r&&o===0&&!t))return w.jsx(Sc,{locations:e});let f;if(r==="groups"?f=h=>{let g=h.group;return typeof g=="string"&&(g=g.split(",").map(y=>y.trim()).filter(Boolean)),Array.isArray(g)?g.filter(y=>s==null?void 0:s.some(v=>v.name===y)):[]}:r==="alphabetic"&&(f=h=>{var y;const g=(y=h.title)==null?void 0:y.trim().charAt(0).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase();return g?/^[0-9]/.test(g)?"#":g:null}),!f)return w.jsx(Sc,{locations:e});let p=lP(e,f,l("Others"));return r==="groups"&&(p=uP(p,s)),p.map(([h,g])=>{const y=r==="groups"?s==null?void 0:s.find(v=>v.name===h):void 0;return w.jsx(Sc,{locations:g,groupId:h,group:y},h)})},fP=({element:e,...t})=>{const[r,s]=L.useState(!1),o=It(),l=typeof document<"u"&&((document.fullscreenEnabled??!1)||"webkitFullscreenEnabled"in document);L.useEffect(()=>{const f=()=>{s(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",f),()=>document.removeEventListener("fullscreenchange",f)},[]);const u=()=>{var f;r?document.exitFullscreen():(f=e.current)==null||f.requestFullscreen()};return l?w.jsxs("button",{"aria-label":o(r?"Exit fullscreen":"Go fullscreen"),type:"button",onClick:u,...t,children:[!r&&w.jsx(Su,{size:16}),r&&w.jsx(Cu,{size:16})]}):null},dP=()=>{const e=P(p=>p.data.legend),t=P(p=>p.data.settings.legendTitle),r=P(p=>p.data.settings.legendToggle),s=P(p=>p.data.settings.legendClosed),o=P(p=>p.data.settings.legendColumns),l=P(p=>p.legendToggle),[u,f]=L.useState(s);return w.jsxs("div",{className:Xe("mapplic-legend",{closed:u}),children:[w.jsx(Dt,{initial:!1,children:!u&&w.jsxs(Ne.div,{className:"mapplic-legend-panel",initial:{height:0,width:0,opacity:0},animate:{height:"auto",width:"auto",opacity:1},exit:{height:0,width:0,opacity:0},transition:{duration:.2,ease:"easeOut"},children:[w.jsxs("div",{className:"mapplic-legend-content",children:[t&&w.jsx("span",{className:"mapplic-legend-title",children:t}),w.jsx("div",{className:"mapplic-legend-items",style:{paddingRight:r?"24px":0,gridTemplateColumns:o?`repeat(${o}, 1fr)`:"100%"},children:e==null?void 0:e.map(p=>w.jsx(pP,{item:p,active:l==null?void 0:l[p.id]},p.id))})]}),r&&w.jsx("button",{className:"mapplic-button ghost xs mapplic-legend-x",type:"button",onClick:()=>f(!0),children:w.jsx(dr,{size:12})})]},"list")}),u&&w.jsx("button",{className:"mapplic-button mapplic-button-icon",onClick:()=>f(!1),children:w.jsx(mu,{size:16})})]})},pP=({item:e,active:t=!0})=>{var p;const r=yr(),o=P(Wi)(e,"color"),l=P(h=>h.setLegendToggle),u=e.action==="togglecss",f=u?"button":"div";return e.disable?null:w.jsxs(f,{className:Xe("mapplic-legend-item",!t&&"off"),"data-id":e.id,...u&&{type:"button",onClick:()=>{l(e.id,!t)}},children:[w.jsx("div",{className:"mapplic-legend-symbol",style:{backgroundColor:o,color:PT(e.color),borderRadius:e.radius+"px",transform:`scale(${e.scale})`},children:(((p=e.icon)==null?void 0:p.length)??0)>3?w.jsx("img",{src:e.icon,alt:e.id}):e.icon}),w.jsx("span",{children:r(e,"text")})]})},hP=ie.lazy(()=>ho(()=>Promise.resolve().then(()=>YO),void 0,ot&&ot.tagName.toUpperCase()==="SCRIPT"&&ot.src||new URL("mapplic.js",document.baseURI).href)),mP=ie.lazy(()=>ho(()=>Promise.resolve().then(()=>KO),void 0,ot&&ot.tagName.toUpperCase()==="SCRIPT"&&ot.src||new URL("mapplic.js",document.baseURI).href)),gP=e=>{const t=P(f=>f.data.settings),r=P(f=>f.toggleSidebar),s=P(f=>f.sidebarClosed),o=P(f=>f.breakpoint),l=P(f=>f.containerMessage),u=It();return w.jsxs("div",{className:"mapplic-controls",children:[w.jsx(mo,{position:"top-left",...e,style:t.sidebar&&t.filters&&s&&!t.rightSidebar&&!(o!=null&&o.portrait)?{top:"60px"}:{}}),w.jsx(mo,{position:"top-right",...e,style:t.sidebar&&t.filters&&s&&t.rightSidebar&&!(o!=null&&o.portrait)?{top:"60px"}:{}}),w.jsx(mo,{position:"bottom-right",...e}),w.jsx(mo,{position:"bottom-left",...e,style:t.sidebar&&s&&(o!=null&&o.portrait)?{bottom:"60px"}:{}}),t.sidebar&&t.toggleSidebar&&(!s||!t.filters)&&w.jsx("button",{type:"button","aria-label":u("Close sidebar"),className:"mapplic-sidebar-close",onClick:()=>r(),children:w.jsx(eu,{size:16,"aria-hidden":"true",focusable:"false"})}),w.jsx(Dt,{children:l==="mouseWheelShift"&&w.jsx(Ne.div,{className:"mapplic-controls-messages",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:w.jsxs("div",{children:["Use ",w.jsx("b",{className:"mapplic-key",children:"Shift"})," + ",w.jsx("b",{children:"Scroll"})," to Zoom"]})})})]})},mo=({position:e,element:t,style:r})=>{const s=P(o=>o.data.settings);return w.jsxs("div",{className:`mapplic-control-zone mapplic-${e}`,style:r,children:[s.legend&&s.legendPos===e&&w.jsx(dP,{}),s.layerSwitcher===e&&w.jsx(xP,{}),s.zoom&&s.zoomButtons===e&&w.jsx(vP,{}),s.zoom&&s.resetButton===e&&w.jsx(yP,{accessibility:s.accessibility}),s.fullscreen===e&&w.jsx(fP,{element:t,className:"mapplic-control-button"}),s.wayfinding&&s.wayfindingControls===e&&w.jsx(L.Suspense,{fallback:null,children:w.jsx(hP,{})}),s.wayfinding&&s.wayfindingFixedFrom&&s.wayfindingFixedFromPos===e&&w.jsx(L.Suspense,{fallback:null,children:w.jsx(mP,{})})]})},yP=({accessibility:e})=>{const t=P(u=>u.pos),r=P(u=>u.initPos),s=P(u=>u.location),o=P(u=>u.closeLocation),l=It();return t.scale===1&&eo(t.scale,r.scale)&&!s||eo(t.scale,r.scale)&&eo(t.x,r.x)&&eo(t.y,r.y)&&!s?null:w.jsxs("button",{"aria-label":l("Reset zoom"),type:"button",className:"mapplic-control-button",onClick:()=>o(!0),children:[e&&w.jsx("span",{children:"Reset"}),w.jsx(Eu,{size:16,"aria-hidden":"true",focusable:"false"})]})},vP=()=>{const e=P(u=>u.data.settings.maxZoom),t=P(u=>u.pos),r=P(u=>u.setTarget),s=P(u=>u.setTransition),o=It(),l=u=>{s({duration:.4}),r({scale:u,x:t.x,y:t.y})};return w.jsxs("div",{className:"mapplic-control-group",children:[w.jsx("button",{"aria-label":o("Zoom in"),type:"button",className:"mapplic-control-button",disabled:t.scale>=e,onClick:()=>l(t.scale*1.6),children:w.jsx(Au,{size:16,"aria-hidden":"true",focusable:"false"})}),w.jsx("button",{"aria-label":o("Zoom out"),type:"button",className:"mapplic-control-button",disabled:t.scale<=1,onClick:()=>l(t.scale/1.6),children:w.jsx(Ou,{size:16,"aria-hidden":"true",focusable:"false"})})]})},xP=()=>{const e=P(o=>o.layer),t=P(o=>o.data.layers),r=P(o=>o.switchLayer),s=yr();return t.filter(o=>!o.disable).length<2?null:w.jsx("div",{className:"mapplic-layer-switcher",children:t.filter(o=>!o.disable).map(o=>w.jsx("button",{type:"button",className:`${o.id===e?"mapplic-active":""}`,onClick:()=>r(o.id),"data-layer":o.id,children:s(o,"name")},o.id))})},wP=({layer:e})=>{const t=P(D=>{var G;return(G=D.filters)==null?void 0:G.search}),r=P(D=>D.admin),s=P(D=>D.newLocation),o=P(D=>D.dragging),l=P(D=>D.setEstPos),u=P(D=>D.setLegacyRoutes),f=P(D=>D.hovered),p=P(D=>D.setHovered),h=P(D=>D.openLocation),g=P(D=>D.location),y=P(D=>D.setNewLocation),v=P(io),k=P(sg),b=P(ao),S=P(SP),C=P(gr),R=P(Zu),I=L.useRef(null),z=L.useCallback(D=>{var ee;if(!D)return;const G=(ee=D.parentElement)==null?void 0:ee.closest("[id^=MLOC]");G&&G.appendChild(D),D.classList.add("mapplic-active")},[]),H=L.useCallback(D=>{LT(D,["mapplic-shape","mapplic-active"]);const G=S(D.id);if(!(G!=null&&G.id))return;D.classList.add("mapplic-shape");const ee=C(G);ee!=null&&ee.disable||(ee!=null&&ee.color&&D.setAttribute("fill",ee.color),ee!=null&&ee.style&&D.classList.add(ee.style))},[S,C]),$=L.useCallback(()=>{(t||b>0)&&k.forEach(D=>{to(I.current,D.id,G=>{G.classList.add("mapplic-filtered")})})},[t,b,k]);L.useEffect(()=>{I.current&&(I.current.querySelectorAll(".mapplic-active").forEach(D=>D.classList.remove("mapplic-active")),to(I.current,g,D=>{z(D)}))},[g,z]),L.useEffect(()=>{I.current&&(I.current.querySelectorAll(".mapplic-highlight").forEach(D=>D.classList.remove("mapplic-highlight")),to(I.current,f,D=>{D.classList.add("mapplic-highlight")}))},[f]),L.useEffect(()=>{I.current&&(I.current.querySelectorAll(".mapplic-filtered").forEach(D=>D.classList.remove("mapplic-filtered")),$())},[$]),L.useEffect(()=>{!I.current||!r||(I.current.querySelectorAll(".mapplic-new-location").forEach(D=>D.classList.remove("mapplic-new-location")),to(I.current,s,D=>{D.classList.add("mapplic-new-location")}))},[r,s]),L.useEffect(()=>{var D;(D=I.current)==null||D.querySelectorAll("[id^=MLOC] > *").forEach(G=>{H(G)})},[H]);const K=()=>{var G;let D={};(G=I.current)==null||G.querySelectorAll("[id^=MLOC] > *").forEach(ee=>{if(!ee.id||!(ee instanceof SVGGraphicsElement))return!1;const fe=ee.getBBox(),Se=ee.getAttribute("data-name"),X={coord:[Yt((fe.x+fe.width/2)/R.width,4),Yt((fe.y+fe.height/2)/R.height,4)],zoom:Yt(Math.min(R.width/(fe.width+40),R.height/(fe.height+40)),4),layer:e.id,...Se&&{title:Se}};D={...D,[ee.id]:X},H(ee)}),$(),l(D),V()},V=()=>{var ee;if(!r)return null;let D=1;const G=Array.from(((ee=I.current)==null?void 0:ee.querySelectorAll("g[id^=routes]"))||[]).flatMap(fe=>Array.from(fe.children).reduce((Se,X)=>{var B;if(X.tagName!=="line"&&X.tagName!=="polyline")return Se;const Y=!!X.id.trim(),q=Y?`${X.id}_${e.id}`:`route_${e.id}_${D++}`,j=X.tagName==="line"?`${X.getAttribute("x1")||0},${X.getAttribute("y1")||0} ${X.getAttribute("x2")||0},${X.getAttribute("y2")||0}`:(B=X.getAttribute("points"))==null?void 0:B.replace(/[\n\t\r]/g,"").trim();return Se.push({element:"polyline",id:q,...Y&&{endpoint:X.id.replace(/^p[f]?-/,"")},layer:e==null?void 0:e.id,points:j}),Se},[]));if(G.length<=1)return null;u(G)},E=D=>{var G;return(G=D.closest("*[id^=MLOC] > *[id]"))==null?void 0:G.id},T=D=>{var ee;const G=E(D);if(G)return(ee=v.find(fe=>Ku(fe.id,G)))==null?void 0:ee.id},M=D=>{D.target instanceof Element&&p(T(D.target)??!1)},Z=D=>{if(D.target instanceof Element&&!o){const G=T(D.target);if(G)h(G);else{const ee=E(D.target),fe=D.ctrlKey||D.metaKey;y(ee??!1,fe)}}};return w.jsx(ec,{width:R.width,height:R.height,innerRef:I,src:e.file,onClick:Z,onMouseMove:M,onTouchStart:M,onMouseLeave:()=>p(!1),onTouchEnd:()=>p(!1),onLoad:K})},SP=be(io,e=>t=>e.find(r=>Ku(r.id,t))),Ui=e=>typeof e=="string"?parseFloat(e):e,kP=({location:e,active:t,minimized:r,scale:s,clusterCount:o,animated:l=!0})=>{const u=P(Zm(e.id)),f=P(Jm(e.id)),p=P(E=>E.setHovered),h=P(E=>E.openLocation),g=P(E=>E.dragging),y=P(E=>E.setTarget),v=P(E=>E.pos),k=P(E=>E.data.settings),b=P(Wi),S=b(e,"color"),C=b(k,"primaryColor"),R=P(E=>E.sidebarClosed),I=P(E=>E.setMarkerOffset),z=L.useRef(null),H=Ui(s||e.scale||1)||1,$=k.sidebar&&!R,K=l?{whileTap:{scale:H},whileHover:{scale:H*1.2},whileDrag:{scale:H*1.2},initial:{scale:H*.4,opacity:0},animate:{scale:H,opacity:1},exit:{scale:H*.4,opacity:0},transition:{type:ji,duration:.4}}:{initial:!1,animate:{scale:H,opacity:1}};L.useEffect(()=>{if(!z.current)return;const E=z.current,T=requestAnimationFrame(()=>{if(!E||!E.isConnected)return;const M=parseFloat(window.getComputedStyle(E).getPropertyValue("margin-top"));I(e.id,M*H)});return()=>cancelAnimationFrame(T)},[e.id,e.type,H,I]);const V=()=>{if(!(g||!e.coord))if(o!=null){const[E,T]=e.coord;y({x:E,y:T,scale:(v.scale||1)*1.6})}else h(e.id)};if(!(e.disable||!e.coord||e.type==="hidden"))return w.jsxs(Ne.button,{type:"button",ref:z,...K,"aria-label":e==null?void 0:e.title,"aria-hidden":$?"true":void 0,tabIndex:$?-1:0,onMouseEnter:()=>p(e.id),onMouseLeave:()=>p(!1),className:Xe("mapplic-marker",{"mapplic-highlight":f,"mapplic-active":u,[e.type||""]:e.type,[e.style||""]:e.style,"dot minimized":r}),style:{top:(e==null?void 0:e.coord[1])*100+"%",left:(e==null?void 0:e.coord[0])*100+"%",backgroundColor:S||C,zIndex:t?101:"auto"},onClick:V,children:[w.jsx(EP,{type:e.type,color:e.color,thumb:e.thumb}),o!=null?w.jsx("span",{children:o}):e.label&&w.jsx("span",{children:e.label}),e.icon&&w.jsx(tc,{src:e.icon,className:"mapplic-marker-icon"}),(e==null?void 0:e.type)==="pulse"&&w.jsx("div",{className:"mapplic-marker-pulse"}),(e==null?void 0:e.type)==="text"&&(e==null?void 0:e.title)&&w.jsx("span",{className:"title",style:{color:(e==null?void 0:e.color)||"black",textShadow:"0 0 4px #fff"},children:e.title})]})},EP=({type:e,color:t,thumb:r})=>{switch(e){case"pin1":return w.jsx("svg",{width:"22px",height:"26px",viewBox:"0 0 22 26",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{fill:t,d:"M22,11c0-6.1-4.9-11-11-11S0,4.9,0,11c0,5,3.4,9.3,8,10.6l3,4.4l3-4.4C18.6,20.3,22,16,22,11z"})});case"pin2":return w.jsxs("svg",{width:"21px",height:"28px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21 28",children:[w.jsx("path",{fill:t,d:"M10.5,0C4.71,0,0,4.71,0,10.5c0,7.75,9.69,16.95,10.1,17.34c0.11,0.11,0.26,0.16,0.4,0.16s0.29-0.05,0.4-0.16C11.31,27.45,21,18.25,21,10.5C21,4.71,16.29,0,10.5,0z"}),w.jsx("circle",{fill:"rgba(0, 0, 0, 0.3)",cx:"10.5",cy:"10.5",r:"8"})]});case"thumb":return r!=null&&r.toLowerCase().includes(".svg")?w.jsx(ec,{src:r}):w.jsx("img",{src:r,alt:"marker"});default:return null}},TP=(e=[],t=1,r=[1e3,1e3],s=20,o,l,u,f)=>{const p=[],h=new Set,g=(y,v)=>{var G,ee,fe,Se,X,Y;const[k,b]=r,S=Ui(y.scale||((G=y.location)==null?void 0:G.scale)||1),C=Ui(v.scale||((ee=v.location)==null?void 0:ee.scale)||1),R=((fe=y.coord)==null?void 0:fe[0])??0,I=((Se=y.coord)==null?void 0:Se[1])??0,z=((X=v.coord)==null?void 0:X[0])??0,H=((Y=v.coord)==null?void 0:Y[1])??0,$=R*k,K=I*b,V=z*k,E=H*b,T=s*S/t,M=s*C/t,Z=Math.abs($-V),D=Math.abs(K-E);return Z<(T+M)/2&&D<(T+M)/2};return e.forEach((y,v)=>{var S,C,R,I,z,H;if(!y||!y.coord)return;const{id:k,crowding:b="none"}=y;if(k){if(k===u){p.push(y);return}switch(b){case"none":p.push(y);break;case"uniform":{if(h.has(`__uniform_done__::${f}`))break;h.add(`__uniform_done__::${f}`);const $=e.filter(M=>M.crowding==="uniform"&&M.id!==u&&M.coord);if($.length<2){$.forEach(M=>p.push(M));break}const K=.3,V=3;let E=V;for(let M=0;M<$.length;M++){const Z=$[M];for(let D=M+1;D<$.length;D++){const G=$[D];let ee=V;for(;ee>K;){const fe={...Z,scale:ee},Se={...G,scale:ee};if(!g(fe,Se))break;ee-=.05}E=Math.min(E,ee)}}const T=Math.max(K,Math.min(E,V));$.forEach(M=>p.push({...M,scale:T}));break}case"minimize":{let $=!1;for(let K=0;K=l){p.push(y),h.add(k);break}if(h.has(k))break;const $=[y];for(let K=0;K1){const K=Qg($.map(E=>{var T;return((T=E.coord)==null?void 0:T[0])??0})),V=Qg($.map(E=>{var T;return((T=E.coord)==null?void 0:T[1])??0}));p.push({id:`cluster-${k}-${$.map(E=>E.id).join("-")}`,coord:[K,V],clusterCount:$.length,members:$})}else p.push(y);break}default:p.push(y);break}}}),p},CP=(e,t=.5,r=2,s=20)=>{const o=Math.max(0,Math.min(1,1-e/s));return t+(r-t)*o},Qg=e=>e.reduce((t,r)=>t+r,0)/e.length,PP=e=>{const t={items:[],children:null,bounds:[0,0,1,1]},r=6,s=8,o=(h,g,y=0)=>{if(!g.coord)return;const[v,k]=g.coord;h.children?o(u(h,[v,k]),g,y+1):(h.items.push(g),h.items.length>s&&yo(u(h,b.coord),b,y+1)),h.items=[]))},l=h=>{const[g,y,v,k]=h.bounds,b=(g+v)/2,S=(y+k)/2;h.children=[{items:[],children:null,bounds:[g,y,b,S]},{items:[],children:null,bounds:[b,y,v,S]},{items:[],children:null,bounds:[g,S,b,k]},{items:[],children:null,bounds:[b,S,v,k]}]},u=(h,g)=>{const[y,v]=g,[k,b,S,C]=h.bounds,R=(k+S)/2,I=(b+C)/2,z=(v>I?2:0)+(y>R?1:0);return h.children[z]},f=(h,g,y,v=[])=>{const[k,b,S,C]=h.bounds,[R,I]=g;if(R+yS||I+yC)return v;if(h.children)for(const z of h.children)f(z,g,y,v);else for(const z of h.items){if(!z.coord)continue;const[H,$]=z.coord,K=H-R,V=$-I;Math.sqrt(K*K+V*V)<=y&&v.push(z)}return v},p=(h,g)=>f(t,h,g,[]);return e.forEach(h=>o(t,h)),{queryWithinRadius:p}},OP=L.memo(()=>{const e=P(t=>jP(t));return w.jsx(Zg,{markers:e,animated:!0})}),bP=L.memo(()=>{const e=P(LP);return w.jsx(Zg,{markers:e,animated:!1})}),Zg=L.memo(({markers:e,animated:t})=>w.jsx(Dt,{children:e.map(r=>w.jsx(kP,{location:r,scale:r.scale,minimized:r.minimized,clusterCount:r.clusterCount,animated:t},r.id))})),jP=be(ag,YT,BT,no,hr,Bi,$i,(e,t,r,s,o,l,u)=>{const f=e.filter(h=>!h.scaleMode||h.scaleMode==="screen");if(r>=t)return f;const p=PP(f);return TP(f,r,[l,u],20,p,t,s,o)}),LP=be(ag,e=>e.filter(t=>t.scaleMode==="map")),RP=ie.lazy(()=>ho(()=>Promise.resolve().then(()=>QO),void 0,ot&&ot.tagName.toUpperCase()==="SCRIPT"&&ot.src||new URL("mapplic.js",document.baseURI).href)),AP=({Editor:e,Vectors:t,animate:r})=>{const s=P(C=>C.data),o=P(C=>C.setData),l=P(C=>C.data.settings),u=P(C=>C.data.layers),f=P(C=>C.routesEditing),p=P(hr),g=P(lg)(p),y=P(C=>C.transition),v=P(C=>C.pos),k=P(eg),b=P(ro),S=v.scale*k;return w.jsx(Ne.div,{className:"mapplic-layers",style:{aspectRatio:b,...l.zoom&&{width:l.mapWidth+"px",height:l.mapHeight+"px"}},transition:y,...r&&{animate:r},children:u.map(C=>C.id===(g==null?void 0:g.id)&&w.jsxs("div",{className:"mapplic-layer",children:[CT(C.file)==="svg"?w.jsx(wP,{layer:C}):w.jsx("img",{src:C.file,alt:C.name}),w.jsx(bP,{}),e&&w.jsx(e,{source:(s==null?void 0:s.routes)||[],setSource:R=>o({routes:R}),prefix:"path_",parentScale:S,active:f}),t&&w.jsx(t,{source:s==null?void 0:s.routes,parentScale:S,active:f}),l.wayfinding&&w.jsx(L.Suspense,{fallback:null,children:w.jsx(RP,{layer:C.id})})]},C.id))})},_P=({location:e})=>{const t=L.useRef(null),r=P(u=>u.setOffset),s=P(u=>u.markerOffsets[e.id]??0),o=P(Bi),l=P($i);return L.useEffect(()=>{var u;t.current&&r({h:((u=t.current)==null?void 0:u.offsetHeight)-s})},[e.id,s,r]),e.coord?w.jsx("div",{className:"mapplic-tooltip-wrap",style:{top:`calc(${e.coord[1]*100}% + ${s-16}px)`,left:e.coord[0]*100+"%"},children:w.jsx(Ne.div,{ref:t,className:Xe("mapplic-tooltip mapplic-popup",{"mapplic-tooltip-mini":o<400}),style:{maxWidth:`min(360px, ${o*.8}px)`,maxHeight:`min(240px, ${l*.8}px)`},"data-location":e.id,"data-group":e==null?void 0:e.group,...wg,onWheel:u=>u.stopPropagation(),children:e.action!=="sidebar"?w.jsx(Gg,{location:e}):w.jsx("div",{className:"mapplic-popup-content mapplic-popup-micro",children:w.jsx(sc,{location:e})})})}):null},go=4,MP=({location:e,containerRef:t,overlayRef:r})=>{const s=L.useRef(null),[o,l]=L.useState({x:0,y:0,triangleOffset:0}),u=P(v=>v.markerOffsets[e.id]??0),f=P(v=>{var k;return(k=v.data.settings.showAboutIn)==null?void 0:k.includes("hover")}),p=P(v=>{var k;return(k=v.data.settings.showThumbIn)==null?void 0:k.includes("hover")}),h=P(v=>v.pos),g=P(Bi),y=P($i);return L.useEffect(()=>{if(!s.current||!(t!=null&&t.current)||!(r!=null&&r.current)||!e.coord)return;const v=t.current.getBoundingClientRect(),k=r.current.getBoundingClientRect(),b=s.current.getBoundingClientRect(),S=k.x+k.width*e.coord[0]-v.x-b.width/2,C=k.x+k.width*e.coord[0]-v.x+b.width/2,R=k.y+k.height*e.coord[1]-v.y-b.height+u,I=k.y+k.height*e.coord[1]-v.y+u,z=S-go,H=C-(v.width-go),$=R-go,K=I-(v.height-go),V=z<0?-z:H>0?-H:0,E=$<0?-$:K>0?-K:-16,T=Math.max(-b.width/2+20,Math.min(-V,b.width/2-20));l({x:V,y:E,triangleOffset:T})},[e,h,g,y,u,t,r]),e.coord?w.jsx("div",{className:"mapplic-tooltip-wrap",style:{left:`calc(${e.coord[0]*100}% + ${o.x}px)`,top:`calc(${e.coord[1]*100}% + ${u+o.y}px)`,"--triangle-offset":`${o.triangleOffset}px`},children:w.jsx(Ne.div,{ref:s,className:`mapplic-tooltip mapplic-tooltip-hover ${o.y!==-16?"no-arrow":""}`,style:{maxWidth:`min(360px, ${g*.8}px)`,maxHeight:`min(240px, ${y*.8}px)`},"data-location":e.id,"data-group":e==null?void 0:e.group,...wg,children:w.jsx("div",{className:"mapplic-popup-content mapplic-popup-micro",children:w.jsx(sc,{location:e,thumb:p&&!!e.thumb,about:f})})})}):null},DP=()=>w.jsx("svg",{width:"100%",height:"100%",style:{position:"absolute",pointerEvents:"none"},children:w.jsx("defs",{children:w.jsxs("pattern",{id:"mapplic-stripe-pattern",patternTransform:"rotate(135)",width:"100%",height:"2",x:"0",y:"0",patternUnits:"userSpaceOnUse",children:[w.jsx("rect",{x:"0",y:"0",width:"100%",height:"1",fill:"rgba(151, 71, 255, 0.4)"}),w.jsx("rect",{x:"0",y:"1",width:"100%",height:"1",fill:"var(--mapplic-bg-georegion)"})]})})}),IP=({animate:e,containerRef:t,LocationDrag:r,TooltipNewLocation:s,AreaSelector:o})=>{const l=P(C=>C.data.settings.initArea),u=P(C=>C.transition),f=P(C=>C.newLocation),p=P(C=>C.areaSelectorActive),h=P(C=>C.setInitArea),g=P(C=>!!C.location),y=P(zP),v=P(ro),[k,b]=L.useState({}),S=L.useRef(null);return w.jsxs(Ne.div,{className:"mapplic-overlay","data-no-interact":!0,ref:S,style:{aspectRatio:v},transition:u,...e&&{animate:e},children:[w.jsx(DP,{}),w.jsx(OP,{}),r&&g&&w.jsx(r,{parentRef:S,setTempCoord:b},"drag"),w.jsx(vc,{children:w.jsxs(Dt,{children:[o&&p&&w.jsx(o,{text:"Init area",coords:l,setCoords:h,parentRef:S},"area"),s&&f&&w.jsx(s,{locationId:f},`new-${f}`),y&&w.jsx(_P,{location:{...y,...k}},`tooltip-${y.id}`),w.jsx(NP,{containerRef:t,overlayRef:S})]})})]})},NP=({containerRef:e,overlayRef:t})=>{const r=P(FP);return r&&w.jsx(MP,{location:r,containerRef:e,overlayRef:t},`hovertip-${r.id}`)},zP=be(no,hr,mr,gr,(e,t,r,s)=>{const o=e?s(r(e)):void 0;return o&&o.coord&&!o.disable&&oo(o,t)&&o.action!=="none"?o:null}),FP=be(hr,mr,gr,NT,no,KT,(e,t,r,s,o,l)=>{const u=s?r(t(s)):void 0;return l&&s&&(!o||!Ku(o,s))&&u&&u.title&&u.coord&&!u.disable&&oo(u,e)?u:null}),Jg=({tools:e,containerRef:t,absScale:r})=>{const s=P(Vi),o=P(ro);return w.jsxs("div",{className:"mapplic-stage",style:{aspectRatio:o},children:[w.jsx(AP,{animate:r?{scale:r}:void 0,Editor:e==null?void 0:e.Editor,Vectors:e==null?void 0:e.Vectors}),w.jsx(IP,{animate:r?{width:s*r}:void 0,containerRef:t,LocationDrag:e==null?void 0:e.LocationDrag,TooltipNewLocation:e==null?void 0:e.TooltipNewLocation,AreaSelector:e==null?void 0:e.AreaSelector})]})},VP=({containerRef:e,stableSize:t,tools:r})=>{const s=P(U=>U.data.settings),o=P(U=>U.pos),l=P(U=>U.setPos),u=P(U=>U.target),f=P(U=>U.transition),p=P(U=>U.setTransition),h=P(U=>U.dragging),g=P(U=>U.setDragging),y=P(U=>U.offset),v=P(U=>U.setContainerMessage),k=P(U=>U.setInitPos),b=P(U=>U.resolveInitPos),S=P(U=>U.initPosResolved),C=P(eg),R=P(Bi),I=P($i),z=eE(),[H,$]=L.useState(!1),[K,V]=L.useState(null),[E,T]=L.useState({scale:1,x:0,y:0}),M=L.useRef(null),Z=bm(0),D=bm(0);L.useEffect(()=>{if(!s.initArea)k({scale:1,x:.5,y:.5});else if(s.initArea&&R&&I){const U=jT(R,I,s.mapWidth,s.mapHeight,s.initArea);t&&!S?(b(U),X(U.scale,U.x,U.y,{duration:0})):k(U)}},[R,I,S,t,s.initArea,k,s.mapWidth,s.mapHeight,b]),L.useEffect(()=>{X(o.scale,o.x,o.y,{duration:0})},[R,I]),L.useEffect(()=>{const U=.5+y.h/I/2;X(u.scale,u.x,u.y,f,U?[.5,U]:void 0)},[u,y.h]);const G=(U=o.scale)=>Yt(Math.min(Math.max(U,1),s.maxZoom),4),ee=(U=E.scale)=>{const le=Math.max(U===C?0:R,R-s.mapWidth*U)/2,te=Math.max(U===C?0:I,I-s.mapHeight*U)/2;return{top:Math.round(I-s.mapHeight*U-te),bottom:Math.round(te),left:Math.round(R-s.mapWidth*U-le),right:Math.round(le)}},fe=(U=E.x,le=E.y,te=E.scale,ue=[.5,.5])=>({scale:te/C,x:(R*ue[0]-U)/(s.mapWidth*te),y:(I*ue[1]-le)/(s.mapHeight*te)}),Se=(U=o.x,le=o.y,te=o.scale,ue=[.5,.5])=>({scale:te*C,x:Math.round(R*ue[0]-U*s.mapWidth*te*C),y:Math.round(I*ue[1]-le*s.mapHeight*te*C)}),X=(U=o.scale,le=o.x,te=o.y,ue={duration:.4},Oe=[.5,.5])=>{const ve=Se(le,te,G(U),Oe),Ae=ee(ve.scale),_e={scale:ve.scale,x:Math.max(Math.min(ve.x,Ae.right),Ae.left),y:Math.max(Math.min(ve.y,Ae.bottom),Ae.top)};_e.scale&&(p(ue),T(_e),l(fe(_e.x,_e.y,_e.scale,Oe)))},Y=U=>{if(!e.current)return;U.nativeEvent.stopImmediatePropagation();const le=e.current.getBoundingClientRect(),te=1.6,ue=G(U.deltaY+U.deltaX<0?o.scale*te:o.scale/te);if(s.mouseWheelShift&&!U.shiftKey){v("mouseWheelShift"),K&&clearTimeout(K),V(setTimeout(()=>{v(null)},1e3));return}if(ue>s.maxZoom)return;const Oe=[(U.clientX-le.x)/le.width,(U.clientY-le.y)/le.height],ve=fe(E.x,E.y,E.scale,Oe);X(ue,ve.x,ve.y,{duration:.4},Oe)};L.useEffect(()=>{const U=M.current,le=(ue,Oe)=>!ue||!(ue instanceof Element)||!ue.parentElement?!1:ue.parentElement.classList.contains(Oe)||le(ue.parentElement,Oe),te=ue=>{s!=null&&s.mouseWheelShift&&!ue.shiftKey||le(ue.target,"mapplic-tooltip")||ue.preventDefault()};if(U)return s.mouseWheel!==!1?U.addEventListener("wheel",te,{passive:!1}):U.removeEventListener("wheel",te),()=>{U.removeEventListener("wheel",te)}},[M,s==null?void 0:s.mouseWheel,s==null?void 0:s.mouseWheelShift]);const q=U=>{if(U.detail===2&&e.current){const le=e.current.getBoundingClientRect(),te=[(U.clientX-le.x)/le.width,(U.clientY-le.y)/le.height],ue=fe(E.x,E.y,E.scale,te);X(G(o.scale*2),ue.x,ue.y,{duration:.4},te)}},j=()=>{const U={...E,x:Z.get(),y:D.get()};T(U),l(fe(U.x,U.y,U.scale))},B=U=>{const le=U.touches[0],te=U.touches[1];return{x:(le.clientX+te.clientX)/2,y:(le.clientY+te.clientY)/2,dist:Math.sqrt(Math.pow(le.clientX-te.clientX,2)+Math.pow(le.clientY-te.clientY,2))}},se=U=>{if(U.touches.length>1&&!H){const le=B(U);$({x:le.x,y:le.y,dist:le.dist,scale:E.scale})}},oe=U=>{if(H&&e.current){const le=B(U),te=e.current.getBoundingClientRect(),ue=[(H.x-te.x)/te.width,(H.y-te.y)/te.height],Oe=fe(E.x,E.y,E.scale,ue);X(G(H.scale/C*le.dist/H.dist),Oe.x,Oe.y,{duration:0},ue)}},ge=U=>{U.touches.length<2&&$(!1)},ke=P(ro);return w.jsx("div",{className:"mapplic-moving-stage-hitbox",style:{cursor:h?"grabbing":"grab"},onPointerDown:U=>{U.target.closest("[data-no-interact]")||z.start(U)},onWheel:(s==null?void 0:s.mouseWheel)===!1?void 0:Y,onTouchStart:se,onTouchMove:oe,onTouchEnd:ge,children:w.jsx(Ne.div,{className:"mapplic-moving-stage",drag:!H,dragControls:z,dragListener:!1,onClick:q,ref:M,style:{x:Z,y:D,aspectRatio:ke},animate:{x:E.x||0,y:E.y||0},transition:f,dragTransition:{bounceStiffness:100,bounceDamping:20,timeConstant:100,power:.2},dragElastic:.3,dragConstraints:ee(),onDragStart:()=>g(!0),onDragEnd:()=>setTimeout(()=>g(!1),50),onDragTransitionEnd:j,children:w.jsx(Jg,{tools:r,containerRef:e,absScale:E.scale})})})};var xr=[],BP=function(){return xr.some(function(e){return e.activeTargets.length>0})},$P=function(){return xr.some(function(e){return e.skippedTargets.length>0})},ey="ResizeObserver loop completed with undelivered notifications.",WP=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:ey}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=ey),window.dispatchEvent(e)},Hi;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Hi||(Hi={}));var wr=function(e){return Object.freeze(e)},UP=function(){function e(t,r){this.inlineSize=t,this.blockSize=r,wr(this)}return e}(),ty=function(){function e(t,r,s,o){return this.x=t,this.y=r,this.width=s,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,wr(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,s=t.y,o=t.top,l=t.right,u=t.bottom,f=t.left,p=t.width,h=t.height;return{x:r,y:s,top:o,right:l,bottom:u,left:f,width:p,height:h}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),kc=function(e){return e instanceof SVGElement&&"getBBox"in e},ny=function(e){if(kc(e)){var t=e.getBBox(),r=t.width,s=t.height;return!r&&!s}var o=e,l=o.offsetWidth,u=o.offsetHeight;return!(l||u||e.getClientRects().length)},ry=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},HP=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Yi=typeof window<"u"?window:{},yo=new WeakMap,iy=/auto|scroll/,YP=/^tb|vertical/,KP=/msie|trident/i.test(Yi.navigator&&Yi.navigator.userAgent),yn=function(e){return parseFloat(e||"0")},qr=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new UP((r?t:e)||0,(r?e:t)||0)},sy=wr({devicePixelContentBoxSize:qr(),borderBoxSize:qr(),contentBoxSize:qr(),contentRect:new ty(0,0,0,0)}),oy=function(e,t){if(t===void 0&&(t=!1),yo.has(e)&&!t)return yo.get(e);if(ny(e))return yo.set(e,sy),sy;var r=getComputedStyle(e),s=kc(e)&&e.ownerSVGElement&&e.getBBox(),o=!KP&&r.boxSizing==="border-box",l=YP.test(r.writingMode||""),u=!s&&iy.test(r.overflowY||""),f=!s&&iy.test(r.overflowX||""),p=s?0:yn(r.paddingTop),h=s?0:yn(r.paddingRight),g=s?0:yn(r.paddingBottom),y=s?0:yn(r.paddingLeft),v=s?0:yn(r.borderTopWidth),k=s?0:yn(r.borderRightWidth),b=s?0:yn(r.borderBottomWidth),S=s?0:yn(r.borderLeftWidth),C=y+h,R=p+g,I=S+k,z=v+b,H=f?e.offsetHeight-z-e.clientHeight:0,$=u?e.offsetWidth-I-e.clientWidth:0,K=o?C+I:0,V=o?R+z:0,E=s?s.width:yn(r.width)-K-$,T=s?s.height:yn(r.height)-V-H,M=E+C+$+I,Z=T+R+H+z,D=wr({devicePixelContentBoxSize:qr(Math.round(E*devicePixelRatio),Math.round(T*devicePixelRatio),l),borderBoxSize:qr(M,Z,l),contentBoxSize:qr(E,T,l),contentRect:new ty(y,p,E,T)});return yo.set(e,D),D},ay=function(e,t,r){var s=oy(e,r),o=s.borderBoxSize,l=s.contentBoxSize,u=s.devicePixelContentBoxSize;switch(t){case Hi.DEVICE_PIXEL_CONTENT_BOX:return u;case Hi.BORDER_BOX:return o;default:return l}},qP=function(){function e(t){var r=oy(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=wr([r.borderBoxSize]),this.contentBoxSize=wr([r.contentBoxSize]),this.devicePixelContentBoxSize=wr([r.devicePixelContentBoxSize])}return e}(),ly=function(e){if(ny(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},GP=function(){var e=1/0,t=[];xr.forEach(function(u){if(u.activeTargets.length!==0){var f=[];u.activeTargets.forEach(function(h){var g=new qP(h.target),y=ly(h.target);f.push(g),h.lastReportedSize=ay(h.target,h.observedBox),ye?r.activeTargets.push(o):r.skippedTargets.push(o))})})},XP=function(){var e=0;for(uy(e);BP();)e=GP(),uy(e);return $P()&&WP(),e>0},Ec,cy=[],QP=function(){return cy.splice(0).forEach(function(e){return e()})},ZP=function(e){if(!Ec){var t=0,r=document.createTextNode(""),s={characterData:!0};new MutationObserver(function(){return QP()}).observe(r,s),Ec=function(){r.textContent="".concat(t?t--:t++)}}cy.push(e),Ec()},JP=function(e){ZP(function(){requestAnimationFrame(e)})},vo=0,eO=function(){return!!vo},tO=250,nO={attributes:!0,characterData:!0,childList:!0,subtree:!0},fy=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dy=function(e){return e===void 0&&(e=0),Date.now()+e},Tc=!1,rO=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=tO),!Tc){Tc=!0;var s=dy(t);JP(function(){var o=!1;try{o=XP()}finally{if(Tc=!1,t=s-dy(),!eO())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,nO)};document.body?r():Yi.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),fy.forEach(function(r){return Yi.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),fy.forEach(function(r){return Yi.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e}(),Cc=new rO,py=function(e){!vo&&e>0&&Cc.start(),vo+=e,!vo&&Cc.stop()},iO=function(e){return!kc(e)&&!HP(e)&&getComputedStyle(e).display==="inline"},sO=function(){function e(t,r){this.target=t,this.observedBox=r||Hi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=ay(this.target,this.observedBox,!0);return iO(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),oO=function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e}(),xo=new WeakMap,hy=function(e,t){for(var r=0;r=0&&(l&&xr.splice(xr.indexOf(s),1),s.observationTargets.splice(o,1),py(-1))},e.disconnect=function(t){var r=this,s=xo.get(t);s.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),s.activeTargets.splice(0,s.activeTargets.length)},e}(),aO=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");wo.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ry(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ry(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.unobserve(this,t)},e.prototype.disconnect=function(){wo.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();const lO=ie[typeof document<"u"&&document.createElement!==void 0?"useLayoutEffect":"useEffect"],uO=e=>{const t=L.useRef(e);return L.useEffect(()=>{t.current=e}),t},cO=typeof window<"u"&&"ResizeObserver"in window?window.ResizeObserver:aO;function fO(){}function dO(e,t){const r=hO(),s=uO(t);return lO(()=>{let o=!1;const l=e&&"current"in e?e.current:e;if(!l)return fO;function u(f,p){o||s.current(f,p)}return r.subscribe(l,u),()=>{o=!0,r.unsubscribe(l,u)}},[e,r,s]),r.observer}function pO(){let e=!1,t=[];const r=new Map,s=new cO((o,l)=>{t=t.concat(o);function u(){const f=new Set;for(let p=0;pg(t[p],l))}t=[],e=!1}e||window.requestAnimationFrame(u),e=!0});return{observer:s,subscribe(o,l){var u;s.observe(o);const f=(u=r.get(o))!==null&&u!==void 0?u:[];f.push(l),r.set(o,f)},unsubscribe(o,l){var u;const f=(u=r.get(o))!==null&&u!==void 0?u:[];if(f.length===1){s.unobserve(o),r.delete(o);return}const p=f.indexOf(l);p!==-1&&f.splice(p,1),r.set(o,f)}}}let Pc;const hO=()=>Pc||(Pc=pO()),my=(e,t)=>{const[r,s]=L.useState(),[o,l]=L.useState(!1),u=L.useRef(null);return L.useLayoutEffect(()=>{var p;const f=(p=e.current)==null?void 0:p.getBoundingClientRect();f&&(s(f),t==null||t({width:f.width,height:f.height}))},[e,t]),dO(e,f=>{const p=f.contentRect;s(p),t==null||t({width:p.width,height:p.height}),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{l(!0)},50)}),{size:r,ready:o}},mO=({element:e,tools:t})=>{const r=P(v=>v.data.settings),s=P(v=>v.breakpoint),o=P(v=>v.location),l=P(v=>v.sidebarClosed),u=P(v=>v.setContainerSize),f=L.useRef(null),p=L.useCallback(({width:v,height:k})=>{!v||!k||u(v,k)},[u]),{ready:h}=my(f,p);L.useEffect(()=>{var k;const v=r.padding??0;(k=e.current)==null||k.style.setProperty("--mapplic-container-padding",v+"px")},[e,r.padding]),L.useEffect(()=>{s!=null&&s.portrait&&f.current&&f.current.getBoundingClientRect().top<0&&(document.documentElement.scrollHeight>document.documentElement.clientHeight?window.scrollTo({top:f.current.getBoundingClientRect().top+window.scrollY-(r.scrollTop||0),behavior:"smooth"}):f.current.scrollIntoView({behavior:"smooth"}))},[s==null?void 0:s.portrait,o,r.scrollTop]);const g=s!=null&&s.sidebar?s.sidebar+"px":e.current?getComputedStyle(e.current).getPropertyValue("--mapplic-sidebar-width"):0,y=r!=null&&r.kiosk&&!(s!=null&&s.portrait)?"100vh":s!=null&&s.container?s.container+"px":"auto";return w.jsxs(Ne.div,{className:"mapplic-container-wrap",initial:!1,transition:{duration:.4},animate:{marginLeft:!l&&!r.rightSidebar&&r.sidebar?g:0,marginRight:!l&&r.rightSidebar&&r.sidebar?g:0},children:[w.jsx(Ne.div,{className:"mapplic-container",ref:f,style:{height:y,...!r.zoom&&{display:"flex"}},children:r.zoom?w.jsx(VP,{containerRef:f,stableSize:h,tools:t}):w.jsx(Jg,{tools:t,containerRef:f})}),w.jsx(gP,{element:e})]})},gO=({element:e})=>{const t=P(p=>p.data.settings),r=P(p=>p.data.styles),s=P(p=>p.data.legend),o=P(p=>p.legendToggle),{primaryColor:l,primaryColor_dark:u}=t;return L.useEffect(()=>{var p,h,g,y;l?(p=e.current)==null||p.style.setProperty("--mapplic-primary",l):(h=e.current)==null||h.style.removeProperty("--mapplic-primary"),u?(g=e.current)==null||g.style.setProperty("--mapplic-primary-dark",u):(y=e.current)==null||y.style.removeProperty("--mapplic-primary-dark")},[e,l,u]),L.useEffect(()=>{var p,h;t.rounding!==void 0?(p=e.current)==null||p.style.setProperty("--mapplic-border-radius",t.rounding+"px"):(h=e.current)==null||h.style.removeProperty("--mapplic-border-radius")},[e,t.rounding]),L.useMemo(()=>{let p="";const h=(S,C="")=>`.mapplic-shape.${S}${C}, .mapplic-shape.${S}${C} > *`,g=(S,C="")=>`.mapplic-marker.${S}${C}`,y=(S,C)=>C?`${S}:${C} !important;`:void 0,v=(S,...C)=>{const R=C.filter(Boolean).join("");return R?`${S} {${R}}`:""},k=S=>{if(!S.svg)return"";let C="";return C+=v(h(S.class),y("fill",S["base-color"]),y("stroke",S["base-stroke"]),y("stroke-width",S["stroke-width"])),C+=v(`.dark ${h(S.class)}`,y("fill",S["base-color_dark"]),y("stroke",S["base-stroke_dark"]),y("stroke-width",S["stroke-width_dark"])),C+=v(h(S.class,".mapplic-highlight"),y("fill",S["hover-color"]),y("stroke",S["hover-stroke"])),C+=v(`.dark ${h(S.class,".mapplic-highlight")}`,y("fill",S["hover-color_dark"]),y("stroke",S["hover-stroke_dark"])),C+=v(h(S.class,".mapplic-filtered"),y("fill",S["hover-color"]),y("stroke",S["hover-stroke"])),C+=v(`.dark ${h(S.class,".mapplic-filtered")}`,y("fill",S["hover-color_dark"]),y("stroke",S["hover-stroke_dark"])),C+=v(h(S.class,".mapplic-active"),y("fill",S["active-color"]),y("stroke",S["active-stroke"])),C+=v(`.dark ${h(S.class,".mapplic-active")}`,y("fill",S["active-color_dark"]),y("stroke",S["active-stroke_dark"])),C},b=S=>{if(!S.marker)return"";let C="";return C+=v(g(S.class),y("background-color",S["base-color"]),y("outline",S["stroke-width"]?`${S["stroke-width"]}px solid ${S["base-stroke"]||"transparent"}`:void 0),y("color",S["text-color"])),C+=v(`.dark ${g(S.class)}`,y("background-color",S["base-color_dark"]),y("outline",S["stroke-width"]?`${S["stroke-width"]}px solid ${S["base-stroke_dark"]||"transparent"}`:void 0),y("color",S["text-color_dark"])),C+=v(g(S.class,".mapplic-highlight"),y("background-color",S["hover-color"]),y("outline-color",S["hover-stroke"]),y("color",S["hover-text"])),C+=v(`.dark ${g(S.class,".mapplic-highlight")}`,y("background-color",S["hover-color_dark"]),y("outline-color",S["hover-stroke_dark"]),y("color",S["hover-text_dark"])),C+=v(g(S.class,".mapplic-active"),y("background-color",S["active-color"]),y("outline-color",S["active-stroke"]),y("color",S["active-text"])),C+=v(`.dark ${g(S.class,".mapplic-active")}`,y("background-color",S["active-color_dark"]),y("outline-color",S["active-stroke_dark"]),y("color",S["active-text_dark"])),C};return r&&r.forEach(S=>{p+=k(S)+b(S)}),o&&Object.entries(o).forEach(([S,C])=>{if(C===!1){const R=s==null?void 0:s.find(I=>I.id===S);R!=null&&R.selector&&(p+=`.mapplic-container ${R.selector} { display: none; }`)}}),t!=null&&t.css&&(p+=t.css),p?w.jsx("style",{children:p}):null},[r,t.css,o,s])};var So={exports:{}};/* @license Papa Parse v5.5.2 https://github.com/mholt/PapaParse License: MIT */var yO=So.exports,gy;function vO(){return gy||(gy=1,function(e,t){((r,s)=>{e.exports=s()})(yO,function r(){var s=typeof self<"u"?self:typeof window<"u"?window:s!==void 0?s:{},o,l=!s.document&&!!s.postMessage,u=s.IS_PAPA_WORKER||!1,f={},p=0,h={};function g(E){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(T){var M=$(T);M.chunkSize=parseInt(M.chunkSize),T.step||T.chunk||(M.chunkSize=null),this._handle=new S(M),(this._handle.streamer=this)._config=M}).call(this,E),this.parseChunk=function(T,M){var Z=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview),u)s.postMessage({results:D,workerId:h.WORKER_ID,finished:Z});else if(V(this._config.chunk)&&!M){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=D=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!Z||!V(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),Z||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(T){V(this._config.error)?this._config.error(T):u&&this._config.error&&s.postMessage({workerId:h.WORKER_ID,error:T,finished:!1})}}function y(E){var T;(E=E||{}).chunkSize||(E.chunkSize=h.RemoteChunkSize),g.call(this,E),this._nextChunk=l?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(M){this._input=M,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(T=new XMLHttpRequest,this._config.withCredentials&&(T.withCredentials=this._config.withCredentials),l||(T.onload=K(this._chunkLoaded,this),T.onerror=K(this._chunkError,this)),T.open(this._config.downloadRequestBody?"POST":"GET",this._input,!l),this._config.downloadRequestHeaders){var M,Z=this._config.downloadRequestHeaders;for(M in Z)T.setRequestHeader(M,Z[M])}var D;this._config.chunkSize&&(D=this._start+this._config.chunkSize-1,T.setRequestHeader("Range","bytes="+this._start+"-"+D));try{T.send(this._config.downloadRequestBody)}catch(G){this._chunkError(G.message)}l&&T.status===0&&this._chunkError()}},this._chunkLoaded=function(){T.readyState===4&&(T.status<200||400<=T.status?this._chunkError():(this._start+=this._config.chunkSize||T.responseText.length,this._finished=!this._config.chunkSize||this._start>=(M=>(M=M.getResponseHeader("Content-Range"))!==null?parseInt(M.substring(M.lastIndexOf("/")+1)):-1)(T),this.parseChunk(T.responseText)))},this._chunkError=function(M){M=T.statusText||M,this._sendError(new Error(M))}}function v(E){(E=E||{}).chunkSize||(E.chunkSize=h.LocalChunkSize),g.call(this,E);var T,M,Z=typeof FileReader<"u";this.stream=function(D){this._input=D,M=D.slice||D.webkitSlice||D.mozSlice,Z?((T=new FileReader).onload=K(this._chunkLoaded,this),T.onerror=K(this._chunkError,this)):T=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(D.target.result)},this._chunkError=function(){this._sendError(T.error)}}function k(E){var T;g.call(this,E=E||{}),this.stream=function(M){return T=M,this._nextChunk()},this._nextChunk=function(){var M,Z;if(!this._finished)return M=this._config.chunkSize,T=M?(Z=T.substring(0,M),T.substring(M)):(Z=T,""),this._finished=!T,this.parseChunk(Z)}}function b(E){g.call(this,E=E||{});var T=[],M=!0,Z=!1;this.pause=function(){g.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){g.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(D){this._input=D,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){Z&&T.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),T.length?this.parseChunk(T.shift()):M=!0},this._streamData=K(function(D){try{T.push(typeof D=="string"?D:D.toString(this._config.encoding)),M&&(M=!1,this._checkIsFinished(),this.parseChunk(T.shift()))}catch(G){this._streamError(G)}},this),this._streamError=K(function(D){this._streamCleanUp(),this._sendError(D)},this),this._streamEnd=K(function(){this._streamCleanUp(),Z=!0,this._streamData("")},this),this._streamCleanUp=K(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function S(E){var T,M,Z,D,G=Math.pow(2,53),ee=-G,fe=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Se=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,X=this,Y=0,q=0,j=!1,B=!1,se=[],oe={data:[],errors:[],meta:{}};function ge(te){return E.skipEmptyLines==="greedy"?te.join("").trim()==="":te.length===1&&te[0].length===0}function ke(){if(oe&&Z&&(le("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+h.DefaultDelimiter+"'"),Z=!1),E.skipEmptyLines&&(oe.data=oe.data.filter(function(ve){return!ge(ve)})),U()){let ve=function(Ae,_e){V(E.transformHeader)&&(Ae=E.transformHeader(Ae,_e)),se.push(Ae)};if(oe)if(Array.isArray(oe.data[0])){for(var te=0;U()&&te(ze=>(E.dynamicTypingFunction&&E.dynamicTyping[ze]===void 0&&(E.dynamicTyping[ze]=E.dynamicTypingFunction(ze)),(E.dynamicTyping[ze]||E.dynamicTyping)===!0))(kt)?Te==="true"||Te==="TRUE"||Te!=="false"&&Te!=="FALSE"&&((ze=>{if(fe.test(ze)&&(ze=parseFloat(ze),ee=se.length?"__parsed_extra":se[Re]:De,Ce=E.transform?E.transform(Ce,De):Ce);De==="__parsed_extra"?(_e[De]=_e[De]||[],_e[De].push(Ce)):_e[De]=Ce}return E.header&&(Re>se.length?le("FieldMismatch","TooManyFields","Too many fields: expected "+se.length+" fields but parsed "+Re,q+Ae):ReE.preview?M.abort():(oe.data=oe.data[0],D(oe,X))))}),this.parse=function(te,ue,Oe){var ve=E.quoteChar||'"',ve=(E.newline||(E.newline=this.guessLineEndings(te,ve)),Z=!1,E.delimiter?V(E.delimiter)&&(E.delimiter=E.delimiter(te),oe.meta.delimiter=E.delimiter):((ve=((Ae,_e,Re,De,Ce)=>{var kt,Te,ze,Pt;Ce=Ce||[","," ","|",";",h.RECORD_SEP,h.UNIT_SEP];for(var Nt=0;Nt=Oe.length/2?`\r `:"\r"}}function C(E){return E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function R(E){var T=(E=E||{}).delimiter,M=E.newline,Z=E.comments,D=E.step,G=E.preview,ee=E.fastMode,fe=null,Se=!1,X=E.quoteChar==null?'"':E.quoteChar,Y=X;if(E.escapeChar!==void 0&&(Y=E.escapeChar),(typeof T!="string"||-1=G)return rt(!0);break}Oe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:ue.length,index:q}),Te++}}else if(Z&&ve.length===0&&B.substring(q,q+le)===Z){if(Ce===-1)return rt();q=Ce+U,Ce=B.indexOf(M,q),De=B.indexOf(T,q)}else if(De!==-1&&(De=G)return rt(!0)}return Ot();function Pt(Qe){ue.push(Qe),Ae=q}function Nt(Qe){var at=0;return at=Qe!==-1&&(Qe=B.substring(Te+1,Qe))&&Qe.trim()===""?Qe.length:at}function Ot(Qe){return oe||(Qe===void 0&&(Qe=B.substring(q)),ve.push(Qe),q=ge,Pt(ve),te&&zt()),rt()}function zn(Qe){q=Qe,Pt(ve),ve=[],Ce=B.indexOf(M,q)}function rt(Qe){if(E.header&&!se&&ue.length&&!Se){var at=ue[0],bt={},Gr=new Set(at);let Fn=!1;for(let qt=0;qtZ.charCodeAt(0)!==65279?Z:Z.slice(1))(E),M=new(T.download?y:k)(T)):E.readable===!0&&V(E.read)&&V(E.on)?M=new b(T):(s.File&&E instanceof File||E instanceof Object)&&(M=new v(T)),M.stream(E);(M=(()=>{var Z;return!!h.WORKERS_SUPPORTED&&(Z=(()=>{var D=s.URL||s.webkitURL||null,G=r.toString();return h.BLOB_URL||(h.BLOB_URL=D.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",G,")();"],{type:"text/javascript"})))})(),(Z=new s.Worker(Z)).onmessage=I,Z.id=p++,f[Z.id]=Z)})()).userStep=T.step,M.userChunk=T.chunk,M.userComplete=T.complete,M.userError=T.error,T.step=V(T.step),T.chunk=V(T.chunk),T.complete=V(T.complete),T.error=V(T.error),delete T.worker,M.postMessage({input:E,config:T,workerId:M.id})},h.unparse=function(E,T){var M=!1,Z=!0,D=",",G=`\r `,ee='"',fe=ee+ee,Se=!1,X=null,Y=!1,q=((()=>{if(typeof T=="object"){if(typeof T.delimiter!="string"||h.BAD_DELIMITERS.filter(function(se){return T.delimiter.indexOf(se)!==-1}).length||(D=T.delimiter),typeof T.quotes!="boolean"&&typeof T.quotes!="function"&&!Array.isArray(T.quotes)||(M=T.quotes),typeof T.skipEmptyLines!="boolean"&&typeof T.skipEmptyLines!="string"||(Se=T.skipEmptyLines),typeof T.newline=="string"&&(G=T.newline),typeof T.quoteChar=="string"&&(ee=T.quoteChar),typeof T.header=="boolean"&&(Z=T.header),Array.isArray(T.columns)){if(T.columns.length===0)throw new Error("Option columns is empty");X=T.columns}T.escapeChar!==void 0&&(fe=T.escapeChar+ee),T.escapeFormulae instanceof RegExp?Y=T.escapeFormulae:typeof T.escapeFormulae=="boolean"&&T.escapeFormulae&&(Y=/^[=+\-@\t\r].*$/)}})(),new RegExp(C(ee),"g"));if(typeof E=="string"&&(E=JSON.parse(E)),Array.isArray(E)){if(!E.length||Array.isArray(E[0]))return j(null,E,Se);if(typeof E[0]=="object")return j(X||Object.keys(E[0]),E,Se)}else if(typeof E=="object")return typeof E.data=="string"&&(E.data=JSON.parse(E.data)),Array.isArray(E.data)&&(E.fields||(E.fields=E.meta&&E.meta.fields||X),E.fields||(E.fields=Array.isArray(E.data[0])?E.fields:typeof E.data[0]=="object"?Object.keys(E.data[0]):[]),Array.isArray(E.data[0])||typeof E.data[0]=="object"||(E.data=[E.data])),j(E.fields||[],E.data||[],Se);throw new Error("Unable to serialize unrecognized input");function j(se,oe,ge){var ke="",U=(typeof se=="string"&&(se=JSON.parse(se)),typeof oe=="string"&&(oe=JSON.parse(oe)),Array.isArray(se)&&0{for(var te=0;te{const t=e.id;if(typeof t!="string")return null;const r=t.trim();if(!r)return null;const s={id:r};for(const o in e){const l=e[o];l!==void 0&&(s[o]=l)}return s},kO=e=>{const t=P(u=>u.fetchData),r=P(u=>u.fetchCsv),s=P(u=>u.setCsv),o=P(u=>{var f;return(f=u.data.settings)==null?void 0:f.csvEnabled}),l=P(u=>{var f;return(f=u.data.settings)==null?void 0:f.csv});P(u=>u.csv),L.useEffect(()=>{e&&t(e)},[e,t]),L.useEffect(()=>{o&&l?r(new Promise((u,f)=>{wO.parse(l,{header:!0,download:!0,encoding:"UTF-8",skipEmptyLines:!0,transform:(p,h)=>{if(!p)return;const g=p.trim().toLowerCase();return g==="true"?!0:g==="false"?!1:h==="coord"||h==="latlon"?p.split(",").map(parseFloat):h==="group"||h==="tags"||h==="layer"?p.split(","):p},complete:p=>{const h=p.data.map(SO).filter(v=>v!==null),g=new Set,y=h.filter(v=>g.has(v.id)?!1:(g.add(v.id),!0));u(y)},error:p=>{f(p)}})})):s([])},[l,o,r,s])},ko=e=>{const t=()=>new URLSearchParams(window.location.search).get(e)??"",r=()=>"",s=u=>(window.addEventListener("popstate",u),()=>window.removeEventListener("popstate",u)),o=L.useSyncExternalStore(s,t,r);return[o,u=>{const f=typeof u=="function"?u(o):u,p=new URL(window.location.href),h=new URLSearchParams(p.search);if(f===""||f===null||Array.isArray(f)&&f.length===0)h.delete(e);else{const v=Array.isArray(f)?f.map(encodeURIComponent).join(","):encodeURIComponent(f);h.set(e,v)}const g=[...h.entries()].map(([v,k])=>`${encodeURIComponent(v)}=${k}`).join("&"),y=`${p.pathname}${g?`?${g}`:""}${p.hash}`;window.history.pushState(window.history.state,"",y),window.dispatchEvent(new PopStateEvent("popstate"))}]},EO=()=>{},TO=e=>{const t=P(C=>C.admin),r=P(C=>C.dataLoaded),s=P(C=>C.location),o=P(C=>{var R;return(R=C.filters)==null?void 0:R.group}),l=P(C=>{var R;return(R=C.data.settings)==null?void 0:R.wayfinding}),u=P(C=>C.setFilter),f=P(C=>C.setFrom),p=P(C=>C.setTo),h=P(C=>C.setFixedFrom),[g]=ko("from"),[y]=ko("to"),[v]=ko("fixedfrom"),k=CO(e),b=l&&k.includes("wayfinding");yy("location",s??"",EO,k.includes("location")&&r);const S=L.useCallback(C=>{u("group",C.split(",").map(decodeURIComponent))},[u]);yy("group",o??"",S,k.includes("group")&&r),L.useEffect(()=>{b&&g&&f(g)},[b,g,f]),L.useEffect(()=>{b&&y&&p(y)},[b,y,p]),L.useEffect(()=>{!t&&b&&v&&h(v)},[b,t,v,h])},CO=e=>e===!0?["location"]:Array.isArray(e)?e:[],yy=(e,t,r,s=!0)=>{const[o,l]=ko(e),[u,f]=L.useState(!1),[p]=L.useState(()=>typeof window<"u"&&new URLSearchParams(window.location.search).has(e)),h=L.useRef(t);L.useEffect(()=>{!s||u||!p||!o||(f(!0),Array.isArray(t)?o===t.join(","):o===t)||r(o)},[s,u,p,o,r,t]),L.useEffect(()=>{const g=h.current===t;if(h.current=t,!s||g)return;const v=typeof t=="string"&&t!==""||Array.isArray(t)&&t.length>0?t:"";v!==o&&l(v)},[s,t,o,l])},PO=()=>{var e;try{const t=(e=window.parent)==null?void 0:e.document;if(t!=null&&t.documentElement.classList.contains("dark")||(t==null?void 0:t.documentElement.getAttribute("data-theme"))==="dark")return"dark"}catch(t){console.error(t)}return"light"},OO=()=>{const e=P(r=>{var s,o;return(o=(s=r.data)==null?void 0:s.settings)==null?void 0:o.theme}),t=P(r=>r.setTheme);L.useEffect(()=>{if(e&&e!=="default"){t(e);return}const r=()=>{const o=PO();o!==e&&t(o)};r();const s=new MutationObserver(r);try{const o=window.parent.document;s.observe(o.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),o.body&&s.observe(o.body,{attributes:!0,attributeFilter:["data-theme","class"]})}catch(o){console.error("useDetectTheme: Failed to observe parent document for theme changes",o)}return()=>s.disconnect()},[e,t])},bO=e=>{const t=P(l=>l.dataLoaded),r=P(l=>l.openLocation),s=P(l=>l.setInitLocation),o=P(l=>l.resolveInitLocation);L.useEffect(()=>{if(t&&e){s(e);const l=setTimeout(()=>o(),1e3),u=setTimeout(()=>r(e),600);return()=>{clearTimeout(l),clearTimeout(u)}}},[t,e,r,s,o])},jO=()=>{const e=P(s=>s.setLang),t=P(s=>{var o,l;return(l=(o=s.data)==null?void 0:o.settings)==null?void 0:l.language}),r=P(s=>{var o;return(o=s.data)==null?void 0:o.languages});L.useEffect(()=>{const s=()=>{const l=Array.isArray(r)?r.map(p=>p.code):[];if(l.length===0)return"en";const u=document.documentElement.lang||navigator.language||"";if(l.includes(u))return u;const f=u.split("-")[0];return l.includes(f)?f:t||"en"};e(s());const o=new MutationObserver(()=>{e(s())});return o.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}),()=>o.disconnect()},[e,t,r])},LO=()=>{const e=P(S=>{var C,R;return(R=(C=S.data)==null?void 0:C.settings)==null?void 0:R.analytics}),t=P(S=>{var C,R;return(R=(C=S.data)==null?void 0:C.settings)==null?void 0:R.analyticsUrl}),r=P(S=>{var C,R;return(R=(C=S.data)==null?void 0:C.settings)==null?void 0:R.mapId}),s=P(S=>S.location),o=P(S=>{var C;return(C=S.filters)==null?void 0:C.group}),l=P(mr),[u,f]=L.useState("desktop"),[,p]=L.useState({events:[],startTime:Date.now(),deviceType:u}),h=L.useRef(o),g=L.useRef(null);L.useEffect(()=>{const S="ontouchstart"in window||navigator.maxTouchPoints>0,C=window.matchMedia("(min-width: 1025px)").matches;C&&S?f("kiosk"):C||f("mobile")},[]);const y=L.useCallback(S=>{t&&fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}).then(C=>{if(!C.ok)throw new Error(`HTTP error! status: ${C.status}`);return C.json()}).catch(C=>{console.error("Error sending session data:",C)})},[t]),v=L.useCallback(()=>{p(S=>{if(S.events.length===0)return S;const C={...S,mapId:r,endTime:Date.now()};return y(C),{events:[],startTime:Date.now(),deviceType:u}})},[r,y,u]),k=L.useCallback(()=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{v()},6e4)},[v]),b=L.useCallback((S,C)=>{e&&(p(R=>({...R,events:[...R.events,{type:S,details:C,timestamp:Date.now()}]})),k())},[k,e]);return L.useEffect(()=>{const S=()=>v();return window.addEventListener("beforeunload",S),()=>{window.removeEventListener("beforeunload",S)}},[v]),L.useEffect(()=>{if(s){const S=l(s);b("location",{id:s,title:S.title,layer:S.layer})}},[s,b,l]),L.useEffect(()=>{if(!Array.isArray(o))return;const S=o.find(C=>!(h.current||[]).includes(C));S&&b("group",{name:S}),h.current=o},[o,b]),b},RO=({json:e,className:t,initSettings:r={},outerSettings:s,tools:o,...l})=>{const u=L.useRef(null),{size:f}=my(u),p=P(T=>T.initStore);L.useEffect(()=>{p(r)},[]);const h=P(T=>T.loading),g=P(T=>T.error),y=P(T=>T.data.settings),v=P(T=>T.sidebarClosed),k=P(T=>T.breakpoint),b=P(T=>T.data.breakpoints),S=P(T=>T.setBreakpoint),C=P(T=>T.dataLoaded),R=P(T=>T.setFixedFrom),I=P(T=>T.theme),z=P(T=>T.setOuterSettings),H=P(T=>{var M;return(M=T.filters)==null?void 0:M.search}),[$,K]=L.useState(!1);LO(),kO(e),TO(y==null?void 0:y.deeplinking),OO();const V=L.useMemo(()=>new URLSearchParams(window.location.search).get("location"),[]);bO(V??l.location),jO(),L.useEffect(()=>{s&&z(JSON.parse(s))},[s,z]),L.useEffect(()=>{l.fixedfrom&&R(l.fixedfrom)},[C,l.fixedfrom,R]),L.useEffect(()=>{const T=b==null?void 0:b.reduce((M,Z)=>f&&Z.below&&M.below&&(f==null?void 0:f.width)<=Z.below&&Z.belowy!=null&&y.kiosk?"100vh":k!=null&&k.element?k.element+"px":"auto";return h?w.jsx("div",{ref:u,className:"mapplic-placeholder",children:w.jsx("div",{className:"mapplic-loader"})}):g?w.jsx("div",{ref:u,className:"mapplic-placeholder",children:w.jsx("i",{children:g})}):w.jsxs("div",{...l,ref:u,style:{maxHeight:E(),...(k==null?void 0:k.sidebar)&&{"--mapplic-sidebar-width":`${k.sidebar}px`}},className:Xe("mapplic-element",t,k==null?void 0:k.name,{"mapplic-portrait":k==null?void 0:k.portrait,"mapplic-sidebar-right":y.rightSidebar,"mapplic-sidebar-closed":v&&y.toggleSidebar,"mapplic-sidebar-toggle":y.toggleSidebar,"mapplic-filtered":H,dark:I==="dark"}),onClick:()=>{$||(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"mapplicUsed"}),K(!0))},children:[w.jsx(gO,{element:u}),w.jsx(mO,{element:u,tools:o}),y.sidebar&&w.jsx(oP,{})]})},AO=({children:e,onStore:t})=>{const[r]=L.useState(()=>gC());return L.useEffect(()=>{t&&t(r)},[t,r]),w.jsx(ug.Provider,{value:r,children:e})};class _O extends HTMLElement{constructor(){super();yd(this,"_root");yd(this,"store");this._root=this.attachShadow({mode:"open"})}connectedCallback(){if(this._root.childElementCount>0)return;const r=this.dataset;if(!r.json)throw new Error("data-json attribute is required for mapplic-map");let s="./";if(r.path)s=r.path;else{const u=document.getElementById("mapplic-script");u&&(s=u.src.substring(0,u.src.lastIndexOf("/")+1))}const o=document.createElement("link");o.setAttribute("rel","stylesheet"),o.setAttribute("type","text/css"),o.setAttribute("href",s+"mapplic.css"),this._root.appendChild(o);const l=u=>{this.store=u;const f=new CustomEvent("mapReady",{detail:{store:u}});this.dispatchEvent(f)};gx.createRoot(this._root).render(w.jsx(AO,{onStore:l,children:w.jsx(RO,{className:this.className,json:r.json,...r,outerSettings:r.settings})}))}}customElements.define("mapplic-map",_O);const MO=Object.freeze(Object.defineProperty({__proto__:null,default:({id:e})=>{const t=P(r=>r.setAny);return w.jsx("button",{className:"mapplic-button mapplic-button-icon mapplic-action-navigate",onClick:()=>{t(e)},children:w.jsx(Fi,{size:16})})}},Symbol.toStringTag,{value:"Module"})),DO=({size:e=24,color:t="currentColor",...r})=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 16 16",fill:"none",...r,children:[w.jsx("path",{fill:t,d:"M11.0933 11.8933C10.7667 11.7533 10.3933 11.9 10.2533 12.2266C9.59333 13.74 8.1 14.72 6.44 14.72C4.14667 14.72 2.28 12.8533 2.28 10.56C2.28 9.07331 3.08 7.69331 4.37333 6.95331C4.68 6.77998 4.78667 6.38664 4.61333 6.07998C4.43333 5.77331 4.04 5.66665 3.73333 5.84665C2.04667 6.80665 1 8.61331 1 10.56C1 13.56 3.44 16 6.44 16C8.60667 16 10.5667 14.72 11.4267 12.7333C11.5667 12.4133 11.4133 12.0333 11.0933 11.8933Z"}),w.jsx("path",{fill:t,d:"M15.6733 12.56C15.54 12.2333 15.1733 12.0733 14.84 12.2L13.88 12.5867L12.4867 8.12667C12.4 7.86 12.1533 7.68 11.8733 7.68H7.3L7.1 6.4H9.62667C9.98 6.4 10.2667 6.11333 10.2667 5.76C10.2667 5.40667 9.98 5.12 9.62667 5.12H6.91333L6.58 2.98667C7.06667 2.71333 7.4 2.19333 7.4 1.6C7.4 0.72 6.68 0 5.8 0C4.92 0 4.2 0.72 4.2 1.6C4.2 2.30667 4.66667 2.90667 5.30667 3.11333L6.12667 8.42C6.17333 8.73333 6.44667 8.96 6.76 8.96H11.4067L12.8667 13.6333C12.92 13.8067 13.04 13.9467 13.2 14.02C13.2867 14.06 13.38 14.08 13.4733 14.08C13.5533 14.08 13.6333 14.0667 13.7133 14.0333L15.3133 13.3933C15.6467 13.2667 15.8067 12.8933 15.6733 12.56Z"})]}),IO=(e,t)=>{var s;const r=[];if(!e)return r;for(const o of e){const l=(s=o==null?void 0:o.points)==null?void 0:s.split(" "),u=[];if(l!=null&&l.length)for(let f=0;f0){let y=Sr(g,u[u.length-1]),v=y*parseFloat(o.weight||"1");if(o.oneway!==">"&&Kt(g,u[u.length-1],v,y,o.inaccessible),o.oneway!=="<"&&Kt(u[u.length-1],g,v,y,o.inaccessible),o.element==="polygon")for(let k=u.length-2;k>=0;k--)y=Sr(g,u[k]),v=y*parseFloat(o.weight||"1"),Kt(g,u[k],v,y,o.inaccessible),Kt(u[k],g,v,y,o.inaccessible)}u.push(g)}}for(let o=0;o{const r=[];for(const s of e){const o=[];let l;for(const u of t)if(!(u.connect||s.layer!==u.layer))for(const f of u.n.map(p=>p.to)){if(f.connect||s.layer!==f.layer||o.some(([g,y])=>Ki(u,g)&&Ki(f,y)||Ki(u,y)&&Ki(f,g)))continue;o.push([u,f]);const p=zO(u,f,s),h=Sr(s,p);(l===void 0||l.distance>h)&&(l={autorouteLocation:s,point:p,distance:h,a:u,b:f})}if(l===void 0){console.error(`Could not autoroute location ${s.end}`);continue}r.push(l)}for(const s of r){const{autorouteLocation:o,point:l,distance:u,a:f,b:p}=s,h=Oc(t,o.x,o.y,o.layer,o.end),g=Oc(t,l.x,l.y,o.layer);if(Kt(h,g,u),Kt(g,h,u),xy(f,p)){const y=Sr(f,g);Kt(f,g,y);const v=Sr(g,p);Kt(g,p,v)}if(xy(p,f)){const y=Sr(p,g);Kt(p,g,y);const v=Sr(g,f);Kt(g,f,v)}}},zO=(e,t,r)=>{const s=t.x-e.x,o=t.y-e.y,l=s*s+o*o;if(l===0)return{x:e.x,y:e.y};let u=((r.x-e.x)*s+(r.y-e.y)*o)/l;return u=Math.max(0,Math.min(1,u)),{x:e.x+u*s,y:e.y+u*o}},Sr=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y),vy=(e,t,r,s)=>{for(let o=0;o{let u=vy(e,t,r,s);return u||(e.push({x:t,y:r,layer:s,n:[]}),u=e[e.length-1],o&&(u.end=o),l&&(u.connect=l)),u},Kt=(e,t,r,s=r,o)=>{if(!vy(e.n.map(l=>l.to),t.x,t.y)){const l={to:t,dist:r,realDist:s};o&&(l.iac=!0),e.n.push(l)}},xy=(e,t)=>e.n.map(r=>r.to).find(r=>Ki(r,t))!=null,Ki=(e,t)=>e.x===t.x&&e.y===t.y&&e.layer===t.layer,FO=be(so,Zu,(e,t)=>e.filter(r=>r.autoroute&&Array.isArray(r.coord)&&r.coord.length===2).map(r=>({end:r.id,layer:Array.isArray(r.layer)?r.layer[0]:r.layer,x:r.coord[0]*t.width,y:r.coord[1]*t.height,n:[]}))),VO=[],wy=be(FO,e=>{var t;return(t=Ge(e))==null?void 0:t.wayfinding},$T,(e,t,r)=>t?IO(r,e):VO),BO=be(wy,e=>t=>e.some(r=>r.end===t)??!1),$O=(e,t,r,s=!1)=>{for(let p=0;p0;){let p=Number.POSITIVE_INFINITY,h=0;for(let y=0;ye.reduce((t,r)=>{const s=t[t.length-1];return s&&s.length>0&&s[0].layer===r.layer?s.push(r):t.push([r]),t},[]),Sy=(e,t)=>{const r=[];for(let s=0;s{const e=P(no),t=P(mr),r=P(T=>T.from),s=P(T=>T.setFrom),o=P(T=>T.to),l=P(T=>T.setTo),u=P(wy),f=P(T=>T.setPaths),p=P(T=>T.routesOpened),h=P(T=>T.setRoutesOpened),g=P(T=>T.routesAccessible),y=P(BO),v=P(T=>T.data.settings),k=P(T=>T.closeLocation),b=P(T=>T.switchLayer),S=P(T=>T.setAnimatedPath),C=P(T=>T.setHasRoute),[R,I]=L.useState(!1),[z,H]=L.useState(!1),$=It();L.useEffect(()=>{C(y)},[y,C]),L.useEffect(()=>{var T;if(r&&o){I(!1);const M=Sy(u,r),Z=Sy(u,o),D=$O(u,M,Z,g);(T=D==null?void 0:D[0])!=null&&T.layer&&b(D[0].layer),k();let G;D&&(G=WO(D)),G&&(G=G.filter(ee=>ee.length>1),f(G)),S(0)}else f([])},[r,o,f,g,k,b,S]),L.useEffect(()=>{v.wayfindingFixedFrom&&s(v.wayfindingFixedFrom),R&&e&&y(e)&&(R==="from"?(s(e),o||I("to")):R==="to"&&(l(e),r||I("from")))},[e]);const K=()=>{h(!1),v.wayfindingFixedFrom||s(null),l(null),I(!1)},V=()=>{const T=r;s(o),l(T),H(M=>!M)},E=()=>{h(!0),I("from")};return w.jsx(Ne.div,{layout:!0,className:Xe("mapplic-wayfinding",{"mapplic-active":p}),children:w.jsx(Dt,{children:p?w.jsxs(w.Fragment,{children:[w.jsx("button",{className:"mapplic-close",onClick:K,children:w.jsx(dr,{size:12})}),w.jsxs("div",{className:"mapplic-wayfinding-content",children:[w.jsx("div",{className:"mapplic-wayfinding-title",children:$("Directions")}),w.jsxs("div",{className:"mapplic-wayfinding-body",children:[w.jsxs("div",{className:"mapplic-wayfinding-dots",children:[w.jsx("div",{}),w.jsx("div",{}),w.jsx("div",{})]}),(o||r)&&!v.wayfindingFixedFrom&&w.jsx("button",{className:Xe("mapplic-wayfinding-swap",{rotated:z}),onClick:V,children:w.jsx(Mu,{size:12})}),w.jsxs("div",{className:"mapplic-wayfinding-positions",children:[w.jsx(ky,{type:"from",location:r?t(r):void 0,selected:R,setSelected:I,fixed:v.wayfindingFixedFrom,placeholder:$("Select from")}),w.jsx(ky,{type:"to",location:o?t(o):void 0,selected:R,setSelected:I,placeholder:$("Select to")})]})]})]}),w.jsxs("div",{className:"mapplic-wayfinding-bar",children:[w.jsx(HO,{}),w.jsx("button",{"aria-label":$("Open wayfinding panel"),className:"mapplic-button mapplic-button-secondary",disabled:!o||!r,onClick:()=>S(0),children:w.jsx(Fi,{size:16})})]})]}):w.jsx("button",{className:"mapplic-control-button",onClick:E,children:w.jsx(Fi,{size:16})})})})},HO=()=>{const e=P(s=>s.data.settings.wayfindingAccessibility),t=P(s=>s.routesAccessible),r=P(s=>s.setRoutesAccessible);return e?w.jsx("button",{className:Xe("mapplic-button",{"mapplic-active":t}),onClick:()=>r(!t),style:{padding:8},children:w.jsx(DO,{size:16})}):null},ky=({type:e,location:t,selected:r,setSelected:s,fixed:o=!1,placeholder:l})=>{const u=()=>{e===r?s(!1):o||s(e)};return w.jsxs("div",{className:Xe("mapplic-wayfinding-position",{"mapplic-filled":t==null?void 0:t.id,"mapplic-selected":e===r}),children:[w.jsx("span",{className:"mapplic-wayfinding-pin"}),w.jsx("button",{onClick:u,children:w.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:(t==null?void 0:t.title)||(t==null?void 0:t.id)||l})})]})},YO=Object.freeze(Object.defineProperty({__proto__:null,default:UO},Symbol.toStringTag,{value:"Module"})),KO=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const e=P(u=>u.pos),t=P(u=>u.data.settings.wayfindingFixedFrom),r=P(u=>u.openLocation),s=P(mr),o=t?s(t):void 0,l=()=>{r(t)};return o!=null&&o.coord&&Math.abs(e.x-(o==null?void 0:o.coord[0]))<.01&&Math.abs(e.y-(o==null?void 0:o.coord[1]))<.01?null:w.jsx("button",{type:"button",className:"mapplic-control-button",onClick:l,children:w.jsx(uu,{size:16})})}},Symbol.toStringTag,{value:"Module"})),qO=({layer:e})=>{var f,p;const t=P(VT),r=P(Ge),s=P(Ey),o=P(Wi),l=(p=(f=t==null?void 0:t[t.length-1])==null?void 0:f.slice(-1))==null?void 0:p[0],u=o(r,"wayfindingLineColor")||"red";return t.length<1?null:w.jsxs("svg",{viewBox:`0 0 ${r.mapWidth} ${r.mapHeight}`,style:{cursor:"crosshair",pointerEvents:"none",position:"absolute",top:0,left:0},children:[t.map((h,g)=>h[0].layer!==e?null:w.jsx(GO,{i:g,path:h,dist:Yt((h[h.length-1].realDist??0)-(h[0].realDist??0),2)},g)),l.layer===e&&w.jsxs("g",{children:[w.jsxs("circle",{cx:l.x,cy:l.y,fill:"none",r:s,stroke:u,strokeWidth:"1",children:[w.jsx("animate",{attributeName:"r",from:s,to:s*2,dur:"1.5s",begin:"0s",repeatCount:"indefinite"}),w.jsx("animate",{attributeName:"opacity",from:"1",to:"0",dur:"1.5s",begin:"0s",repeatCount:"indefinite"})]}),w.jsx("circle",{cx:l.x,cy:l.y,fill:u,r:s})]})]})},GO=({path:e,dist:t,i:r})=>{const s=P(XO),o=P(Ey),l=P(Ge),u=P(R=>R.setTarget),f=P(R=>R.setOffset),p=P(R=>R.animatedPath),h=P(R=>R.setAnimatedPath),y=P(Wi)(l,"wayfindingLineColor")||"red",v=L.useRef(null),[k,b]=L.useState(!1);L.useEffect(()=>{if(r===p){const R=()=>{b(!0),setTimeout(()=>{h(p+1)},(l.wayfindingSpeed||2)*1e3+400)},I=v.current.getBBox();b(!1);const z=Math.max(I.width,I.height)/2,H={x:Yt((I.x+I.width/2)/l.mapWidth,4),y:Yt((I.y+I.height/2)/l.mapHeight,4),scale:Yt(Math.min(l.mapWidth/(I.width+z),l.mapHeight/(I.height+z)),4)};f({h:0}),u(H);const $=setTimeout(R,200);return()=>clearTimeout($)}},[t,e,f,u,l,r,p,h]);const S=(R,I,z)=>{const H=I.x-R.x,$=I.y-R.y,K=Math.abs(R.realDist??0-(I.realDist??0)),V=Math.min(z,K/2),E=V/K;return{x:R.x+H*E,y:R.y+$*E}},C=R=>{let I="M "+R[0].x+","+R[0].y;for(let z=0;z0&&z=(p||-1)?t+" "+t:0,strokeDashoffset:k?0:t,transitionDelay:"0.4s",transitionTimingFunction:"ease-in-out",transitionDuration:`${l.wayfindingSpeed||2}s`,transitionProperty:k?"stroke-dashoffset":"none"}}),w.jsx("path",{className:"mapplic-routes-dashed",stroke:y,strokeOpacity:1,strokeWidth:o/2,strokeDasharray:`${o} ${o*1.5}`,strokeLinecap:"round",fill:"none",d:C(e)})]})},Ey=e=>Ge(e).wayfindingLineWidth||3,XO=e=>Ge(e).wayfindingSmoothing,QO=Object.freeze(Object.defineProperty({__proto__:null,default:qO},Symbol.toStringTag,{value:"Module"}))})();