@dynamo-caffeina-dev/locator-frontend 0.0.15 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(xe,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(xe=typeof globalThis<"u"?globalThis:xe||self,m(xe["@dynamo-caffeina-dev/locator-frontend"]={},xe.React,xe.ReactDOM))})(this,function(xe,m,nn){"use strict";function Tl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=Tl(m);function ur(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var on={exports:{}},_t={};/**
1
+ (function(ee,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(ee=typeof globalThis<"u"?globalThis:ee||self,m(ee["@dynamo-caffeina-dev/locator-frontend"]={},ee.React,ee.ReactDOM))})(this,function(ee,m,Ee){"use strict";var ny=Object.defineProperty;var oy=(ee,m,Ee)=>m in ee?ny(ee,m,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):ee[m]=Ee;var Rn=(ee,m,Ee)=>oy(ee,typeof m!="symbol"?m+"":m,Ee);function Ml(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=Ml(m);function pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var an={exports:{}},At={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var dr;function El(){if(dr)return _t;dr=1;var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,d={},f=null,g=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(g=l.ref);for(u in l)o.call(l,u)&&!s.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:f,ref:g,props:d,_owner:r.current}}return _t.Fragment=n,_t.jsx=i,_t.jsxs=i,_t}var Tt={};/**
9
+ */var mr;function Ll(){if(mr)return At;mr=1;var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)o.call(l,u)&&!s.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:f,ref:p,props:d,_owner:r.current}}return At.Fragment=n,At.jsx=i,At.jsxs=i,At}var Mt={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,128 +14,128 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var fr;function Pl(){return fr||(fr=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),h=Symbol.iterator,v="@@iterator";function S(p){if(p===null||typeof p!="object")return null;var C=h&&p[h]||p[v];return typeof C=="function"?C:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(p){{for(var C=arguments.length,E=new Array(C>1?C-1:0),j=1;j<C;j++)E[j-1]=arguments[j];w("error",p,E)}}function w(p,C,E){{var j=x.ReactDebugCurrentFrame,$=j.getStackAddendum();$!==""&&(C+="%s",E=E.concat([$]));var z=E.map(function(B){return String(B)});z.unshift("Warning: "+C),Function.prototype.apply.call(console[p],console,z)}}var P=!1,T=!1,M=!1,N=!1,A=!1,I;I=Symbol.for("react.module.reference");function V(p){return!!(typeof p=="string"||typeof p=="function"||p===o||p===s||A||p===r||p===c||p===u||N||p===g||P||T||M||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===a||p.$$typeof===l||p.$$typeof===I||p.getModuleId!==void 0))}function q(p,C,E){var j=p.displayName;if(j)return j;var $=C.displayName||C.name||"";return $!==""?E+"("+$+")":E}function ae(p){return p.displayName||"Context"}function le(p){if(p==null)return null;if(typeof p.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case o:return"Fragment";case n:return"Portal";case s:return"Profiler";case r:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case a:var C=p;return ae(C)+".Consumer";case i:var E=p;return ae(E._context)+".Provider";case l:return q(p,p.render,"ForwardRef");case d:var j=p.displayName||null;return j!==null?j:le(p.type)||"Memo";case f:{var $=p,z=$._payload,B=$._init;try{return le(B(z))}catch{return null}}}return null}var L=Object.assign,ce=0,J,D,_,F,ee,X,je;function ne(){}ne.__reactDisabledLog=!0;function Ge(){{if(ce===0){J=console.log,D=console.info,_=console.warn,F=console.error,ee=console.group,X=console.groupCollapsed,je=console.groupEnd;var p={configurable:!0,enumerable:!0,value:ne,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}ce++}}function en(){{if(ce--,ce===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},p,{value:J}),info:L({},p,{value:D}),warn:L({},p,{value:_}),error:L({},p,{value:F}),group:L({},p,{value:ee}),groupCollapsed:L({},p,{value:X}),groupEnd:L({},p,{value:je})})}ce<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var bt=x.ReactCurrentDispatcher,St;function kn(p,C,E){{if(St===void 0)try{throw Error()}catch($){var j=$.stack.trim().match(/\n( *(at )?)/);St=j&&j[1]||""}return`
18
- `+St+p}}var rr=!1,On;{var kg=typeof WeakMap=="function"?WeakMap:Map;On=new kg}function ul(p,C){if(!p||rr)return"";{var E=On.get(p);if(E!==void 0)return E}var j;rr=!0;var $=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var z;z=bt.current,bt.current=null,Ge();try{if(C){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(he){j=he}Reflect.construct(p,[],B)}else{try{B.call()}catch(he){j=he}p.call(B.prototype)}}else{try{throw Error()}catch(he){j=he}p()}}catch(he){if(he&&j&&typeof he.stack=="string"){for(var R=he.stack.split(`
17
+ */var gr;function Ol(){return gr||(gr=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.iterator,g="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var C=y&&h[y]||h[g];return typeof C=="function"?C:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(h){{for(var C=arguments.length,E=new Array(C>1?C-1:0),j=1;j<C;j++)E[j-1]=arguments[j];_("error",h,E)}}function _(h,C,E){{var j=x.ReactDebugCurrentFrame,$=j.getStackAddendum();$!==""&&(C+="%s",E=E.concat([$]));var z=E.map(function(B){return String(B)});z.unshift("Warning: "+C),Function.prototype.apply.call(console[h],console,z)}}var P=!1,T=!1,L=!1,N=!1,M=!1,R;R=Symbol.for("react.module.reference");function I(h){return!!(typeof h=="string"||typeof h=="function"||h===o||h===s||M||h===r||h===c||h===u||N||h===p||P||T||L||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===a||h.$$typeof===l||h.$$typeof===R||h.getModuleId!==void 0))}function q(h,C,E){var j=h.displayName;if(j)return j;var $=C.displayName||C.name||"";return $!==""?E+"("+$+")":E}function le(h){return h.displayName||"Context"}function re(h){if(h==null)return null;if(typeof h.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case o:return"Fragment";case n:return"Portal";case s:return"Profiler";case r:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var C=h;return le(C)+".Consumer";case i:var E=h;return le(E._context)+".Provider";case l:return q(h,h.render,"ForwardRef");case d:var j=h.displayName||null;return j!==null?j:re(h.type)||"Memo";case f:{var $=h,z=$._payload,B=$._init;try{return re(B(z))}catch{return null}}}return null}var ce=Object.assign,O=0,me,A,w,F,Q,X,Ie;function ne(){}ne.__reactDisabledLog=!0;function qe(){{if(O===0){me=console.log,A=console.info,w=console.warn,F=console.error,Q=console.group,X=console.groupCollapsed,Ie=console.groupEnd;var h={configurable:!0,enumerable:!0,value:ne,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}O++}}function rn(){{if(O--,O===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ce({},h,{value:me}),info:ce({},h,{value:A}),warn:ce({},h,{value:w}),error:ce({},h,{value:F}),group:ce({},h,{value:Q}),groupCollapsed:ce({},h,{value:X}),groupEnd:ce({},h,{value:Ie})})}O<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ct=x.ReactCurrentDispatcher,wt;function Tt(h,C,E){{if(wt===void 0)try{throw Error()}catch($){var j=$.stack.trim().match(/\n( *(at )?)/);wt=j&&j[1]||""}return`
18
+ `+wt+h}}var lr=!1,jn;{var Og=typeof WeakMap=="function"?WeakMap:Map;jn=new Og}function pl(h,C){if(!h||lr)return"";{var E=jn.get(h);if(E!==void 0)return E}var j;lr=!0;var $=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var z;z=ct.current,ct.current=null,qe();try{if(C){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(he){j=he}Reflect.construct(h,[],B)}else{try{B.call()}catch(he){j=he}h.call(B.prototype)}}else{try{throw Error()}catch(he){j=he}h()}}catch(he){if(he&&j&&typeof he.stack=="string"){for(var V=he.stack.split(`
19
19
  `),de=j.stack.split(`
20
- `),Z=R.length-1,Q=de.length-1;Z>=1&&Q>=0&&R[Z]!==de[Q];)Q--;for(;Z>=1&&Q>=0;Z--,Q--)if(R[Z]!==de[Q]){if(Z!==1||Q!==1)do if(Z--,Q--,Q<0||R[Z]!==de[Q]){var ye=`
21
- `+R[Z].replace(" at new "," at ");return p.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",p.displayName)),typeof p=="function"&&On.set(p,ye),ye}while(Z>=1&&Q>=0);break}}}finally{rr=!1,bt.current=z,en(),Error.prepareStackTrace=$}var Ct=p?p.displayName||p.name:"",it=Ct?kn(Ct):"";return typeof p=="function"&&On.set(p,it),it}function Og(p,C,E){return ul(p,!1)}function jg(p){var C=p.prototype;return!!(C&&C.isReactComponent)}function jn(p,C,E){if(p==null)return"";if(typeof p=="function")return ul(p,jg(p));if(typeof p=="string")return kn(p);switch(p){case c:return kn("Suspense");case u:return kn("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case l:return Og(p.render);case d:return jn(p.type,C,E);case f:{var j=p,$=j._payload,z=j._init;try{return jn(z($),C,E)}catch{}}}return""}var tn=Object.prototype.hasOwnProperty,dl={},fl=x.ReactDebugCurrentFrame;function Nn(p){if(p){var C=p._owner,E=jn(p.type,p._source,C?C.type:null);fl.setExtraStackFrame(E)}else fl.setExtraStackFrame(null)}function Ng(p,C,E,j,$){{var z=Function.call.bind(tn);for(var B in p)if(z(p,B)){var R=void 0;try{if(typeof p[B]!="function"){var de=Error((j||"React class")+": "+E+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw de.name="Invariant Violation",de}R=p[B](C,B,j,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z){R=Z}R&&!(R instanceof Error)&&(Nn($),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",E,B,typeof R),Nn(null)),R instanceof Error&&!(R.message in dl)&&(dl[R.message]=!0,Nn($),b("Failed %s type: %s",E,R.message),Nn(null))}}}var Vg=Array.isArray;function sr(p){return Vg(p)}function Ig(p){{var C=typeof Symbol=="function"&&Symbol.toStringTag,E=C&&p[Symbol.toStringTag]||p.constructor.name||"Object";return E}}function Rg(p){try{return hl(p),!1}catch{return!0}}function hl(p){return""+p}function pl(p){if(Rg(p))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ig(p)),hl(p)}var ml=x.ReactCurrentOwner,Bg={key:!0,ref:!0,__self:!0,__source:!0},gl,yl;function Fg(p){if(tn.call(p,"ref")){var C=Object.getOwnPropertyDescriptor(p,"ref").get;if(C&&C.isReactWarning)return!1}return p.ref!==void 0}function $g(p){if(tn.call(p,"key")){var C=Object.getOwnPropertyDescriptor(p,"key").get;if(C&&C.isReactWarning)return!1}return p.key!==void 0}function zg(p,C){typeof p.ref=="string"&&ml.current}function Ug(p,C){{var E=function(){gl||(gl=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};E.isReactWarning=!0,Object.defineProperty(p,"key",{get:E,configurable:!0})}}function Xg(p,C){{var E=function(){yl||(yl=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};E.isReactWarning=!0,Object.defineProperty(p,"ref",{get:E,configurable:!0})}}var Wg=function(p,C,E,j,$,z,B){var R={$$typeof:t,type:p,key:C,ref:E,props:B,_owner:z};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function Gg(p,C,E,j,$){{var z,B={},R=null,de=null;E!==void 0&&(pl(E),R=""+E),$g(C)&&(pl(C.key),R=""+C.key),Fg(C)&&(de=C.ref,zg(C,$));for(z in C)tn.call(C,z)&&!Bg.hasOwnProperty(z)&&(B[z]=C[z]);if(p&&p.defaultProps){var Z=p.defaultProps;for(z in Z)B[z]===void 0&&(B[z]=Z[z])}if(R||de){var Q=typeof p=="function"?p.displayName||p.name||"Unknown":p;R&&Ug(B,Q),de&&Xg(B,Q)}return Wg(p,R,de,$,j,ml.current,B)}}var ir=x.ReactCurrentOwner,vl=x.ReactDebugCurrentFrame;function wt(p){if(p){var C=p._owner,E=jn(p.type,p._source,C?C.type:null);vl.setExtraStackFrame(E)}else vl.setExtraStackFrame(null)}var ar;ar=!1;function lr(p){return typeof p=="object"&&p!==null&&p.$$typeof===t}function xl(){{if(ir.current){var p=le(ir.current.type);if(p)return`
20
+ `),Z=V.length-1,J=de.length-1;Z>=1&&J>=0&&V[Z]!==de[J];)J--;for(;Z>=1&&J>=0;Z--,J--)if(V[Z]!==de[J]){if(Z!==1||J!==1)do if(Z--,J--,J<0||V[Z]!==de[J]){var xe=`
21
+ `+V[Z].replace(" at new "," at ");return h.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",h.displayName)),typeof h=="function"&&jn.set(h,xe),xe}while(Z>=1&&J>=0);break}}}finally{lr=!1,ct.current=z,rn(),Error.prepareStackTrace=$}var Pt=h?h.displayName||h.name:"",ut=Pt?Tt(Pt):"";return typeof h=="function"&&jn.set(h,ut),ut}function Dg(h,C,E){return pl(h,!1)}function kg(h){var C=h.prototype;return!!(C&&C.isReactComponent)}function In(h,C,E){if(h==null)return"";if(typeof h=="function")return pl(h,kg(h));if(typeof h=="string")return Tt(h);switch(h){case c:return Tt("Suspense");case u:return Tt("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return Dg(h.render);case d:return In(h.type,C,E);case f:{var j=h,$=j._payload,z=j._init;try{return In(z($),C,E)}catch{}}}return""}var sn=Object.prototype.hasOwnProperty,ml={},gl=x.ReactDebugCurrentFrame;function Vn(h){if(h){var C=h._owner,E=In(h.type,h._source,C?C.type:null);gl.setExtraStackFrame(E)}else gl.setExtraStackFrame(null)}function Ng(h,C,E,j,$){{var z=Function.call.bind(sn);for(var B in h)if(z(h,B)){var V=void 0;try{if(typeof h[B]!="function"){var de=Error((j||"React class")+": "+E+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw de.name="Invariant Violation",de}V=h[B](C,B,j,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z){V=Z}V&&!(V instanceof Error)&&(Vn($),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",j||"React class",E,B,typeof V),Vn(null)),V instanceof Error&&!(V.message in ml)&&(ml[V.message]=!0,Vn($),b("Failed %s type: %s",E,V.message),Vn(null))}}}var jg=Array.isArray;function cr(h){return jg(h)}function Ig(h){{var C=typeof Symbol=="function"&&Symbol.toStringTag,E=C&&h[Symbol.toStringTag]||h.constructor.name||"Object";return E}}function Vg(h){try{return yl(h),!1}catch{return!0}}function yl(h){return""+h}function vl(h){if(Vg(h))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ig(h)),yl(h)}var xl=x.ReactCurrentOwner,Rg={key:!0,ref:!0,__self:!0,__source:!0},bl,Sl;function Bg(h){if(sn.call(h,"ref")){var C=Object.getOwnPropertyDescriptor(h,"ref").get;if(C&&C.isReactWarning)return!1}return h.ref!==void 0}function Fg(h){if(sn.call(h,"key")){var C=Object.getOwnPropertyDescriptor(h,"key").get;if(C&&C.isReactWarning)return!1}return h.key!==void 0}function $g(h,C){typeof h.ref=="string"&&xl.current}function zg(h,C){{var E=function(){bl||(bl=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};E.isReactWarning=!0,Object.defineProperty(h,"key",{get:E,configurable:!0})}}function Ug(h,C){{var E=function(){Sl||(Sl=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};E.isReactWarning=!0,Object.defineProperty(h,"ref",{get:E,configurable:!0})}}var Xg=function(h,C,E,j,$,z,B){var V={$$typeof:t,type:h,key:C,ref:E,props:B,_owner:z};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:j}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function Wg(h,C,E,j,$){{var z,B={},V=null,de=null;E!==void 0&&(vl(E),V=""+E),Fg(C)&&(vl(C.key),V=""+C.key),Bg(C)&&(de=C.ref,$g(C,$));for(z in C)sn.call(C,z)&&!Rg.hasOwnProperty(z)&&(B[z]=C[z]);if(h&&h.defaultProps){var Z=h.defaultProps;for(z in Z)B[z]===void 0&&(B[z]=Z[z])}if(V||de){var J=typeof h=="function"?h.displayName||h.name||"Unknown":h;V&&zg(B,J),de&&Ug(B,J)}return Xg(h,V,de,$,j,xl.current,B)}}var ur=x.ReactCurrentOwner,_l=x.ReactDebugCurrentFrame;function Et(h){if(h){var C=h._owner,E=In(h.type,h._source,C?C.type:null);_l.setExtraStackFrame(E)}else _l.setExtraStackFrame(null)}var dr;dr=!1;function fr(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function Cl(){{if(ur.current){var h=re(ur.current.type);if(h)return`
22
22
 
23
- Check the render method of \``+p+"`."}return""}}function Kg(p){return""}var bl={};function Hg(p){{var C=xl();if(!C){var E=typeof p=="string"?p:p.displayName||p.name;E&&(C=`
23
+ Check the render method of \``+h+"`."}return""}}function Gg(h){return""}var wl={};function Hg(h){{var C=Cl();if(!C){var E=typeof h=="string"?h:h.displayName||h.name;E&&(C=`
24
24
 
25
- Check the top-level render call using <`+E+">.")}return C}}function Sl(p,C){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var E=Hg(C);if(bl[E])return;bl[E]=!0;var j="";p&&p._owner&&p._owner!==ir.current&&(j=" It was passed a child from "+le(p._owner.type)+"."),wt(p),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,j),wt(null)}}function wl(p,C){{if(typeof p!="object")return;if(sr(p))for(var E=0;E<p.length;E++){var j=p[E];lr(j)&&Sl(j,C)}else if(lr(p))p._store&&(p._store.validated=!0);else if(p){var $=S(p);if(typeof $=="function"&&$!==p.entries)for(var z=$.call(p),B;!(B=z.next()).done;)lr(B.value)&&Sl(B.value,C)}}}function qg(p){{var C=p.type;if(C==null||typeof C=="string")return;var E;if(typeof C=="function")E=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))E=C.propTypes;else return;if(E){var j=le(C);Ng(E,p.props,"prop",j,p)}else if(C.PropTypes!==void 0&&!ar){ar=!0;var $=le(C);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",$||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Yg(p){{for(var C=Object.keys(p.props),E=0;E<C.length;E++){var j=C[E];if(j!=="children"&&j!=="key"){wt(p),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),wt(null);break}}p.ref!==null&&(wt(p),b("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var Cl={};function _l(p,C,E,j,$,z){{var B=V(p);if(!B){var R="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var de=Kg();de?R+=de:R+=xl();var Z;p===null?Z="null":sr(p)?Z="array":p!==void 0&&p.$$typeof===t?(Z="<"+(le(p.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):Z=typeof p,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Z,R)}var Q=Gg(p,C,E,$,z);if(Q==null)return Q;if(B){var ye=C.children;if(ye!==void 0)if(j)if(sr(ye)){for(var Ct=0;Ct<ye.length;Ct++)wl(ye[Ct],p);Object.freeze&&Object.freeze(ye)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else wl(ye,p)}if(tn.call(C,"key")){var it=le(p),he=Object.keys(C).filter(function(ny){return ny!=="key"}),cr=he.length>0?"{key: someKey, "+he.join(": ..., ")+": ...}":"{key: someKey}";if(!Cl[it+cr]){var ty=he.length>0?"{"+he.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+E+">.")}return C}}function Tl(h,C){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var E=Hg(C);if(wl[E])return;wl[E]=!0;var j="";h&&h._owner&&h._owner!==ur.current&&(j=" It was passed a child from "+re(h._owner.type)+"."),Et(h),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,j),Et(null)}}function El(h,C){{if(typeof h!="object")return;if(cr(h))for(var E=0;E<h.length;E++){var j=h[E];fr(j)&&Tl(j,C)}else if(fr(h))h._store&&(h._store.validated=!0);else if(h){var $=S(h);if(typeof $=="function"&&$!==h.entries)for(var z=$.call(h),B;!(B=z.next()).done;)fr(B.value)&&Tl(B.value,C)}}}function Kg(h){{var C=h.type;if(C==null||typeof C=="string")return;var E;if(typeof C=="function")E=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))E=C.propTypes;else return;if(E){var j=re(C);Ng(E,h.props,"prop",j,h)}else if(C.PropTypes!==void 0&&!dr){dr=!0;var $=re(C);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",$||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qg(h){{for(var C=Object.keys(h.props),E=0;E<C.length;E++){var j=C[E];if(j!=="children"&&j!=="key"){Et(h),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",j),Et(null);break}}h.ref!==null&&(Et(h),b("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}var Pl={};function Al(h,C,E,j,$,z){{var B=I(h);if(!B){var V="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(V+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var de=Gg();de?V+=de:V+=Cl();var Z;h===null?Z="null":cr(h)?Z="array":h!==void 0&&h.$$typeof===t?(Z="<"+(re(h.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):Z=typeof h,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Z,V)}var J=Wg(h,C,E,$,z);if(J==null)return J;if(B){var xe=C.children;if(xe!==void 0)if(j)if(cr(xe)){for(var Pt=0;Pt<xe.length;Pt++)El(xe[Pt],h);Object.freeze&&Object.freeze(xe)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else El(xe,h)}if(sn.call(C,"key")){var ut=re(h),he=Object.keys(C).filter(function(ty){return ty!=="key"}),hr=he.length>0?"{key: someKey, "+he.join(": ..., ")+": ...}":"{key: someKey}";if(!Pl[ut+hr]){var ey=he.length>0?"{"+he.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,cr,it,ty,it),Cl[it+cr]=!0}}return p===o?Yg(Q):qg(Q),Q}}function Zg(p,C,E){return _l(p,C,E,!0)}function Jg(p,C,E){return _l(p,C,E,!1)}var Qg=Jg,ey=Zg;Tt.Fragment=o,Tt.jsx=Qg,Tt.jsxs=ey}()),Tt}var hr;function Al(){return hr||(hr=1,process.env.NODE_ENV==="production"?on.exports=El():on.exports=Pl()),on.exports}var y=Al(),Ke=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(Ke||{});const pr=e=>{let t;const n=new Set,o=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(g=>g(t,f))}},r=()=>t,a={setState:o,getState:r,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(o,r,a);return a},Ml=e=>e?pr(e):pr,Ll=e=>e;function Dl(e,t=Ll){const n=m.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return m.useDebugValue(n),n}const mr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LOCATOR_DEMO_APP_API_BASE_URL:"https://develop.place-locator.airc.n3.caffeina.host/api",VITE_LOCATOR_DEMO_APP_GOOGLE_MAPS_API_KEY:"AIzaSyBPE8v1IxBu-lZ1cue8qUrTyHeZEED7ESA"},Vn=new Map,rn=e=>{const t=Vn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,o])=>[n,o.getState()])):{}},kl=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const o=Vn.get(n.name);if(o)return{type:"tracked",store:e,...o};const r={connection:t.connect(n),stores:{}};return Vn.set(n.name,r),{type:"tracked",store:e,...r}},Ol=(e,t={})=>(n,o,r)=>{const{enabled:s,anonymousActionType:i,store:a,...l}=t;let c;try{c=(s??(mr?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,o,r);const{connection:u,...d}=kl(a,c,l);let f=!0;r.setState=(v,S,x)=>{const b=n(v,S);if(!f)return b;const w=x===void 0?{type:i||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(u==null||u.send(w,o()),b):(u==null||u.send({...w,type:`${a}/${w.type}`},{...rn(l.name),[a]:r.getState()}),b)};const g=(...v)=>{const S=f;f=!1,n(...v),f=S},h=e(r.setState,o,r);if(d.type==="untracked"?u==null||u.init(h):(d.stores[d.store]=r,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([v,S])=>[v,v===d.store?h:S.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let v=!1;const S=r.dispatch;r.dispatch=(...x)=>{(mr?"production":void 0)!=="production"&&x[0].type==="__setState"&&!v&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),v=!0),S(...x)}}return u.subscribe(v=>{var S;switch(v.type){case"ACTION":if(typeof v.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return In(v.payload,x=>{if(x.type==="__setState"){if(a===void 0){g(x.state);return}Object.keys(x.state).length!==1&&console.error(`
30
+ <%s key={someKey} {...props} />`,hr,ut,ey,ut),Pl[ut+hr]=!0}}return h===o?qg(J):Kg(J),J}}function Yg(h,C,E){return Al(h,C,E,!0)}function Zg(h,C,E){return Al(h,C,E,!1)}var Jg=Zg,Qg=Yg;Mt.Fragment=o,Mt.jsx=Jg,Mt.jsxs=Qg}()),Mt}var yr;function Dl(){return yr||(yr=1,process.env.NODE_ENV==="production"?an.exports=Ll():an.exports=Ol()),an.exports}var v=Dl(),Ye=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(Ye||{});const vr=e=>{let t;const n=new Set,o=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},r=()=>t,a={setState:o,getState:r,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(o,r,a);return a},kl=e=>e?vr(e):vr,Nl=e=>e;function jl(e,t=Nl){const n=m.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return m.useDebugValue(n),n}const xr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LOCATOR_DEMO_APP_API_BASE_URL:"https://develop.place-locator.airc.n3.caffeina.host/api",VITE_LOCATOR_DEMO_APP_GOOGLE_MAPS_API_KEY:"AIzaSyBPE8v1IxBu-lZ1cue8qUrTyHeZEED7ESA"},Bn=new Map,ln=e=>{const t=Bn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,o])=>[n,o.getState()])):{}},Il=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const o=Bn.get(n.name);if(o)return{type:"tracked",store:e,...o};const r={connection:t.connect(n),stores:{}};return Bn.set(n.name,r),{type:"tracked",store:e,...r}},Vl=(e,t={})=>(n,o,r)=>{const{enabled:s,anonymousActionType:i,store:a,...l}=t;let c;try{c=(s??(xr?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,o,r);const{connection:u,...d}=Il(a,c,l);let f=!0;r.setState=(g,S,x)=>{const b=n(g,S);if(!f)return b;const _=x===void 0?{type:i||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(u==null||u.send(_,o()),b):(u==null||u.send({..._,type:`${a}/${_.type}`},{...ln(l.name),[a]:r.getState()}),b)};const p=(...g)=>{const S=f;f=!1,n(...g),f=S},y=e(r.setState,o,r);if(d.type==="untracked"?u==null||u.init(y):(d.stores[d.store]=r,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([g,S])=>[g,g===d.store?y:S.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let g=!1;const S=r.dispatch;r.dispatch=(...x)=>{(xr?"production":void 0)!=="production"&&x[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),S(...x)}}return u.subscribe(g=>{var S;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Fn(g.payload,x=>{if(x.type==="__setState"){if(a===void 0){p(x.state);return}Object.keys(x.state).length!==1&&console.error(`
31
31
  [zustand devtools middleware] Unsupported __setState action format.
32
32
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
33
33
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
34
- `);const b=x.state[a];if(b==null)return;JSON.stringify(r.getState())!==JSON.stringify(b)&&g(b);return}r.dispatchFromDevtools&&typeof r.dispatch=="function"&&r.dispatch(x)});case"DISPATCH":switch(v.payload.type){case"RESET":return g(h),a===void 0?u==null?void 0:u.init(r.getState()):u==null?void 0:u.init(rn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(r.getState());return}return u==null?void 0:u.init(rn(l.name));case"ROLLBACK":return In(v.state,x=>{if(a===void 0){g(x),u==null||u.init(r.getState());return}g(x[a]),u==null||u.init(rn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return In(v.state,x=>{if(a===void 0){g(x);return}JSON.stringify(r.getState())!==JSON.stringify(x[a])&&g(x[a])});case"IMPORT_STATE":{const{nextLiftedState:x}=v.payload,b=(S=x.computedStates.slice(-1)[0])==null?void 0:S.state;if(!b)return;g(a===void 0?b:b[a]),u==null||u.send(null,x);return}case"PAUSE_RECORDING":return f=!f}return}}),h},In=(e,t)=>{let n;try{n=JSON.parse(e)}catch(o){console.error("[zustand devtools middleware] Could not parse the received json",o)}n!==void 0&&t(n)},jl={lang:"IT",labels:{"InfoWindow.CTA_1":"Percorso","InfoWindow.CTA_2":"Dettagli","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato","Map.areaSearchButton":"Cerca nell'area","Map.areaSearchTooltip":"Posiziona la mappa e avvia la ricerca","Map.areaSearchVisualCueCTA":"Esegui ricerca","Search.geolocationButton":"Geolocalizzati","Search.placeholder":"La tua città","ShareSheet.copyLinkErrorNotif":"Impossibile copiare il link","ShareSheet.copyLinkSuccessNotif":"Link copiato in clipboard!","ShareSheet.copyLinkTooltip":"Copia link","ShareSheet.genericShareTooltip":"Condividi su ","ShareSheet.shareViaEmailTooltip":"Condividi via email","ShareSheet.title":"Condividi"}},Nl=()=>Ml()(Ol(e=>({mapId:void 0,locations:[],mapDetail:Ke.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,isLocationListExpanded:!1,isShareSheetOpen:!1,localizationConfig:jl,featureFlags:{fullscreen:!0,search:!0,share:!0},setMapId:t=>e({mapId:t},!1,"SET_MAP_ID"),setLocations:t=>e({locations:t},!1,"SET_LOCATIONS"),setMapDetail:t=>e({mapDetail:t},!1,"SET_MAP_DETAIL"),setFullscreen:t=>e({isFullscreen:t},!1,"SET_FULLSCREEN"),setSelectedLocation:t=>e({selectedLocation:t},!1,"SET_SELECTED_LOCATION"),setShouldRefetch:t=>e({shouldRefetch:t},!1,"SET_SHOULD_REFETCH"),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}},!1,"ZOOM_TO_LOCATION"),clearTargetLocation:()=>e({targetLocation:null},!1,"CLEAR_TARGET_LOCATION"),setIsLocationListExpanded:t=>e({isLocationListExpanded:t},!1,"SET_IS_LOCATION_LIST_EXPANDED"),toggleShareSheet:t=>e({isShareSheetOpen:t},!1,"TOGGLE_SHARE_SHEET"),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}}),!1,"SET_LOCALIZATION_CONFIG"),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}),!1,"SET_FEATURE_FLAGS")}),{name:`LocatorStore_${Date.now()}`})),gr=m.createContext(null);function Vl({children:e}){const[t]=m.useState(Nl);return y.jsx(gr.Provider,{value:t,children:e})}function O(e){const t=m.useContext(gr);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Dl(t,e)}var Rn={exports:{}};/*!
34
+ `);const b=x.state[a];if(b==null)return;JSON.stringify(r.getState())!==JSON.stringify(b)&&p(b);return}r.dispatchFromDevtools&&typeof r.dispatch=="function"&&r.dispatch(x)});case"DISPATCH":switch(g.payload.type){case"RESET":return p(y),a===void 0?u==null?void 0:u.init(r.getState()):u==null?void 0:u.init(ln(l.name));case"COMMIT":if(a===void 0){u==null||u.init(r.getState());return}return u==null?void 0:u.init(ln(l.name));case"ROLLBACK":return Fn(g.state,x=>{if(a===void 0){p(x),u==null||u.init(r.getState());return}p(x[a]),u==null||u.init(ln(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Fn(g.state,x=>{if(a===void 0){p(x);return}JSON.stringify(r.getState())!==JSON.stringify(x[a])&&p(x[a])});case"IMPORT_STATE":{const{nextLiftedState:x}=g.payload,b=(S=x.computedStates.slice(-1)[0])==null?void 0:S.state;if(!b)return;p(a===void 0?b:b[a]),u==null||u.send(null,x);return}case"PAUSE_RECORDING":return f=!f}return}}),y},Fn=(e,t)=>{let n;try{n=JSON.parse(e)}catch(o){console.error("[zustand devtools middleware] Could not parse the received json",o)}n!==void 0&&t(n)},Rl={lang:"IT",labels:{"InfoWindow.CTA_1":"Percorso","InfoWindow.CTA_2":"Dettagli","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato","Map.areaSearchButton":"Cerca nell'area","Map.areaSearchTooltip":"Posiziona la mappa e avvia la ricerca","Map.areaSearchVisualCueCTA":"Esegui ricerca","Search.geolocationButton":"Geolocalizzati","Search.placeholder":"La tua città","ShareSheet.copyLinkErrorNotif":"Impossibile copiare il link","ShareSheet.copyLinkSuccessNotif":"Link copiato in clipboard!","ShareSheet.copyLinkTooltip":"Copia link","ShareSheet.genericShareTooltip":"Condividi su ","ShareSheet.shareViaEmailTooltip":"Condividi via email","ShareSheet.title":"Condividi"}},Bl=()=>kl()(Vl(e=>({mapId:void 0,locations:[],mapDetail:Ye.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,isLocationListExpanded:!1,isShareSheetOpen:!1,localizationConfig:Rl,featureFlags:{fullscreen:!0,search:!0,share:!0},setMapId:t=>e({mapId:t},!1,"SET_MAP_ID"),setLocations:t=>e({locations:t},!1,"SET_LOCATIONS"),setMapDetail:t=>e({mapDetail:t},!1,"SET_MAP_DETAIL"),setFullscreen:t=>e({isFullscreen:t},!1,"SET_FULLSCREEN"),setSelectedLocation:t=>e({selectedLocation:t},!1,"SET_SELECTED_LOCATION"),setShouldRefetch:t=>e({shouldRefetch:t},!1,"SET_SHOULD_REFETCH"),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}},!1,"ZOOM_TO_LOCATION"),clearTargetLocation:()=>e({targetLocation:null},!1,"CLEAR_TARGET_LOCATION"),setIsLocationListExpanded:t=>e({isLocationListExpanded:t},!1,"SET_IS_LOCATION_LIST_EXPANDED"),toggleShareSheet:t=>e({isShareSheetOpen:t},!1,"TOGGLE_SHARE_SHEET"),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}}),!1,"SET_LOCALIZATION_CONFIG"),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}),!1,"SET_FEATURE_FLAGS")}),{name:`LocatorStore_${Date.now()}`})),br=m.createContext(null);function Fl({children:e}){const[t]=m.useState(Bl);return v.jsx(br.Provider,{value:t,children:e})}function k(e){const t=m.useContext(br);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return jl(t,e)}var $n={exports:{}};/*!
35
35
  Copyright (c) 2018 Jed Watson.
36
36
  Licensed under the MIT License (MIT), see
37
37
  http://jedwatson.github.io/classnames
38
- */var yr;function Il(){return yr||(yr=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=r(s,o(a)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var a in s)t.call(s,a)&&s[a]&&(i=r(i,a));return i}function r(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Rn)),Rn.exports}var Rl=Il();const W=ur(Rl),vr={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},xr={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Et({className:e,size:t="medium",color:n="primary",...o}){const r=W(xr.root,e);return y.jsx("div",{className:r,"data-size":t,"data-color":n,...o,children:y.jsx("div",{className:xr.spinner})})}const Bl=m.lazy(()=>Promise.resolve().then(()=>Pg)),Fl=m.lazy(()=>Promise.resolve().then(()=>Mg)),$l=m.lazy(()=>Promise.resolve().then(()=>Dg));function zl({children:e,mapProvider:t}){const{name:n,APIKey:o,config:r}=t??{};if(!o||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const s=y.jsx("div",{className:vr.loaderContainer,children:y.jsx(Et,{size:"large",color:"primary"})});return y.jsx(m.Suspense,{fallback:s,children:(()=>{switch(n){case"mapbox":return y.jsx(Fl,{apiKey:o,...r??{},children:e});case"here":return y.jsx($l,{apiKey:o,...r??{},children:e});case"google":return y.jsx(Bl,{apiKey:o,...r??{},children:e});default:return null}})()})}const Ul={container:"_container_17c19_4"},Pt={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
38
+ */var Sr;function $l(){return Sr||(Sr=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=r(s,o(a)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var a in s)t.call(s,a)&&s[a]&&(i=r(i,a));return i}function r(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}($n)),$n.exports}var zl=$l();const W=pr(zl),_r={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},Cr={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Lt({className:e,size:t="medium",color:n="primary",...o}){const r=W(Cr.root,e);return v.jsx("div",{className:r,"data-size":t,"data-color":n,...o,children:v.jsx("div",{className:Cr.spinner})})}const Ul=m.lazy(()=>Promise.resolve().then(()=>Eg)),Xl=m.lazy(()=>Promise.resolve().then(()=>Ag)),Wl=m.lazy(()=>Promise.resolve().then(()=>Lg));function Gl({children:e,mapProvider:t}){const{name:n,APIKey:o,config:r}=t??{};if(!o||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const s=v.jsx("div",{className:_r.loaderContainer,children:v.jsx(Lt,{size:"large",color:"primary"})});return v.jsx(m.Suspense,{fallback:s,children:(()=>{switch(n){case"mapbox":return v.jsx(Xl,{apiKey:o,...r??{},children:e});case"here":return v.jsx(Wl,{apiKey:o,...r??{},children:e});case"google":return v.jsx(Ul,{apiKey:o,...r??{},children:e});default:return null}})()})}const Hl={container:"_container_17c19_4"},Ot={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
39
39
  * @license lucide-react v0.483.0 - ISC
40
40
  *
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
- */const Xl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),br=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/**
43
+ */const Kl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wr=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/**
44
44
  * @license lucide-react v0.483.0 - ISC
45
45
  *
46
46
  * This source code is licensed under the ISC license.
47
47
  * See the LICENSE file in the root directory of this source tree.
48
- */var Wl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
48
+ */var ql={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
49
49
  * @license lucide-react v0.483.0 - ISC
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */const Gl=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:i,...a},l)=>m.createElement("svg",{ref:l,...Wl,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:br("lucide",r),...a},[...i.map(([c,u])=>m.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
53
+ */const Yl=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:i,...a},l)=>m.createElement("svg",{ref:l,...ql,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:wr("lucide",r),...a},[...i.map(([c,u])=>m.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
54
54
  * @license lucide-react v0.483.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
- */const re=(e,t)=>{const n=m.forwardRef(({className:o,...r},s)=>m.createElement(Gl,{ref:s,iconNode:t,className:br(`lucide-${Xl(e)}`,o),...r}));return n.displayName=`${e}`,n};/**
58
+ */const se=(e,t)=>{const n=m.forwardRef(({className:o,...r},s)=>m.createElement(Yl,{ref:s,iconNode:t,className:wr(`lucide-${Kl(e)}`,o),...r}));return n.displayName=`${e}`,n};/**
59
59
  * @license lucide-react v0.483.0 - ISC
60
60
  *
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
- */const Kl=re("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
63
+ */const Zl=se("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
64
64
  * @license lucide-react v0.483.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const Hl=re("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
68
+ */const Jl=se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
69
69
  * @license lucide-react v0.483.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
- */const ql=re("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
73
+ */const Ql=se("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
74
74
  * @license lucide-react v0.483.0 - ISC
75
75
  *
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
- */const Yl=re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
78
+ */const ec=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
79
79
  * @license lucide-react v0.483.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
- */const Zl=re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
83
+ */const tc=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
84
84
  * @license lucide-react v0.483.0 - ISC
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const Jl=re("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
88
+ */const nc=se("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
89
89
  * @license lucide-react v0.483.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
- */const Ql=re("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
93
+ */const oc=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
94
94
  * @license lucide-react v0.483.0 - ISC
95
95
  *
96
96
  * This source code is licensed under the ISC license.
97
97
  * See the LICENSE file in the root directory of this source tree.
98
- */const ec=re("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
98
+ */const rc=se("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
99
99
  * @license lucide-react v0.483.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
- */const tc=re("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
103
+ */const sc=se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
104
104
  * @license lucide-react v0.483.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
- */const nc=re("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
108
+ */const ic=se("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
109
109
  * @license lucide-react v0.483.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
- */const oc=re("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
113
+ */const ac=se("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
114
114
  * @license lucide-react v0.483.0 - ISC
115
115
  *
116
116
  * This source code is licensed under the ISC license.
117
117
  * See the LICENSE file in the root directory of this source tree.
118
- */const rc=re("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
118
+ */const lc=se("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
119
119
  * @license lucide-react v0.483.0 - ISC
120
120
  *
121
121
  * This source code is licensed under the ISC license.
122
122
  * See the LICENSE file in the root directory of this source tree.
123
- */const sc=re("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
123
+ */const cc=se("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
124
124
  * @license lucide-react v0.483.0 - ISC
125
125
  *
126
126
  * This source code is licensed under the ISC license.
127
127
  * See the LICENSE file in the root directory of this source tree.
128
- */const ic=re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
128
+ */const uc=se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
129
129
  * @license lucide-react v0.483.0 - ISC
130
130
  *
131
131
  * This source code is licensed under the ISC license.
132
132
  * See the LICENSE file in the root directory of this source tree.
133
- */const ac=re("SquareArrowOutUpRight",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]);/**
133
+ */const dc=se("SquareArrowOutUpRight",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]);/**
134
134
  * @license lucide-react v0.483.0 - ISC
135
135
  *
136
136
  * This source code is licensed under the ISC license.
137
137
  * See the LICENSE file in the root directory of this source tree.
138
- */const Sr=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wr=m.createContext({});function lc(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bn=typeof window<"u",cc=Bn?m.useLayoutEffect:m.useEffect,Fn=m.createContext(null),Cr=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uc(e=!0){const t=m.useContext(Fn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=m.useId();m.useEffect(()=>{if(e)return r(s)},[e]);const i=m.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,i]:[!0]}function $n(e,t){e.indexOf(t)===-1&&e.push(t)}function zn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const fe=e=>e;let at=fe,Ne=fe;process.env.NODE_ENV!=="production"&&(at=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ne=(e,t)=>{if(!e)throw new Error(t)});const dc={useManualTiming:!1};function Un(e){let t;return()=>(t===void 0&&(t=e()),t)}const lt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Xn{constructor(){this.subscriptions=[]}add(t){return $n(this.subscriptions,t),()=>zn(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const i=this.subscriptions[s];i&&i(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const be=e=>e*1e3,Te=e=>e/1e3;function _r(e,t){return t?e*(1e3/t):0}const Tr=new Set;function sn(e,t,n){e||Tr.has(t)||(console.warn(t),Tr.add(t))}const fc=Un(()=>window.ScrollTimeline!==void 0);class hc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(fc()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class pc extends hc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Wn(e,t){return e?e[t]||e.default||e:void 0}const Gn=2e4;function Er(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Gn;)t+=n,o=e.next(t);return t>=Gn?1/0:t}function Kn(e){return typeof e=="function"}function Pr(e,t){e.timeline=t,e.onfinish=null}const Hn=e=>Array.isArray(e)&&typeof e[0]=="number",mc={linearEasing:void 0};function gc(e,t){const n=Un(e);return()=>{var o;return(o=mc[t])!==null&&o!==void 0?o:n()}}const an=gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ar=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(lt(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function Mr(e){return!!(typeof e=="function"&&an()||!e||typeof e=="string"&&(e in qn||an())||Hn(e)||Array.isArray(e)&&e.every(Mr))}const At=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function Lr(e,t){if(e)return typeof e=="function"&&an()?Ar(e,t):Hn(e)?At(e):Array.isArray(e)?e.map(n=>Lr(n,t)||qn.easeOut):qn[e]}const ln=["read","resolveKeyframes","update","preRender","render","postRender"],Dr={value:null};function yc(e,t){let n=new Set,o=new Set,r=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,g=!1)=>{const v=g&&r?n:o;return f&&i.add(d),v.has(d)||v.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(a=d,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(c),t&&Dr.value&&Dr.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,u.process(d))}};return u}const vc=40;function kr(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=ln.reduce((x,b)=>(x[b]=yc(s,t?b:void 0),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,g=()=>{const x=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,vc),1),r.timestamp=x,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},h=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:ln.reduce((x,b)=>{const w=i[b];return x[b]=(P,T=!1,M=!1)=>(n||h(),w.schedule(P,T,M)),x},{}),cancel:x=>{for(let b=0;b<ln.length;b++)i[ln[b]].cancel(x)},state:r,steps:i}}const{schedule:U,cancel:Ve,state:oe,steps:Yn}=kr(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0),{schedule:Zn}=kr(queueMicrotask,!1);let cn;function xc(){cn=void 0}const Se={now:()=>(cn===void 0&&Se.set(oe.isProcessing||dc.useManualTiming?oe.timestamp:performance.now()),cn),set:e=>{cn=e,queueMicrotask(xc)}},ve={x:!1,y:!1};function Or(){return ve.x||ve.y}function bc(e){return e==="x"||e==="y"?ve[e]?null:(ve[e]=!0,()=>{ve[e]=!1}):ve.x||ve.y?null:(ve.x=ve.y=!0,()=>{ve.x=ve.y=!1})}function Sc(e,t,n){var o;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function jr(e,t){const n=Sc(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Nr(e){return!(e.pointerType==="touch"||Or())}function wc(e,t,n={}){const[o,r,s]=jr(e,n),i=a=>{if(!Nr(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Nr(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return o.forEach(a=>{a.addEventListener("pointerenter",i,r)}),s}function Vr(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Ir=(e,t)=>t?e===t?!0:Ir(e,t.parentElement):!1,Jn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Cc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _c(e){return Cc.has(e.tagName)||e.tabIndex!==-1}const Mt=new WeakSet;function Rr(e){return t=>{t.key==="Enter"&&e(t)}}function Qn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Tc=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Rr(()=>{if(Mt.has(n))return;Qn(n,"down");const r=Rr(()=>{Qn(n,"up")}),s=()=>Qn(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Br(e){return Jn(e)&&!Or()}function Ec(e,t,n={}){const[o,r,s]=jr(e,n),i=a=>{const l=a.currentTarget;if(!l||!Br(a)||Mt.has(l))return;Mt.add(l),Vr(a,"set");const c=t(l,a),u=(g,h)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Vr(g,"release"),!(!Br(g)||!Mt.has(l))&&(Mt.delete(l),typeof c=="function"&&c(g,{success:h}))},d=g=>{(g.isTrusted?Pc(g,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(g,!1):u(g,!(l instanceof Element)||Ir(l,g.target))},f=g=>{u(g,!1)};l.addEventListener("pointerup",d,r),l.addEventListener("pointercancel",f,r),l.addEventListener("lostpointercapture",f,r)};return o.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!_c(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,r),l&&a.addEventListener("focus",c=>Tc(c,r),r)}),s}function Pc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Fr=30,Ac=e=>!isNaN(parseFloat(e));class Mc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=Se.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Se.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ac(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&sn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Xn);const o=this.events[t].add(n);return t==="change"?()=>{o(),U.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Se.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fr);return _r(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lt(e,t){return new Mc(e,t)}const $r=m.createContext({strict:!1}),zr={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"]},ct={};for(const e in zr)ct[e]={isEnabled:t=>zr[e].some(n=>!!t[n])};function Lc(e){for(const t in e)ct[t]={...ct[t],...e[t]}}const Dc=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 un(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Dc.has(e)}let Ur=e=>!un(e);function kc(e){e&&(Ur=t=>t.startsWith("on")?!un(t):e(t))}try{kc(require("@emotion/is-prop-valid").default)}catch{}function Oc(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Ur(r)||n===!0&&un(r)||!t&&!un(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}function jc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&sn(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const dn=m.createContext({});function fn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dt(e){return typeof e=="string"||Array.isArray(e)}const eo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],to=["initial",...eo];function hn(e){return fn(e.animate)||to.some(t=>Dt(e[t]))}function Xr(e){return!!(hn(e)||e.variants)}function Nc(e,t){if(hn(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Dt(n)?n:void 0,animate:Dt(o)?o:void 0}}return e.inherit!==!1?t:{}}function Vc(e){const{initial:t,animate:n}=Nc(e,m.useContext(dn));return m.useMemo(()=>({initial:t,animate:n}),[Wr(t),Wr(n)])}function Wr(e){return Array.isArray(e)?e.join(" "):e}const Ic=Symbol.for("motionComponentSymbol");function ut(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Rc(e,t,n){return m.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ut(n)&&(n.current=o))},[t])}const no=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Gr="data-"+no("framerAppearId"),Kr=m.createContext({});function Bc(e,t,n,o,r){var s,i;const{visualElement:a}=m.useContext(dn),l=m.useContext($r),c=m.useContext(Fn),u=m.useContext(Cr).reducedMotion,d=m.useRef(null);o=o||l.renderer,!d.current&&o&&(d.current=o(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,g=m.useContext(Kr);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&Fc(d.current,n,r,g);const h=m.useRef(!1);m.useInsertionEffect(()=>{f&&h.current&&f.update(n,c)});const v=n[Gr],S=m.useRef(!!v&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,v))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,v)));return cc(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Zn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,v)}),S.current=!1))}),f}function Fc(e,t,n,o){const{layoutId:r,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Hr(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!i||a&&ut(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:c})}function Hr(e){if(e)return e.options.allowProjection!==!1?e.projection:Hr(e.parent)}function $c({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,i;e&&Lc(e);function a(c,u){let d;const f={...m.useContext(Cr),...c,layoutId:zc(c)},{isStatic:g}=f,h=Vc(c),v=o(c,g);if(!g&&Bn){Uc(f,e);const S=Xc(f);d=S.MeasureLayout,h.visualElement=Bc(r,v,f,t,S.ProjectionNode)}return y.jsxs(dn.Provider,{value:h,children:[d&&h.visualElement?y.jsx(d,{visualElement:h.visualElement,...f}):null,n(r,c,Rc(v,h.visualElement,u),v,g,h.visualElement)]})}a.displayName=`motion.${typeof r=="string"?r:`create(${(i=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&i!==void 0?i:""})`}`;const l=m.forwardRef(a);return l[Ic]=r,l}function zc({layoutId:e}){const t=m.useContext(wr).id;return t&&e!==void 0?t+"-"+e:e}function Uc(e,t){const n=m.useContext($r).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?at(!1,o):Ne(!1,o)}}function Xc(e){const{drag:t,layout:n}=ct;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const qr=e=>t=>typeof t=="string"&&t.startsWith(e),oo=qr("--"),Wc=qr("var(--"),ro=e=>Wc(e)?Gc.test(e.split("/*")[0].trim()):!1,Gc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt={};function Kc(e){for(const t in e)kt[t]=e[t],oo(t)&&(kt[t].isCSSVariable=!0)}const dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=new Set(dt);function Yr(e,{layout:t,layoutId:n}){return He.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kt[e]||e==="opacity")}const se=e=>!!(e&&e.getVelocity),Zr=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ee=(e,t,n)=>n>t?t:n<e?e:n,ft={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ot={...ft,transform:e=>Ee(0,1,e)},pn={...ft,default:1},jt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ie=jt("deg"),we=jt("%"),k=jt("px"),Hc=jt("vh"),qc=jt("vw"),Jr={...we,parse:e=>we.parse(e)/100,transform:e=>we.transform(e*100)},Yc={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,backgroundPositionX:k,backgroundPositionY:k},Zc={rotate:Ie,rotateX:Ie,rotateY:Ie,rotateZ:Ie,scale:pn,scaleX:pn,scaleY:pn,scaleZ:pn,skew:Ie,skewX:Ie,skewY:Ie,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:Ot,originX:Jr,originY:Jr,originZ:k},Qr={...ft,transform:Math.round},so={...Yc,...Zc,zIndex:Qr,size:k,fillOpacity:Ot,strokeOpacity:Ot,numOctaves:Qr},Jc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qc=dt.length;function eu(e,t,n){let o="",r=!0;for(let s=0;s<Qc;s++){const i=dt[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Zr(a,so[i]);if(!l){r=!1;const u=Jc[i]||i;o+=`${u}(${c}) `}n&&(t[i]=c)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function io(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(He.has(l)){i=!0;continue}else if(oo(l)){r[l]=c;continue}else{const u=Zr(c,so[l]);l.startsWith("origin")?(a=!0,s[l]=u):o[l]=u}}if(t.transform||(i||n?o.transform=eu(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;o.transformOrigin=`${l} ${c} ${u}`}}const ao=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function es(e,t,n){for(const o in t)!se(t[o])&&!Yr(o,n)&&(e[o]=t[o])}function tu({transformTemplate:e},t){return m.useMemo(()=>{const n=ao();return io(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nu(e,t){const n=e.style||{},o={};return es(o,n,e),Object.assign(o,tu(e,t)),o}function ou(e,t){const n={},o=nu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const ru=["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 lo(e){return typeof e!="string"||e.includes("-")?!1:!!(ru.indexOf(e)>-1||/[A-Z]/u.test(e))}const su={offset:"stroke-dashoffset",array:"stroke-dasharray"},iu={offset:"strokeDashoffset",array:"strokeDasharray"};function au(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?su:iu;e[s.offset]=k.transform(-o);const i=k.transform(t),a=k.transform(n);e[s.array]=`${i} ${a}`}function ts(e,t,n){return typeof e=="string"?e:k.transform(t+n*e)}function lu(e,t,n){const o=ts(t,e.x,e.width),r=ts(n,e.y,e.height);return`${o} ${r}`}function co(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(io(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:g,dimensions:h}=e;f.transform&&(h&&(g.transform=f.transform),delete f.transform),h&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=lu(h,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),i!==void 0&&au(f,i,a,l,!1)}const ns=()=>({...ao(),attrs:{}}),uo=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cu(e,t,n,o){const r=m.useMemo(()=>{const s=ns();return co(s,t,uo(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};es(s,e.style,e),r.style={...s,...r.style}}return r}function uu(e=!1){return(n,o,r,{latestValues:s},i)=>{const l=(lo(n)?cu:ou)(o,s,i,n),c=Oc(o,typeof n=="string",e),u=n!==m.Fragment?{...c,...l,ref:r}:{},{children:d}=o,f=m.useMemo(()=>se(d)?d.get():d,[d]);return m.createElement(n,{...u,children:f})}}function os(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function fo(e,t,n,o){if(typeof t=="function"){const[r,s]=os(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=os(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const ho=e=>Array.isArray(e),du=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fu=e=>ho(e)?e[e.length-1]||0:e;function mn(e){const t=se(e)?e.get():e;return du(t)?t.toValue():t}function hu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const i={latestValues:pu(o,r,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:o,current:a,...i}),i.onUpdate=a=>n(a)),i}const rs=e=>(t,n)=>{const o=m.useContext(dn),r=m.useContext(Fn),s=()=>hu(e,t,o,r);return n?s():lc(s)};function pu(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=mn(s[f]);let{initial:i,animate:a}=e;const l=hn(e),c=Xr(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!fn(d)){const f=Array.isArray(d)?d:[d];for(let g=0;g<f.length;g++){const h=fo(e,f[g]);if(h){const{transitionEnd:v,transition:S,...x}=h;for(const b in x){let w=x[b];if(Array.isArray(w)){const P=u?w.length-1:0;w=w[P]}w!==null&&(r[b]=w)}for(const b in v)r[b]=v[b]}}}return r}function po(e,t,n){var o;const{style:r}=e,s={};for(const i in r)(se(r[i])||t.style&&se(t.style[i])||Yr(i,e)||((o=n==null?void 0:n.getValue(i))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[i]=r[i]);return s}const mu={useVisualState:rs({scrapeMotionValuesFromProps:po,createRenderState:ao})};function ss(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function is(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const as=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"]);function ls(e,t,n,o){is(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(as.has(r)?r:no(r),t.attrs[r])}function cs(e,t,n){const o=po(e,t,n);for(const r in e)if(se(e[r])||se(t[r])){const s=dt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const us=["x","y","width","height","cx","cy","r"],gu={useVisualState:rs({scrapeMotionValuesFromProps:cs,createRenderState:ns,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in r)if(He.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<us.length;a++){const l=us[a];e[l]!==t[l]&&(i=!0)}i&&U.read(()=>{ss(n,o),U.render(()=>{co(o,r,uo(n.tagName),e.transformTemplate),ls(n,o)})})}})};function yu(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const i={...lo(o)?gu:mu,preloadedFeatures:e,useRender:uu(r),createVisualElement:t,Component:o};return $c(i)}}function Nt(e,t,n){const o=e.getProps();return fo(o,t,n!==void 0?n:o.custom,e)}const ds=new Set(["width","height","top","left","right","bottom",...dt]);function vu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lt(n))}function xu(e,t){const n=Nt(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const i in s){const a=fu(s[i]);vu(e,i,a)}}function bu(e){return!!(se(e)&&e.add)}function mo(e,t){const n=e.getValue("willChange");if(bu(n))return n.add(t)}function fs(e){return e.props[Gr]}const hs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Su=1e-7,wu=12;function Cu(e,t,n,o,r){let s,i,a=0;do i=t+(n-t)/2,s=hs(i,o,r)-e,s>0?n=i:t=i;while(Math.abs(s)>Su&&++a<wu);return i}function Vt(e,t,n,o){if(e===t&&n===o)return fe;const r=s=>Cu(s,0,1,e,n);return s=>s===0||s===1?s:hs(r(s),t,o)}const ps=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ms=e=>t=>1-e(1-t),gs=Vt(.33,1.53,.69,.99),go=ms(gs),ys=ps(go),vs=e=>(e*=2)<1?.5*go(e):.5*(2-Math.pow(2,-10*(e-1))),yo=e=>1-Math.sin(Math.acos(e)),xs=ms(yo),bs=ps(yo),Ss=e=>/^0[^.\s]+$/u.test(e);function _u(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ss(e):!0}const It=e=>Math.round(e*1e5)/1e5,vo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Tu(e){return e==null}const Eu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xo=(e,t)=>n=>!!(typeof n=="string"&&Eu.test(n)&&n.startsWith(e)||t&&!Tu(n)&&Object.prototype.hasOwnProperty.call(n,t)),ws=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,i,a]=o.match(vo);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Pu=e=>Ee(0,255,e),bo={...ft,transform:e=>Math.round(Pu(e))},qe={test:xo("rgb","red"),parse:ws("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+bo.transform(e)+", "+bo.transform(t)+", "+bo.transform(n)+", "+It(Ot.transform(o))+")"};function Au(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const So={test:xo("#"),parse:Au,transform:qe.transform},ht={test:xo("hsl","hue"),parse:ws("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+we.transform(It(t))+", "+we.transform(It(n))+", "+It(Ot.transform(o))+")"},ie={test:e=>qe.test(e)||So.test(e)||ht.test(e),parse:e=>qe.test(e)?qe.parse(e):ht.test(e)?ht.parse(e):So.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qe.transform(e):ht.transform(e)},Mu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Lu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(vo))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Mu))===null||n===void 0?void 0:n.length)||0)>0}const Cs="number",_s="color",Du="var",ku="var(",Ts="${}",Ou=/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 Rt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const a=t.replace(Ou,l=>(ie.test(l)?(o.color.push(s),r.push(_s),n.push(ie.parse(l))):l.startsWith(ku)?(o.var.push(s),r.push(Du),n.push(l)):(o.number.push(s),r.push(Cs),n.push(parseFloat(l))),++s,Ts)).split(Ts);return{values:n,split:a,indexes:o,types:r}}function Es(e){return Rt(e).values}function Ps(e){const{split:t,types:n}=Rt(e),o=t.length;return r=>{let s="";for(let i=0;i<o;i++)if(s+=t[i],r[i]!==void 0){const a=n[i];a===Cs?s+=It(r[i]):a===_s?s+=ie.transform(r[i]):s+=r[i]}return s}}const ju=e=>typeof e=="number"?0:e;function Nu(e){const t=Es(e);return Ps(e)(t.map(ju))}const Re={test:Lu,parse:Es,createTransformer:Ps,getAnimatableNone:Nu},Vu=new Set(["brightness","contrast","saturate","opacity"]);function Iu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(vo)||[];if(!o)return e;const r=n.replace(o,"");let s=Vu.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const Ru=/\b([a-z-]*)\(.*?\)/gu,wo={...Re,getAnimatableNone:e=>{const t=e.match(Ru);return t?t.map(Iu).join(" "):e}},Bu={...so,color:ie,backgroundColor:ie,outlineColor:ie,fill:ie,stroke:ie,borderColor:ie,borderTopColor:ie,borderRightColor:ie,borderBottomColor:ie,borderLeftColor:ie,filter:wo,WebkitFilter:wo},As=e=>Bu[e];function Ms(e,t){let n=As(e);return n!==wo&&(n=Re),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fu=new Set(["auto","none","0"]);function $u(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!Fu.has(s)&&Rt(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Ms(n,r)}const Ye=e=>e*180/Math.PI,Co=e=>{const t=Ye(Math.atan2(e[1],e[0]));return _o(t)},zu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Co,rotateZ:Co,skewX:e=>Ye(Math.atan(e[1])),skewY:e=>Ye(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_o=e=>(e=e%360,e<0&&(e+=360),e),Ls=Co,Ds=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ks=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Uu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ds,scaleY:ks,scale:e=>(Ds(e)+ks(e))/2,rotateX:e=>_o(Ye(Math.atan2(e[6],e[5]))),rotateY:e=>_o(Ye(Math.atan2(-e[2],e[0]))),rotateZ:Ls,rotate:Ls,skewX:e=>Ye(Math.atan(e[4])),skewY:e=>Ye(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Os(e){return e.includes("scale")?1:0}function To(e,t){if(!e||e==="none")return Os(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,r;if(n)o=Uu,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=zu,r=a}if(!r)return Os(t);const s=o[t],i=r[1].split(",").map(Wu);return typeof s=="function"?s(i):i[s]}const Xu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return To(n,t)};function Wu(e){return parseFloat(e.trim())}const js=e=>e===ft||e===k,Gu=new Set(["x","y","z"]),Ku=dt.filter(e=>!Gu.has(e));function Hu(e){const t=[];return Ku.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const pt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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})=>To(t,"x"),y:(e,{transform:t})=>To(t,"y")};pt.translateX=pt.x,pt.translateY=pt.y;const Ze=new Set;let Eo=!1,Po=!1;function Ns(){if(Po){const e=Array.from(Ze).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=Hu(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,i])=>{var a;(a=o.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Po=!1,Eo=!1,Ze.forEach(e=>e.complete()),Ze.clear()}function Vs(){Ze.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Po=!0)})}function qu(){Vs(),Ns()}class Ao{constructor(t,n,o,r,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ze.add(this),Eo||(Eo=!0,U.read(Vs),U.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=r==null?void 0:r.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const l=o.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),r&&i===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Is=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Yu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zu(e){const t=Yu.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const Ju=4;function Rs(e,t,n=1){Ne(n<=Ju,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=Zu(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const i=s.trim();return Is(i)?parseFloat(i):i}return ro(r)?Rs(r,t,n+1):r}const Bs=e=>t=>t.test(e),Fs=[ft,k,we,Ie,qc,Hc,{test:e=>e==="auto",parse:e=>e}],$s=e=>Fs.find(Bs(e));class zs extends Ao{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ro(c))){const u=Rs(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ds.has(o)||t.length!==2)return;const[r,s]=t,i=$s(r),a=$s(s);if(i!==a)if(js(i)&&js(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)_u(t[r])&&o.push(r);o.length&&$u(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=pt[o](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Us=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Re.test(e)||e==="0")&&!e.startsWith("url("));function Qu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ed(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Us(r,t),a=Us(s,t);return at(i===a,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:Qu(e)||(n==="spring"||Kn(n))&&o}const td=e=>e!==null;function gn(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(td),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const nd=40;class Xs{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Se.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>nd?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&qu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Se.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ed(t,o,r,s))if(i)this.options.duration=0;else{l&&l(gn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const G=(e,t,n)=>e+(t-e)*n;function Mo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function od({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,i=0;if(!t)r=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=Mo(l,a,e+1/3),s=Mo(l,a,e),i=Mo(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:o}}function yn(e,t){return n=>n>0?t:e}const Lo=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},rd=[So,qe,ht],sd=e=>rd.find(t=>t.test(e));function Ws(e){const t=sd(e);if(at(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ht&&(n=od(n)),n}const Gs=(e,t)=>{const n=Ws(e),o=Ws(t);if(!n||!o)return yn(e,t);const r={...n};return s=>(r.red=Lo(n.red,o.red,s),r.green=Lo(n.green,o.green,s),r.blue=Lo(n.blue,o.blue,s),r.alpha=G(n.alpha,o.alpha,s),qe.transform(r))},id=(e,t)=>n=>t(e(n)),Bt=(...e)=>e.reduce(id),Do=new Set(["none","hidden"]);function ad(e,t){return Do.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ld(e,t){return n=>G(e,t,n)}function ko(e){return typeof e=="number"?ld:typeof e=="string"?ro(e)?yn:ie.test(e)?Gs:dd:Array.isArray(e)?Ks:typeof e=="object"?ie.test(e)?Gs:cd:yn}function Ks(e,t){const n=[...e],o=n.length,r=e.map((s,i)=>ko(s)(s,t[i]));return s=>{for(let i=0;i<o;i++)n[i]=r[i](s);return n}}function cd(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=ko(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function ud(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][r[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;o[s]=l,r[i]++}return o}const dd=(e,t)=>{const n=Re.createTransformer(t),o=Rt(e),r=Rt(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?Do.has(e)&&!r.values.length||Do.has(t)&&!o.values.length?ad(e,t):Bt(Ks(ud(o,r),r.values),n):(at(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),yn(e,t))};function Hs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?G(e,t,n):ko(e)(e,t)}const fd=5;function qs(e,t,n){const o=Math.max(t-fd,0);return _r(n-e(o),t-o)}const K={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},Ys=.001;function hd({duration:e=K.duration,bounce:t=K.bounce,velocity:n=K.velocity,mass:o=K.mass}){let r,s;at(e<=be(K.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Ee(K.minDamping,K.maxDamping,i),e=Ee(K.minDuration,K.maxDuration,Te(e)),i<1?(r=c=>{const u=c*i,d=u*e,f=u-n,g=Oo(c,i),h=Math.exp(-d);return Ys-f/g*h},s=c=>{const d=c*i*e,f=d*n+n,g=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),v=Oo(Math.pow(c,2),i);return(-r(c)+Ys>0?-1:1)*((f-g)*h)/v}):(r=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=md(r,s,a);if(e=be(e),isNaN(l))return{stiffness:K.stiffness,damping:K.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:i*2*Math.sqrt(o*c),duration:e}}}const pd=12;function md(e,t,n){let o=n;for(let r=1;r<pd;r++)o=o-e(o)/t(o);return o}function Oo(e,t){return e*Math.sqrt(1-t*t)}const gd=["duration","bounce"],yd=["stiffness","damping","mass"];function Zs(e,t){return t.some(n=>e[n]!==void 0)}function vd(e){let t={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...e};if(!Zs(e,yd)&&Zs(e,gd))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*Ee(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:K.mass,stiffness:r,damping:s}}else{const n=hd(e);t={...t,...n,mass:K.mass},t.isResolvedFromDuration=!0}return t}function Js(e=K.visualDuration,t=K.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:g}=vd({...n,velocity:-Te(n.velocity||0)}),h=f||0,v=c/(2*Math.sqrt(l*u)),S=i-s,x=Te(Math.sqrt(l/u)),b=Math.abs(S)<5;o||(o=b?K.restSpeed.granular:K.restSpeed.default),r||(r=b?K.restDelta.granular:K.restDelta.default);let w;if(v<1){const T=Oo(x,v);w=M=>{const N=Math.exp(-v*x*M);return i-N*((h+v*x*S)/T*Math.sin(T*M)+S*Math.cos(T*M))}}else if(v===1)w=T=>i-Math.exp(-x*T)*(S+(h+x*S)*T);else{const T=x*Math.sqrt(v*v-1);w=M=>{const N=Math.exp(-v*x*M),A=Math.min(T*M,300);return i-N*((h+v*x*S)*Math.sinh(A)+T*S*Math.cosh(A))/T}}const P={calculatedDuration:g&&d||null,next:T=>{const M=w(T);if(g)a.done=T>=d;else{let N=0;v<1&&(N=T===0?be(h):qs(w,T,M));const A=Math.abs(N)<=o,I=Math.abs(i-M)<=r;a.done=A&&I}return a.value=a.done?i:M,a},toString:()=>{const T=Math.min(Er(P),Gn),M=Ar(N=>P.next(T*N).value,T,30);return T+"ms "+M}};return P}function Qs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},g=A=>a!==void 0&&A<a||l!==void 0&&A>l,h=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let v=n*t;const S=d+v,x=i===void 0?S:i(S);x!==S&&(v=x-d);const b=A=>-v*Math.exp(-A/o),w=A=>x+b(A),P=A=>{const I=b(A),V=w(A);f.done=Math.abs(I)<=c,f.value=f.done?x:V};let T,M;const N=A=>{g(f.value)&&(T=A,M=Js({keyframes:[f.value,h(f.value)],velocity:qs(w,A,f.value),damping:r,stiffness:s,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:A=>{let I=!1;return!M&&T===void 0&&(I=!0,P(A),N(A)),T!==void 0&&A>=T?M.next(A-T):(!I&&P(A),f)}}}const xd=Vt(.42,0,1,1),bd=Vt(0,0,.58,1),ei=Vt(.42,0,.58,1),Sd=e=>Array.isArray(e)&&typeof e[0]!="number",ti={linear:fe,easeIn:xd,easeInOut:ei,easeOut:bd,circIn:yo,circInOut:bs,circOut:xs,backIn:go,backInOut:ys,backOut:gs,anticipate:vs},ni=e=>{if(Hn(e)){Ne(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return Vt(t,n,o,r)}else if(typeof e=="string")return Ne(ti[e]!==void 0,`Invalid easing type '${e}'`),ti[e];return e};function wd(e,t,n){const o=[],r=n||Hs,s=e.length-1;for(let i=0;i<s;i++){let a=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||fe:t;a=Bt(l,a)}o.push(a)}return o}function Cd(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(Ne(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=wd(t,o,r),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=lt(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ee(e[0],e[s-1],u)):c}function _d(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=lt(0,t,o);e.push(G(n,1,r))}}function Td(e){const t=[0];return _d(t,e.length-1),t}function Ed(e,t){return e.map(n=>n*t)}function Pd(e,t){return e.map(()=>t||ei).splice(0,e.length-1)}function Ft({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=Sd(o)?o.map(ni):ni(o),s={done:!1,value:t[0]},i=Ed(n&&n.length===t.length?n:Td(t),e),a=Cd(i,t,{ease:Array.isArray(r)?r:Pd(t,r)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ad=e=>{const t=({timestamp:n})=>e(n);return{start:()=>U.update(t,!0),stop:()=>Ve(t),now:()=>oe.isProcessing?oe.timestamp:Se.now()}},Md={decay:Qs,inertia:Qs,tween:Ft,keyframes:Ft,spring:Js},Ld=e=>e/100;class jo extends Xs{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,i=(r==null?void 0:r.KeyframeResolver)||Ao,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:i=0}=this.options,a=Kn(n)?n:Md[n]||Ft;let l,c;process.env.NODE_ENV!=="production"&&a!==Ft&&Ne(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Ft&&typeof t[0]!="number"&&(l=Bt(Ld,Hs(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Er(u));const{calculatedDuration:d}=u,f=d+r,g=f*(o+1)-r;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:g,repeatType:h,repeatDelay:v,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,P=s;if(g){const A=Math.min(this.currentTime,u)/d;let I=Math.floor(A),V=A%1;!V&&A>=1&&(V=1),V===1&&I--,I=Math.min(I,g+1),!!(I%2)&&(h==="reverse"?(V=1-V,v&&(V-=v/d)):h==="mirror"&&(P=i)),w=Ee(0,1,V)*d}const T=b?{done:!1,value:l[0]}:P.next(w);a&&(T.value=a(T.value));let{done:M}=T;!b&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return N&&r!==void 0&&(T.value=gn(l,this.options,r)),S&&S(T.value),N&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Te(t.calculatedDuration):0}get time(){return Te(this.currentTime)}set time(t){t=be(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Te(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Ad,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Dd=new Set(["opacity","clipPath","filter","transform"]);function kd(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Lr(a,r);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:o,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Od=Un(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vn=10,jd=2e4;function Nd(e){return Kn(e.type)||e.type==="spring"||!Mr(e.ease)}function Vd(e,t){const n=new jo({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<jd;)o=n.sample(s),r.push(o.value),s+=vn;return{times:void 0,keyframes:r,duration:s-vn,ease:"linear"}}const oi={anticipate:vs,backInOut:ys,circInOut:bs};function Id(e){return e in oi}class ri extends Xs{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new zs(s,(i,a)=>this.onKeyframesResolved(i,a),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&an()&&Id(s)&&(s=oi[s]),Nd(this.options)){const{onComplete:d,onUpdate:f,motionValue:g,element:h,...v}=this.options,S=Vd(t,v);t=S.keyframes,t.length===1&&(t[1]=t[0]),o=S.duration,r=S.times,s=S.ease,i="keyframes"}const u=kd(a.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Pr(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(gn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:r,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Te(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Te(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=be(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return fe;const{animation:o}=n;Pr(o,t)}return fe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...g}=this.options,h=new jo({...g,keyframes:o,duration:r,type:s,ease:i,times:a,isGenerator:!0}),v=be(this.time);c.setWithVelocity(h.sample(v-vn).value,h.sample(v).value,vn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Od()&&o&&Dd.has(o)&&!l&&!c&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}}const Rd={type:"spring",stiffness:500,damping:25,restSpeed:10},Bd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fd={type:"keyframes",duration:.8},$d={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zd=(e,{keyframes:t})=>t.length>2?Fd:He.has(e)?e.startsWith("scale")?Bd(t[1]):Rd:$d;function Ud({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const No=(e,t,n,o={},r,s)=>i=>{const a=Wn(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-be(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:r};Ud(a)||(u={...u,...zd(e,u)}),u.duration&&(u.duration=be(u.duration)),u.repeatDelay&&(u.repeatDelay=be(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=gn(u.keyframes,a);if(f!==void 0)return U.update(()=>{u.onUpdate(f),u.onComplete()}),new pc([])}return!s&&ri.supports(u)?new ri(u):new jo(u)};function Xd({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function si(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;o&&(i=o);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),g=l[d];if(g===void 0||u&&Xd(u,d))continue;const h={delay:n,...Wn(i||{},d)};let v=!1;if(window.MotionHandoffAnimation){const x=fs(e);if(x){const b=window.MotionHandoffAnimation(x,d,U);b!==null&&(h.startTime=b,v=!0)}}mo(e,d),f.start(No(d,f,g,e.shouldReduceMotion&&ds.has(d)?{type:!1}:h,e,v));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{U.update(()=>{a&&xu(e,a)})}),c}function Vo(e,t,n={}){var o;const r=Nt(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(si(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return Wd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Wd(e,t,n=0,o=0,r=1,s){const i=[],a=(e.variantChildren.size-1)*o,l=r===1?(c=0)=>c*o:(c=0)=>a-c*o;return Array.from(e.variantChildren).sort(Gd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Vo(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Gd(e,t){return e.sortNodePosition(t)}function Kd(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Vo(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Vo(e,t,n);else{const r=typeof t=="function"?Nt(e,t,n.custom):t;o=Promise.all(si(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function ii(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Hd=to.length;function ai(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ai(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Hd;n++){const o=to[n],r=e.props[o];(Dt(r)||r===!1)&&(t[o]=r)}return t}const qd=[...eo].reverse(),Yd=eo.length;function Zd(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Kd(e,n,o)))}function Jd(e){let t=Zd(e),n=li(),o=!0;const r=l=>(c,u)=>{var d;const f=Nt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:g,transitionEnd:h,...v}=f;c={...c,...v,...h}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=ai(e.parent)||{},d=[],f=new Set;let g={},h=1/0;for(let S=0;S<Yd;S++){const x=qd[S],b=n[x],w=c[x]!==void 0?c[x]:u[x],P=Dt(w),T=x===l?b.isActive:null;T===!1&&(h=S);let M=w===u[x]&&w!==c[x]&&P;if(M&&o&&e.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...g},!b.isActive&&T===null||!w&&!b.prevProp||fn(w)||typeof w=="boolean")continue;const N=Qd(b.prevProp,w);let A=N||x===l&&b.isActive&&!M&&P||S>h&&P,I=!1;const V=Array.isArray(w)?w:[w];let q=V.reduce(r(x),{});T===!1&&(q={});const{prevResolvedValues:ae={}}=b,le={...ae,...q},L=D=>{A=!0,f.has(D)&&(I=!0,f.delete(D)),b.needsAnimating[D]=!0;const _=e.getValue(D);_&&(_.liveStyle=!1)};for(const D in le){const _=q[D],F=ae[D];if(g.hasOwnProperty(D))continue;let ee=!1;ho(_)&&ho(F)?ee=!ii(_,F):ee=_!==F,ee?_!=null?L(D):f.add(D):_!==void 0&&f.has(D)?L(D):b.protectedKeys[D]=!0}b.prevProp=w,b.prevResolvedValues=q,b.isActive&&(g={...g,...q}),o&&e.blockInitialAnimation&&(A=!1),A&&(!(M&&N)||I)&&d.push(...V.map(D=>({animation:D,options:{type:x}})))}if(f.size){const S={};if(typeof c.initial!="boolean"){const x=Nt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(S.transition=x.transition)}f.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),S[x]=b??null}),d.push({animation:S})}let v=!!d.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(v=!1),o=!1,v?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var g;return(g=f.animationState)===null||g===void 0?void 0:g.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=li(),o=!0}}}function Qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ii(t,e):!1}function Je(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function li(){return{animate:Je(!0),whileInView:Je(),whileHover:Je(),whileTap:Je(),whileDrag:Je(),whileFocus:Je(),exit:Je()}}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ef extends Be{constructor(t){super(t),t.animationState||(t.animationState=Jd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let tf=0;class nf extends Be{constructor(){super(...arguments),this.id=tf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const of={animation:{Feature:ef},exit:{Feature:nf}};function $t(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function zt(e){return{point:{x:e.pageX,y:e.pageY}}}const rf=e=>t=>Jn(t)&&e(t,zt(t));function Ut(e,t,n,o){return $t(e,t,rf(n),o)}function ci({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function sf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function af(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const ui=1e-4,lf=1-ui,cf=1+ui,di=.01,uf=0-di,df=0+di;function ue(e){return e.max-e.min}function ff(e,t,n){return Math.abs(e-t)<=n}function fi(e,t,n,o=.5){e.origin=o,e.originPoint=G(t.min,t.max,e.origin),e.scale=ue(n)/ue(t),e.translate=G(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lf&&e.scale<=cf||isNaN(e.scale))&&(e.scale=1),(e.translate>=uf&&e.translate<=df||isNaN(e.translate))&&(e.translate=0)}function Xt(e,t,n,o){fi(e.x,t.x,n.x,o?o.originX:void 0),fi(e.y,t.y,n.y,o?o.originY:void 0)}function hi(e,t,n){e.min=n.min+t.min,e.max=e.min+ue(t)}function hf(e,t,n){hi(e.x,t.x,n.x),hi(e.y,t.y,n.y)}function pi(e,t,n){e.min=t.min-n.min,e.max=e.min+ue(t)}function Wt(e,t,n){pi(e.x,t.x,n.x),pi(e.y,t.y,n.y)}const mi=()=>({translate:0,scale:1,origin:0,originPoint:0}),mt=()=>({x:mi(),y:mi()}),gi=()=>({min:0,max:0}),Y=()=>({x:gi(),y:gi()});function me(e){return[e("x"),e("y")]}function Io(e){return e===void 0||e===1}function Ro({scale:e,scaleX:t,scaleY:n}){return!Io(e)||!Io(t)||!Io(n)}function Qe(e){return Ro(e)||yi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yi(e){return vi(e.x)||vi(e.y)}function vi(e){return e&&e!=="0%"}function xn(e,t,n){const o=e-n,r=t*o;return n+r}function xi(e,t,n,o,r){return r!==void 0&&(e=xn(e,r,o)),xn(e,n,o)+t}function Bo(e,t=0,n=1,o,r){e.min=xi(e.min,t,n,o,r),e.max=xi(e.max,t,n,o,r)}function bi(e,{x:t,y:n}){Bo(e.x,t.translate,t.scale,t.originPoint),Bo(e.y,n.translate,n.scale,n.originPoint)}const Si=.999999999999,wi=1.0000000000001;function pf(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,i;for(let a=0;a<r;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&yt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,bi(e,i)),o&&Qe(s.latestValues)&&yt(e,s.latestValues))}t.x<wi&&t.x>Si&&(t.x=1),t.y<wi&&t.y>Si&&(t.y=1)}function gt(e,t){e.min=e.min+t,e.max=e.max+t}function Ci(e,t,n,o,r=.5){const s=G(e.min,e.max,r);Bo(e,t,n,s,o)}function yt(e,t){Ci(e.x,t.x,t.scaleX,t.scale,t.originX),Ci(e.y,t.y,t.scaleY,t.scale,t.originY)}function _i(e,t){return ci(af(e.getBoundingClientRect(),t))}function mf(e,t,n){const o=_i(e,n),{scroll:r}=t;return r&&(gt(o.x,r.offset.x),gt(o.y,r.offset.y)),o}const Ti=({current:e})=>e?e.ownerDocument.defaultView:null,Ei=(e,t)=>Math.abs(e-t);function gf(e,t){const n=Ei(e.x,t.x),o=Ei(e.y,t.y);return Math.sqrt(n**2+o**2)}class Pi{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=$o(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,g=gf(d.offset,{x:0,y:0})>=3;if(!f&&!g)return;const{point:h}=d,{timestamp:v}=oe;this.history.push({...h,timestamp:v});const{onStart:S,onMove:x}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Fo(f,this.transformPagePoint),U.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:g,onSessionEnd:h,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=$o(d.type==="pointercancel"?this.lastMoveEventInfo:Fo(f,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,S),h&&h(d,S)},!Jn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const i=zt(t),a=Fo(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=oe;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,$o(a,this.history)),this.removeListeners=Bt(Ut(this.contextWindow,"pointermove",this.handlePointerMove),Ut(this.contextWindow,"pointerup",this.handlePointerUp),Ut(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ve(this.updatePoint)}}function Fo(e,t){return t?{point:t(e.point)}:e}function Ai(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $o({point:e},t){return{point:e,delta:Ai(e,Mi(t)),offset:Ai(e,yf(t)),velocity:vf(t,.1)}}function yf(e){return e[0]}function Mi(e){return e[e.length-1]}function vf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Mi(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>be(t)));)n--;if(!o)return{x:0,y:0};const s=Te(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const i={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function xf(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?G(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?G(n,e,o.max):Math.min(e,n)),e}function Li(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function bf(e,{top:t,left:n,bottom:o,right:r}){return{x:Li(e.x,n,r),y:Li(e.y,t,o)}}function Di(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Sf(e,t){return{x:Di(e.x,t.x),y:Di(e.y,t.y)}}function wf(e,t){let n=.5;const o=ue(e),r=ue(t);return r>o?n=lt(t.min,t.max-o,e.min):o>r&&(n=lt(e.min,e.max-r,t.min)),Ee(0,1,n)}function Cf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const zo=.35;function _f(e=zo){return e===!1?e=0:e===!0&&(e=zo),{x:ki(e,"left","right"),y:ki(e,"top","bottom")}}function ki(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const Tf=new WeakMap;class Ef{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=Y(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:g,onDragStart:h}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),me(S=>{let x=this.getAxisMotionValue(S).get()||0;if(we.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[S];w&&(x=ue(w)*(parseFloat(x)/100))}}this.originPoint[S]=x}),h&&U.postRender(()=>h(u,d)),mo(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:h,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(g&&this.currentDirection===null){this.currentDirection=Pf(S),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),v&&v(u,d)},a=(u,d)=>this.stop(u,d),l=()=>me(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Pi(t,{onSessionStart:r,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ti(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&U.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!bn(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=xf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ut(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=bf(r.layoutBox,n):this.constraints=!1,this.elastic=_f(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&me(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Cf(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ut(t))return!1;const o=t.current;Ne(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=mf(o,r.root,this.visualElement.getTransformPagePoint());let i=Sf(r.layout.layoutBox,s);if(n){const a=n(sf(i));this.hasMutatedConstraints=!!a,a&&(i=ci(a))}return i}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=me(u=>{if(!bn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=r?200:1e6,g=r?40:1e7,h={type:"inertia",velocity:o?t[u]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return mo(this.visualElement,t),o.start(No(t,o,0,n,this.visualElement,!1))}stopAnimation(){me(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){me(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){me(n=>{const{drag:o}=this.getProps();if(!bn(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n];s.set(t[n]-G(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ut(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};me(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();r[i]=wf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),me(i=>{if(!bn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(G(l,c,r[i]))})}addListeners(){if(!this.visualElement.current)return;Tf.set(this.visualElement,this);const t=this.visualElement.current,n=Ut(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();ut(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),U.read(o);const i=$t(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(me(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:i=zo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function bn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Af extends Be{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Ef(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}unmount(){this.removeGroupControls(),this.removeListeners()}}const ji=e=>(t,n)=>{e&&U.postRender(()=>e(t,n))};class Mf extends Be{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Pi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:ji(t),onStart:ji(n),onMove:o,onEnd:(s,i)=>{delete this.session,r&&U.postRender(()=>r(s,i))}}}mount(){this.removePointerDownListener=Ut(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ni(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(k.test(e))e=parseFloat(e);else return e;const n=Ni(e,t.target.x),o=Ni(e,t.target.y);return`${n}% ${o}%`}},Lf={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Re.parse(e);if(r.length>5)return o;const s=Re.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=l;const c=G(a,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=c),typeof r[3+i]=="number"&&(r[3+i]/=c),s(r)}};class Df extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;Kc(kf),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Sn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,i=o.projection;return i&&(i.isPresent=s,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||U.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Zn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vi(e){const[t,n]=uc(),o=m.useContext(wr);return y.jsx(Df,{...e,layoutGroup:o,switchLayoutGroup:m.useContext(Kr),isPresent:t,safeToRemove:n})}const kf={borderRadius:{...Gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gt,borderTopRightRadius:Gt,borderBottomLeftRadius:Gt,borderBottomRightRadius:Gt,boxShadow:Lf};function Of(e,t,n){const o=se(e)?e:Lt(e);return o.start(No("",o,t,n)),o.animation}function jf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Nf=(e,t)=>e.depth-t.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(t){$n(this.children,t),this.isDirty=!0}remove(t){zn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Nf),this.isDirty=!1,this.children.forEach(t)}}function If(e,t){const n=Se.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(Ve(o),e(s-t))};return U.read(o,!0),()=>Ve(o)}const Ii=["TopLeft","TopRight","BottomLeft","BottomRight"],Rf=Ii.length,Ri=e=>typeof e=="string"?parseFloat(e):e,Bi=e=>typeof e=="number"||k.test(e);function Bf(e,t,n,o,r,s){r?(e.opacity=G(0,n.opacity!==void 0?n.opacity:1,Ff(o)),e.opacityExit=G(t.opacity!==void 0?t.opacity:1,0,$f(o))):s&&(e.opacity=G(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let i=0;i<Rf;i++){const a=`border${Ii[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bi(l)===Bi(c)?(e[a]=Math.max(G(Ri(l),Ri(c),o),0),(we.test(c)||we.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=G(t.rotate||0,n.rotate||0,o))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ff=$i(0,.5,xs),$f=$i(.5,.95,fe);function $i(e,t,n){return o=>o<e?0:o>t?1:n(lt(e,t,o))}function zi(e,t){e.min=t.min,e.max=t.max}function ge(e,t){zi(e.x,t.x),zi(e.y,t.y)}function Ui(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Xi(e,t,n,o,r){return e-=t,e=xn(e,1/n,o),r!==void 0&&(e=xn(e,1/r,o)),e}function zf(e,t=0,n=1,o=.5,r,s=e,i=e){if(we.test(t)&&(t=parseFloat(t),t=G(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=G(s.min,s.max,o);e===s&&(a-=t),e.min=Xi(e.min,t,n,a,r),e.max=Xi(e.max,t,n,a,r)}function Wi(e,t,[n,o,r],s,i){zf(e,t[n],t[o],t[r],t.scale,s,i)}const Uf=["x","scaleX","originX"],Xf=["y","scaleY","originY"];function Gi(e,t,n,o){Wi(e.x,t,Uf,n?n.x:void 0,o?o.x:void 0),Wi(e.y,t,Xf,n?n.y:void 0,o?o.y:void 0)}function Ki(e){return e.translate===0&&e.scale===1}function Hi(e){return Ki(e.x)&&Ki(e.y)}function qi(e,t){return e.min===t.min&&e.max===t.max}function Wf(e,t){return qi(e.x,t.x)&&qi(e.y,t.y)}function Yi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zi(e,t){return Yi(e.x,t.x)&&Yi(e.y,t.y)}function Ji(e){return ue(e.x)/ue(e.y)}function Qi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Gf{constructor(){this.members=[]}add(t){$n(this.members,t),t.scheduleRender()}remove(t){if(zn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Kf(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||s||i)&&(o=`translate3d(${r}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:g,skewY:h}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),g&&(o+=`skewX(${g}deg) `),h&&(o+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const Uo=["","X","Y","Z"],Hf={visibility:"hidden"},ea=1e3;let qf=0;function Xo(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function ta(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fs(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&ta(o)}function na({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=qf++,this.animationId=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.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(Jf),this.nodes.forEach(oh),this.nodes.forEach(rh),this.nodes.forEach(Qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Xn),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=jf(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=If(f,250),Sn.hasAnimatedSinceResize&&(Sn.hasAnimatedSinceResize=!1,this.nodes.forEach(ra))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:g,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||ch,{onLayoutAnimationStart:S,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!Zi(this.targetLayout,h),w=!f&&g;if(this.options.layoutRoot||this.resumeFrom||w||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const P={...Wn(v,"layout"),onPlay:S,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else f||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ve(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(sh),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ta(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(oa);return}this.isUpdating||this.nodes.forEach(th),this.isUpdating=!1,this.nodes.forEach(nh),this.nodes.forEach(Yf),this.nodes.forEach(Zf),this.clearAllSnapshots();const a=Se.now();oe.delta=Ee(0,1e3/60,a-oe.timestamp),oe.timestamp=a,oe.isProcessing=!0,Yn.update.process(oe),Yn.preRender.process(oe),Yn.render.process(oe),oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eh),this.sharedNodes.forEach(ih)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ue(this.snapshot.measuredBox.x)&&!ue(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Hi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Qe(this.latestValues)||u)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),uh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return Y();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(dh))){const{scroll:u}=this.root;u&&(gt(l.x,u.offset.x),gt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=Y();if(ge(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ge(l,i),gt(l.x,d.offset.x),gt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=Y();ge(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&yt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Qe(u.latestValues)&&yt(l,u.latestValues)}return Qe(this.latestValues)&&yt(l,this.latestValues),l}removeTransform(i){const a=Y();ge(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Qe(c.latestValues))continue;Ro(c.latestValues)&&c.updateSnapshot();const u=Y(),d=c.measurePageBox();ge(u,d),Gi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Qe(this.latestValues)&&Gi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=oe.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Wt(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),ge(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ge(this.target,this.layout.layoutBox),bi(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Wt(this.relativeTargetOrigin,this.target,g.target),ge(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ro(this.parent.latestValues)||yi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===oe.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;ge(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,g=this.treeScale.y;pf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Y());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ui(this.prevProjectionDelta.x,this.projectionDelta.x),Ui(this.prevProjectionDelta.y,this.projectionDelta.y)),Xt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==g||!Qi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=mt(),this.projectionDelta=mt(),this.projectionDeltaWithTransform=mt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=mt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Y(),g=l?l.source:void 0,h=this.layout?this.layout.source:void 0,v=g!==h,S=this.getStack(),x=!S||S.members.length<=1,b=!!(v&&!x&&this.options.crossfade===!0&&!this.path.some(lh));this.animationProgress=0;let w;this.mixTargetDelta=P=>{const T=P/1e3;sa(d.x,i.x,T),sa(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ah(this.relativeTarget,this.relativeTargetOrigin,f,T),w&&Wf(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Y()),ge(w,this.relativeTarget)),v&&(this.animationValues=u,Bf(u,c,this.latestValues,T,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ve(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{Sn.hasAnimatedSinceResize=!0,this.currentAnimation=Of(0,ea,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ea),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&ua(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Y();const d=ue(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ue(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}ge(a,l),yt(a,u),Xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Gf),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Xo("z",i,c,this.animationValues);for(let u=0;u<Uo.length;u++)Xo(`rotate${Uo[u]}`,i,c,this.animationValues),Xo(`skew${Uo[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Hf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=mn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=mn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Qe(this.latestValues)&&(v.transform=u?u({},""):"none",this.hasProjected=!1),v}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Kf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:g,y:h}=this.projectionDelta;c.transformOrigin=`${g.origin*100}% ${h.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const v in kt){if(f[v]===void 0)continue;const{correct:S,applyTo:x,isCSSVariable:b}=kt[v],w=c.transform==="none"?f[v]:S(f[v],d);if(x){const P=x.length;for(let T=0;T<P;T++)c[x[T]]=w}else b?this.options.visualElement.renderState.vars[v]=w:c[v]=w}return this.options.layoutId&&(c.pointerEvents=d===this?mn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(oa),this.root.sharedNodes.clear()}}}function Yf(e){e.updateLayout()}function Zf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?me(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],g=ue(f);f.min=o[d].min,f.max=f.min+g}):ua(s,n.layoutBox,o)&&me(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],g=ue(o[d]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+g)});const a=mt();Xt(a,o,n.layoutBox);const l=mt();i?Xt(l,e.applyTransform(r,!0),n.measuredBox):Xt(l,o,n.layoutBox);const c=!Hi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:g}=d;if(f&&g){const h=Y();Wt(h,n.layoutBox,f.layoutBox);const v=Y();Wt(v,o,g.layoutBox),Zi(h,v)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Jf(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 Qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eh(e){e.clearSnapshot()}function oa(e){e.clearMeasurements()}function th(e){e.isLayoutDirty=!1}function nh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ra(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oh(e){e.resolveTargetDelta()}function rh(e){e.calcProjection()}function sh(e){e.resetSkewAndRotation()}function ih(e){e.removeLeadSnapshot()}function sa(e,t,n){e.translate=G(t.translate,0,n),e.scale=G(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ia(e,t,n,o){e.min=G(t.min,n.min,o),e.max=G(t.max,n.max,o)}function ah(e,t,n,o){ia(e.x,t.x,n.x,o),ia(e.y,t.y,n.y,o)}function lh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ch={duration:.45,ease:[.4,0,.1,1]},aa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),la=aa("applewebkit/")&&!aa("chrome/")?Math.round:fe;function ca(e){e.min=la(e.min),e.max=la(e.max)}function uh(e){ca(e.x),ca(e.y)}function ua(e,t,n){return e==="position"||e==="preserve-aspect"&&!ff(Ji(t),Ji(n),.2)}function dh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const fh=na({attachResizeListener:(e,t)=>$t(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wo={current:void 0},da=na({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wo.current){const e=new fh({});e.mount(window),e.setOptions({layoutScroll:!0}),Wo.current=e}return Wo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hh={pan:{Feature:Mf},drag:{Feature:Af,ProjectionNode:da,MeasureLayout:Vi}};function fa(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&U.postRender(()=>s(t,zt(t)))}class ph extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=wc(t,(n,o)=>(fa(this.node,o,"Start"),r=>fa(this.node,r,"End"))))}unmount(){}}class mh extends Be{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=Bt($t(this.node.current,"focus",()=>this.onFocus()),$t(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ha(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&U.postRender(()=>s(t,zt(t)))}class gh extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=Ec(t,(n,o)=>(ha(this.node,o,"Start"),(r,{success:s})=>ha(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Go=new WeakMap,Ko=new WeakMap,yh=e=>{const t=Go.get(e.target);t&&t(e)},vh=e=>{e.forEach(yh)};function xh({root:e,...t}){const n=e||document;Ko.has(n)||Ko.set(n,{});const o=Ko.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(vh,{root:e,...t})),o[r]}function bh(e,t,n){const o=xh(t);return Go.set(e,n),o.observe(e),()=>{Go.delete(e),o.unobserve(e)}}const Sh={some:0,all:1};class wh extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Sh[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return bh(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ch(t,n))&&this.startObserver()}unmount(){}}function Ch({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _h={inView:{Feature:wh},tap:{Feature:gh},focus:{Feature:mh},hover:{Feature:ph}},Th={layout:{ProjectionNode:da,MeasureLayout:Vi}},Ho={current:null},pa={current:!1};function Eh(){if(pa.current=!0,!!Bn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ho.current=e.matches;e.addListener(t),t()}else Ho.current=!1}const Ph=[...Fs,ie,Re],Ah=e=>Ph.find(Bs(e)),Mh=new WeakMap;function Lh(e,t,n){for(const o in t){const r=t[o],s=n[o];if(se(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&sn(r.version==="12.5.0",`Attempting to mix Motion versions ${r.version} with 12.5.0 may not work as expected.`);else if(se(s))e.addValue(o,Lt(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const i=e.getValue(o);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(o);e.addValue(o,Lt(i!==void 0?i:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const ma=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dh{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ao,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 g=Se.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,U.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=hn(n),this.isVariantNode=Xr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const h=f[g];l[g]!==void 0&&se(h)&&h.set(l[g],!1)}}mount(t){this.current=t,Mh.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),pa.current||Eh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ho.current,process.env.NODE_ENV!=="production"&&sn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ve(this.notifyUpdate),Ve(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=He.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&U.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),i&&i(),n.owner&&n.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 ct){const n=ct[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<ma.length;o++){const r=ma[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,i=t[s];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Lh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Lt(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Is(r)||Ss(r))?r=parseFloat(r):!Ah(r)&&Re.test(n)&&(r=Ms(t,n)),this.setBaseTarget(t,se(r)?r.get():r)),se(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const i=fo(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(r=i[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!se(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ga extends Dh{constructor(){super(...arguments),this.KeyframeResolver=zs}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kh(e){return window.getComputedStyle(e)}class Oh extends ga{constructor(){super(...arguments),this.type="html",this.renderInstance=is}readValueFromInstance(t,n){if(He.has(n))return Xu(t,n);{const o=kh(t),r=(oo(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return _i(t,n)}build(t,n,o){io(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return po(t,n,o)}}class jh extends ga{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&ss(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(He.has(n)){const o=As(n);return o&&o.default||0}return n=as.has(n)?n:no(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return cs(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&U.postRender(this.updateDimensions)}build(t,n,o){co(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){ls(t,n,o,r)}mount(t){this.isSVGTag=uo(t.tagName),super.mount(t)}}const Nh=(e,t)=>lo(e)?new jh(t):new Oh(t,{allowProjection:e!==m.Fragment}),Vh=yu({...of,..._h,...hh,...Th},Nh),et=jc(Vh),Ih={root:"_root_uup2j_1"},ya={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function Fe(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ya).includes(t)).filter(t=>e[t]===!0).map(t=>ya[t]):null}const tt="Errore: ",Rh="Impossibile acquisire la posizione.",qo="Impossibile caricare i punti di mappa.",Bh="Si è verificato un errore.",Fh="Impossibile caricare i suggerimenti.",$h="Impossibile caricare i dettagli della location.",zh="Impossibile caricare la mappa.",Uh="Impossibile trovare punti di mappa nell'area di ricerca.",Xh="Ottieni indicazioni di navigazione per questa destinazione",Wh="Condividi questa destinazione",Gh="Scarica l'evento",Kh="dyn-locator__portal-root",Hh=3e3,va=6,qh=2e4,Yh=300,Kt={north:47.1,south:36.6,east:18.6,west:6.6},Zh={lat:(Kt.north+Kt.south)/2,lng:(Kt.east+Kt.west)/2};function Pe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Ae(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function xa(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Xh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Wh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Gh,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Jh(e,t){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>e(...o),t)}}const ba="Anchor";function Sa({as:e,wrapper:t,children:n,variant:o="default",className:r,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},g){const h=t||"span",v=s?et[h]:h,S=e||"a",x=Fe(f)??[],b=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},P=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return y.jsx(v,{className:W(Ih.root,"dyn-locator__"+Ae(ba),Pe(r),...x),"data-variant":o,...d?{style:d}:{},...b,...f,children:y.jsx(S,{ref:g,href:a,target:l,rel:P,...u,children:n})})}Sa.displayName=ba;const wa=m.forwardRef(Sa),Ca="ErrorBanner";function _a({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:o,errorDetails:r,className:s,children:i,...a}){const l=Fe(a)??[];return y.jsxs("div",{className:W("dyn-locator__"+Ae(Ca),Pt.root,Pe(s),...l??[]),children:[y.jsxs("header",{className:Pt.header,children:[y.jsx(Jl,{size:28,color:"currentColor",className:Pt.icon})," ",y.jsx("h3",{children:e})]}),y.jsxs("div",{className:Pt.body,children:[y.jsx("p",{children:t}),n&&o&&y.jsxs("p",{children:["Prova a"," ",y.jsx(wa,{animate:!1,"aria-label":n,href:"#",onClick:o,children:n})]}),i,r&&y.jsx("div",{className:Pt.content,children:y.jsx("pre",{children:r})})]})]})}_a.displayName=Ca;const Ta=_a;class Qh extends m.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||y.jsx("div",{className:Ul.container,children:y.jsx(Ta,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const ep=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",fillRule:"evenodd",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M12 2.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19ZM13.286 14.518h2.459l.386-2.498h-2.845v-1.365c0-1.037.338-1.957 1.309-1.957h1.56v-2.18c-.275-.037-.854-.118-1.949-.118-2.287 0-3.627 1.208-3.627 3.959v1.661h-2.35v2.498h2.35v6.864c.465.07.937.118 1.421.118.438 0 .864-.04 1.286-.097v-6.885Z"})]}),tp=m.forwardRef(ep),np=m.memo(tp),op=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M8 3a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5H8Zm10 2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-6 2a5 5 0 1 1-.001 10.001A5 5 0 0 1 12 7Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})]}),rp=m.forwardRef(op),sp=m.memo(rp),ip=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM9 17H6.477v-7H9v7ZM7.694 8.717c-.771 0-1.286-.514-1.286-1.2 0-.686.514-1.2 1.371-1.2.771 0 1.286.514 1.286 1.2 0 .686-.514 1.2-1.371 1.2ZM18 17h-2.442v-3.826c0-1.058-.651-1.302-.895-1.302s-1.058.163-1.058 1.302V17h-2.523v-7h2.523v.977c.325-.57.976-.977 2.197-.977S18 10.977 18 13.174V17Z"})]}),ap=m.forwardRef(ip),lp=m.memo(ap),cp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.68 1.92H4.32a2.403 2.403 0 0 0-2.4 2.4v15.36c0 1.323 1.077 2.4 2.4 2.4h15.36c1.323 0 2.4-1.077 2.4-2.4V4.32c0-1.323-1.077-2.4-2.4-2.4Zm-1.917 8.795a3.596 3.596 0 0 1-3.34-1.61v5.538a4.093 4.093 0 1 1-4.093-4.093c.085 0 .169.008.253.013v2.017c-.084-.01-.167-.025-.253-.025a2.089 2.089 0 1 0 0 4.178c1.154 0 2.173-.91 2.173-2.063l.02-9.405h1.927a3.594 3.594 0 0 0 3.313 3.208v2.242Z"})]}),up=m.forwardRef(cp),dp=m.memo(up),fp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.077 4.928A9.927 9.927 0 0 0 12.011 2c-5.506 0-9.987 4.479-9.989 9.985a9.962 9.962 0 0 0 1.333 4.992L2 22l5.233-1.237a9.98 9.98 0 0 0 4.773 1.216h.004c5.505 0 9.986-4.48 9.989-9.985a9.922 9.922 0 0 0-2.922-7.066Zm-2.179 10.626c-.208.583-1.227 1.145-1.685 1.186-.458.042-.887.207-2.995-.624-2.537-1-4.139-3.601-4.263-3.767-.125-.167-1.019-1.353-1.019-2.581s.645-1.832.874-2.081a.916.916 0 0 1 .666-.312c.166 0 .333 0 .478.006.178.007.375.016.562.431.222.494.707 1.728.769 1.853.062.125.104.271.021.437-.083.166-.125.27-.249.416-.125.146-.262.325-.374.437-.125.124-.255.26-.11.509.146.25.646 1.067 1.388 1.728.954.85 1.757 1.113 2.007 1.239.25.125.395.104.541-.063.146-.166.624-.728.79-.978.166-.25.333-.208.562-.125.229.083 1.456.687 1.705.812.25.125.416.187.478.291.062.103.062.603-.146 1.186Z"})]}),hp=m.forwardRef(fp),pp=m.memo(hp),mp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillOpacity:"0.3",fillRule:"evenodd",d:"M15.572 20.5 3.91 3.5h4.479l11.661 17h-4.479Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.862 4.5 10.29 15h-2.054L5.81 4.5h2.053Zm.79-1.5h-5.69l12.346 18H21L8.652 3Z",clipRule:"evenodd"})]})]}),gp=m.forwardRef(mp),Ea=m.memo(gp),yp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M21.551 6.96c-.191-1.056-1.102-1.824-2.16-2.064-1.582-.336-4.511-.576-7.68-.576-3.167 0-6.142.24-7.727.576-1.055.24-1.968.96-2.16 2.064-.193 1.2-.384 2.88-.384 5.04s.191 3.84.431 5.04c.193 1.056 1.105 1.824 2.16 2.064 1.68.336 4.56.576 7.729.576 3.169 0 6.049-.24 7.729-.576 1.055-.24 1.967-.96 2.16-2.064.19-1.2.43-2.929.48-5.04-.098-2.16-.338-3.84-.578-5.04ZM9.12 15.36V8.64L14.976 12 9.12 15.36Z"})]}),vp=m.forwardRef(yp),xp=m.memo(vp),Pa={ArrowLeft:Kl,ArrowUpRight:ql,ChevronUp:Zl,ChevronDown:Yl,Close:Sr,Expand:oc,Location:nc,Search:ic,Share:ac,Target:ec,Email:tc,Copy:Ql,X:Ea,Twitter:Ea,Facebook:np,Instagram:sp,Linkedin:lp,TikTok:dp,Whatsapp:pp,Youtube:xp},Me={root:"_root_1cmog_4",header:"_header_1cmog_21",body:"_body_1cmog_22",cta:"_cta_1cmog_23",titleContainer:"_titleContainer_1cmog_40",shareButton:"_shareButton_1cmog_51",capabilities:"_capabilities_1cmog_59",tagContainer:"_tagContainer_1cmog_72",tag:"_tag_1cmog_72"},vt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Yo={root:"_root_71ove_4",icon:"_icon_71ove_43"};function bp(e){return m.isValidElement(e)||typeof e=="function"}function Sp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function wp(e){return!!e&&typeof e=="object"&&"path"in e}const Aa="Icon";function Ma({as:e,icon:t,iconRef:n,label:o,size:r="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const g=e||"span",h=l?et[g]:g,{iconMap:v}=Mp();function S(w){if(Sp(w)){const P=typeof w=="string"?w:w.name;return v[P]?m.createElement(v[P],{...n?{ref:n}:{},...o?{title:o,titleId:o.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Yo.icon}):'No icon found for "'+P+'"!'}return wp(w)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),y.jsx("img",{...n?{ref:n}:{},src:w.path,alt:`Icona decorativa${o?" che rappresenta '"+o+"'":""}`,className:Yo.icon})):"No icon provided"}const x=Fe(d)??[],b=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return y.jsx(h,{ref:f,className:W(Yo.root,"dyn-locator__"+Ae(Aa),Pe(a),...x),...u?{style:u}:{},"data-variant":i,"data-size":r,...s?{"data-radius":s}:{},...b,...d,children:S(t)})}Ma.displayName=Aa;const Ce=m.forwardRef(Ma),La="Tag";function Da({as:e,iconPosition:t="left",children:n,icon:o,className:r,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?et[u]:u,f=Fe(l)??[],g=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return y.jsx(d,{ref:c,className:W(vt.root,"dyn-locator__"+Ae(La),Pe(r),...f),"data-icon-position":t,...a?{style:a}:{},...g,...l,children:y.jsxs("div",{className:vt.container,children:[o?y.jsx("div",{className:vt.icon,children:bp(o)?typeof o=="function"?y.jsx(o,{className:vt.icon}):o:y.jsx(Ce,{className:vt.icon,icon:o})}):null,y.jsx("div",{className:vt.label,children:n})]})})}Da.displayName=La;const Cp=m.forwardRef(Da),_p={root:"_root_u5v4v_1"},ka="IconButton";function Oa({as:e,children:t,className:n,variant:o="default",animate:r=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},g){const h=e||"button",v=r?et[h]:h,S=Fe(f)??[],x=r?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},b=h==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return y.jsx(v,{ref:g,className:W(_p.root,"dyn-locator__"+Ae(ka),Pe(n),...S),"data-variant":o,"data-element":h,"aria-label":a,disabled:d,...i?{style:i}:{},...x,...b,...f,children:t})}Oa.displayName=ka;const $e=m.forwardRef(Oa),ja={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Na="Card";function Va({as:e,children:t,className:n,variant:o="default",animate:r=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=r?et[d]:d,g=Fe(c)??[],h=r?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return y.jsx(f,{ref:u,className:W(ja.root,"dyn-locator__"+Ae(Na),Pe(n),...g),"data-variant":o,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...h,...c,children:o==="bare"?t:y.jsx("div",{className:ja.content,children:t})})}Va.displayName=Na;const Tp=m.forwardRef(Va);function Ia(e){const{componentMap:t}=Lp();return t[e]}const Ra="LocationCard";function Ba({id:e,title:t,timestamp:n,address:o,capabilities:r,on_share:s,actions:i,className:a,...l},c){const u=Ia("ctaButton"),d=O(h=>h.toggleShareSheet),f=O(h=>h.featureFlags);function g(){d(!0)}return y.jsx(Tp,{ref:c,variant:"bare",clickable:!0,className:W("dyn-locator__"+Ae(Ra),Pe(a)),...l,style:{...l.style?l.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:y.jsxs("div",{className:Me.root,children:[y.jsxs("header",{className:Me.header,children:[n?y.jsx("time",{children:n}):null,y.jsxs("div",{className:Me.titleContainer,children:[t?y.jsx("h4",{children:t}):null,f.share?y.jsx($e,{className:Me.shareButton,variant:"bare",onClick:g,children:y.jsx(Ce,{size:"M",icon:"Share"})}):null]}),o?y.jsx("address",{children:o}):null]}),r!=null&&r.length?y.jsx("div",{className:Me.body,children:r.map((h,v)=>y.jsxs("div",{className:Me.capabilities,children:[y.jsx("h5",{children:h.title}),y.jsx("ul",{className:Me.tagContainer,children:(h.capabilities??[]).map((S,x)=>y.jsx(Cp,{as:"li",animationDelay:+`.${x+1}`,className:Me.tag,children:S.label},x))})]},v))}):null,i!=null&&i.length?y.jsx("div",{className:Me.cta,children:i.map((h,v)=>y.jsx(u,{animate:!1,fullWidth:!0,variant:v===0?"themed":"secondary",...xa(h),children:h.label},v))}):null]})})}Ba.displayName=Ra;const Ep=m.forwardRef(Ba),Fa={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},$a="Button";function za({as:e,children:t,className:n,variant:o="default",size:r="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:g,...h},v){const S=e||(u?"a":"button"),x=l?et[S]:S,b=Fe(h)??[],w=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},P=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return y.jsx(x,{ref:v,className:W(Fa.root,"dyn-locator__"+Ae($a),Pe(n),...b),"data-variant":o,"data-size":r,"data-full-width":a,disabled:s||i,...g?{style:g}:{},...w,...P,...h,children:i?y.jsxs("span",{style:{display:"flex",gap:10},children:[t,y.jsx("span",{className:Fa.loader,"aria-hidden":"true"})]}):t})}za.displayName=$a;const Ht=m.forwardRef(za),Ua={locationCard:Ep,ctaButton:Ht},Pp={iconMap:Pa,componentMap:Ua},Zo=m.createContext(Pp);function Ap({children:e,customIcons:t,customComponents:n}){const o={...Pa,...t??{}},r={...Ua,...n??{}};return y.jsx(Zo.Provider,{value:{iconMap:o,componentMap:r},children:e})}function Mp(){const{iconMap:e}=m.useContext(Zo);return{iconMap:e}}function Lp(){const{componentMap:e}=m.useContext(Zo);return{componentMap:e}}var qt=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(qt||{});const Xa=m.createContext({endpointMap:{},apiUrl:""});function Dp({children:e,endpoints:t,apiUrl:n}){var o;if(!n||!((o=Object.keys(t??{}))!=null&&o.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return y.jsx(Xa.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function kp(e){const{endpointMap:t,apiUrl:n}=m.useContext(Xa);return{getEndpoint:(o={})=>{const r=t[e];if(!r)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return r.buildPath?s=r.buildPath(o):(s=r.path,Object.entries(o).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:r.method}}}}let Op={data:""},jp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Op,Np=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Vp=/\/\*[^]*?\*\/| +/g,Wa=/\n+/g,ze=(e,t)=>{let n="",o="",r="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":o+=s[1]=="f"?ze(i,s):s+"{"+ze(i,s[1]=="k"?"":t)+"}":typeof i=="object"?o+=ze(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=ze.p?ze.p(s,i):s+":"+i+";")}return n+(t&&r?t+"{"+r+"}":r)+o},Le={},Ga=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ga(e[n]);return t}return e},Ip=(e,t,n,o,r)=>{let s=Ga(e),i=Le[s]||(Le[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!Le[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=Np.exec(c.replace(Vp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Wa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Wa," ").trim();return f[0]})(e);Le[i]=ze(r?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Le.g?Le.g:null;return n&&(Le.g=Le[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Le[i],t,o,a),i},Rp=(e,t,n)=>e.reduce((o,r,s)=>{let i=t[s];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":ze(a,""):a===!1?"":a}return o+r+(i??"")},"");function wn(e){let t=this||{},n=e.call?e(t.p):e;return Ip(n.unshift?n.raw?Rp(n,[].slice.call(arguments,1),t.p):n.reduce((o,r)=>Object.assign(o,r&&r.call?r(t.p):r),{}):n,jp(t.target),t.g,t.o,t.k)}let Ka,Jo,Qo;wn.bind({g:1});let De=wn.bind({k:1});function Bp(e,t,n,o){ze.p=t,Ka=e,Jo=n,Qo=o}function Ue(e,t){let n=this||{};return function(){let o=arguments;function r(s,i){let a=Object.assign({},s),l=a.className||r.className;n.p=Object.assign({theme:Jo&&Jo()},a),n.o=/ *go\d+/.test(l),a.className=wn.apply(n,o)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Qo&&c[0]&&Qo(a),Ka(c,a)}return t?t(r):r}}var Fp=e=>typeof e=="function",Cn=(e,t)=>Fp(e)?e(t):e,$p=(()=>{let e=0;return()=>(++e).toString()})(),Ha=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),zp=20,qa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,zp)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return qa(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let r=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+r}))}}},_n=[],nt={toasts:[],pausedAt:void 0},ot=e=>{nt=qa(nt,e),_n.forEach(t=>{t(nt)})},Up={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Xp=(e={})=>{let[t,n]=m.useState(nt),o=m.useRef(nt);m.useEffect(()=>(o.current!==nt&&n(nt),_n.push(n),()=>{let s=_n.indexOf(n);s>-1&&_n.splice(s,1)}),[]);let r=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||Up[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:r}},Wp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||$p()}),Yt=e=>(t,n)=>{let o=Wp(t,e,n);return ot({type:2,toast:o}),o.id},H=(e,t)=>Yt("blank")(e,t);H.error=Yt("error"),H.success=Yt("success"),H.loading=Yt("loading"),H.custom=Yt("custom"),H.dismiss=e=>{ot({type:3,toastId:e})},H.remove=e=>ot({type:4,toastId:e}),H.promise=(e,t,n)=>{let o=H.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(r=>{let s=t.success?Cn(t.success,r):void 0;return s?H.success(s,{id:o,...n,...n==null?void 0:n.success}):H.dismiss(o),r}).catch(r=>{let s=t.error?Cn(t.error,r):void 0;s?H.error(s,{id:o,...n,...n==null?void 0:n.error}):H.dismiss(o)}),e};var Gp=(e,t)=>{ot({type:1,toast:{id:e,height:t}})},Kp=()=>{ot({type:5,time:Date.now()})},Zt=new Map,Hp=1e3,qp=(e,t=Hp)=>{if(Zt.has(e))return;let n=setTimeout(()=>{Zt.delete(e),ot({type:4,toastId:e})},t);Zt.set(e,n)},Yp=e=>{let{toasts:t,pausedAt:n}=Xp(e);m.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&H.dismiss(a.id);return}return setTimeout(()=>H.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let o=m.useCallback(()=>{n&&ot({type:6,time:Date.now()})},[n]),r=m.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(g=>(g.position||c)===(s.position||c)&&g.height),d=u.findIndex(g=>g.id===s.id),f=u.filter((g,h)=>h<d&&g.visible).length;return u.filter(g=>g.visible).slice(...a?[f+1]:[0,f]).reduce((g,h)=>g+(h.height||0)+l,0)},[t]);return m.useEffect(()=>{t.forEach(s=>{if(s.dismissed)qp(s.id,s.removeDelay);else{let i=Zt.get(s.id);i&&(clearTimeout(i),Zt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:Gp,startPause:Kp,endPause:o,calculateOffset:r}}},Zp=De`
138
+ */const Tr=se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Er=m.createContext({});function fc(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const zn=typeof window<"u",hc=zn?m.useLayoutEffect:m.useEffect,Un=m.createContext(null),Pr=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function pc(e=!0){const t=m.useContext(Un);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=m.useId();m.useEffect(()=>{if(e)return r(s)},[e]);const i=m.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,i]:[!0]}function Xn(e,t){e.indexOf(t)===-1&&e.push(t)}function Wn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const fe=e=>e;let dt=fe,Ve=fe;process.env.NODE_ENV!=="production"&&(dt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ve=(e,t)=>{if(!e)throw new Error(t)});const mc={useManualTiming:!1};function Gn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ft=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Hn{constructor(){this.subscriptions=[]}add(t){return Xn(this.subscriptions,t),()=>Wn(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const i=this.subscriptions[s];i&&i(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Se=e=>e*1e3,Pe=e=>e/1e3;function Ar(e,t){return t?e*(1e3/t):0}const Mr=new Set;function cn(e,t,n){e||Mr.has(t)||(console.warn(t),Mr.add(t))}const gc=Gn(()=>window.ScrollTimeline!==void 0);class yc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(gc()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class vc extends yc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Kn(e,t){return e?e[t]||e.default||e:void 0}const qn=2e4;function Lr(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<qn;)t+=n,o=e.next(t);return t>=qn?1/0:t}function Yn(e){return typeof e=="function"}function Or(e,t){e.timeline=t,e.onfinish=null}const Zn=e=>Array.isArray(e)&&typeof e[0]=="number",xc={linearEasing:void 0};function bc(e,t){const n=Gn(e);return()=>{var o;return(o=xc[t])!==null&&o!==void 0?o:n()}}const un=bc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dr=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(ft(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function kr(e){return!!(typeof e=="function"&&un()||!e||typeof e=="string"&&(e in Jn||un())||Zn(e)||Array.isArray(e)&&e.every(kr))}const Dt=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Jn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dt([0,.65,.55,1]),circOut:Dt([.55,0,1,.45]),backIn:Dt([.31,.01,.66,-.59]),backOut:Dt([.33,1.53,.69,.99])};function Nr(e,t){if(e)return typeof e=="function"&&un()?Dr(e,t):Zn(e)?Dt(e):Array.isArray(e)?e.map(n=>Nr(n,t)||Jn.easeOut):Jn[e]}const dn=["read","resolveKeyframes","update","preRender","render","postRender"],jr={value:null};function Sc(e,t){let n=new Set,o=new Set,r=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,p=!1)=>{const g=p&&r?n:o;return f&&i.add(d),g.has(d)||g.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(a=d,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(c),t&&jr.value&&jr.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,u.process(d))}};return u}const _c=40;function Ir(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=dn.reduce((x,b)=>(x[b]=Sc(s,t?b:void 0),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{const x=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,_c),1),r.timestamp=x,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(p))},y=()=>{n=!0,o=!0,r.isProcessing||e(p)};return{schedule:dn.reduce((x,b)=>{const _=i[b];return x[b]=(P,T=!1,L=!1)=>(n||y(),_.schedule(P,T,L)),x},{}),cancel:x=>{for(let b=0;b<dn.length;b++)i[dn[b]].cancel(x)},state:r,steps:i}}const{schedule:U,cancel:Re,state:oe,steps:Qn}=Ir(typeof requestAnimationFrame<"u"?requestAnimationFrame:fe,!0),{schedule:eo}=Ir(queueMicrotask,!1);let fn;function Cc(){fn=void 0}const _e={now:()=>(fn===void 0&&_e.set(oe.isProcessing||mc.useManualTiming?oe.timestamp:performance.now()),fn),set:e=>{fn=e,queueMicrotask(Cc)}},be={x:!1,y:!1};function Vr(){return be.x||be.y}function wc(e){return e==="x"||e==="y"?be[e]?null:(be[e]=!0,()=>{be[e]=!1}):be.x||be.y?null:(be.x=be.y=!0,()=>{be.x=be.y=!1})}function Tc(e,t,n){var o;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Rr(e,t){const n=Tc(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Br(e){return!(e.pointerType==="touch"||Vr())}function Ec(e,t,n={}){const[o,r,s]=Rr(e,n),i=a=>{if(!Br(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Br(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return o.forEach(a=>{a.addEventListener("pointerenter",i,r)}),s}function Fr(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const $r=(e,t)=>t?e===t?!0:$r(e,t.parentElement):!1,to=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Pc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ac(e){return Pc.has(e.tagName)||e.tabIndex!==-1}const kt=new WeakSet;function zr(e){return t=>{t.key==="Enter"&&e(t)}}function no(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Mc=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=zr(()=>{if(kt.has(n))return;no(n,"down");const r=zr(()=>{no(n,"up")}),s=()=>no(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Ur(e){return to(e)&&!Vr()}function Lc(e,t,n={}){const[o,r,s]=Rr(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ur(a)||kt.has(l))return;kt.add(l),Fr(a,"set");const c=t(l,a),u=(p,y)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Fr(p,"release"),!(!Ur(p)||!kt.has(l))&&(kt.delete(l),typeof c=="function"&&c(p,{success:y}))},d=p=>{(p.isTrusted?Oc(p,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(p,!1):u(p,!(l instanceof Element)||$r(l,p.target))},f=p=>{u(p,!1)};l.addEventListener("pointerup",d,r),l.addEventListener("pointercancel",f,r),l.addEventListener("lostpointercapture",f,r)};return o.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!Ac(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,r),l&&a.addEventListener("focus",c=>Mc(c,r),r)}),s}function Oc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Xr=30,Dc=e=>!isNaN(parseFloat(e));class kc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=_e.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_e.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Dc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&cn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Hn);const o=this.events[t].add(n);return t==="change"?()=>{o(),U.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_e.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Xr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Xr);return Ar(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Nt(e,t){return new kc(e,t)}const Wr=m.createContext({strict:!1}),Gr={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"]},ht={};for(const e in Gr)ht[e]={isEnabled:t=>Gr[e].some(n=>!!t[n])};function Nc(e){for(const t in e)ht[t]={...ht[t],...e[t]}}const jc=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 hn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jc.has(e)}let Hr=e=>!hn(e);function Ic(e){e&&(Hr=t=>t.startsWith("on")?!hn(t):e(t))}try{Ic(require("@emotion/is-prop-valid").default)}catch{}function Vc(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Hr(r)||n===!0&&hn(r)||!t&&!hn(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}function Rc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&cn(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const pn=m.createContext({});function mn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function jt(e){return typeof e=="string"||Array.isArray(e)}const oo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ro=["initial",...oo];function gn(e){return mn(e.animate)||ro.some(t=>jt(e[t]))}function Kr(e){return!!(gn(e)||e.variants)}function Bc(e,t){if(gn(e)){const{initial:n,animate:o}=e;return{initial:n===!1||jt(n)?n:void 0,animate:jt(o)?o:void 0}}return e.inherit!==!1?t:{}}function Fc(e){const{initial:t,animate:n}=Bc(e,m.useContext(pn));return m.useMemo(()=>({initial:t,animate:n}),[qr(t),qr(n)])}function qr(e){return Array.isArray(e)?e.join(" "):e}const $c=Symbol.for("motionComponentSymbol");function pt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zc(e,t,n){return m.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):pt(n)&&(n.current=o))},[t])}const so=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Yr="data-"+so("framerAppearId"),Zr=m.createContext({});function Uc(e,t,n,o,r){var s,i;const{visualElement:a}=m.useContext(pn),l=m.useContext(Wr),c=m.useContext(Un),u=m.useContext(Pr).reducedMotion,d=m.useRef(null);o=o||l.renderer,!d.current&&o&&(d.current=o(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,p=m.useContext(Zr);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&Xc(d.current,n,r,p);const y=m.useRef(!1);m.useInsertionEffect(()=>{f&&y.current&&f.update(n,c)});const g=n[Yr],S=m.useRef(!!g&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,g))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,g)));return hc(()=>{f&&(y.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),eo.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,g)}),S.current=!1))}),f}function Xc(e,t,n,o){const{layoutId:r,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Jr(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!i||a&&pt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:c})}function Jr(e){if(e)return e.options.allowProjection!==!1?e.projection:Jr(e.parent)}function Wc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,i;e&&Nc(e);function a(c,u){let d;const f={...m.useContext(Pr),...c,layoutId:Gc(c)},{isStatic:p}=f,y=Fc(c),g=o(c,p);if(!p&&zn){Hc(f,e);const S=Kc(f);d=S.MeasureLayout,y.visualElement=Uc(r,g,f,t,S.ProjectionNode)}return v.jsxs(pn.Provider,{value:y,children:[d&&y.visualElement?v.jsx(d,{visualElement:y.visualElement,...f}):null,n(r,c,zc(g,y.visualElement,u),g,p,y.visualElement)]})}a.displayName=`motion.${typeof r=="string"?r:`create(${(i=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&i!==void 0?i:""})`}`;const l=m.forwardRef(a);return l[$c]=r,l}function Gc({layoutId:e}){const t=m.useContext(Er).id;return t&&e!==void 0?t+"-"+e:e}function Hc(e,t){const n=m.useContext(Wr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?dt(!1,o):Ve(!1,o)}}function Kc(e){const{drag:t,layout:n}=ht;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const Qr=e=>t=>typeof t=="string"&&t.startsWith(e),io=Qr("--"),qc=Qr("var(--"),ao=e=>qc(e)?Yc.test(e.split("/*")[0].trim()):!1,Yc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={};function Zc(e){for(const t in e)It[t]=e[t],io(t)&&(It[t].isCSSVariable=!0)}const mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ze=new Set(mt);function es(e,{layout:t,layoutId:n}){return Ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!It[e]||e==="opacity")}const ie=e=>!!(e&&e.getVelocity),ts=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ae=(e,t,n)=>n>t?t:n<e?e:n,gt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Vt={...gt,transform:e=>Ae(0,1,e)},yn={...gt,default:1},Rt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Be=Rt("deg"),Ce=Rt("%"),D=Rt("px"),Jc=Rt("vh"),Qc=Rt("vw"),ns={...Ce,parse:e=>Ce.parse(e)/100,transform:e=>Ce.transform(e*100)},eu={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,backgroundPositionX:D,backgroundPositionY:D},tu={rotate:Be,rotateX:Be,rotateY:Be,rotateZ:Be,scale:yn,scaleX:yn,scaleY:yn,scaleZ:yn,skew:Be,skewX:Be,skewY:Be,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:Vt,originX:ns,originY:ns,originZ:D},os={...gt,transform:Math.round},lo={...eu,...tu,zIndex:os,size:D,fillOpacity:Vt,strokeOpacity:Vt,numOctaves:os},nu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ou=mt.length;function ru(e,t,n){let o="",r=!0;for(let s=0;s<ou;s++){const i=mt[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ts(a,lo[i]);if(!l){r=!1;const u=nu[i]||i;o+=`${u}(${c}) `}n&&(t[i]=c)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function co(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ze.has(l)){i=!0;continue}else if(io(l)){r[l]=c;continue}else{const u=ts(c,lo[l]);l.startsWith("origin")?(a=!0,s[l]=u):o[l]=u}}if(t.transform||(i||n?o.transform=ru(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;o.transformOrigin=`${l} ${c} ${u}`}}const uo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rs(e,t,n){for(const o in t)!ie(t[o])&&!es(o,n)&&(e[o]=t[o])}function su({transformTemplate:e},t){return m.useMemo(()=>{const n=uo();return co(n,t,e),Object.assign({},n.vars,n.style)},[t])}function iu(e,t){const n=e.style||{},o={};return rs(o,n,e),Object.assign(o,su(e,t)),o}function au(e,t){const n={},o=iu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const lu=["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 fo(e){return typeof e!="string"||e.includes("-")?!1:!!(lu.indexOf(e)>-1||/[A-Z]/u.test(e))}const cu={offset:"stroke-dashoffset",array:"stroke-dasharray"},uu={offset:"strokeDashoffset",array:"strokeDasharray"};function du(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?cu:uu;e[s.offset]=D.transform(-o);const i=D.transform(t),a=D.transform(n);e[s.array]=`${i} ${a}`}function ss(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function fu(e,t,n){const o=ss(t,e.x,e.width),r=ss(n,e.y,e.height);return`${o} ${r}`}function ho(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(co(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:y}=e;f.transform&&(y&&(p.transform=f.transform),delete f.transform),y&&(r!==void 0||s!==void 0||p.transform)&&(p.transformOrigin=fu(y,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),i!==void 0&&du(f,i,a,l,!1)}const is=()=>({...uo(),attrs:{}}),po=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hu(e,t,n,o){const r=m.useMemo(()=>{const s=is();return ho(s,t,po(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};rs(s,e.style,e),r.style={...s,...r.style}}return r}function pu(e=!1){return(n,o,r,{latestValues:s},i)=>{const l=(fo(n)?hu:au)(o,s,i,n),c=Vc(o,typeof n=="string",e),u=n!==m.Fragment?{...c,...l,ref:r}:{},{children:d}=o,f=m.useMemo(()=>ie(d)?d.get():d,[d]);return m.createElement(n,{...u,children:f})}}function as(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function mo(e,t,n,o){if(typeof t=="function"){const[r,s]=as(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=as(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const go=e=>Array.isArray(e),mu=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),gu=e=>go(e)?e[e.length-1]||0:e;function vn(e){const t=ie(e)?e.get():e;return mu(t)?t.toValue():t}function yu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const i={latestValues:vu(o,r,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:o,current:a,...i}),i.onUpdate=a=>n(a)),i}const ls=e=>(t,n)=>{const o=m.useContext(pn),r=m.useContext(Un),s=()=>yu(e,t,o,r);return n?s():fc(s)};function vu(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=vn(s[f]);let{initial:i,animate:a}=e;const l=gn(e),c=Kr(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!mn(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const y=mo(e,f[p]);if(y){const{transitionEnd:g,transition:S,...x}=y;for(const b in x){let _=x[b];if(Array.isArray(_)){const P=u?_.length-1:0;_=_[P]}_!==null&&(r[b]=_)}for(const b in g)r[b]=g[b]}}}return r}function yo(e,t,n){var o;const{style:r}=e,s={};for(const i in r)(ie(r[i])||t.style&&ie(t.style[i])||es(i,e)||((o=n==null?void 0:n.getValue(i))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[i]=r[i]);return s}const xu={useVisualState:ls({scrapeMotionValuesFromProps:yo,createRenderState:uo})};function cs(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function us(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const ds=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"]);function fs(e,t,n,o){us(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(ds.has(r)?r:so(r),t.attrs[r])}function hs(e,t,n){const o=yo(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const s=mt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const ps=["x","y","width","height","cx","cy","r"],bu={useVisualState:ls({scrapeMotionValuesFromProps:hs,createRenderState:is,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in r)if(Ze.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<ps.length;a++){const l=ps[a];e[l]!==t[l]&&(i=!0)}i&&U.read(()=>{cs(n,o),U.render(()=>{ho(o,r,po(n.tagName),e.transformTemplate),fs(n,o)})})}})};function Su(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const i={...fo(o)?bu:xu,preloadedFeatures:e,useRender:pu(r),createVisualElement:t,Component:o};return Wc(i)}}function Bt(e,t,n){const o=e.getProps();return mo(o,t,n!==void 0?n:o.custom,e)}const ms=new Set(["width","height","top","left","right","bottom",...mt]);function _u(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Nt(n))}function Cu(e,t){const n=Bt(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const i in s){const a=gu(s[i]);_u(e,i,a)}}function wu(e){return!!(ie(e)&&e.add)}function vo(e,t){const n=e.getValue("willChange");if(wu(n))return n.add(t)}function gs(e){return e.props[Yr]}const ys=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Tu=1e-7,Eu=12;function Pu(e,t,n,o,r){let s,i,a=0;do i=t+(n-t)/2,s=ys(i,o,r)-e,s>0?n=i:t=i;while(Math.abs(s)>Tu&&++a<Eu);return i}function Ft(e,t,n,o){if(e===t&&n===o)return fe;const r=s=>Pu(s,0,1,e,n);return s=>s===0||s===1?s:ys(r(s),t,o)}const vs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xs=e=>t=>1-e(1-t),bs=Ft(.33,1.53,.69,.99),xo=xs(bs),Ss=vs(xo),_s=e=>(e*=2)<1?.5*xo(e):.5*(2-Math.pow(2,-10*(e-1))),bo=e=>1-Math.sin(Math.acos(e)),Cs=xs(bo),ws=vs(bo),Ts=e=>/^0[^.\s]+$/u.test(e);function Au(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ts(e):!0}const $t=e=>Math.round(e*1e5)/1e5,So=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Mu(e){return e==null}const Lu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_o=(e,t)=>n=>!!(typeof n=="string"&&Lu.test(n)&&n.startsWith(e)||t&&!Mu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Es=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,i,a]=o.match(So);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Ou=e=>Ae(0,255,e),Co={...gt,transform:e=>Math.round(Ou(e))},Je={test:_o("rgb","red"),parse:Es("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Co.transform(e)+", "+Co.transform(t)+", "+Co.transform(n)+", "+$t(Vt.transform(o))+")"};function Du(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const wo={test:_o("#"),parse:Du,transform:Je.transform},yt={test:_o("hsl","hue"),parse:Es("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Ce.transform($t(t))+", "+Ce.transform($t(n))+", "+$t(Vt.transform(o))+")"},ae={test:e=>Je.test(e)||wo.test(e)||yt.test(e),parse:e=>Je.test(e)?Je.parse(e):yt.test(e)?yt.parse(e):wo.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Je.transform(e):yt.transform(e)},ku=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Nu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(So))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(ku))===null||n===void 0?void 0:n.length)||0)>0}const Ps="number",As="color",ju="var",Iu="var(",Ms="${}",Vu=/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 zt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const a=t.replace(Vu,l=>(ae.test(l)?(o.color.push(s),r.push(As),n.push(ae.parse(l))):l.startsWith(Iu)?(o.var.push(s),r.push(ju),n.push(l)):(o.number.push(s),r.push(Ps),n.push(parseFloat(l))),++s,Ms)).split(Ms);return{values:n,split:a,indexes:o,types:r}}function Ls(e){return zt(e).values}function Os(e){const{split:t,types:n}=zt(e),o=t.length;return r=>{let s="";for(let i=0;i<o;i++)if(s+=t[i],r[i]!==void 0){const a=n[i];a===Ps?s+=$t(r[i]):a===As?s+=ae.transform(r[i]):s+=r[i]}return s}}const Ru=e=>typeof e=="number"?0:e;function Bu(e){const t=Ls(e);return Os(e)(t.map(Ru))}const Fe={test:Nu,parse:Ls,createTransformer:Os,getAnimatableNone:Bu},Fu=new Set(["brightness","contrast","saturate","opacity"]);function $u(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(So)||[];if(!o)return e;const r=n.replace(o,"");let s=Fu.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const zu=/\b([a-z-]*)\(.*?\)/gu,To={...Fe,getAnimatableNone:e=>{const t=e.match(zu);return t?t.map($u).join(" "):e}},Uu={...lo,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:To,WebkitFilter:To},Ds=e=>Uu[e];function ks(e,t){let n=Ds(e);return n!==To&&(n=Fe),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Xu=new Set(["auto","none","0"]);function Wu(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!Xu.has(s)&&zt(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=ks(n,r)}const Qe=e=>e*180/Math.PI,Eo=e=>{const t=Qe(Math.atan2(e[1],e[0]));return Po(t)},Gu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Eo,rotateZ:Eo,skewX:e=>Qe(Math.atan(e[1])),skewY:e=>Qe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Po=e=>(e=e%360,e<0&&(e+=360),e),Ns=Eo,js=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Is=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Hu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:js,scaleY:Is,scale:e=>(js(e)+Is(e))/2,rotateX:e=>Po(Qe(Math.atan2(e[6],e[5]))),rotateY:e=>Po(Qe(Math.atan2(-e[2],e[0]))),rotateZ:Ns,rotate:Ns,skewX:e=>Qe(Math.atan(e[4])),skewY:e=>Qe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vs(e){return e.includes("scale")?1:0}function Ao(e,t){if(!e||e==="none")return Vs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,r;if(n)o=Hu,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Gu,r=a}if(!r)return Vs(t);const s=o[t],i=r[1].split(",").map(qu);return typeof s=="function"?s(i):i[s]}const Ku=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ao(n,t)};function qu(e){return parseFloat(e.trim())}const Rs=e=>e===gt||e===D,Yu=new Set(["x","y","z"]),Zu=mt.filter(e=>!Yu.has(e));function Ju(e){const t=[];return Zu.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const vt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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})=>Ao(t,"x"),y:(e,{transform:t})=>Ao(t,"y")};vt.translateX=vt.x,vt.translateY=vt.y;const et=new Set;let Mo=!1,Lo=!1;function Bs(){if(Lo){const e=Array.from(et).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=Ju(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,i])=>{var a;(a=o.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Lo=!1,Mo=!1,et.forEach(e=>e.complete()),et.clear()}function Fs(){et.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Lo=!0)})}function Qu(){Fs(),Bs()}class Oo{constructor(t,n,o,r,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(et.add(this),Mo||(Mo=!0,U.read(Fs),U.resolveKeyframes(Bs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=r==null?void 0:r.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const l=o.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),r&&i===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),et.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,et.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const $s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ed=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function td(e){const t=ed.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const nd=4;function zs(e,t,n=1){Ve(n<=nd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=td(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const i=s.trim();return $s(i)?parseFloat(i):i}return ao(r)?zs(r,t,n+1):r}const Us=e=>t=>t.test(e),Xs=[gt,D,Ce,Be,Qc,Jc,{test:e=>e==="auto",parse:e=>e}],Ws=e=>Xs.find(Us(e));class Gs extends Oo{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ao(c))){const u=zs(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ms.has(o)||t.length!==2)return;const[r,s]=t,i=Ws(r),a=Ws(s);if(i!==a)if(Rs(i)&&Rs(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)Au(t[r])&&o.push(r);o.length&&Wu(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=vt[o](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Hs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Fe.test(e)||e==="0")&&!e.startsWith("url("));function od(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function rd(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Hs(r,t),a=Hs(s,t);return dt(i===a,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:od(e)||(n==="spring"||Yn(n))&&o}const sd=e=>e!==null;function xn(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(sd),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const id=40;class Ks{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_e.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>id?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Qu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=_e.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!rd(t,o,r,s))if(i)this.options.duration=0;else{l&&l(xn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const G=(e,t,n)=>e+(t-e)*n;function Do(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ad({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,i=0;if(!t)r=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=Do(l,a,e+1/3),s=Do(l,a,e),i=Do(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:o}}function bn(e,t){return n=>n>0?t:e}const ko=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},ld=[wo,Je,yt],cd=e=>ld.find(t=>t.test(e));function qs(e){const t=cd(e);if(dt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===yt&&(n=ad(n)),n}const Ys=(e,t)=>{const n=qs(e),o=qs(t);if(!n||!o)return bn(e,t);const r={...n};return s=>(r.red=ko(n.red,o.red,s),r.green=ko(n.green,o.green,s),r.blue=ko(n.blue,o.blue,s),r.alpha=G(n.alpha,o.alpha,s),Je.transform(r))},ud=(e,t)=>n=>t(e(n)),Ut=(...e)=>e.reduce(ud),No=new Set(["none","hidden"]);function dd(e,t){return No.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function fd(e,t){return n=>G(e,t,n)}function jo(e){return typeof e=="number"?fd:typeof e=="string"?ao(e)?bn:ae.test(e)?Ys:md:Array.isArray(e)?Zs:typeof e=="object"?ae.test(e)?Ys:hd:bn}function Zs(e,t){const n=[...e],o=n.length,r=e.map((s,i)=>jo(s)(s,t[i]));return s=>{for(let i=0;i<o;i++)n[i]=r[i](s);return n}}function hd(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=jo(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function pd(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][r[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;o[s]=l,r[i]++}return o}const md=(e,t)=>{const n=Fe.createTransformer(t),o=zt(e),r=zt(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?No.has(e)&&!r.values.length||No.has(t)&&!o.values.length?dd(e,t):Ut(Zs(pd(o,r),r.values),n):(dt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),bn(e,t))};function Js(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?G(e,t,n):jo(e)(e,t)}const gd=5;function Qs(e,t,n){const o=Math.max(t-gd,0);return Ar(n-e(o),t-o)}const H={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},ei=.001;function yd({duration:e=H.duration,bounce:t=H.bounce,velocity:n=H.velocity,mass:o=H.mass}){let r,s;dt(e<=Se(H.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Ae(H.minDamping,H.maxDamping,i),e=Ae(H.minDuration,H.maxDuration,Pe(e)),i<1?(r=c=>{const u=c*i,d=u*e,f=u-n,p=Io(c,i),y=Math.exp(-d);return ei-f/p*y},s=c=>{const d=c*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,y=Math.exp(-d),g=Io(Math.pow(c,2),i);return(-r(c)+ei>0?-1:1)*((f-p)*y)/g}):(r=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=xd(r,s,a);if(e=Se(e),isNaN(l))return{stiffness:H.stiffness,damping:H.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:i*2*Math.sqrt(o*c),duration:e}}}const vd=12;function xd(e,t,n){let o=n;for(let r=1;r<vd;r++)o=o-e(o)/t(o);return o}function Io(e,t){return e*Math.sqrt(1-t*t)}const bd=["duration","bounce"],Sd=["stiffness","damping","mass"];function ti(e,t){return t.some(n=>e[n]!==void 0)}function _d(e){let t={velocity:H.velocity,stiffness:H.stiffness,damping:H.damping,mass:H.mass,isResolvedFromDuration:!1,...e};if(!ti(e,Sd)&&ti(e,bd))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*Ae(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:H.mass,stiffness:r,damping:s}}else{const n=yd(e);t={...t,...n,mass:H.mass},t.isResolvedFromDuration=!0}return t}function ni(e=H.visualDuration,t=H.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=_d({...n,velocity:-Pe(n.velocity||0)}),y=f||0,g=c/(2*Math.sqrt(l*u)),S=i-s,x=Pe(Math.sqrt(l/u)),b=Math.abs(S)<5;o||(o=b?H.restSpeed.granular:H.restSpeed.default),r||(r=b?H.restDelta.granular:H.restDelta.default);let _;if(g<1){const T=Io(x,g);_=L=>{const N=Math.exp(-g*x*L);return i-N*((y+g*x*S)/T*Math.sin(T*L)+S*Math.cos(T*L))}}else if(g===1)_=T=>i-Math.exp(-x*T)*(S+(y+x*S)*T);else{const T=x*Math.sqrt(g*g-1);_=L=>{const N=Math.exp(-g*x*L),M=Math.min(T*L,300);return i-N*((y+g*x*S)*Math.sinh(M)+T*S*Math.cosh(M))/T}}const P={calculatedDuration:p&&d||null,next:T=>{const L=_(T);if(p)a.done=T>=d;else{let N=0;g<1&&(N=T===0?Se(y):Qs(_,T,L));const M=Math.abs(N)<=o,R=Math.abs(i-L)<=r;a.done=M&&R}return a.value=a.done?i:L,a},toString:()=>{const T=Math.min(Lr(P),qn),L=Dr(N=>P.next(T*N).value,T,30);return T+"ms "+L}};return P}function oi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=M=>a!==void 0&&M<a||l!==void 0&&M>l,y=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let g=n*t;const S=d+g,x=i===void 0?S:i(S);x!==S&&(g=x-d);const b=M=>-g*Math.exp(-M/o),_=M=>x+b(M),P=M=>{const R=b(M),I=_(M);f.done=Math.abs(R)<=c,f.value=f.done?x:I};let T,L;const N=M=>{p(f.value)&&(T=M,L=ni({keyframes:[f.value,y(f.value)],velocity:Qs(_,M,f.value),damping:r,stiffness:s,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:M=>{let R=!1;return!L&&T===void 0&&(R=!0,P(M),N(M)),T!==void 0&&M>=T?L.next(M-T):(!R&&P(M),f)}}}const Cd=Ft(.42,0,1,1),wd=Ft(0,0,.58,1),ri=Ft(.42,0,.58,1),Td=e=>Array.isArray(e)&&typeof e[0]!="number",si={linear:fe,easeIn:Cd,easeInOut:ri,easeOut:wd,circIn:bo,circInOut:ws,circOut:Cs,backIn:xo,backInOut:Ss,backOut:bs,anticipate:_s},ii=e=>{if(Zn(e)){Ve(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return Ft(t,n,o,r)}else if(typeof e=="string")return Ve(si[e]!==void 0,`Invalid easing type '${e}'`),si[e];return e};function Ed(e,t,n){const o=[],r=n||Js,s=e.length-1;for(let i=0;i<s;i++){let a=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||fe:t;a=Ut(l,a)}o.push(a)}return o}function Pd(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(Ve(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ed(t,o,r),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ft(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ae(e[0],e[s-1],u)):c}function Ad(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=ft(0,t,o);e.push(G(n,1,r))}}function Md(e){const t=[0];return Ad(t,e.length-1),t}function Ld(e,t){return e.map(n=>n*t)}function Od(e,t){return e.map(()=>t||ri).splice(0,e.length-1)}function Xt({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=Td(o)?o.map(ii):ii(o),s={done:!1,value:t[0]},i=Ld(n&&n.length===t.length?n:Md(t),e),a=Pd(i,t,{ease:Array.isArray(r)?r:Od(t,r)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Dd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>U.update(t,!0),stop:()=>Re(t),now:()=>oe.isProcessing?oe.timestamp:_e.now()}},kd={decay:oi,inertia:oi,tween:Xt,keyframes:Xt,spring:ni},Nd=e=>e/100;class Vo extends Ks{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,i=(r==null?void 0:r.KeyframeResolver)||Oo,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:i=0}=this.options,a=Yn(n)?n:kd[n]||Xt;let l,c;process.env.NODE_ENV!=="production"&&a!==Xt&&Ve(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Xt&&typeof t[0]!="number"&&(l=Ut(Nd,Js(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Lr(u));const{calculatedDuration:d}=u,f=d+r,p=f*(o+1)-r;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:M}=this.options;return{done:!0,value:M[M.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:p,repeatType:y,repeatDelay:g,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let _=this.currentTime,P=s;if(p){const M=Math.min(this.currentTime,u)/d;let R=Math.floor(M),I=M%1;!I&&M>=1&&(I=1),I===1&&R--,R=Math.min(R,p+1),!!(R%2)&&(y==="reverse"?(I=1-I,g&&(I-=g/d)):y==="mirror"&&(P=i)),_=Ae(0,1,I)*d}const T=b?{done:!1,value:l[0]}:P.next(_);a&&(T.value=a(T.value));let{done:L}=T;!b&&c!==null&&(L=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return N&&r!==void 0&&(T.value=xn(l,this.options,r)),S&&S(T.value),N&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Pe(t.calculatedDuration):0}get time(){return Pe(this.currentTime)}set time(t){t=Se(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Pe(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Dd,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const jd=new Set(["opacity","clipPath","filter","transform"]);function Id(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Nr(a,r);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:o,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Vd=Gn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Sn=10,Rd=2e4;function Bd(e){return Yn(e.type)||e.type==="spring"||!kr(e.ease)}function Fd(e,t){const n=new Vo({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<Rd;)o=n.sample(s),r.push(o.value),s+=Sn;return{times:void 0,keyframes:r,duration:s-Sn,ease:"linear"}}const ai={anticipate:_s,backInOut:Ss,circInOut:ws};function $d(e){return e in ai}class li extends Ks{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new Gs(s,(i,a)=>this.onKeyframesResolved(i,a),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&un()&&$d(s)&&(s=ai[s]),Bd(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:y,...g}=this.options,S=Fd(t,g);t=S.keyframes,t.length===1&&(t[1]=t[0]),o=S.duration,r=S.times,s=S.ease,i="keyframes"}const u=Id(a.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Or(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(xn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:r,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Pe(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Pe(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Se(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return fe;const{animation:o}=n;Or(o,t)}return fe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,y=new Vo({...p,keyframes:o,duration:r,type:s,ease:i,times:a,isGenerator:!0}),g=Se(this.time);c.setWithVelocity(y.sample(g-Sn).value,y.sample(g).value,Sn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Vd()&&o&&jd.has(o)&&!l&&!c&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}}const zd={type:"spring",stiffness:500,damping:25,restSpeed:10},Ud=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xd={type:"keyframes",duration:.8},Wd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gd=(e,{keyframes:t})=>t.length>2?Xd:Ze.has(e)?e.startsWith("scale")?Ud(t[1]):zd:Wd;function Hd({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Ro=(e,t,n,o={},r,s)=>i=>{const a=Kn(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Se(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:r};Hd(a)||(u={...u,...Gd(e,u)}),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=xn(u.keyframes,a);if(f!==void 0)return U.update(()=>{u.onUpdate(f),u.onComplete()}),new vc([])}return!s&&li.supports(u)?new li(u):new Vo(u)};function Kd({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function ci(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;o&&(i=o);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),p=l[d];if(p===void 0||u&&Kd(u,d))continue;const y={delay:n,...Kn(i||{},d)};let g=!1;if(window.MotionHandoffAnimation){const x=gs(e);if(x){const b=window.MotionHandoffAnimation(x,d,U);b!==null&&(y.startTime=b,g=!0)}}vo(e,d),f.start(Ro(d,f,p,e.shouldReduceMotion&&ms.has(d)?{type:!1}:y,e,g));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{U.update(()=>{a&&Cu(e,a)})}),c}function Bo(e,t,n={}){var o;const r=Bt(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(ci(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return qd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function qd(e,t,n=0,o=0,r=1,s){const i=[],a=(e.variantChildren.size-1)*o,l=r===1?(c=0)=>c*o:(c=0)=>a-c*o;return Array.from(e.variantChildren).sort(Yd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Bo(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Yd(e,t){return e.sortNodePosition(t)}function Zd(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Bo(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Bo(e,t,n);else{const r=typeof t=="function"?Bt(e,t,n.custom):t;o=Promise.all(ci(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function ui(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Jd=ro.length;function di(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?di(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Jd;n++){const o=ro[n],r=e.props[o];(jt(r)||r===!1)&&(t[o]=r)}return t}const Qd=[...oo].reverse(),ef=oo.length;function tf(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Zd(e,n,o)))}function nf(e){let t=tf(e),n=fi(),o=!0;const r=l=>(c,u)=>{var d;const f=Bt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:y,...g}=f;c={...c,...g,...y}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=di(e.parent)||{},d=[],f=new Set;let p={},y=1/0;for(let S=0;S<ef;S++){const x=Qd[S],b=n[x],_=c[x]!==void 0?c[x]:u[x],P=jt(_),T=x===l?b.isActive:null;T===!1&&(y=S);let L=_===u[x]&&_!==c[x]&&P;if(L&&o&&e.manuallyAnimateOnMount&&(L=!1),b.protectedKeys={...p},!b.isActive&&T===null||!_&&!b.prevProp||mn(_)||typeof _=="boolean")continue;const N=of(b.prevProp,_);let M=N||x===l&&b.isActive&&!L&&P||S>y&&P,R=!1;const I=Array.isArray(_)?_:[_];let q=I.reduce(r(x),{});T===!1&&(q={});const{prevResolvedValues:le={}}=b,re={...le,...q},ce=A=>{M=!0,f.has(A)&&(R=!0,f.delete(A)),b.needsAnimating[A]=!0;const w=e.getValue(A);w&&(w.liveStyle=!1)};for(const A in re){const w=q[A],F=le[A];if(p.hasOwnProperty(A))continue;let Q=!1;go(w)&&go(F)?Q=!ui(w,F):Q=w!==F,Q?w!=null?ce(A):f.add(A):w!==void 0&&f.has(A)?ce(A):b.protectedKeys[A]=!0}b.prevProp=_,b.prevResolvedValues=q,b.isActive&&(p={...p,...q}),o&&e.blockInitialAnimation&&(M=!1),M&&(!(L&&N)||R)&&d.push(...I.map(A=>({animation:A,options:{type:x}})))}if(f.size){const S={};if(typeof c.initial!="boolean"){const x=Bt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(S.transition=x.transition)}f.forEach(x=>{const b=e.getBaseTarget(x),_=e.getValue(x);_&&(_.liveStyle=!0),S[x]=b??null}),d.push({animation:S})}let g=!!d.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=fi(),o=!0}}}function of(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ui(t,e):!1}function tt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fi(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class $e{constructor(t){this.isMounted=!1,this.node=t}update(){}}class rf extends $e{constructor(t){super(t),t.animationState||(t.animationState=nf(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();mn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let sf=0;class af extends $e{constructor(){super(...arguments),this.id=sf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const lf={animation:{Feature:rf},exit:{Feature:af}};function Wt(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function Gt(e){return{point:{x:e.pageX,y:e.pageY}}}const cf=e=>t=>to(t)&&e(t,Gt(t));function Ht(e,t,n,o){return Wt(e,t,cf(n),o)}function hi({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function uf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function df(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const pi=1e-4,ff=1-pi,hf=1+pi,mi=.01,pf=0-mi,mf=0+mi;function ue(e){return e.max-e.min}function gf(e,t,n){return Math.abs(e-t)<=n}function gi(e,t,n,o=.5){e.origin=o,e.originPoint=G(t.min,t.max,e.origin),e.scale=ue(n)/ue(t),e.translate=G(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ff&&e.scale<=hf||isNaN(e.scale))&&(e.scale=1),(e.translate>=pf&&e.translate<=mf||isNaN(e.translate))&&(e.translate=0)}function Kt(e,t,n,o){gi(e.x,t.x,n.x,o?o.originX:void 0),gi(e.y,t.y,n.y,o?o.originY:void 0)}function yi(e,t,n){e.min=n.min+t.min,e.max=e.min+ue(t)}function yf(e,t,n){yi(e.x,t.x,n.x),yi(e.y,t.y,n.y)}function vi(e,t,n){e.min=t.min-n.min,e.max=e.min+ue(t)}function qt(e,t,n){vi(e.x,t.x,n.x),vi(e.y,t.y,n.y)}const xi=()=>({translate:0,scale:1,origin:0,originPoint:0}),xt=()=>({x:xi(),y:xi()}),bi=()=>({min:0,max:0}),Y=()=>({x:bi(),y:bi()});function ge(e){return[e("x"),e("y")]}function Fo(e){return e===void 0||e===1}function $o({scale:e,scaleX:t,scaleY:n}){return!Fo(e)||!Fo(t)||!Fo(n)}function nt(e){return $o(e)||Si(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Si(e){return _i(e.x)||_i(e.y)}function _i(e){return e&&e!=="0%"}function _n(e,t,n){const o=e-n,r=t*o;return n+r}function Ci(e,t,n,o,r){return r!==void 0&&(e=_n(e,r,o)),_n(e,n,o)+t}function zo(e,t=0,n=1,o,r){e.min=Ci(e.min,t,n,o,r),e.max=Ci(e.max,t,n,o,r)}function wi(e,{x:t,y:n}){zo(e.x,t.translate,t.scale,t.originPoint),zo(e.y,n.translate,n.scale,n.originPoint)}const Ti=.999999999999,Ei=1.0000000000001;function vf(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,i;for(let a=0;a<r;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&St(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,wi(e,i)),o&&nt(s.latestValues)&&St(e,s.latestValues))}t.x<Ei&&t.x>Ti&&(t.x=1),t.y<Ei&&t.y>Ti&&(t.y=1)}function bt(e,t){e.min=e.min+t,e.max=e.max+t}function Pi(e,t,n,o,r=.5){const s=G(e.min,e.max,r);zo(e,t,n,s,o)}function St(e,t){Pi(e.x,t.x,t.scaleX,t.scale,t.originX),Pi(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ai(e,t){return hi(df(e.getBoundingClientRect(),t))}function xf(e,t,n){const o=Ai(e,n),{scroll:r}=t;return r&&(bt(o.x,r.offset.x),bt(o.y,r.offset.y)),o}const Mi=({current:e})=>e?e.ownerDocument.defaultView:null,Li=(e,t)=>Math.abs(e-t);function bf(e,t){const n=Li(e.x,t.x),o=Li(e.y,t.y);return Math.sqrt(n**2+o**2)}class Oi{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Xo(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=bf(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:y}=d,{timestamp:g}=oe;this.history.push({...y,timestamp:g});const{onStart:S,onMove:x}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Uo(f,this.transformPagePoint),U.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Xo(d.type==="pointercancel"?this.lastMoveEventInfo:Uo(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,S),y&&y(d,S)},!to(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const i=Gt(t),a=Uo(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=oe;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Xo(a,this.history)),this.removeListeners=Ut(Ht(this.contextWindow,"pointermove",this.handlePointerMove),Ht(this.contextWindow,"pointerup",this.handlePointerUp),Ht(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Re(this.updatePoint)}}function Uo(e,t){return t?{point:t(e.point)}:e}function Di(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xo({point:e},t){return{point:e,delta:Di(e,ki(t)),offset:Di(e,Sf(t)),velocity:_f(t,.1)}}function Sf(e){return e[0]}function ki(e){return e[e.length-1]}function _f(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=ki(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Se(t)));)n--;if(!o)return{x:0,y:0};const s=Pe(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const i={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Cf(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?G(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?G(n,e,o.max):Math.min(e,n)),e}function Ni(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function wf(e,{top:t,left:n,bottom:o,right:r}){return{x:Ni(e.x,n,r),y:Ni(e.y,t,o)}}function ji(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Tf(e,t){return{x:ji(e.x,t.x),y:ji(e.y,t.y)}}function Ef(e,t){let n=.5;const o=ue(e),r=ue(t);return r>o?n=ft(t.min,t.max-o,e.min):o>r&&(n=ft(e.min,e.max-r,t.min)),Ae(0,1,n)}function Pf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Wo=.35;function Af(e=Wo){return e===!1?e=0:e===!0&&(e=Wo),{x:Ii(e,"left","right"),y:Ii(e,"top","bottom")}}function Ii(e,t,n){return{min:Vi(e,t),max:Vi(e,n)}}function Vi(e,t){return typeof e=="number"?e:e[t]||0}const Mf=new WeakMap;class Lf{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=Y(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Gt(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:p,onDragStart:y}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ge(S=>{let x=this.getAxisMotionValue(S).get()||0;if(Ce.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const _=b.layout.layoutBox[S];_&&(x=ue(_)*(parseFloat(x)/100))}}this.originPoint[S]=x}),y&&U.postRender(()=>y(u,d)),vo(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:y,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(p&&this.currentDirection===null){this.currentDirection=Of(S),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),g&&g(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ge(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Oi(t,{onSessionStart:r,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Mi(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&U.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!Cn(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=Cf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&pt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=wf(r.layoutBox,n):this.constraints=!1,this.elastic=Af(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ge(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Pf(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pt(t))return!1;const o=t.current;Ve(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=xf(o,r.root,this.visualElement.getTransformPagePoint());let i=Tf(r.layout.layoutBox,s);if(n){const a=n(uf(i));this.hasMutatedConstraints=!!a,a&&(i=hi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ge(u=>{if(!Cn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=r?200:1e6,p=r?40:1e7,y={type:"inertia",velocity:o?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return vo(this.visualElement,t),o.start(Ro(t,o,0,n,this.visualElement,!1))}stopAnimation(){ge(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ge(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){ge(n=>{const{drag:o}=this.getProps();if(!Cn(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n];s.set(t[n]-G(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!pt(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ge(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();r[i]=Ef({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),ge(i=>{if(!Cn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(G(l,c,r[i]))})}addListeners(){if(!this.visualElement.current)return;Mf.set(this.visualElement,this);const t=this.visualElement.current,n=Ht(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();pt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),U.read(o);const i=Wt(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ge(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:i=Wo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Cn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Of(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Df extends $e{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Lf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ri=e=>(t,n)=>{e&&U.postRender(()=>e(t,n))};class kf extends $e{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Oi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Mi(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ri(t),onStart:Ri(n),onMove:o,onEnd:(s,i)=>{delete this.session,r&&U.postRender(()=>r(s,i))}}}mount(){this.removePointerDownListener=Ht(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const wn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=Bi(e,t.target.x),o=Bi(e,t.target.y);return`${n}% ${o}%`}},Nf={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Fe.parse(e);if(r.length>5)return o;const s=Fe.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=l;const c=G(a,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=c),typeof r[3+i]=="number"&&(r[3+i]/=c),s(r)}};class jf extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;Zc(If),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),wn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,i=o.projection;return i&&(i.isPresent=s,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||U.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),eo.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Fi(e){const[t,n]=pc(),o=m.useContext(Er);return v.jsx(jf,{...e,layoutGroup:o,switchLayoutGroup:m.useContext(Zr),isPresent:t,safeToRemove:n})}const If={borderRadius:{...Yt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yt,borderTopRightRadius:Yt,borderBottomLeftRadius:Yt,borderBottomRightRadius:Yt,boxShadow:Nf};function Vf(e,t,n){const o=ie(e)?e:Nt(e);return o.start(Ro("",o,t,n)),o.animation}function Rf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Bf=(e,t)=>e.depth-t.depth;class Ff{constructor(){this.children=[],this.isDirty=!1}add(t){Xn(this.children,t),this.isDirty=!0}remove(t){Wn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Bf),this.isDirty=!1,this.children.forEach(t)}}function $f(e,t){const n=_e.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(Re(o),e(s-t))};return U.read(o,!0),()=>Re(o)}const $i=["TopLeft","TopRight","BottomLeft","BottomRight"],zf=$i.length,zi=e=>typeof e=="string"?parseFloat(e):e,Ui=e=>typeof e=="number"||D.test(e);function Uf(e,t,n,o,r,s){r?(e.opacity=G(0,n.opacity!==void 0?n.opacity:1,Xf(o)),e.opacityExit=G(t.opacity!==void 0?t.opacity:1,0,Wf(o))):s&&(e.opacity=G(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let i=0;i<zf;i++){const a=`border${$i[i]}Radius`;let l=Xi(t,a),c=Xi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ui(l)===Ui(c)?(e[a]=Math.max(G(zi(l),zi(c),o),0),(Ce.test(c)||Ce.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=G(t.rotate||0,n.rotate||0,o))}function Xi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Xf=Wi(0,.5,Cs),Wf=Wi(.5,.95,fe);function Wi(e,t,n){return o=>o<e?0:o>t?1:n(ft(e,t,o))}function Gi(e,t){e.min=t.min,e.max=t.max}function ye(e,t){Gi(e.x,t.x),Gi(e.y,t.y)}function Hi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ki(e,t,n,o,r){return e-=t,e=_n(e,1/n,o),r!==void 0&&(e=_n(e,1/r,o)),e}function Gf(e,t=0,n=1,o=.5,r,s=e,i=e){if(Ce.test(t)&&(t=parseFloat(t),t=G(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=G(s.min,s.max,o);e===s&&(a-=t),e.min=Ki(e.min,t,n,a,r),e.max=Ki(e.max,t,n,a,r)}function qi(e,t,[n,o,r],s,i){Gf(e,t[n],t[o],t[r],t.scale,s,i)}const Hf=["x","scaleX","originX"],Kf=["y","scaleY","originY"];function Yi(e,t,n,o){qi(e.x,t,Hf,n?n.x:void 0,o?o.x:void 0),qi(e.y,t,Kf,n?n.y:void 0,o?o.y:void 0)}function Zi(e){return e.translate===0&&e.scale===1}function Ji(e){return Zi(e.x)&&Zi(e.y)}function Qi(e,t){return e.min===t.min&&e.max===t.max}function qf(e,t){return Qi(e.x,t.x)&&Qi(e.y,t.y)}function ea(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ta(e,t){return ea(e.x,t.x)&&ea(e.y,t.y)}function na(e){return ue(e.x)/ue(e.y)}function oa(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Yf{constructor(){this.members=[]}add(t){Xn(this.members,t),t.scheduleRender()}remove(t){if(Wn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Zf(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||s||i)&&(o=`translate3d(${r}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:y}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),p&&(o+=`skewX(${p}deg) `),y&&(o+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const Go=["","X","Y","Z"],Jf={visibility:"hidden"},ra=1e3;let Qf=0;function Ho(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function sa(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=gs(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&sa(o)}function ia({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Qf++,this.animationId=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.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(nh),this.nodes.forEach(ah),this.nodes.forEach(lh),this.nodes.forEach(oh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ff)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Hn),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Rf(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=$f(f,250),wn.hasAnimatedSinceResize&&(wn.hasAnimatedSinceResize=!1,this.nodes.forEach(la))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||hh,{onLayoutAnimationStart:S,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!ta(this.targetLayout,y),_=!f&&p;if(this.options.layoutRoot||this.resumeFrom||_||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,_);const P={...Kn(g,"layout"),onPlay:S,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else f||la(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Re(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(ch),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(aa);return}this.isUpdating||this.nodes.forEach(sh),this.isUpdating=!1,this.nodes.forEach(ih),this.nodes.forEach(eh),this.nodes.forEach(th),this.clearAllSnapshots();const a=_e.now();oe.delta=Ae(0,1e3/60,a-oe.timestamp),oe.timestamp=a,oe.isProcessing=!0,Qn.update.process(oe),Qn.preRender.process(oe),Qn.render.process(oe),oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rh),this.sharedNodes.forEach(uh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ue(this.snapshot.measuredBox.x)&&!ue(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ji(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||nt(this.latestValues)||u)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),ph(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return Y();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(mh))){const{scroll:u}=this.root;u&&(bt(l.x,u.offset.x),bt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=Y();if(ye(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ye(l,i),bt(l.x,d.offset.x),bt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=Y();ye(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&St(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&St(l,u.latestValues)}return nt(this.latestValues)&&St(l,this.latestValues),l}removeTransform(i){const a=Y();ye(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;$o(c.latestValues)&&c.updateSnapshot();const u=Y(),d=c.measurePageBox();ye(u,d),Yi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&Yi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=oe.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),qt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ye(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),yf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ye(this.target,this.layout.layoutBox),wi(this.target,this.targetDelta)):ye(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),qt(this.relativeTargetOrigin,this.target,p.target),ye(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||$o(this.parent.latestValues)||Si(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===oe.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;ye(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;vf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Y());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Hi(this.prevProjectionDelta.x,this.projectionDelta.x),Hi(this.prevProjectionDelta.y,this.projectionDelta.y)),Kt(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!oa(this.projectionDelta.x,this.prevProjectionDelta.x)||!oa(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xt(),this.projectionDelta=xt(),this.projectionDeltaWithTransform=xt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=xt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Y(),p=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=p!==y,S=this.getStack(),x=!S||S.members.length<=1,b=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(fh));this.animationProgress=0;let _;this.mixTargetDelta=P=>{const T=P/1e3;ca(d.x,i.x,T),ca(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),dh(this.relativeTarget,this.relativeTargetOrigin,f,T),_&&qf(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Y()),ye(_,this.relativeTarget)),g&&(this.animationValues=u,Uf(u,c,this.latestValues,T,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Re(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{wn.hasAnimatedSinceResize=!0,this.currentAnimation=Vf(0,ra,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ra),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&pa(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Y();const d=ue(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ue(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}ye(a,l),St(a,u),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Yf),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ho("z",i,c,this.animationValues);for(let u=0;u<Go.length;u++)Ho(`rotate${Go[u]}`,i,c,this.animationValues),Ho(`skew${Go[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Jf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=vn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=vn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Zf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${y.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in It){if(f[g]===void 0)continue;const{correct:S,applyTo:x,isCSSVariable:b}=It[g],_=c.transform==="none"?f[g]:S(f[g],d);if(x){const P=x.length;for(let T=0;T<P;T++)c[x[T]]=_}else b?this.options.visualElement.renderState.vars[g]=_:c[g]=_}return this.options.layoutId&&(c.pointerEvents=d===this?vn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(aa),this.root.sharedNodes.clear()}}}function eh(e){e.updateLayout()}function th(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?ge(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ue(f);f.min=o[d].min,f.max=f.min+p}):pa(s,n.layoutBox,o)&&ge(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ue(o[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=xt();Kt(a,o,n.layoutBox);const l=xt();i?Kt(l,e.applyTransform(r,!0),n.measuredBox):Kt(l,o,n.layoutBox);const c=!Ji(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const y=Y();qt(y,n.layoutBox,f.layoutBox);const g=Y();qt(g,o,p.layoutBox),ta(y,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function nh(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 oh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rh(e){e.clearSnapshot()}function aa(e){e.clearMeasurements()}function sh(e){e.isLayoutDirty=!1}function ih(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function la(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ah(e){e.resolveTargetDelta()}function lh(e){e.calcProjection()}function ch(e){e.resetSkewAndRotation()}function uh(e){e.removeLeadSnapshot()}function ca(e,t,n){e.translate=G(t.translate,0,n),e.scale=G(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ua(e,t,n,o){e.min=G(t.min,n.min,o),e.max=G(t.max,n.max,o)}function dh(e,t,n,o){ua(e.x,t.x,n.x,o),ua(e.y,t.y,n.y,o)}function fh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const hh={duration:.45,ease:[.4,0,.1,1]},da=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),fa=da("applewebkit/")&&!da("chrome/")?Math.round:fe;function ha(e){e.min=fa(e.min),e.max=fa(e.max)}function ph(e){ha(e.x),ha(e.y)}function pa(e,t,n){return e==="position"||e==="preserve-aspect"&&!gf(na(t),na(n),.2)}function mh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const gh=ia({attachResizeListener:(e,t)=>Wt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ko={current:void 0},ma=ia({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ko.current){const e=new gh({});e.mount(window),e.setOptions({layoutScroll:!0}),Ko.current=e}return Ko.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yh={pan:{Feature:kf},drag:{Feature:Df,ProjectionNode:ma,MeasureLayout:Fi}};function ga(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&U.postRender(()=>s(t,Gt(t)))}class vh extends $e{mount(){const{current:t}=this.node;t&&(this.unmount=Ec(t,(n,o)=>(ga(this.node,o,"Start"),r=>ga(this.node,r,"End"))))}unmount(){}}class xh extends $e{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=Ut(Wt(this.node.current,"focus",()=>this.onFocus()),Wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ya(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&U.postRender(()=>s(t,Gt(t)))}class bh extends $e{mount(){const{current:t}=this.node;t&&(this.unmount=Lc(t,(n,o)=>(ya(this.node,o,"Start"),(r,{success:s})=>ya(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const qo=new WeakMap,Yo=new WeakMap,Sh=e=>{const t=qo.get(e.target);t&&t(e)},_h=e=>{e.forEach(Sh)};function Ch({root:e,...t}){const n=e||document;Yo.has(n)||Yo.set(n,{});const o=Yo.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(_h,{root:e,...t})),o[r]}function wh(e,t,n){const o=Ch(t);return qo.set(e,n),o.observe(e),()=>{qo.delete(e),o.unobserve(e)}}const Th={some:0,all:1};class Eh extends $e{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Th[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return wh(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ph(t,n))&&this.startObserver()}unmount(){}}function Ph({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ah={inView:{Feature:Eh},tap:{Feature:bh},focus:{Feature:xh},hover:{Feature:vh}},Mh={layout:{ProjectionNode:ma,MeasureLayout:Fi}},Zo={current:null},va={current:!1};function Lh(){if(va.current=!0,!!zn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zo.current=e.matches;e.addListener(t),t()}else Zo.current=!1}const Oh=[...Xs,ae,Fe],Dh=e=>Oh.find(Us(e)),kh=new WeakMap;function Nh(e,t,n){for(const o in t){const r=t[o],s=n[o];if(ie(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&cn(r.version==="12.5.0",`Attempting to mix Motion versions ${r.version} with 12.5.0 may not work as expected.`);else if(ie(s))e.addValue(o,Nt(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const i=e.getValue(o);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(o);e.addValue(o,Nt(i!==void 0?i:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const xa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class jh{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Oo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 p=_e.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,U.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=gn(n),this.isVariantNode=Kr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const y=f[p];l[p]!==void 0&&ie(y)&&y.set(l[p],!1)}}mount(t){this.current=t,kh.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),va.current||Lh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zo.current,process.env.NODE_ENV!=="production"&&cn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Re(this.notifyUpdate),Re(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=Ze.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&U.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),i&&i(),n.owner&&n.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 ht){const n=ht[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<xa.length;o++){const r=xa[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,i=t[s];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Nh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Nt(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($s(r)||Ts(r))?r=parseFloat(r):!Dh(r)&&Fe.test(n)&&(r=ks(t,n)),this.setBaseTarget(t,ie(r)?r.get():r)),ie(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const i=mo(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(r=i[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ie(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Hn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ba extends jh{constructor(){super(...arguments),this.KeyframeResolver=Gs}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ih(e){return window.getComputedStyle(e)}class Vh extends ba{constructor(){super(...arguments),this.type="html",this.renderInstance=us}readValueFromInstance(t,n){if(Ze.has(n))return Ku(t,n);{const o=Ih(t),r=(io(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ai(t,n)}build(t,n,o){co(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return yo(t,n,o)}}class Rh extends ba{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&cs(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ze.has(n)){const o=Ds(n);return o&&o.default||0}return n=ds.has(n)?n:so(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return hs(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&U.postRender(this.updateDimensions)}build(t,n,o){ho(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){fs(t,n,o,r)}mount(t){this.isSVGTag=po(t.tagName),super.mount(t)}}const Bh=(e,t)=>fo(e)?new Rh(t):new Vh(t,{allowProjection:e!==m.Fragment}),Fh=Su({...lf,...Ah,...yh,...Mh},Bh),ot=Rc(Fh),$h={root:"_root_uup2j_1"},Sa={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function ze(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(Sa).includes(t)).filter(t=>e[t]===!0).map(t=>Sa[t]):null}const rt="Errore: ",zh="Impossibile acquisire la posizione.",Jo="Impossibile caricare i punti di mappa.",Uh="Si è verificato un errore.",Xh="Impossibile caricare i suggerimenti.",Wh="Impossibile caricare i dettagli della location.",Gh="Impossibile caricare la mappa.",Hh="Impossibile trovare punti di mappa nell'area di ricerca.",Kh="Ottieni indicazioni di navigazione per questa destinazione",qh="Condividi questa destinazione",Yh="Scarica l'evento",Zh="dyn-locator__portal-root",Jh=3e3,_a=6,Qh=2e4,ep=300,Zt={north:47.1,south:36.6,east:18.6,west:6.6},tp={lat:(Zt.north+Zt.south)/2,lng:(Zt.east+Zt.west)/2};function Me(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Le(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function Ca(e,t){const{type:n,url:o}=e??{};switch(n){case"navigate":case"directions":return{"aria-label":Kh,as:"a",href:o??"#",target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"share":return{"aria-label":qh,as:"a",href:o??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Yh,as:"a",href:o??"#",download:!0,target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"email":default:return{}}}function np(e,t){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>e(...o),t)}}function op(e){var l,c,u,d;const t=(e==null?void 0:e.address_components)??[];function n(f){return t.find(p=>p.types.includes(f))}const o=(e==null?void 0:e.formatted_address)??"No address found",r=((l=n("locality"))==null?void 0:l.long_name)??"No city found",s=((c=n("country"))==null?void 0:c.long_name)??"No country found",i=((u=n("administrative_area_level_1"))==null?void 0:u.long_name)??"No region found",a=((d=n("administrative_area_level_2"))==null?void 0:d.short_name)??"No province found";return{address:o,city:r,province:a,region:i,country:s}}const wa="Anchor";function Ta({as:e,wrapper:t,children:n,variant:o="default",className:r,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},p){const y=t||"span",g=s?ot[y]:y,S=e||"a",x=ze(f)??[],b=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},P=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return v.jsx(g,{className:W($h.root,"dyn-locator__"+Le(wa),Me(r),...x),"data-variant":o,...d?{style:d}:{},...b,...f,children:v.jsx(S,{ref:p,href:a,target:l,rel:P,...u,children:n})})}Ta.displayName=wa;const Ea=m.forwardRef(Ta),Pa="ErrorBanner";function Aa({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:o,errorDetails:r,className:s,children:i,...a}){const l=ze(a)??[];return v.jsxs("div",{className:W("dyn-locator__"+Le(Pa),Ot.root,Me(s),...l??[]),children:[v.jsxs("header",{className:Ot.header,children:[v.jsx(nc,{size:28,color:"currentColor",className:Ot.icon})," ",v.jsx("h3",{children:e})]}),v.jsxs("div",{className:Ot.body,children:[v.jsx("p",{children:t}),n&&o&&v.jsxs("p",{children:["Prova a"," ",v.jsx(Ea,{animate:!1,"aria-label":n,href:"#",onClick:o,children:n})]}),i,r&&v.jsx("div",{className:Ot.content,children:v.jsx("pre",{children:r})})]})]})}Aa.displayName=Pa;const Ma=Aa;class rp extends m.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||v.jsx("div",{className:Hl.container,children:v.jsx(Ma,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const sp=({title:e,titleId:t,...n},o)=>v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?v.jsx("title",{id:t,children:e}):null,v.jsx("path",{fill:"currentColor",fillRule:"evenodd",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M12 2.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19ZM13.286 14.518h2.459l.386-2.498h-2.845v-1.365c0-1.037.338-1.957 1.309-1.957h1.56v-2.18c-.275-.037-.854-.118-1.949-.118-2.287 0-3.627 1.208-3.627 3.959v1.661h-2.35v2.498h2.35v6.864c.465.07.937.118 1.421.118.438 0 .864-.04 1.286-.097v-6.885Z"})]}),ip=m.forwardRef(sp),ap=({title:e,titleId:t,...n},o)=>v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?v.jsx("title",{id:t,children:e}):null,v.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M8 3a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5H8Zm10 2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-6 2a5 5 0 1 1-.001 10.001A5 5 0 0 1 12 7Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})]}),lp=m.forwardRef(ap),cp=({title:e,titleId:t,...n},o)=>v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?v.jsx("title",{id:t,children:e}):null,v.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM9 17H6.477v-7H9v7ZM7.694 8.717c-.771 0-1.286-.514-1.286-1.2 0-.686.514-1.2 1.371-1.2.771 0 1.286.514 1.286 1.2 0 .686-.514 1.2-1.371 1.2ZM18 17h-2.442v-3.826c0-1.058-.651-1.302-.895-1.302s-1.058.163-1.058 1.302V17h-2.523v-7h2.523v.977c.325-.57.976-.977 2.197-.977S18 10.977 18 13.174V17Z"})]}),up=m.forwardRef(cp),dp=({title:e,titleId:t,...n},o)=>v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?v.jsx("title",{id:t,children:e}):null,v.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.68 1.92H4.32a2.403 2.403 0 0 0-2.4 2.4v15.36c0 1.323 1.077 2.4 2.4 2.4h15.36c1.323 0 2.4-1.077 2.4-2.4V4.32c0-1.323-1.077-2.4-2.4-2.4Zm-1.917 8.795a3.596 3.596 0 0 1-3.34-1.61v5.538a4.093 4.093 0 1 1-4.093-4.093c.085 0 .169.008.253.013v2.017c-.084-.01-.167-.025-.253-.025a2.089 2.089 0 1 0 0 4.178c1.154 0 2.173-.91 2.173-2.063l.02-9.405h1.927a3.594 3.594 0 0 0 3.313 3.208v2.242Z"})]}),fp=m.forwardRef(dp),hp=({title:e,titleId:t,...n},o)=>v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?v.jsx("title",{id:t,children:e}):null,v.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.077 4.928A9.927 9.927 0 0 0 12.011 2c-5.506 0-9.987 4.479-9.989 9.985a9.962 9.962 0 0 0 1.333 4.992L2 22l5.233-1.237a9.98 9.98 0 0 0 4.773 1.216h.004c5.505 0 9.986-4.48 9.989-9.985a9.922 9.922 0 0 0-2.922-7.066Zm-2.179 10.626c-.208.583-1.227 1.145-1.685 1.186-.458.042-.887.207-2.995-.624-2.537-1-4.139-3.601-4.263-3.767-.125-.167-1.019-1.353-1.019-2.581s.645-1.832.874-2.081a.916.916 0 0 1 .666-.312c.166 0 .333 0 .478.006.178.007.375.016.562.431.222.494.707 1.728.769 1.853.062.125.104.271.021.437-.083.166-.125.27-.249.416-.125.146-.262.325-.374.437-.125.124-.255.26-.11.509.146.25.646 1.067 1.388 1.728.954.85 1.757 1.113 2.007 1.239.25.125.395.104.541-.063.146-.166.624-.728.79-.978.166-.25.333-.208.562-.125.229.083 1.456.687 1.705.812.25.125.416.187.478.291.062.103.062.603-.146 1.186Z"})]}),pp=m.forwardRef(hp),mp=({title:e,titleId:t,...n},o)=>v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?v.jsx("title",{id:t,children:e}):null,v.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),v.jsx("path",{fill:"currentColor",fillOpacity:"0.3",fillRule:"evenodd",d:"M15.572 20.5 3.91 3.5h4.479l11.661 17h-4.479Z",clipRule:"evenodd"}),v.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.862 4.5 10.29 15h-2.054L5.81 4.5h2.053Zm.79-1.5h-5.69l12.346 18H21L8.652 3Z",clipRule:"evenodd"})]})]}),La=m.forwardRef(mp),gp=({title:e,titleId:t,...n},o)=>v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?v.jsx("title",{id:t,children:e}):null,v.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M21.551 6.96c-.191-1.056-1.102-1.824-2.16-2.064-1.582-.336-4.511-.576-7.68-.576-3.167 0-6.142.24-7.727.576-1.055.24-1.968.96-2.16 2.064-.193 1.2-.384 2.88-.384 5.04s.191 3.84.431 5.04c.193 1.056 1.105 1.824 2.16 2.064 1.68.336 4.56.576 7.729.576 3.169 0 6.049-.24 7.729-.576 1.055-.24 1.967-.96 2.16-2.064.19-1.2.43-2.929.48-5.04-.098-2.16-.338-3.84-.578-5.04ZM9.12 15.36V8.64L14.976 12 9.12 15.36Z"})]}),yp=m.forwardRef(gp),Oa={ArrowLeft:Zl,ArrowUpRight:Ql,ChevronUp:tc,ChevronDown:ec,Close:Tr,Expand:ac,Location:ic,Search:uc,Share:dc,Target:rc,Email:sc,Copy:oc,X:La,Twitter:La,Facebook:ip,Instagram:lp,Linkedin:up,TikTok:fp,Whatsapp:pp,Youtube:yp},Oe={root:"_root_1cmog_4",header:"_header_1cmog_21",body:"_body_1cmog_22",cta:"_cta_1cmog_23",titleContainer:"_titleContainer_1cmog_40",shareButton:"_shareButton_1cmog_51",capabilities:"_capabilities_1cmog_59",tagContainer:"_tagContainer_1cmog_72",tag:"_tag_1cmog_72"},_t={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Qo={root:"_root_71ove_4",icon:"_icon_71ove_43"};function vp(e){return m.isValidElement(e)||typeof e=="function"}function xp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function bp(e){return!!e&&typeof e=="object"&&"path"in e}const Da="Icon";function ka({as:e,icon:t,iconRef:n,label:o,size:r="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const p=e||"span",y=l?ot[p]:p,{iconMap:g}=Ap();function S(_){if(xp(_)){const P=typeof _=="string"?_:_.name;return g[P]?m.createElement(g[P],{...n?{ref:n}:{},...o?{title:o,titleId:o.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Qo.icon}):'No icon found for "'+P+'"!'}return bp(_)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),v.jsx("img",{...n?{ref:n}:{},src:_.path,alt:`Icona decorativa${o?" che rappresenta '"+o+"'":""}`,className:Qo.icon})):"No icon provided"}const x=ze(d)??[],b=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return v.jsx(y,{ref:f,className:W(Qo.root,"dyn-locator__"+Le(Da),Me(a),...x),...u?{style:u}:{},"data-variant":i,"data-size":r,...s?{"data-radius":s}:{},...b,...d,children:S(t)})}ka.displayName=Da;const we=m.forwardRef(ka),Na="Tag";function ja({as:e,iconPosition:t="left",children:n,icon:o,className:r,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?ot[u]:u,f=ze(l)??[],p=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return v.jsx(d,{ref:c,className:W(_t.root,"dyn-locator__"+Le(Na),Me(r),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:v.jsxs("div",{className:_t.container,children:[o?v.jsx("div",{className:_t.icon,children:vp(o)?typeof o=="function"?v.jsx(o,{className:_t.icon}):o:v.jsx(we,{className:_t.icon,icon:o})}):null,v.jsx("div",{className:_t.label,children:n})]})})}ja.displayName=Na;const Sp=m.forwardRef(ja),_p={root:"_root_u5v4v_1"},Ia="IconButton";function Va({as:e,children:t,className:n,variant:o="default",animate:r=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},p){const y=e||"button",g=r?ot[y]:y,S=ze(f)??[],x=r?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},b=y==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return v.jsx(g,{ref:p,className:W(_p.root,"dyn-locator__"+Le(Ia),Me(n),...S),"data-variant":o,"data-element":y,"aria-label":a,disabled:d,...i?{style:i}:{},...x,...b,...f,children:t})}Va.displayName=Ia;const Ue=m.forwardRef(Va),Ra={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Ba="Card";function Fa({as:e,children:t,className:n,variant:o="default",animate:r=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=r?ot[d]:d,p=ze(c)??[],y=r?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return v.jsx(f,{ref:u,className:W(Ra.root,"dyn-locator__"+Le(Ba),Me(n),...p),"data-variant":o,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...y,...c,children:o==="bare"?t:v.jsx("div",{className:Ra.content,children:t})})}Fa.displayName=Ba;const Cp=m.forwardRef(Fa);function $a(e){const{componentMap:t}=Mp();return t[e]}var ve=(e=>(e.FULLSCREEN_TOGGLE="fullscreen",e.BACK_BUTTON_CLICK="back_button",e.SEARCH="search",e.AUTOCOMPLETE_ITEM_SELECT="autocomplete_item_select",e.GEOLOCATION="geolocation",e.LOCATION_CARD_CLICK="location_card_click",e.LOCATION_CARD_PRIMARY_ACTION="location_card_primary_action",e.LOCATION_CARD_SECONDARY_ACTION="location_card_secondary_action",e.INFO_WINDOW_PRIMARY_ACTION="info_window_primary_action",e.INFO_WINDOW_SECONDARY_ACTION="info_window_secondary_action",e.CARD_LIST_TOGGLE="card_list_toggle",e.SHARE_SHEET_OPEN="share_sheet_open",e.SHARE_SHEET_CLOSE="share_sheet_close",e.SHARE_SHEET_SHARE="share_sheet_share",e.AREA_SEARCH_TOGGLE="area_search_toggle",e.AREA_SEARCH_SUBMIT="area_search_submit",e.AREA_SEARCH_CANCEL="area_search_cancel",e))(ve||{});const er=[ve.LOCATION_CARD_PRIMARY_ACTION,ve.LOCATION_CARD_SECONDARY_ACTION,ve.AUTOCOMPLETE_ITEM_SELECT];class wp{constructor(){Rn(this,"config",{});Rn(this,"isInitialized",!1);Rn(this,"warnedEvents",new Set)}initialize(t={}){this.config=t,this.isInitialized=!0,Object.keys(t).forEach(n=>{var o;(o=t[n])!=null&&o.enabled&&!er.includes(n)&&console.warn(`[TrackingService] Event "${n}" is configured but not yet implemented in the codebase.`)})}isEventEnabled(t){var n,o;return this.isInitialized?(!er.includes(t)&&!this.warnedEvents.has(t)&&(console.warn(`[TrackingService] Event "${t}" is not yet implemented in the codebase.`),this.warnedEvents.add(t)),!!((n=this.config[t])!=null&&n.enabled)&&typeof((o=this.config[t])==null?void 0:o.tracker)=="function"):!1}track(t,n={}){if(!er.includes(t)&&!this.warnedEvents.has(t)&&(console.warn(`[TrackingService] Event "${t}" is not yet implemented in the codebase.`),this.warnedEvents.add(t)),!this.isEventEnabled(t))return;const o={...n,timestamp:n.timestamp||Date.now()},{tracker:r}=this.config[t]??{};typeof r=="function"&&r(o)}isTrackerInitialized(){return this.isInitialized}reset(){this.config={},this.isInitialized=!1,this.warnedEvents.clear()}}const Xe=new wp,za="LocationCard";function Ua({title:e,timestamp:t,address:n,capabilities:o,actions:r,className:s,id:i,coords:a,on_share:l,...c},u){const d=$a("ctaButton"),f=k(S=>S.toggleShareSheet),p=k(S=>S.featureFlags);function y(){f(!0)}function g(S){if(Xe.isEventEnabled(ve.LOCATION_CARD_PRIMARY_ACTION))return()=>Xe.track(ve.LOCATION_CARD_PRIMARY_ACTION,{cta_event_type:S.type??"",cta_url:S.url??"",cta_label:S.label??""});if(Xe.isEventEnabled(ve.LOCATION_CARD_SECONDARY_ACTION))return()=>Xe.track(ve.LOCATION_CARD_SECONDARY_ACTION,{cta_event_type:S.type??"",cta_url:S.url??"",cta_label:S.label??""})}return v.jsx(Cp,{ref:u,variant:"bare",clickable:!0,className:W("dyn-locator__"+Le(za),Me(s)),...c,style:{...c.style?c.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:v.jsxs("div",{className:Oe.root,children:[v.jsxs("header",{className:Oe.header,children:[t?v.jsx("time",{children:t}):null,v.jsxs("div",{className:Oe.titleContainer,children:[e?v.jsx("h4",{children:e}):null,p.share?v.jsx(Ue,{className:Oe.shareButton,variant:"bare",onClick:y,children:v.jsx(we,{size:"M",icon:"Share"})}):null]}),n?v.jsx("address",{children:n}):null]}),o!=null&&o.length?v.jsx("div",{className:Oe.body,children:o.map((S,x)=>v.jsxs("div",{className:Oe.capabilities,children:[v.jsx("h5",{children:S.title}),v.jsx("ul",{className:Oe.tagContainer,children:(S.capabilities??[]).map((b,_)=>v.jsx(Sp,{as:"li",animationDelay:+`.${_+1}`,className:Oe.tag,children:b.label},_))})]},x))}):null,r!=null&&r.length?v.jsx("div",{className:Oe.cta,children:r.map((S,x)=>v.jsx(d,{animate:!1,fullWidth:!0,variant:x===0?"themed":"secondary",...Ca(S,g(S)),children:S.label},x))}):null]})})}Ua.displayName=za;const Tp=m.forwardRef(Ua),Xa={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},Wa="Button";function Ga({as:e,children:t,className:n,variant:o="default",size:r="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:p,...y},g){const S=e||(u?"a":"button"),x=l?ot[S]:S,b=ze(y)??[],_=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},P=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return v.jsx(x,{ref:g,className:W(Xa.root,"dyn-locator__"+Le(Wa),Me(n),...b),"data-variant":o,"data-size":r,"data-full-width":a,disabled:s||i,...p?{style:p}:{},..._,...P,...y,children:i?v.jsxs("span",{style:{display:"flex",gap:10},children:[t,v.jsx("span",{className:Xa.loader,"aria-hidden":"true"})]}):t})}Ga.displayName=Wa;const Jt=m.forwardRef(Ga),Ha={locationCard:Tp,ctaButton:Jt},Ep={iconMap:Oa,componentMap:Ha},tr=m.createContext(Ep);function Pp({children:e,customIcons:t,customComponents:n}){const o={...Oa,...t??{}},r={...Ha,...n??{}};return v.jsx(tr.Provider,{value:{iconMap:o,componentMap:r},children:e})}function Ap(){const{iconMap:e}=m.useContext(tr);return{iconMap:e}}function Mp(){const{componentMap:e}=m.useContext(tr);return{componentMap:e}}var Qt=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(Qt||{});const Ka=m.createContext({endpointMap:{},apiUrl:""});function Lp({children:e,endpoints:t,apiUrl:n}){var o;if(!n||!((o=Object.keys(t??{}))!=null&&o.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return v.jsx(Ka.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function Op(e){const{endpointMap:t,apiUrl:n}=m.useContext(Ka);return{getEndpoint:(o={})=>{const r=t[e];if(!r)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return r.buildPath?s=r.buildPath(o):(s=r.path,Object.entries(o).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:r.method}}}}let Dp={data:""},kp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Dp,Np=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,jp=/\/\*[^]*?\*\/| +/g,qa=/\n+/g,We=(e,t)=>{let n="",o="",r="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":o+=s[1]=="f"?We(i,s):s+"{"+We(i,s[1]=="k"?"":t)+"}":typeof i=="object"?o+=We(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=We.p?We.p(s,i):s+":"+i+";")}return n+(t&&r?t+"{"+r+"}":r)+o},De={},Ya=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ya(e[n]);return t}return e},Ip=(e,t,n,o,r)=>{let s=Ya(e),i=De[s]||(De[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!De[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=Np.exec(c.replace(jp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(qa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(qa," ").trim();return f[0]})(e);De[i]=We(r?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&De.g?De.g:null;return n&&(De.g=De[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(De[i],t,o,a),i},Vp=(e,t,n)=>e.reduce((o,r,s)=>{let i=t[s];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":We(a,""):a===!1?"":a}return o+r+(i??"")},"");function Tn(e){let t=this||{},n=e.call?e(t.p):e;return Ip(n.unshift?n.raw?Vp(n,[].slice.call(arguments,1),t.p):n.reduce((o,r)=>Object.assign(o,r&&r.call?r(t.p):r),{}):n,kp(t.target),t.g,t.o,t.k)}let Za,nr,or;Tn.bind({g:1});let ke=Tn.bind({k:1});function Rp(e,t,n,o){We.p=t,Za=e,nr=n,or=o}function Ge(e,t){let n=this||{};return function(){let o=arguments;function r(s,i){let a=Object.assign({},s),l=a.className||r.className;n.p=Object.assign({theme:nr&&nr()},a),n.o=/ *go\d+/.test(l),a.className=Tn.apply(n,o)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),or&&c[0]&&or(a),Za(c,a)}return t?t(r):r}}var Bp=e=>typeof e=="function",En=(e,t)=>Bp(e)?e(t):e,Fp=(()=>{let e=0;return()=>(++e).toString()})(),Ja=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),$p=20,Qa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,$p)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return Qa(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let r=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+r}))}}},Pn=[],st={toasts:[],pausedAt:void 0},it=e=>{st=Qa(st,e),Pn.forEach(t=>{t(st)})},zp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Up=(e={})=>{let[t,n]=m.useState(st),o=m.useRef(st);m.useEffect(()=>(o.current!==st&&n(st),Pn.push(n),()=>{let s=Pn.indexOf(n);s>-1&&Pn.splice(s,1)}),[]);let r=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||zp[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:r}},Xp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Fp()}),en=e=>(t,n)=>{let o=Xp(t,e,n);return it({type:2,toast:o}),o.id},K=(e,t)=>en("blank")(e,t);K.error=en("error"),K.success=en("success"),K.loading=en("loading"),K.custom=en("custom"),K.dismiss=e=>{it({type:3,toastId:e})},K.remove=e=>it({type:4,toastId:e}),K.promise=(e,t,n)=>{let o=K.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(r=>{let s=t.success?En(t.success,r):void 0;return s?K.success(s,{id:o,...n,...n==null?void 0:n.success}):K.dismiss(o),r}).catch(r=>{let s=t.error?En(t.error,r):void 0;s?K.error(s,{id:o,...n,...n==null?void 0:n.error}):K.dismiss(o)}),e};var Wp=(e,t)=>{it({type:1,toast:{id:e,height:t}})},Gp=()=>{it({type:5,time:Date.now()})},tn=new Map,Hp=1e3,Kp=(e,t=Hp)=>{if(tn.has(e))return;let n=setTimeout(()=>{tn.delete(e),it({type:4,toastId:e})},t);tn.set(e,n)},qp=e=>{let{toasts:t,pausedAt:n}=Up(e);m.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&K.dismiss(a.id);return}return setTimeout(()=>K.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let o=m.useCallback(()=>{n&&it({type:6,time:Date.now()})},[n]),r=m.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(p=>(p.position||c)===(s.position||c)&&p.height),d=u.findIndex(p=>p.id===s.id),f=u.filter((p,y)=>y<d&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,y)=>p+(y.height||0)+l,0)},[t]);return m.useEffect(()=>{t.forEach(s=>{if(s.dismissed)Kp(s.id,s.removeDelay);else{let i=tn.get(s.id);i&&(clearTimeout(i),tn.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:Wp,startPause:Gp,endPause:o,calculateOffset:r}}},Yp=ke`
139
139
  from {
140
140
  transform: scale(0) rotate(45deg);
141
141
  opacity: 0;
@@ -143,7 +143,7 @@ from {
143
143
  to {
144
144
  transform: scale(1) rotate(45deg);
145
145
  opacity: 1;
146
- }`,Jp=De`
146
+ }`,Zp=ke`
147
147
  from {
148
148
  transform: scale(0);
149
149
  opacity: 0;
@@ -151,7 +151,7 @@ from {
151
151
  to {
152
152
  transform: scale(1);
153
153
  opacity: 1;
154
- }`,Qp=De`
154
+ }`,Jp=ke`
155
155
  from {
156
156
  transform: scale(0) rotate(90deg);
157
157
  opacity: 0;
@@ -159,7 +159,7 @@ from {
159
159
  to {
160
160
  transform: scale(1) rotate(90deg);
161
161
  opacity: 1;
162
- }`,em=Ue("div")`
162
+ }`,Qp=Ge("div")`
163
163
  width: 20px;
164
164
  opacity: 0;
165
165
  height: 20px;
@@ -168,14 +168,14 @@ to {
168
168
  position: relative;
169
169
  transform: rotate(45deg);
170
170
 
171
- animation: ${Zp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
171
+ animation: ${Yp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
172
172
  forwards;
173
173
  animation-delay: 100ms;
174
174
 
175
175
  &:after,
176
176
  &:before {
177
177
  content: '';
178
- animation: ${Jp} 0.15s ease-out forwards;
178
+ animation: ${Zp} 0.15s ease-out forwards;
179
179
  animation-delay: 150ms;
180
180
  position: absolute;
181
181
  border-radius: 3px;
@@ -188,18 +188,18 @@ to {
188
188
  }
189
189
 
190
190
  &:before {
191
- animation: ${Qp} 0.15s ease-out forwards;
191
+ animation: ${Jp} 0.15s ease-out forwards;
192
192
  animation-delay: 180ms;
193
193
  transform: rotate(90deg);
194
194
  }
195
- `,tm=De`
195
+ `,em=ke`
196
196
  from {
197
197
  transform: rotate(0deg);
198
198
  }
199
199
  to {
200
200
  transform: rotate(360deg);
201
201
  }
202
- `,nm=Ue("div")`
202
+ `,tm=Ge("div")`
203
203
  width: 12px;
204
204
  height: 12px;
205
205
  box-sizing: border-box;
@@ -207,8 +207,8 @@ to {
207
207
  border-radius: 100%;
208
208
  border-color: ${e=>e.secondary||"#e0e0e0"};
209
209
  border-right-color: ${e=>e.primary||"#616161"};
210
- animation: ${tm} 1s linear infinite;
211
- `,om=De`
210
+ animation: ${em} 1s linear infinite;
211
+ `,nm=ke`
212
212
  from {
213
213
  transform: scale(0) rotate(45deg);
214
214
  opacity: 0;
@@ -216,7 +216,7 @@ from {
216
216
  to {
217
217
  transform: scale(1) rotate(45deg);
218
218
  opacity: 1;
219
- }`,rm=De`
219
+ }`,om=ke`
220
220
  0% {
221
221
  height: 0;
222
222
  width: 0;
@@ -230,7 +230,7 @@ to {
230
230
  100% {
231
231
  opacity: 1;
232
232
  height: 10px;
233
- }`,sm=Ue("div")`
233
+ }`,rm=Ge("div")`
234
234
  width: 20px;
235
235
  opacity: 0;
236
236
  height: 20px;
@@ -239,13 +239,13 @@ to {
239
239
  position: relative;
240
240
  transform: rotate(45deg);
241
241
 
242
- animation: ${om} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
242
+ animation: ${nm} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
243
243
  forwards;
244
244
  animation-delay: 100ms;
245
245
  &:after {
246
246
  content: '';
247
247
  box-sizing: border-box;
248
- animation: ${rm} 0.2s ease-out forwards;
248
+ animation: ${om} 0.2s ease-out forwards;
249
249
  opacity: 0;
250
250
  animation-delay: 200ms;
251
251
  position: absolute;
@@ -257,16 +257,16 @@ to {
257
257
  height: 10px;
258
258
  width: 6px;
259
259
  }
260
- `,im=Ue("div")`
260
+ `,sm=Ge("div")`
261
261
  position: absolute;
262
- `,am=Ue("div")`
262
+ `,im=Ge("div")`
263
263
  position: relative;
264
264
  display: flex;
265
265
  justify-content: center;
266
266
  align-items: center;
267
267
  min-width: 20px;
268
268
  min-height: 20px;
269
- `,lm=De`
269
+ `,am=ke`
270
270
  from {
271
271
  transform: scale(0.6);
272
272
  opacity: 0.4;
@@ -274,20 +274,20 @@ from {
274
274
  to {
275
275
  transform: scale(1);
276
276
  opacity: 1;
277
- }`,cm=Ue("div")`
277
+ }`,lm=Ge("div")`
278
278
  position: relative;
279
279
  transform: scale(0.6);
280
280
  opacity: 0.4;
281
281
  min-width: 20px;
282
- animation: ${lm} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
282
+ animation: ${am} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
283
283
  forwards;
284
- `,um=({toast:e})=>{let{icon:t,type:n,iconTheme:o}=e;return t!==void 0?typeof t=="string"?te.createElement(cm,null,t):t:n==="blank"?null:te.createElement(am,null,te.createElement(nm,{...o}),n!=="loading"&&te.createElement(im,null,n==="error"?te.createElement(em,{...o}):te.createElement(sm,{...o})))},dm=e=>`
284
+ `,cm=({toast:e})=>{let{icon:t,type:n,iconTheme:o}=e;return t!==void 0?typeof t=="string"?te.createElement(lm,null,t):t:n==="blank"?null:te.createElement(im,null,te.createElement(tm,{...o}),n!=="loading"&&te.createElement(sm,null,n==="error"?te.createElement(Qp,{...o}):te.createElement(rm,{...o})))},um=e=>`
285
285
  0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
286
286
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
287
- `,fm=e=>`
287
+ `,dm=e=>`
288
288
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
289
289
  100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
290
- `,hm="0%{opacity:0;} 100%{opacity:1;}",pm="0%{opacity:1;} 100%{opacity:0;}",mm=Ue("div")`
290
+ `,fm="0%{opacity:0;} 100%{opacity:1;}",hm="0%{opacity:1;} 100%{opacity:0;}",pm=Ge("div")`
291
291
  display: flex;
292
292
  align-items: center;
293
293
  background: #fff;
@@ -299,17 +299,17 @@ to {
299
299
  pointer-events: auto;
300
300
  padding: 8px 10px;
301
301
  border-radius: 8px;
302
- `,gm=Ue("div")`
302
+ `,mm=Ge("div")`
303
303
  display: flex;
304
304
  justify-content: center;
305
305
  margin: 4px 10px;
306
306
  color: inherit;
307
307
  flex: 1 1 auto;
308
308
  white-space: pre-line;
309
- `,ym=(e,t)=>{let n=e.includes("top")?1:-1,[o,r]=Ha()?[hm,pm]:[dm(n),fm(n)];return{animation:t?`${De(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${De(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ya=te.memo(({toast:e,position:t,style:n,children:o})=>{let r=e.height?ym(e.position||t||"top-center",e.visible):{opacity:0},s=te.createElement(um,{toast:e}),i=te.createElement(gm,{...e.ariaProps},Cn(e.message,e));return te.createElement(mm,{className:e.className,style:{...r,...n,...e.style}},typeof o=="function"?o({icon:s,message:i}):te.createElement(te.Fragment,null,s,i))});Bp(te.createElement);var vm=({id:e,className:t,style:n,onHeightUpdate:o,children:r})=>{let s=te.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;o(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,o]);return te.createElement("div",{ref:s,className:t,style:n},r)},xm=(e,t)=>{let n=e.includes("top"),o=n?{top:0}:{bottom:0},r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Ha()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...o,...r}},bm=wn`
309
+ `,gm=(e,t)=>{let n=e.includes("top")?1:-1,[o,r]=Ja()?[fm,hm]:[um(n),dm(n)];return{animation:t?`${ke(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ke(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},el=te.memo(({toast:e,position:t,style:n,children:o})=>{let r=e.height?gm(e.position||t||"top-center",e.visible):{opacity:0},s=te.createElement(cm,{toast:e}),i=te.createElement(mm,{...e.ariaProps},En(e.message,e));return te.createElement(pm,{className:e.className,style:{...r,...n,...e.style}},typeof o=="function"?o({icon:s,message:i}):te.createElement(te.Fragment,null,s,i))});Rp(te.createElement);var ym=({id:e,className:t,style:n,onHeightUpdate:o,children:r})=>{let s=te.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;o(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,o]);return te.createElement("div",{ref:s,className:t,style:n},r)},vm=(e,t)=>{let n=e.includes("top"),o=n?{top:0}:{bottom:0},r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Ja()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...o,...r}},xm=Tn`
310
310
  z-index: 9999;
311
311
  > * {
312
312
  pointer-events: auto;
313
313
  }
314
- `,Tn=16,Sm=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:o,children:r,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=Yp(n);return te.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Tn,left:Tn,right:Tn,bottom:Tn,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:o,defaultPosition:t}),f=xm(u,d);return te.createElement(vm,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?bm:"",style:f},c.type==="custom"?Cn(c.message,c):r?r(c):te.createElement(Ya,{toast:c,position:u}))}))};const wm={root:"_root_movxa_4"};function er({className:e,children:t,show:n=!0,variant:o="light",...r}){const s=W("dyn-locator__overlay",wm.root,e);return n?y.jsx("div",{className:s,"data-variant":o,...r,children:t}):null}function En(e){const[t,n]=m.useState(!1),[o,r]=m.useState(null),{getEndpoint:s}=kp(e);return{request:async(a={},l={})=>{n(!0),r(null);try{let c;try{c=s(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw r(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:o}}const Xe={content:"_content_jvati_17",header:"_header_jvati_29",locationInfo:"_locationInfo_jvati_30",title:"_title_jvati_42",closeButton:"_closeButton_jvati_49",body:"_body_jvati_56",shareButtons:"_shareButtons_jvati_77",shareButton:"_shareButton_jvati_77"},Cm={root:"_root_1re47_4"};function _m({children:e,className:t,position:n="top"}){return y.jsx("span",{className:W("dyn-locator__tooltip",Cm.root,t),role:"tooltip","aria-hidden":"true","data-position":n,children:e})}function Tm({isOpen:e,onClose:t,portalContainer:n=document.body}){var c,u;const{labels:o}=O(d=>d.localizationConfig),r=O(d=>d.locations),s=O(d=>d.selectedLocation),i=m.useMemo(()=>s?r.find(d=>d.id===s):void 0,[r,s]);function a(d){const{name:f,shareURL:g}=d;switch(f){case"facebook":return{style:{"--icon-button-bg":"#1877F2","--icon-button-hover-bg":"#0a4992"},href:g??"#",target:"_blank",rel:"noopener noreferrer"};case"x":case"twitter":return{style:{"--icon-button-bg":"#000","--icon-button-hover-bg":"#333"},href:g??"#",target:"_blank",rel:"noopener noreferrer"};case"whatsapp":return{style:{"--icon-button-bg":"#25D366","--icon-button-hover-bg":"#167d3c"},href:g??"#",target:"_blank",rel:"noopener noreferrer"};case"email":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:g??"#"};case"copy":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:"#",onClick:h=>{h.preventDefault(),navigator.clipboard.writeText(g).then(()=>{H.success(o["ShareSheet.copyLinkSuccessNotif"])}).catch(v=>{H.error(o["ShareSheet.copyLinkErrorNotif"]),console.error("Failed to copy link: ",v)})}};default:return{}}}if(!e)return null;const l=y.jsx(er,{show:e,variant:"dark",onClick:t,children:y.jsxs("div",{className:W("dyn-locator__share-sheet",Xe.content),onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"share-sheet-title",children:[y.jsxs("header",{className:Xe.header,children:[y.jsx("h2",{id:"share-sheet-title",className:Xe.title,children:o["ShareSheet.title"]}),y.jsx($e,{className:Xe.closeButton,onClick:t,"aria-label":"Close",variant:"bare",children:y.jsx(Ce,{icon:"Close"})})]}),y.jsxs("div",{className:Xe.body,children:[i&&y.jsxs("div",{className:Xe.locationInfo,children:[y.jsx("h3",{children:i.title}),y.jsx("p",{children:i.address})]}),y.jsx("div",{className:Xe.shareButtons,children:(u=(c=i==null?void 0:i.on_share)==null?void 0:c.map)==null?void 0:u.call(c,d=>{const{name:f,shareURL:g}=d,h=f.charAt(0).toUpperCase()+f.slice(1),v=f==="copy"?o["ShareSheet.copyLinkTooltip"]:f==="email"?o["ShareSheet.shareViaEmailTooltip"]:o["ShareSheet.genericShareTooltip"]+h;return y.jsxs($e,{as:"a",href:g,variant:"negative",className:Xe.shareButton,...a(d),children:[y.jsx(Ce,{icon:h,size:"M"}),y.jsx(_m,{children:v})]})})})]})]})});return n?nn.createPortal(l,n):l}function Em(){return y.jsx(Sm,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:e=>y.jsx(Ya,{toast:e,children:({icon:t,message:n})=>y.jsxs(y.Fragment,{children:[t,n,e.type==="error"&&y.jsx($e,{variant:"bare",onClick:()=>H.dismiss(e.id),children:y.jsx(Ce,{icon:"Close"})})]})})})}function Pm({children:e,customComponents:t,customIcons:n,featureFlags:o,fetchLocations:r,localizationConfig:s,locations:i=[],mapId:a}){const l=O(L=>L.shouldRefetch),c=O(L=>L.setShouldRefetch),u=O(L=>L.isShareSheetOpen),d=O(L=>L.toggleShareSheet),f=O(L=>L.featureFlags),g=O(L=>L.setFeatureFlags),h=O(L=>L.setMapId),v=O(L=>L.setLocalizationConfig),S=O(L=>L.setMapDetail),x=O(L=>L.setLocations),b=O(L=>L.isFullscreen),w=m.useRef(null),{request:P,loading:T,error:M}=En(qt.CLUSTERS),{request:N,loading:A,error:I}=En(qt.MARKERS),V=T||A,q=!!M||!!I;async function ae(L){var ce;try{if(typeof L!="number"||L<0||isNaN(L))throw new Error("No map ID provided");const{data:J}=await P({mapId:String(L)})??{};if(!J)throw new Error("No cluster data received from the server");x((ce=J.map)==null?void 0:ce.call(J,D=>({...D,onMarkerClick:async()=>{await le(L,D.id)}})))}catch(J){console.error("Error fetching clusters: ",J),H.error(tt+qo),x([])}}async function le(L,ce){try{if(typeof L!="number"||L<0||isNaN(L))throw new Error("No map ID provided");const{data:J}=await N({mapId:L,clusterId:ce})??{};if(!J)throw new Error("No marker data received from the server");x(J),S(Ke.MARKER)}catch(J){console.error("Error fetching markers: ",J),H.error(tt+qo),x([])}}return m.useEffect(()=>{s&&v(s),o&&g(o),typeof a=="number"&&a>0&&!isNaN(a)&&h(a),i!=null&&i.length?x(i):r?r().then(L=>x(L)):ae(a)},[]),m.useEffect(()=>{let L=!0;return l&&a&&ae(a).finally(()=>{L&&c(!1)}),()=>{L=!1}},[l,a]),y.jsx("div",{id:"dyn-locator",className:W("dyn-locator__locator",vr.root),"data-fullscreen":b,children:y.jsxs(Ap,{customIcons:n,customComponents:t,children:[e,y.jsxs(er,{show:V||q,variant:"light",children:[V?y.jsx(Et,{size:"large"}):null,q?y.jsx(Ta,{title:Bh,message:qo,actionText:"ricaricare la pagina.",errorDetails:(M==null?void 0:M.message)||(I==null?void 0:I.message),onAction:L=>{L.preventDefault(),window.location.reload()}}):null]}),y.jsx(Em,{}),y.jsx("div",{ref:w,className:Kh}),f.share?y.jsx(Tm,{isOpen:u,onClose:()=>d(!1),portalContainer:w.current}):null]})})}function Za({mapProvider:e,endpoints:t,apiUrl:n,children:o,...r}){return y.jsx(Qh,{children:y.jsx(Vl,{children:y.jsx(zl,{mapProvider:e,children:y.jsx(Dp,{endpoints:t,apiUrl:n,children:y.jsx(Pm,{children:o,...r})})})})})}Za.displayName="Locator";var tr,Ja;function Am(){return Ja||(Ja=1,tr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),tr}var Mm=Am();const Lm=ur(Mm);function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_e.apply(null,arguments)}function rt(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Dm(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function km(e){var t=Dm(e,"string");return typeof t=="symbol"?t:t+""}const pe={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Om="https://maps.googleapis.com/maps/api/js";class Jt{static async load(t,n){var o;const r=t.libraries?t.libraries.split(","):[],s=this.serializeParams(t);this.listeners.push(n),(o=window.google)!=null&&(o=o.maps)!=null&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=pe.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==s&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...r];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const o=()=>n||(n=new Promise((r,s)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Om+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=pe.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=pe.LOADED,this.notifyLoadingStatusListeners(),r()},window.gm_authFailure=()=>{this.loadingStatus=pe.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=pe.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=r=>o().then(()=>google.maps.importLibrary(r))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Jt.loadingStatus=pe.NOT_LOADED,Jt.serializedApiParams=void 0,Jt.listeners=[];const jm=["onLoad","onError","apiKey","version","libraries"],Nm=["children"],Vm="GMP_visgl_rgmlibrary_v1_default",Qt=m.createContext(null);function Im(){const[e,t]=m.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>_e({},a,{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>rt(i,[s].map(km)))},clearMapInstances:()=>{t({})}}}function Rm(e){const{onLoad:t,onError:n,apiKey:o,version:r,libraries:s=[]}=e,i=rt(e,jm),[a,l]=m.useState(Jt.loadingStatus),[c,u]=m.useReducer((h,v)=>h[v.name]?h:_e({},h,{[v.name]:v.value}),{}),d=m.useMemo(()=>s==null?void 0:s.join(","),[s]),f=m.useMemo(()=>JSON.stringify(_e({apiKey:o,version:r},i)),[o,r,i]),g=m.useCallback(async h=>{var v;if(c[h])return c[h];if(!((v=google)!=null&&(v=v.maps)!=null&&v.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(h);return u({name:h,value:S}),S},[c]);return m.useEffect(()=>{(async()=>{try{const h=_e({key:o},i);r&&(h.v=r),(d==null?void 0:d.length)>0&&(h.libraries=d),(h.channel===void 0||h.channel<0||h.channel>999)&&delete h.channel,h.solutionChannel===void 0?h.solutionChannel=Vm:h.solutionChannel===""&&delete h.solutionChannel,await Jt.load(h,v=>l(v));for(const v of["core","maps",...s])await g(v);t&&t()}catch(h){n?n(h):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",h)}})()},[o,d,f]),{status:a,loadedLibraries:c,importLibrary:g}}const Bm=e=>{const{children:t}=e,n=rt(e,Nm),{mapInstances:o,addMapInstance:r,removeMapInstance:s,clearMapInstances:i}=Im(),{status:a,loadedLibraries:l,importLibrary:c}=Rm(n),u=m.useMemo(()=>({mapInstances:o,addMapInstance:r,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[o,r,s,i,a,l,c]);return m.createElement(Qt.Provider,{value:u},t)};function Fm(e,t){for(const n of Xm){const o=t[n],r=Qa[n];m.useEffect(()=>{if(!e||!o)return;const s=google.maps.event.addListener(e,r,i=>{o($m(r,e,i))});return()=>s.remove()},[e,r,o])}}function $m(e,t,n){const o={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(zm.includes(e)){const s=o,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(Um.includes(e)){var r;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=o;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((r=n.latLng)==null?void 0:r.toJSON())||null,placeId:n.placeId},s}return o}const Qa={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},zm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Um=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Xm=Object.keys(Qa);function nr(e,t){const n=m.useRef(void 0);(!n.current||!Lm(t,n.current))&&(n.current=t),m.useEffect(e,n.current)}const Wm=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Gm(e,t){const n={},o=Object.keys(t);for(const r of o)Wm.has(r)&&(n[r]=t[r]);nr(()=>{e&&e.setOptions(n)},[n])}function or(){var e;return((e=m.useContext(Qt))==null?void 0:e.status)||pe.NOT_LOADED}function Km(e,t){const{viewport:n,viewState:o}=t,r=!!n;return m.useLayoutEffect(()=>{if(!e||!o)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:c}=o;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:c+1})},[e,o]),r}function Hm(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function el(e){return Hm(e)?e:e.toJSON()}function qm(e,t,n){const o=n.center?el(n.center):null;let r=null,s=null;o&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&(r=o.lat,s=o.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;m.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;r!==null&&s!==null&&(t.current.center.lat!==r||t.current.center.lng!==s)&&(c.center={lat:r,lng:s},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const Ym=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return m.createElement("div",{style:e},m.createElement("h2",null,"Error: AuthFailure"),m.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",m.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function Zm(){const[e,t]=m.useState(null),n=m.useCallback(o=>t(o),[t]);return[e,n]}function tl(){return or()===pe.LOADED}function Jm(){const[,e]=m.useReducer(t=>t+1,0);return e}function Qm(e,t){const n=e.getCenter(),o=e.getZoom(),r=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(o))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:o||0,heading:r,tilt:s})}function eg(e){const t=Jm(),n=m.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return m.useEffect(()=>{if(!e)return;const o=google.maps.event.addListener(e,"bounds_changed",()=>{Qm(e,n),t()});return()=>o.remove()},[e,t]),n}const tg=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],ng=["padding"];class Pn{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}Pn.entries={};function og(e,t){const n=tl(),[o,r]=m.useState(null),[s,i]=Zm(),a=eg(o),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:g,reuseMaps:h,renderingType:v,colorScheme:S}=e,x=rt(e,tg),b=e.zoom!==void 0||e.defaultZoom!==void 0,w=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!w)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!x.center&&u&&(x.center=u),!x.zoom&&Number.isFinite(d)&&(x.zoom=d),!x.heading&&Number.isFinite(f)&&(x.heading=f),!x.tilt&&Number.isFinite(g)&&(x.tilt=g);for(const T of Object.keys(x))x[T]===void 0&&delete x[T];const P=m.useRef(void 0);return m.useEffect(()=>{if(!s||!n)return;const{addMapInstance:T,removeMapInstance:M}=t,{mapId:N}=e,A=`${N||"default"}:${v||"default"}:${S||"LIGHT"}`;let I,V;if(h&&Pn.has(A)?(V=Pn.pop(A),I=V.getDiv(),s.appendChild(I),V.setOptions(x),setTimeout(()=>V.setCenter(V.getCenter()),0)):(I=document.createElement("div"),I.style.height="100%",s.appendChild(I),V=new google.maps.Map(I,_e({},x,v?{renderingType:v}:{},S?{colorScheme:S}:{}))),r(V),T(V,l),c){const{padding:q}=c,ae=rt(c,ng);V.fitBounds(ae,q)}else(!b||!w)&&V.fitBounds({east:180,west:-180,south:-90,north:90});if(P.current){const{mapId:q,cameraState:ae}=P.current;q!==N&&V.setOptions(ae)}return()=>{P.current={mapId:N,cameraState:a.current},I.remove(),h?Pn.push(A,V):google.maps.event.clearInstanceListeners(V),r(null),M(l)}},[s,n,l,e.mapId,e.renderingType,e.colorScheme]),[o,i,a]}const nl=m.createContext(null),ol=e=>{const{children:t,id:n,className:o,style:r}=e,s=m.useContext(Qt),i=or();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=og(e,s);qm(a,c,e),Fm(a,e),Gm(a,e);const u=Km(a,e),d=!!e.controlled;m.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?el(e.center):null;let g=null,h=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(g=f.lat,h=f.lng);const v=m.useMemo(()=>{var b,w,P,T,M;return{center:{lat:(b=g)!=null?b:0,lng:(w=h)!=null?w:0},zoom:(P=e.zoom)!=null?P:0,heading:(T=e.heading)!=null?T:0,tilt:(M=e.tilt)!=null?M:0}},[g,h,e.zoom,e.heading,e.tilt]);m.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(v);const b=a.addListener("bounds_changed",()=>{a.moveCamera(v)});return()=>b.remove()},[a,d,v]);const S=m.useMemo(()=>_e({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},r),[r,u]),x=m.useMemo(()=>({map:a}),[a]);return i===pe.AUTH_FAILURE?m.createElement("div",{style:_e({position:"relative"},o?{}:S),className:o},m.createElement(Ym,null)):m.createElement("div",_e({ref:l,"data-testid":"map",style:o?void 0:S,className:o},n?{id:n}:{}),a?m.createElement(nl.Provider,{value:x},t):null)};ol.deckGLViewProps=!0;const rl=new Set;function rg(...e){const t=JSON.stringify(e);rl.has(t)||(rl.add(t),console.error(...e))}const An=(e=null)=>{const t=m.useContext(Qt),{map:n}=m.useContext(nl)||{};if(t===null)return rg("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:o}=t;return e!==null?o[e]||null:n||o.default||null};function Mn(e){const t=tl(),n=m.useContext(Qt);return m.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function xt(e,t,n){m.useEffect(()=>{if(!e||!t||!n)return;const o=google.maps.event.addListener(e,t,n);return()=>o.remove()},[e,t,n])}function Ln(e,t,n){m.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function sl(e,t,n){m.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function sg(e){return e.content!==void 0}function ig(e){return e.nodeType===Node.ELEMENT_NODE}const ag=m.createContext(null),lg={BOTTOM:["50%","100%"]},cg=({children:e,styles:t,className:n,anchorPoint:o})=>{const[r,s]=o??lg.BOTTOM;let i=`-${r}`,a=`-${s}`;r.trimStart().startsWith("-")&&(i=r.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return m.createElement("div",{style:{transform:l}},m.createElement("div",{className:n,style:t},e))};function ug(e){const[t,n]=m.useState(null),[o,r]=m.useState(null),s=An(),i=Mn("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:g,onDragEnd:h,collisionBehavior:v,clickable:S,draggable:x,position:b,title:w,zIndex:P}=e,T=m.Children.count(a);return m.useEffect(()=>{if(!s||!i)return;const M=new i.AdvancedMarkerElement;M.map=s,n(M);let N=null;return T>0&&(N=document.createElement("div"),N.isCustomMarker=!0,M.content=N,r(N)),()=>{var A;M.map=null,(A=N)==null||A.remove(),n(null),r(null)}},[s,i,T]),m.useEffect(()=>{!t||!t.content||T>0||(t.content.className=c||"")},[t,c,T]),Ln(t,"position",b),Ln(t,"title",w??""),Ln(t,"zIndex",P),Ln(t,"collisionBehavior",v),m.useEffect(()=>{t&&(x!==void 0?t.gmpDraggable=x:f||g||h?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,x,f,h,g]),m.useEffect(()=>{if(!t)return;const M=S!==void 0||!!l||!!u||!!d;t.gmpClickable=M,M&&t!=null&&t.content&&ig(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),xt(t,"click",l),xt(t,"drag",f),xt(t,"dragstart",g),xt(t,"dragend",h),sl(t==null?void 0:t.element,"mouseenter",u),sl(t==null?void 0:t.element,"mouseleave",d),[t,o]}m.forwardRef((e,t)=>{const{children:n,style:o,className:r,anchorPoint:s}=e,[i,a]=ug(e),l=m.useMemo(()=>i?{marker:i}:null,[i]);return m.useImperativeHandle(t,()=>i,[i]),a?m.createElement(ag.Provider,{value:l},nn.createPortal(m.createElement(cg,{anchorPoint:s,styles:o,className:r},n),a)):null});function dg(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const o=e.style;if(n==null){if(t==null)return;for(const r in t)t.hasOwnProperty(r)&&il(o,r,t[r]);return}for(const r in n)n.hasOwnProperty(r)&&(t==null||!t.hasOwnProperty(r))&&(r.indexOf("--")===0?o.setProperty(r,""):r==="float"?o.cssFloat="":o[r]="");if(t!=null)for(const r in t){const s=t[r];t.hasOwnProperty(r)&&n[r]!==s&&il(o,r,s)}}function il(e,t,n){const o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n=="number"&&n!==0&&!hg(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const fg=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function hg(e){return fg.has(e)}const pg=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],mg=e=>{const{children:t,headerContent:n,style:o,className:r,pixelOffset:s,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=rt(e,pg),d=Mn("maps"),[f,g]=m.useState(null),h=m.useRef(null),v=m.useRef(null);m.useEffect(()=>{if(!d)return;h.current=document.createElement("div"),v.current=document.createElement("div");const b=u;s&&(b.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(b.headerContent=typeof n=="string"?n:v.current);const w=new google.maps.InfoWindow(u);return w.setContent(h.current),g(w),()=>{var P,T;w.setContent(null),(P=h.current)==null||P.remove(),(T=v.current)==null||T.remove(),h.current=null,v.current=null,g(null)}},[d]);const S=m.useRef(null);m.useEffect(()=>{!f||!h.current||(dg(h.current,o||null,S.current),S.current=o||null,r!==h.current.className&&(h.current.className=r||""))},[f,r,o]),nr(()=>{if(!f)return;const b=u;s?b.pixelOffset=new google.maps.Size(s[0],s[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:v.current:b.headerContent=null,f.setOptions(u)},[u,s,n]),xt(f,"close",l),xt(f,"closeclick",c);const x=An();return nr(()=>{if(!x||!f||i===null)return;const b=!!i,w={map:x};if(i&&(w.anchor=i,sg(i)&&i.content instanceof Element)){const T=i.content,M=T==null?void 0:T.getBoundingClientRect();if(M&&T!=null&&T.isCustomMarker){var P;const N=(P=i.content.firstElementChild)==null?void 0:P.firstElementChild,A=N==null?void 0:N.getBoundingClientRect(),I=A.x-M.x+(A.width-M.width)/2,V=A.y-M.y,q=u;q.pixelOffset=new google.maps.Size(s?s[0]+I:I,s?s[1]+V:V),f.setOptions(q)}}return a!==void 0&&(w.shouldFocus=a),f.open(w),()=>{b&&f.set("anchor",null),f.close()}},[f,i,x,a,u,s]),m.createElement(m.Fragment,null,h.current&&nn.createPortal(t,h.current),v.current!==null&&nn.createPortal(n,v.current))},gg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function yg(e){const[t,n]=m.useState(null),o=An(),{onClick:r,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=rt(e,gg),{position:d,draggable:f}=u;return m.useEffect(()=>{if(!o){o===void 0&&console.error("<Marker> has to be inside a Map component.");return}const g=new google.maps.Marker(u);return g.setMap(o),n(g),()=>{g.setMap(null),n(null)}},[o]),m.useEffect(()=>{if(!t)return;const g=t,h=google.maps.event;return r&&h.addListener(g,"click",r),s&&h.addListener(g,"drag",s),i&&h.addListener(g,"dragstart",i),a&&h.addListener(g,"dragend",a),l&&h.addListener(g,"mouseover",l),c&&h.addListener(g,"mouseout",c),t.setDraggable(!!f),()=>{h.clearInstanceListeners(g)}},[t,f,r,s,i,a,l,c]),m.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),m.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const al=m.forwardRef((e,t)=>{const n=yg(e);return m.useImperativeHandle(t,()=>n,[n]),m.createElement(m.Fragment,null)});function vg(){const[e,t]=m.useState(null);return[m.useCallback(o=>{t(o)},[]),e]}const We={root:"_root_faay1_10",header:"_header_faay1_18",body:"_body_faay1_31",highlighted:"_highlighted_faay1_43",toggleButton:"_toggleButton_faay1_46",toggleButtonIcon:"_toggleButtonIcon_faay1_46"};function xg({onLocationSelect:e}){const t=Ia("locationCard"),n=O(h=>h.locations),{labels:o}=O(h=>h.localizationConfig),r=O(h=>h.isLocationListExpanded),s=O(h=>h.setIsLocationListExpanded),i=O(h=>h.selectedLocation),a=O(h=>h.setSelectedLocation),l=m.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=m.useMemo(()=>d.map((h,v)=>h==="{:1}"?y.jsx("span",{className:We.highlighted,children:(n==null?void 0:n.length)??0},v):h==="{:2}"?y.jsx("span",{className:We.highlighted,children:u},v):h),[u,n.length,d]);function g(h){return()=>{e==null||e(h.coords),a==null||a(h.id)}}return m.useEffect(()=>{if(i&&r){const h=l.current[i];h!=null&&h.current&&requestAnimationFrame(()=>{const v=window.scrollY;h.current.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollTo({top:v,behavior:"auto"})})}},[i,r]),y.jsxs("div",{className:W("dyn-locator__location-list",We.root),"data-expanded":r,children:[y.jsxs("header",{className:We.header,onClick:()=>s(!r),role:"button","aria-expanded":r,children:[y.jsx("span",{children:f}),y.jsx($e,{className:We.toggleButton,variant:"bare",children:y.jsx(Ce,{className:We.toggleButtonIcon,animate:!1,icon:"ChevronUp"})})]}),y.jsx("div",{className:We.body,children:n!=null&&n.length?n.map(h=>{const v=h.id;l.current[v]||(l.current[v]=m.createRef());const S=l.current[v];return y.jsx(t,{ref:S,"data-active":i===h.id,onClick:g(h),...h},h.id)}):y.jsx("div",{className:We.noResults,children:o["LocationList.noResults"]})})]})}const ke={root:"_root_b3glo_21",loaderContainer:"_loaderContainer_b3glo_29",fullscreenButton:"_fullscreenButton_b3glo_36",backButton:"_backButton_b3glo_37",areaSearchButton:"_areaSearchButton_b3glo_52",visualCue:"_visualCue_b3glo_77",closeButton:"_closeButton_b3glo_102",searchButton:"_searchButton_b3glo_120"},Dn={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function bg({id:e,title:t,address:n,coords:o,actions:r,onClick:s,onRightButtonClick:i}){var g;const{labels:a}=O(h=>h.localizationConfig),l=O(h=>h.selectedLocation),c=O(h=>h.setSelectedLocation),[u,d]=vg(),f=m.useCallback(()=>{c==null||c("")},[c]);return y.jsxs(y.Fragment,{children:[y.jsx(al,{ref:u,position:o,onClick:()=>{s==null||s()}}),l===e?y.jsxs(mg,{anchor:d,headerContent:t,onCloseClick:f,className:Dn.root,children:[y.jsxs("header",{className:Dn.header,children:[y.jsx("h6",{children:t}),y.jsx("address",{children:n})]}),y.jsx("div",{className:Dn.body,children:y.jsxs("div",{className:Dn.cta,children:[y.jsx(Ht,{animate:!1,variant:"secondary",size:"small",...xa((g=r==null?void 0:r.find)==null?void 0:g.call(r,h=>h.type==="navigate")),children:a["InfoWindow.CTA_1"]}),y.jsx(Ht,{animate:!1,variant:"secondary",size:"small",onClick:i,children:a["InfoWindow.CTA_2"]})]})})]}):null]})}function Sg(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function wg(e){return"title"in e&&!("size"in e)}function Cg(){var D;const[e,t]=m.useState({zoom:va}),[n,o]=m.useState(!1),[r,s]=m.useState("inactive"),i=m.useRef(""),a=or(),{request:l,loading:c}=En(qt.FIND),u=O(_=>_.mapId),d=O(_=>_.featureFlags),{labels:f}=O(_=>_.localizationConfig),g=O(_=>_.locations),h=O(_=>_.setLocations),v=O(_=>_.targetLocation),S=O(_=>_.clearTargetLocation),x=O(_=>_.mapDetail),b=O(_=>_.setMapDetail),w=O(_=>_.isFullscreen),P=O(_=>_.setFullscreen),T=O(_=>_.isLocationListExpanded),M=O(_=>_.setIsLocationListExpanded),N=O(_=>_.shouldRefetch),A=O(_=>_.setShouldRefetch),I=O(_=>_.setSelectedLocation),V=x===Ke.MARKER;function q({detail:_}){const{center:F,zoom:ee}=_;t({center:F,zoom:ee}),n||o(!0)}function ae(){n&&e.center&&r==="inactive"&&s("active")}function le(_){t(F=>({center:_,zoom:F.zoom}))}function L(){s("inactive"),I(""),M(!1),b(Ke.CLUSTER),t({center:Zh,zoom:va}),A(!0)}const ce=m.useCallback(async()=>{if(!e.center)return;const{lat:_,lng:F}=e.center,ee={location:{type:"Feature",geometry:{type:"Point",coordinates:[F,_]},properties:{distance:qh}}};try{const{data:X}=await l({mapId:u},{body:ee})??{};if(!(X!=null&&X.pins))throw new Error("No locations found");h(X.pins),b(Ke.MARKER),s("inactive")}catch(X){console.error("Error finding locations in this area: ",X),H.error(tt+Uh)}},[e.center,l,b,u,h]);function J(_){function F(){t({center:_.coords,zoom:18}),T||M(!0)}if(Sg(_))return y.jsx(al,{position:_.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(_.range??0)/Hh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await _.onMarkerClick(),t({center:_.coords,zoom:_.zoom||15})}},_.id);if(wg(_))return y.jsx(bg,{id:_.id,title:_.title??"No title",address:_.address??"No address",coords:_.coords,actions:_.actions,onRightButtonClick:F,onClick:()=>{I(_.id)}},_.id)}if(m.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),m.useEffect(()=>{v&&(t({center:v.coords,zoom:v.zoom}),S())},[v,S]),a===pe.LOADING)return y.jsx("div",{className:W("dyn-locator__map",ke.root),children:y.jsx("div",{className:ke.loaderContainer,children:y.jsx(Et,{size:"large"})})});if(a===pe.FAILED||a===pe.AUTH_FAILURE)throw new Error(zh);if(a===pe.LOADED)return y.jsxs("div",{className:W("dyn-locator__map",ke.root),children:[d.fullscreen?y.jsx($e,{className:W(ke.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>P==null?void 0:P(!w),children:y.jsx(Ce,{size:"M",icon:w?"Close":"Expand"})}):null,V?y.jsx($e,{className:W(ke.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:L,children:y.jsx(Ce,{size:"M",icon:"ArrowLeft"})}):null,r!=="inactive"&&y.jsxs(Ht,{className:W(ke.areaSearchButton,"dyn-locator__map__area-search-button",V&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||r==="select_area",loading:c,onClick:()=>s("select_area"),children:[y.jsx(rc,{}),f["Map.areaSearchButton"]]}),r==="select_area"&&y.jsxs("div",{className:ke.visualCue,children:[y.jsxs("i",{children:[y.jsx("button",{className:ke.closeButton,onClick:()=>s("active"),"aria-label":"Close area search",children:y.jsx(Sr,{size:16})}),y.jsx(sc,{size:48,strokeWidth:1,color:"currentColor"})]}),y.jsxs(Ht,{className:ke.searchButton,disabled:c,loading:c,onClick:ce,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",y.jsx(Hl,{size:22,style:{position:"relative",left:-8}})]})]}),y.jsx(ol,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:q,onDragend:ae,defaultBounds:Kt,children:!N&&((D=g==null?void 0:g.map)==null?void 0:D.call(g,J))}),V?y.jsx(xg,{onLocationSelect:le}):null]})}const Oe={root:"_root_1nmik_10",validIcon:"_validIcon_1nmik_20",errorIcon:"_errorIcon_1nmik_27",label:"_label_1nmik_48",input:"_input_1nmik_58",sideButton:"_sideButton_1nmik_89",sideOrnament:"_sideOrnament_1nmik_92",clearButton:"_clearButton_1nmik_126",dropdown:"_dropdown_1nmik_166"},ll="Input";function cl({label:e,className:t,showValidation:n=!0,error:o=!1,valid:r=!1,clearable:s=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:g,sideOrnament:h,...v},S){const x=a?et.div:"div",b=Fe(v)??[],w=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return y.jsxs(x,{className:W("dyn-locator__"+Ae(ll),Oe.root,Pe(t),...b??[]),"data-valid":r,"data-error":o,"data-expanded":u,"data-side-button":!!g,...f?{style:f}:{},...w,children:[n&&y.jsxs(y.Fragment,{children:[r&&y.jsx("span",{className:Oe.validIcon}),o&&y.jsx("span",{className:Oe.errorIcon})]}),e?y.jsx("label",{className:Oe.label,...v.id?{htmlFor:v.id}:{},children:e}):null,h?y.jsx("span",{className:Oe.sideOrnament,children:h}):null,y.jsx("input",{ref:S,className:W(Oe.input),"aria-label":d,"aria-invalid":o,"data-side-button":!!g,"data-side-ornament":!!h,...v}),g?y.jsx("span",{className:Oe.sideButton,children:g}):null,s&&(v==null?void 0:v.value)&&y.jsx("button",{className:Oe.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&y.jsx("div",{className:Oe.dropdown,children:c})]})}cl.displayName=ll;const _g=m.forwardRef(cl),st={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function Tg(){const[e,t]=m.useState(""),[n,o]=m.useState([]),[r,s]=m.useState(!1),[i,a]=m.useState(!1),[l,c]=m.useState(!1),u=O(D=>D.mapId),d=O(D=>D.setLocations),f=O(D=>D.setMapDetail),g=O(D=>D.zoomToLocation),{labels:h}=O(D=>D.localizationConfig),{search:v}=O(D=>D.featureFlags),{request:S,loading:x}=En(qt.FIND),b=Mn("places"),w=Mn("geocoding"),P=An(),T=m.useRef(null),M=m.useRef(null),N=m.useRef(null),A=m.useRef(null);m.useEffect(()=>{w&&(N.current||(N.current=new w.Geocoder))},[w]),m.useEffect(()=>{b&&(T.current||(T.current=new b.AutocompleteService),A.current||(A.current=new b.AutocompleteSessionToken))},[b]),m.useEffect(()=>{!b||!P||M.current||(M.current=new b.PlacesService(P))},[b,P]);const I=m.useCallback(Jh(async D=>{var _;if(!D||D.length<3){o([]),s(!1);return}a(!0);try{if(!b||!T.current)throw new Error("Places library or Autocomplete Service not available");const F=await T.current.getPlacePredictions({input:D,...A.current?{sessionToken:A.current}:{}});if(a(!1),!((_=F==null?void 0:F.predictions)!=null&&_.length)){o([]),s(!1);return}o(F.predictions),s(!0)}catch(F){console.error("Error fetching predictions: ",F),a(!1),o([]),s(!1),H.error(tt+Fh)}},Yh),[b]),V=D=>{const _=D.currentTarget.value;if(t(_),!_||_.length<3){o([]),s(!1);return}I(_)},q=async D=>{var _,F,ee,X,je;t(D.description),s(!1);try{if(!b||!M.current)throw new Error("Places library or Places Service not available");const ne=await new Promise((Ge,en)=>{M.current.getDetails({placeId:D.place_id,fields:["geometry"],...A.current?{sessionToken:A.current}:{}},(bt,St)=>{St===b.PlacesServiceStatus.OK&&bt?Ge(bt):en(new Error(`Place details request failed with status: ${St}`))})});if((_=ne==null?void 0:ne.geometry)!=null&&_.location){const Ge=(ee=(F=ne.geometry.location).lat)==null?void 0:ee.call(F),en=(je=(X=ne.geometry.location).lng)==null?void 0:je.call(X);await ce({lat:Ge,lng:en})}}catch(ne){console.error("Error getting place details:",ne),H.error(tt+$h)}finally{b&&(A.current=new b.AutocompleteSessionToken)}},ae=()=>{t(""),o([]),s(!1)},le=()=>!r||n.length===0?null:y.jsx("div",{className:st.predictionsContainer,children:i?y.jsx("div",{className:st.loadingItem,children:y.jsx(Et,{size:"medium"})}):n.map(D=>y.jsx("div",{className:st.predictionItem,onClick:()=>q(D),children:D.description},D.place_id))});async function L(D){D.preventDefault(),c(!0);try{const _=await new Promise((X,je)=>{navigator.geolocation.getCurrentPosition(ne=>X(ne),ne=>je(ne),{timeout:5e3})}),F={lat:_.coords.latitude,lng:_.coords.longitude};if(await ce(F),!w||!(N!=null&&N.current)||!P)throw new Error("Geocoding library or Geocoder not available");const ee=await new Promise((X,je)=>{N.current.geocode({location:F},(ne,Ge)=>{Ge===google.maps.GeocoderStatus.OK&&ne&&ne.length>0?X(ne):je(new Error(`Geocoding failed with status: ${Ge}`))})});ee&&ee[0]&&t(ee[0].formatted_address)}catch(_){console.error("Error getting location: ",_);const F=_ instanceof GeolocationPositionError?tt+_.message:tt+Rh;H.error(F)}finally{c(!1)}}async function ce(D){const{lng:_,lat:F}=D,ee={location:{type:"Feature",geometry:{type:"Point",coordinates:[_,F]},properties:{}}};try{const{data:X}=await S({mapId:u},{body:ee})??{};if(!(X!=null&&X.pins))throw new Error("No locations found");d(X.pins),f(Ke.MARKER),g({lat:F,lng:_},X.zoom||15)}catch(X){throw console.error("Error finding locations: ",X),X}}const J=x||l;return v?y.jsxs("div",{className:W("dyn-locator__search",st.root),children:[y.jsx(_g,{name:"locator_search_field",className:W("dyn-locator__search__field",st.input),value:e,onChange:V,placeholder:h["Search.placeholder"],dropdown:le(),dropdownVisible:r,disabled:J,sideOrnament:e?void 0:y.jsx(Ce,{className:st.sideOrnament,icon:"Search",size:"M"}),sideButton:e?y.jsx($e,{variant:"bare",className:st.clearButton,onClick:ae,"aria-label":"Clear",children:y.jsx(Ce,{icon:"Close",size:"M"})}):y.jsx(wa,{href:"#",onClick:L,children:h["Search.geolocationButton"]})}),y.jsx(er,{show:J,children:y.jsx(Et,{size:"medium"})})]}):null}function Eg({children:e,apiKey:t,language:n,region:o,libraries:r}){return y.jsx(Bm,{apiKey:t,region:o,language:n,libraries:r,children:e})}const Pg=Object.freeze(Object.defineProperty({__proto__:null,default:Eg},Symbol.toStringTag,{value:"Module"}));function Ag(){throw new Error("Mapbox provider is not implemented yet")}const Mg=Object.freeze(Object.defineProperty({__proto__:null,default:Ag},Symbol.toStringTag,{value:"Module"}));function Lg(){throw new Error("HERE Maps provider is not implemented yet")}const Dg=Object.freeze(Object.defineProperty({__proto__:null,default:Lg},Symbol.toStringTag,{value:"Module"}));xe.Map=Cg,xe.Search=Tg,xe.default=Za,Object.defineProperties(xe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
314
+ `,An=16,bm=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:o,children:r,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=qp(n);return te.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:An,left:An,right:An,bottom:An,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:o,defaultPosition:t}),f=vm(u,d);return te.createElement(ym,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?xm:"",style:f},c.type==="custom"?En(c.message,c):r?r(c):te.createElement(el,{toast:c,position:u}))}))};const Sm={root:"_root_movxa_4"};function rr({className:e,children:t,show:n=!0,variant:o="light",...r}){const s=W("dyn-locator__overlay",Sm.root,e);return n?v.jsx("div",{className:s,"data-variant":o,...r,children:t}):null}function Mn(e){const[t,n]=m.useState(!1),[o,r]=m.useState(null),{getEndpoint:s}=Op(e);return{request:async(a={},l={})=>{n(!0),r(null);try{let c;try{c=s(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw r(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:o}}const He={content:"_content_jvati_17",header:"_header_jvati_29",locationInfo:"_locationInfo_jvati_30",title:"_title_jvati_42",closeButton:"_closeButton_jvati_49",body:"_body_jvati_56",shareButtons:"_shareButtons_jvati_77",shareButton:"_shareButton_jvati_77"},_m={root:"_root_1re47_4"};function Cm({children:e,className:t,position:n="top"}){return v.jsx("span",{className:W("dyn-locator__tooltip",_m.root,t),role:"tooltip","aria-hidden":"true","data-position":n,children:e})}function wm({isOpen:e,onClose:t,portalContainer:n=document.body}){var c,u;const{labels:o}=k(d=>d.localizationConfig),r=k(d=>d.locations),s=k(d=>d.selectedLocation),i=m.useMemo(()=>s?r.find(d=>d.id===s):void 0,[r,s]);function a(d){const{name:f,shareURL:p}=d;switch(f){case"facebook":return{style:{"--icon-button-bg":"#1877F2","--icon-button-hover-bg":"#0a4992"},href:p??"#",target:"_blank",rel:"noopener noreferrer"};case"x":case"twitter":return{style:{"--icon-button-bg":"#000","--icon-button-hover-bg":"#333"},href:p??"#",target:"_blank",rel:"noopener noreferrer"};case"whatsapp":return{style:{"--icon-button-bg":"#25D366","--icon-button-hover-bg":"#167d3c"},href:p??"#",target:"_blank",rel:"noopener noreferrer"};case"email":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:p??"#"};case"copy":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:"#",onClick:y=>{y.preventDefault(),navigator.clipboard.writeText(p).then(()=>{K.success(o["ShareSheet.copyLinkSuccessNotif"])}).catch(g=>{K.error(o["ShareSheet.copyLinkErrorNotif"]),console.error("Failed to copy link: ",g)})}};default:return{}}}if(!e)return null;const l=v.jsx(rr,{show:e,variant:"dark",onClick:t,children:v.jsxs("div",{className:W("dyn-locator__share-sheet",He.content),onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"share-sheet-title",children:[v.jsxs("header",{className:He.header,children:[v.jsx("h2",{id:"share-sheet-title",className:He.title,children:o["ShareSheet.title"]}),v.jsx(Ue,{className:He.closeButton,onClick:t,"aria-label":"Close",variant:"bare",children:v.jsx(we,{icon:"Close"})})]}),v.jsxs("div",{className:He.body,children:[i&&v.jsxs("div",{className:He.locationInfo,children:[v.jsx("h3",{children:i.title}),v.jsx("p",{children:i.address})]}),v.jsx("div",{className:He.shareButtons,children:(u=(c=i==null?void 0:i.on_share)==null?void 0:c.map)==null?void 0:u.call(c,d=>{const{name:f,shareURL:p}=d,y=f.charAt(0).toUpperCase()+f.slice(1),g=f==="copy"?o["ShareSheet.copyLinkTooltip"]:f==="email"?o["ShareSheet.shareViaEmailTooltip"]:o["ShareSheet.genericShareTooltip"]+y;return v.jsxs(Ue,{as:"a",href:p,variant:"negative",className:He.shareButton,...a(d),children:[v.jsx(we,{icon:y,size:"M"}),v.jsx(Cm,{children:g})]})})})]})]})});return n?Ee.createPortal(l,n):l}function Tm({isFullscreen:e}){return v.jsx(bm,{...e?{}:{containerStyle:{position:"absolute"}},toastOptions:{position:e?"top-center":"bottom-right",duration:3e3,error:{duration:1/0}},children:t=>v.jsx(el,{toast:t,children:({icon:n,message:o})=>v.jsxs(v.Fragment,{children:[n,o,t.type==="error"&&v.jsx(Ue,{variant:"bare",onClick:()=>K.dismiss(t.id),children:v.jsx(we,{icon:"Close"})})]})})})}function Em({children:e,customComponents:t,customIcons:n,featureFlags:o,fetchLocations:r,localizationConfig:s,locations:i=[],mapId:a,trackingConfig:l}){const c=k(O=>O.shouldRefetch),u=k(O=>O.setShouldRefetch),d=k(O=>O.isShareSheetOpen),f=k(O=>O.toggleShareSheet),p=k(O=>O.featureFlags),y=k(O=>O.setFeatureFlags),g=k(O=>O.setMapId),S=k(O=>O.setLocalizationConfig),x=k(O=>O.setMapDetail),b=k(O=>O.setLocations),_=k(O=>O.isFullscreen),P=m.useRef(null),{request:T,loading:L,error:N}=Mn(Qt.CLUSTERS),{request:M,loading:R,error:I}=Mn(Qt.MARKERS),q=L||R,le=!!N||!!I;async function re(O){var me;try{if(typeof O!="number"||O<0||isNaN(O))throw new Error("No map ID provided");const{data:A}=await T({mapId:String(O)})??{};if(!A)throw new Error("No cluster data received from the server");b((me=A.map)==null?void 0:me.call(A,w=>({...w,onMarkerClick:async()=>{await ce(O,w.id)}})))}catch(A){console.error("Error fetching clusters: ",A),K.error(rt+Jo),b([])}}async function ce(O,me){try{if(typeof O!="number"||O<0||isNaN(O))throw new Error("No map ID provided");const{data:A}=await M({mapId:O,clusterId:me})??{};if(!A)throw new Error("No marker data received from the server");b(A),x(Ye.MARKER)}catch(A){console.error("Error fetching markers: ",A),K.error(rt+Jo),b([])}}return m.useEffect(()=>{s&&S(s),o&&y(o),l&&Xe.initialize(l),typeof a=="number"&&a>0&&!isNaN(a)&&g(a),i!=null&&i.length?b(i):r?r().then(O=>b(O)):re(a)},[]),m.useEffect(()=>{let O=!0;return c&&a&&re(a).finally(()=>{O&&u(!1)}),()=>{O=!1}},[c,a]),v.jsx("div",{id:"dyn-locator",className:W("dyn-locator__locator",_r.root),"data-fullscreen":_,children:v.jsxs(Pp,{customIcons:n,customComponents:t,children:[e,v.jsxs(rr,{show:q||le,variant:"light",children:[q?v.jsx(Lt,{size:"large"}):null,le?v.jsx(Ma,{title:Uh,message:Jo,actionText:"ricaricare la pagina.",errorDetails:(N==null?void 0:N.message)||(I==null?void 0:I.message),onAction:O=>{O.preventDefault(),window.location.reload()}}):null]}),v.jsx(Tm,{isFullscreen:_}),v.jsx("div",{ref:P,className:Zh}),p.share?v.jsx(wm,{isOpen:d,onClose:()=>f(!1),portalContainer:P.current}):null]})})}function tl({mapProvider:e,endpoints:t,apiUrl:n,children:o,...r}){return v.jsx(rp,{children:v.jsx(Fl,{children:v.jsx(Gl,{mapProvider:e,children:v.jsx(Lp,{endpoints:t,apiUrl:n,children:v.jsx(Em,{...r,children:o})})})})})}tl.displayName="Locator";var sr,nl;function Pm(){return nl||(nl=1,sr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),sr}var Am=Pm();const Mm=pr(Am);function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Te.apply(null,arguments)}function at(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Lm(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Om(e){var t=Lm(e,"string");return typeof t=="symbol"?t:t+""}const pe={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Dm="https://maps.googleapis.com/maps/api/js";class nn{static async load(t,n){var o;const r=t.libraries?t.libraries.split(","):[],s=this.serializeParams(t);this.listeners.push(n),(o=window.google)!=null&&(o=o.maps)!=null&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=pe.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==s&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...r];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const o=()=>n||(n=new Promise((r,s)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Dm+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=pe.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=pe.LOADED,this.notifyLoadingStatusListeners(),r()},window.gm_authFailure=()=>{this.loadingStatus=pe.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=pe.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=r=>o().then(()=>google.maps.importLibrary(r))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}nn.loadingStatus=pe.NOT_LOADED,nn.serializedApiParams=void 0,nn.listeners=[];const km=["onLoad","onError","apiKey","version","libraries"],Nm=["children"],jm="GMP_visgl_rgmlibrary_v1_default",on=m.createContext(null);function Im(){const[e,t]=m.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>Te({},a,{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>at(i,[s].map(Om)))},clearMapInstances:()=>{t({})}}}function Vm(e){const{onLoad:t,onError:n,apiKey:o,version:r,libraries:s=[]}=e,i=at(e,km),[a,l]=m.useState(nn.loadingStatus),[c,u]=m.useReducer((y,g)=>y[g.name]?y:Te({},y,{[g.name]:g.value}),{}),d=m.useMemo(()=>s==null?void 0:s.join(","),[s]),f=m.useMemo(()=>JSON.stringify(Te({apiKey:o,version:r},i)),[o,r,i]),p=m.useCallback(async y=>{var g;if(c[y])return c[y];if(!((g=google)!=null&&(g=g.maps)!=null&&g.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(y);return u({name:y,value:S}),S},[c]);return m.useEffect(()=>{(async()=>{try{const y=Te({key:o},i);r&&(y.v=r),(d==null?void 0:d.length)>0&&(y.libraries=d),(y.channel===void 0||y.channel<0||y.channel>999)&&delete y.channel,y.solutionChannel===void 0?y.solutionChannel=jm:y.solutionChannel===""&&delete y.solutionChannel,await nn.load(y,g=>l(g));for(const g of["core","maps",...s])await p(g);t&&t()}catch(y){n?n(y):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",y)}})()},[o,d,f]),{status:a,loadedLibraries:c,importLibrary:p}}const Rm=e=>{const{children:t}=e,n=at(e,Nm),{mapInstances:o,addMapInstance:r,removeMapInstance:s,clearMapInstances:i}=Im(),{status:a,loadedLibraries:l,importLibrary:c}=Vm(n),u=m.useMemo(()=>({mapInstances:o,addMapInstance:r,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[o,r,s,i,a,l,c]);return m.createElement(on.Provider,{value:u},t)};function Bm(e,t){for(const n of Um){const o=t[n],r=ol[n];m.useEffect(()=>{if(!e||!o)return;const s=google.maps.event.addListener(e,r,i=>{o(Fm(r,e,i))});return()=>s.remove()},[e,r,o])}}function Fm(e,t,n){const o={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if($m.includes(e)){const s=o,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(zm.includes(e)){var r;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=o;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((r=n.latLng)==null?void 0:r.toJSON())||null,placeId:n.placeId},s}return o}const ol={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},$m=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],zm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Um=Object.keys(ol);function ir(e,t){const n=m.useRef(void 0);(!n.current||!Mm(t,n.current))&&(n.current=t),m.useEffect(e,n.current)}const Xm=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Wm(e,t){const n={},o=Object.keys(t);for(const r of o)Xm.has(r)&&(n[r]=t[r]);ir(()=>{e&&e.setOptions(n)},[n])}function ar(){var e;return((e=m.useContext(on))==null?void 0:e.status)||pe.NOT_LOADED}function Gm(e,t){const{viewport:n,viewState:o}=t,r=!!n;return m.useLayoutEffect(()=>{if(!e||!o)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:c}=o;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:c+1})},[e,o]),r}function Hm(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function rl(e){return Hm(e)?e:e.toJSON()}function Km(e,t,n){const o=n.center?rl(n.center):null;let r=null,s=null;o&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&(r=o.lat,s=o.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;m.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;r!==null&&s!==null&&(t.current.center.lat!==r||t.current.center.lng!==s)&&(c.center={lat:r,lng:s},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const qm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return m.createElement("div",{style:e},m.createElement("h2",null,"Error: AuthFailure"),m.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",m.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function Ym(){const[e,t]=m.useState(null),n=m.useCallback(o=>t(o),[t]);return[e,n]}function sl(){return ar()===pe.LOADED}function Zm(){const[,e]=m.useReducer(t=>t+1,0);return e}function Jm(e,t){const n=e.getCenter(),o=e.getZoom(),r=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(o))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:o||0,heading:r,tilt:s})}function Qm(e){const t=Zm(),n=m.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return m.useEffect(()=>{if(!e)return;const o=google.maps.event.addListener(e,"bounds_changed",()=>{Jm(e,n),t()});return()=>o.remove()},[e,t]),n}const eg=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],tg=["padding"];class Ln{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}Ln.entries={};function ng(e,t){const n=sl(),[o,r]=m.useState(null),[s,i]=Ym(),a=Qm(o),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:y,renderingType:g,colorScheme:S}=e,x=at(e,eg),b=e.zoom!==void 0||e.defaultZoom!==void 0,_=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!_)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!x.center&&u&&(x.center=u),!x.zoom&&Number.isFinite(d)&&(x.zoom=d),!x.heading&&Number.isFinite(f)&&(x.heading=f),!x.tilt&&Number.isFinite(p)&&(x.tilt=p);for(const T of Object.keys(x))x[T]===void 0&&delete x[T];const P=m.useRef(void 0);return m.useEffect(()=>{if(!s||!n)return;const{addMapInstance:T,removeMapInstance:L}=t,{mapId:N}=e,M=`${N||"default"}:${g||"default"}:${S||"LIGHT"}`;let R,I;if(y&&Ln.has(M)?(I=Ln.pop(M),R=I.getDiv(),s.appendChild(R),I.setOptions(x),setTimeout(()=>I.setCenter(I.getCenter()),0)):(R=document.createElement("div"),R.style.height="100%",s.appendChild(R),I=new google.maps.Map(R,Te({},x,g?{renderingType:g}:{},S?{colorScheme:S}:{}))),r(I),T(I,l),c){const{padding:q}=c,le=at(c,tg);I.fitBounds(le,q)}else(!b||!_)&&I.fitBounds({east:180,west:-180,south:-90,north:90});if(P.current){const{mapId:q,cameraState:le}=P.current;q!==N&&I.setOptions(le)}return()=>{P.current={mapId:N,cameraState:a.current},R.remove(),y?Ln.push(M,I):google.maps.event.clearInstanceListeners(I),r(null),L(l)}},[s,n,l,e.mapId,e.renderingType,e.colorScheme]),[o,i,a]}const il=m.createContext(null),al=e=>{const{children:t,id:n,className:o,style:r}=e,s=m.useContext(on),i=ar();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=ng(e,s);Km(a,c,e),Bm(a,e),Wm(a,e);const u=Gm(a,e),d=!!e.controlled;m.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?rl(e.center):null;let p=null,y=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,y=f.lng);const g=m.useMemo(()=>{var b,_,P,T,L;return{center:{lat:(b=p)!=null?b:0,lng:(_=y)!=null?_:0},zoom:(P=e.zoom)!=null?P:0,heading:(T=e.heading)!=null?T:0,tilt:(L=e.tilt)!=null?L:0}},[p,y,e.zoom,e.heading,e.tilt]);m.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(g);const b=a.addListener("bounds_changed",()=>{a.moveCamera(g)});return()=>b.remove()},[a,d,g]);const S=m.useMemo(()=>Te({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},r),[r,u]),x=m.useMemo(()=>({map:a}),[a]);return i===pe.AUTH_FAILURE?m.createElement("div",{style:Te({position:"relative"},o?{}:S),className:o},m.createElement(qm,null)):m.createElement("div",Te({ref:l,"data-testid":"map",style:o?void 0:S,className:o},n?{id:n}:{}),a?m.createElement(il.Provider,{value:x},t):null)};al.deckGLViewProps=!0;const ll=new Set;function og(...e){const t=JSON.stringify(e);ll.has(t)||(ll.add(t),console.error(...e))}const On=(e=null)=>{const t=m.useContext(on),{map:n}=m.useContext(il)||{};if(t===null)return og("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:o}=t;return e!==null?o[e]||null:n||o.default||null};function Dn(e){const t=sl(),n=m.useContext(on);return m.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function Ct(e,t,n){m.useEffect(()=>{if(!e||!t||!n)return;const o=google.maps.event.addListener(e,t,n);return()=>o.remove()},[e,t,n])}function kn(e,t,n){m.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function cl(e,t,n){m.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function rg(e){return e.content!==void 0}function sg(e){return e.nodeType===Node.ELEMENT_NODE}const ig=m.createContext(null),ag={BOTTOM:["50%","100%"]},lg=({children:e,styles:t,className:n,anchorPoint:o})=>{const[r,s]=o??ag.BOTTOM;let i=`-${r}`,a=`-${s}`;r.trimStart().startsWith("-")&&(i=r.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return m.createElement("div",{style:{transform:l}},m.createElement("div",{className:n,style:t},e))};function cg(e){const[t,n]=m.useState(null),[o,r]=m.useState(null),s=On(),i=Dn("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:y,collisionBehavior:g,clickable:S,draggable:x,position:b,title:_,zIndex:P}=e,T=m.Children.count(a);return m.useEffect(()=>{if(!s||!i)return;const L=new i.AdvancedMarkerElement;L.map=s,n(L);let N=null;return T>0&&(N=document.createElement("div"),N.isCustomMarker=!0,L.content=N,r(N)),()=>{var M;L.map=null,(M=N)==null||M.remove(),n(null),r(null)}},[s,i,T]),m.useEffect(()=>{!t||!t.content||T>0||(t.content.className=c||"")},[t,c,T]),kn(t,"position",b),kn(t,"title",_??""),kn(t,"zIndex",P),kn(t,"collisionBehavior",g),m.useEffect(()=>{t&&(x!==void 0?t.gmpDraggable=x:f||p||y?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,x,f,y,p]),m.useEffect(()=>{if(!t)return;const L=S!==void 0||!!l||!!u||!!d;t.gmpClickable=L,L&&t!=null&&t.content&&sg(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),Ct(t,"click",l),Ct(t,"drag",f),Ct(t,"dragstart",p),Ct(t,"dragend",y),cl(t==null?void 0:t.element,"mouseenter",u),cl(t==null?void 0:t.element,"mouseleave",d),[t,o]}m.forwardRef((e,t)=>{const{children:n,style:o,className:r,anchorPoint:s}=e,[i,a]=cg(e),l=m.useMemo(()=>i?{marker:i}:null,[i]);return m.useImperativeHandle(t,()=>i,[i]),a?m.createElement(ig.Provider,{value:l},Ee.createPortal(m.createElement(lg,{anchorPoint:s,styles:o,className:r},n),a)):null});function ug(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const o=e.style;if(n==null){if(t==null)return;for(const r in t)t.hasOwnProperty(r)&&ul(o,r,t[r]);return}for(const r in n)n.hasOwnProperty(r)&&(t==null||!t.hasOwnProperty(r))&&(r.indexOf("--")===0?o.setProperty(r,""):r==="float"?o.cssFloat="":o[r]="");if(t!=null)for(const r in t){const s=t[r];t.hasOwnProperty(r)&&n[r]!==s&&ul(o,r,s)}}function ul(e,t,n){const o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n=="number"&&n!==0&&!fg(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const dg=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function fg(e){return dg.has(e)}const hg=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],pg=e=>{const{children:t,headerContent:n,style:o,className:r,pixelOffset:s,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=at(e,hg),d=Dn("maps"),[f,p]=m.useState(null),y=m.useRef(null),g=m.useRef(null);m.useEffect(()=>{if(!d)return;y.current=document.createElement("div"),g.current=document.createElement("div");const b=u;s&&(b.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(b.headerContent=typeof n=="string"?n:g.current);const _=new google.maps.InfoWindow(u);return _.setContent(y.current),p(_),()=>{var P,T;_.setContent(null),(P=y.current)==null||P.remove(),(T=g.current)==null||T.remove(),y.current=null,g.current=null,p(null)}},[d]);const S=m.useRef(null);m.useEffect(()=>{!f||!y.current||(ug(y.current,o||null,S.current),S.current=o||null,r!==y.current.className&&(y.current.className=r||""))},[f,r,o]),ir(()=>{if(!f)return;const b=u;s?b.pixelOffset=new google.maps.Size(s[0],s[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:g.current:b.headerContent=null,f.setOptions(u)},[u,s,n]),Ct(f,"close",l),Ct(f,"closeclick",c);const x=On();return ir(()=>{if(!x||!f||i===null)return;const b=!!i,_={map:x};if(i&&(_.anchor=i,rg(i)&&i.content instanceof Element)){const T=i.content,L=T==null?void 0:T.getBoundingClientRect();if(L&&T!=null&&T.isCustomMarker){var P;const N=(P=i.content.firstElementChild)==null?void 0:P.firstElementChild,M=N==null?void 0:N.getBoundingClientRect(),R=M.x-L.x+(M.width-L.width)/2,I=M.y-L.y,q=u;q.pixelOffset=new google.maps.Size(s?s[0]+R:R,s?s[1]+I:I),f.setOptions(q)}}return a!==void 0&&(_.shouldFocus=a),f.open(_),()=>{b&&f.set("anchor",null),f.close()}},[f,i,x,a,u,s]),m.createElement(m.Fragment,null,y.current&&Ee.createPortal(t,y.current),g.current!==null&&Ee.createPortal(n,g.current))},mg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function gg(e){const[t,n]=m.useState(null),o=On(),{onClick:r,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=at(e,mg),{position:d,draggable:f}=u;return m.useEffect(()=>{if(!o){o===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(u);return p.setMap(o),n(p),()=>{p.setMap(null),n(null)}},[o]),m.useEffect(()=>{if(!t)return;const p=t,y=google.maps.event;return r&&y.addListener(p,"click",r),s&&y.addListener(p,"drag",s),i&&y.addListener(p,"dragstart",i),a&&y.addListener(p,"dragend",a),l&&y.addListener(p,"mouseover",l),c&&y.addListener(p,"mouseout",c),t.setDraggable(!!f),()=>{y.clearInstanceListeners(p)}},[t,f,r,s,i,a,l,c]),m.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),m.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const dl=m.forwardRef((e,t)=>{const n=gg(e);return m.useImperativeHandle(t,()=>n,[n]),m.createElement(m.Fragment,null)});function yg(){const[e,t]=m.useState(null);return[m.useCallback(o=>{t(o)},[]),e]}const Ke={root:"_root_faay1_10",header:"_header_faay1_18",body:"_body_faay1_31",highlighted:"_highlighted_faay1_43",toggleButton:"_toggleButton_faay1_46",toggleButtonIcon:"_toggleButtonIcon_faay1_46"};function vg({onLocationSelect:e}){var y;const t=$a("locationCard"),n=k(g=>g.locations),{labels:o}=k(g=>g.localizationConfig),r=k(g=>g.isLocationListExpanded),s=k(g=>g.setIsLocationListExpanded),i=k(g=>g.selectedLocation),a=k(g=>g.setSelectedLocation),l=m.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=(y=c==null?void 0:c.split)==null?void 0:y.call(c,/(\{:\d\})/g),f=m.useMemo(()=>(d??[]).map((g,S)=>g==="{:1}"?v.jsx("span",{className:Ke.highlighted,children:(n==null?void 0:n.length)??0},S):g==="{:2}"?v.jsx("span",{className:Ke.highlighted,children:u},S):g),[u,n.length,d]);function p(g){return()=>{e==null||e(g.coords),a==null||a(g.id)}}return m.useEffect(()=>{if(i&&r){const g=l.current[i];g!=null&&g.current&&requestAnimationFrame(()=>{const S=window.scrollY;g.current.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollTo({top:S,behavior:"auto"})})}},[i,r]),v.jsxs("div",{className:W("dyn-locator__location-list",Ke.root),"data-expanded":r,children:[v.jsxs("header",{className:Ke.header,onClick:()=>s(!r),role:"button","aria-expanded":r,children:[v.jsx("span",{children:f}),v.jsx(Ue,{className:Ke.toggleButton,variant:"bare",children:v.jsx(we,{className:Ke.toggleButtonIcon,animate:!1,icon:"ChevronUp"})})]}),v.jsx("div",{className:Ke.body,children:n!=null&&n.length?n.map(g=>{const S=g.id;l.current[S]||(l.current[S]=m.createRef());const x=l.current[S];return v.jsx(t,{ref:x,"data-active":i===g.id,onClick:p(g),...g},g.id)}):v.jsx("div",{className:Ke.noResults,children:o["LocationList.noResults"]})})]})}const Ne={root:"_root_b3glo_21",loaderContainer:"_loaderContainer_b3glo_29",fullscreenButton:"_fullscreenButton_b3glo_36",backButton:"_backButton_b3glo_37",areaSearchButton:"_areaSearchButton_b3glo_52",visualCue:"_visualCue_b3glo_77",closeButton:"_closeButton_b3glo_102",searchButton:"_searchButton_b3glo_120"},Nn={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function xg({id:e,title:t,address:n,coords:o,actions:r,onClick:s,onRightButtonClick:i}){var p;const{labels:a}=k(y=>y.localizationConfig),l=k(y=>y.selectedLocation),c=k(y=>y.setSelectedLocation),[u,d]=yg(),f=m.useCallback(()=>{c==null||c("")},[c]);return v.jsxs(v.Fragment,{children:[v.jsx(dl,{ref:u,position:o,onClick:()=>{s==null||s()}}),l===e?v.jsxs(pg,{anchor:d,headerContent:t,onCloseClick:f,className:Nn.root,children:[v.jsxs("header",{className:Nn.header,children:[v.jsx("h6",{children:t}),v.jsx("address",{children:n})]}),v.jsx("div",{className:Nn.body,children:v.jsxs("div",{className:Nn.cta,children:[v.jsx(Jt,{animate:!1,variant:"secondary",size:"small",...Ca((p=r==null?void 0:r.find)==null?void 0:p.call(r,y=>y.type==="navigate")),children:a["InfoWindow.CTA_1"]}),v.jsx(Jt,{animate:!1,variant:"secondary",size:"small",onClick:i,children:a["InfoWindow.CTA_2"]})]})})]}):null]})}function bg(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Sg(e){return"title"in e&&!("size"in e)}function _g(){var A;const[e,t]=m.useState({zoom:_a}),[n,o]=m.useState(!1),[r,s]=m.useState("inactive"),i=m.useRef(""),a=ar(),{request:l,loading:c}=Mn(Qt.FIND),u=k(w=>w.mapId),d=k(w=>w.featureFlags),{labels:f}=k(w=>w.localizationConfig),p=k(w=>w.locations),y=k(w=>w.setLocations),g=k(w=>w.targetLocation),S=k(w=>w.clearTargetLocation),x=k(w=>w.mapDetail),b=k(w=>w.setMapDetail),_=k(w=>w.isFullscreen),P=k(w=>w.setFullscreen),T=k(w=>w.isLocationListExpanded),L=k(w=>w.setIsLocationListExpanded),N=k(w=>w.shouldRefetch),M=k(w=>w.setShouldRefetch),R=k(w=>w.setSelectedLocation),I=x===Ye.MARKER;function q({detail:w}){const{center:F,zoom:Q}=w;t({center:F,zoom:Q}),n||o(!0)}function le(){n&&e.center&&r==="inactive"&&s("active")}function re(w){t(F=>({center:w,zoom:F.zoom}))}function ce(){s("inactive"),R(""),L(!1),b(Ye.CLUSTER),t({center:tp,zoom:_a}),M(!0)}const O=m.useCallback(async()=>{if(!e.center)return;const{lat:w,lng:F}=e.center,Q={location:{type:"Feature",geometry:{type:"Point",coordinates:[F,w]},properties:{distance:Qh}}};try{const{data:X}=await l({mapId:u},{body:Q})??{};if(!(X!=null&&X.pins))throw new Error("No locations found");y(X.pins),b(Ye.MARKER),s("inactive")}catch(X){console.error("Error finding locations in this area: ",X),K.error(rt+Hh)}},[e.center,l,b,u,y]);function me(w){function F(){t({center:w.coords,zoom:18}),T||L(!0)}if(bg(w))return v.jsx(dl,{position:w.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(w.range??0)/Jh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await w.onMarkerClick(),t({center:w.coords,zoom:w.zoom||15})}},w.id);if(Sg(w))return v.jsx(xg,{id:w.id,title:w.title??"No title",address:w.address??"No address",coords:w.coords,actions:w.actions,onRightButtonClick:F,onClick:()=>{R(w.id)}},w.id)}if(m.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),m.useEffect(()=>{g&&(t({center:g.coords,zoom:g.zoom}),S())},[g,S]),a===pe.LOADING)return v.jsx("div",{className:W("dyn-locator__map",Ne.root),children:v.jsx("div",{className:Ne.loaderContainer,children:v.jsx(Lt,{size:"large"})})});if(a===pe.FAILED||a===pe.AUTH_FAILURE)throw new Error(Gh);if(a===pe.LOADED)return v.jsxs("div",{className:W("dyn-locator__map",Ne.root),children:[d.fullscreen?v.jsx(Ue,{className:W(Ne.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>P==null?void 0:P(!_),children:v.jsx(we,{size:"M",icon:_?"Close":"Expand"})}):null,I?v.jsx(Ue,{className:W(Ne.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:ce,children:v.jsx(we,{size:"M",icon:"ArrowLeft"})}):null,r!=="inactive"&&v.jsxs(Jt,{className:W(Ne.areaSearchButton,"dyn-locator__map__area-search-button",I&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||r==="select_area",loading:c,onClick:()=>s("select_area"),children:[v.jsx(lc,{}),f["Map.areaSearchButton"]]}),r==="select_area"&&v.jsxs("div",{className:Ne.visualCue,children:[v.jsxs("i",{children:[v.jsx("button",{className:Ne.closeButton,onClick:()=>s("active"),"aria-label":"Close area search",children:v.jsx(Tr,{size:16})}),v.jsx(cc,{size:48,strokeWidth:1,color:"currentColor"})]}),v.jsxs(Jt,{className:Ne.searchButton,disabled:c,loading:c,onClick:O,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",v.jsx(Jl,{size:22,style:{position:"relative",left:-8}})]})]}),v.jsx(al,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:q,onDragend:le,defaultBounds:Zt,children:!N&&((A=p==null?void 0:p.map)==null?void 0:A.call(p,me))}),I?v.jsx(vg,{onLocationSelect:re}):null]})}const je={root:"_root_1nmik_10",validIcon:"_validIcon_1nmik_20",errorIcon:"_errorIcon_1nmik_27",label:"_label_1nmik_48",input:"_input_1nmik_58",sideButton:"_sideButton_1nmik_89",sideOrnament:"_sideOrnament_1nmik_92",clearButton:"_clearButton_1nmik_126",dropdown:"_dropdown_1nmik_166"},fl="Input";function hl({label:e,className:t,showValidation:n=!0,error:o=!1,valid:r=!1,clearable:s=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:p,sideOrnament:y,...g},S){const x=a?ot.div:"div",b=ze(g)??[],_=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return v.jsxs(x,{className:W("dyn-locator__"+Le(fl),je.root,Me(t),...b??[]),"data-valid":r,"data-error":o,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},..._,children:[n&&v.jsxs(v.Fragment,{children:[r&&v.jsx("span",{className:je.validIcon}),o&&v.jsx("span",{className:je.errorIcon})]}),e?v.jsx("label",{className:je.label,...g.id?{htmlFor:g.id}:{},children:e}):null,y?v.jsx("span",{className:je.sideOrnament,children:y}):null,v.jsx("input",{ref:S,className:W(je.input),"aria-label":d,"aria-invalid":o,"data-side-button":!!p,"data-side-ornament":!!y,...g}),p?v.jsx("span",{className:je.sideButton,children:p}):null,s&&(g==null?void 0:g.value)&&v.jsx("button",{className:je.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&v.jsx("div",{className:je.dropdown,children:c})]})}hl.displayName=fl;const Cg=m.forwardRef(hl),lt={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function wg(){const[e,t]=m.useState(""),[n,o]=m.useState([]),[r,s]=m.useState(!1),[i,a]=m.useState(!1),[l,c]=m.useState(!1),u=k(A=>A.mapId),d=k(A=>A.setLocations),f=k(A=>A.setMapDetail),p=k(A=>A.zoomToLocation),{labels:y}=k(A=>A.localizationConfig),{search:g}=k(A=>A.featureFlags),{request:S,loading:x}=Mn(Qt.FIND),b=Dn("places"),_=Dn("geocoding"),P=On(),T=m.useRef(null),L=m.useRef(null),N=m.useRef(null),M=m.useRef(null);m.useEffect(()=>{_&&(N.current||(N.current=new _.Geocoder))},[_]),m.useEffect(()=>{b&&(T.current||(T.current=new b.AutocompleteService),M.current||(M.current=new b.AutocompleteSessionToken))},[b]),m.useEffect(()=>{!b||!P||L.current||(L.current=new b.PlacesService(P))},[b,P]);const R=m.useCallback(np(async A=>{var w;if(!A||A.length<3){o([]),s(!1);return}a(!0);try{if(!b||!T.current)throw new Error("Places library or Autocomplete Service not available");const F=await T.current.getPlacePredictions({input:A,...M.current?{sessionToken:M.current}:{}});if(a(!1),!((w=F==null?void 0:F.predictions)!=null&&w.length)){o([]),s(!1);return}o(F.predictions),s(!0)}catch(F){console.error("Error fetching predictions: ",F),a(!1),o([]),s(!1),K.error(rt+Xh)}},ep),[b]),I=A=>{const w=A.currentTarget.value;if(t(w),!w||w.length<3){o([]),s(!1);return}R(w)},q=async A=>{var w,F,Q,X,Ie;t(A.description),s(!1);try{if(!b||!L.current)throw new Error("Places library or Places Service not available");const ne=await new Promise((qe,rn)=>{L.current.getDetails({placeId:A.place_id,fields:["geometry","address_components","formatted_address"],...M.current?{sessionToken:M.current}:{}},(ct,wt)=>{if(wt===b.PlacesServiceStatus.OK&&ct){qe(ct);try{Xe.isEventEnabled(ve.AUTOCOMPLETE_ITEM_SELECT)&&Xe.track(ve.AUTOCOMPLETE_ITEM_SELECT,{label:A.description,...op(ct)})}catch(Tt){console.error(`Could not track event: "${ve.AUTOCOMPLETE_ITEM_SELECT}"`,Tt)}}else rn(new Error(`Place details request failed with status: ${wt}`))})});if((w=ne==null?void 0:ne.geometry)!=null&&w.location){const qe=(Q=(F=ne.geometry.location).lat)==null?void 0:Q.call(F),rn=(Ie=(X=ne.geometry.location).lng)==null?void 0:Ie.call(X);await O({lat:qe,lng:rn})}}catch(ne){console.error("Error getting place details:",ne),K.error(rt+Wh)}finally{b&&(M.current=new b.AutocompleteSessionToken)}},le=()=>{t(""),o([]),s(!1)},re=()=>!r||n.length===0?null:v.jsx("div",{className:lt.predictionsContainer,children:i?v.jsx("div",{className:lt.loadingItem,children:v.jsx(Lt,{size:"medium"})}):n.map(A=>v.jsx("div",{className:lt.predictionItem,onClick:()=>q(A),children:A.description},A.place_id))});async function ce(A){A.preventDefault(),c(!0);try{const w=await new Promise((X,Ie)=>{navigator.geolocation.getCurrentPosition(ne=>X(ne),ne=>Ie(ne),{timeout:5e3})}),F={lat:w.coords.latitude,lng:w.coords.longitude};if(await O(F),!_||!(N!=null&&N.current)||!P)throw new Error("Geocoding library or Geocoder not available");const Q=await new Promise((X,Ie)=>{N.current.geocode({location:F},(ne,qe)=>{qe===google.maps.GeocoderStatus.OK&&ne&&ne.length>0?X(ne):Ie(new Error(`Geocoding failed with status: ${qe}`))})});Q&&Q[0]&&t(Q[0].formatted_address)}catch(w){console.error("Error getting location: ",w);const F=w instanceof GeolocationPositionError?rt+w.message:rt+zh;K.error(F)}finally{c(!1)}}async function O(A){const{lng:w,lat:F}=A,Q={location:{type:"Feature",geometry:{type:"Point",coordinates:[w,F]},properties:{}}};try{const{data:X}=await S({mapId:u},{body:Q})??{};if(!(X!=null&&X.pins))throw new Error("No locations found");d(X.pins),f(Ye.MARKER),p({lat:F,lng:w},X.zoom||15)}catch(X){throw console.error("Error finding locations: ",X),X}}const me=x||l;return g?v.jsxs("div",{className:W("dyn-locator__search",lt.root),children:[v.jsx(Cg,{name:"locator_search_field",className:W("dyn-locator__search__field",lt.input),value:e,onChange:I,placeholder:y["Search.placeholder"],dropdown:re(),dropdownVisible:r,disabled:me,sideOrnament:e?void 0:v.jsx(we,{className:lt.sideOrnament,icon:"Search",size:"M"}),sideButton:e?v.jsx(Ue,{variant:"bare",className:lt.clearButton,onClick:le,"aria-label":"Clear",children:v.jsx(we,{icon:"Close",size:"M"})}):v.jsx(Ea,{href:"#",onClick:ce,children:y["Search.geolocationButton"]})}),v.jsx(rr,{show:me,children:v.jsx(Lt,{size:"medium"})})]}):null}function Tg({children:e,apiKey:t,language:n,region:o,libraries:r}){return v.jsx(Rm,{apiKey:t,region:o,language:n,libraries:r,children:e})}const Eg=Object.freeze(Object.defineProperty({__proto__:null,default:Tg},Symbol.toStringTag,{value:"Module"}));function Pg(){throw new Error("Mapbox provider is not implemented yet")}const Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Pg},Symbol.toStringTag,{value:"Module"}));function Mg(){throw new Error("HERE Maps provider is not implemented yet")}const Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Mg},Symbol.toStringTag,{value:"Module"}));ee.Map=_g,ee.Search=wg,ee.TrackingEvent=ve,ee.default=tl,ee.trackingService=Xe,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
315
315
  //# sourceMappingURL=index.umd.js.map