var yn,W,aa,Fs,ct,Wo,sa,zr,ua,un={},ca=[],Hs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,rr=Array.isArray;function Ye(e,t){for(var n in t)e[n]=t[n];return e}function la(e){var t=e.parentNode;t&&t.removeChild(e)}function te(e,t,n){var r,o,i,a={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?yn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return rn(e,a,r,o,null)}function rn(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++aa,__i:-1,__u:0};return o==null&&W.vnode!=null&&W.vnode(i),i}function uo(){return{current:null}}function De(e){return e.children}function Pe(e,t){this.props=e,this.context=t}function Nt(e,t){if(t==null)return e.__?Nt(e.__,e.__i+1):null;for(var n;tt&&ct.sort(zr));In.__r=0}function fa(e,t,n,r,o,i,a,u,s,l,d){var c,f,h,p,m,y=r&&r.__k||ca,_=t.length;for(n.__d=s,Bs(n,t,y),s=n.__d,c=0;c<_;c++)(h=n.__k[c])!=null&&typeof h!="boolean"&&typeof h!="function"&&(f=h.__i===-1?un:y[h.__i]||un,h.__i=c,co(e,h,f,o,i,a,u,s,l,d),p=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&lo(f.ref,null,h),d.push(h.ref,h.__c||p,h)),m==null&&p!=null&&(m=p),65536&h.__u||f.__k===h.__k?s=ha(h,s,e):typeof h.type=="function"&&h.__d!==void 0?s=h.__d:p&&(s=p.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=s,n.__e=m}function Bs(e,t,n){var r,o,i,a,u,s=t.length,l=n.length,d=l,c=0;for(e.__k=[],r=0;r0?rn(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,u=Us(o,n,a=r+c,d),o.__i=u,i=null,u!==-1&&(d--,(i=n[u])&&(i.__u|=131072)),i==null||i.__v===null?(u==-1&&c--,typeof o.type!="function"&&(o.__u|=65536)):u!==a&&(u===a+1?c++:u>a?d>s-a?c+=u-a:c--:c=u(s!=null&&!(131072&s.__u)?1:0))for(;a>=0||u=0){if((s=t[a])&&!(131072&s.__u)&&o==s.key&&i===s.type)return a;a--}if(u2&&(u.children=arguments.length>3?yn.call(arguments,2):n),rn(e.type,u,r||e.key,o||e.ref,null)}function be(e,t){var n={__c:t="__cC"+ua++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(u){u.__e=!0,jr(u)})},this.sub=function(a){o.push(a);var u=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),u&&u.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}yn=ca.slice,W={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(u){e=u}throw e}},aa=0,Fs=function(e){return e!=null&&e.constructor==null},Pe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ye({},this.state),typeof e=="function"&&(e=e(Ye({},n),this.props)),e&&Ye(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),jr(this))},Pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),jr(this))},Pe.prototype.render=De,ct=[],sa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zr=function(e,t){return e.__v.__b-t.__v.__b},In.__r=0,ua=0;var Je,oe,gr,Zo,kt=0,_a=[],Rn=[],Vo=W.__b,Jo=W.__r,Xo=W.diffed,Qo=W.__c,ei=W.unmount;function pt(e,t){W.__h&&W.__h(oe,e,kt||t),kt=0;var n=oe.__H||(oe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Rn}),n.__[e]}function me(e){return kt=1,or(va,e)}function or(e,t,n){var r=pt(Je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):va(void 0,t),function(u){var s=r.__N?r.__N[0]:r.__[0],l=r.t(s,u);s!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=oe,!oe.u)){var o=function(u,s,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!i||i.call(this,u,s,l);var c=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(c=!0)}}),!(!c&&r.__c.props===u)&&(!i||i.call(this,u,s,l))};oe.u=!0;var i=oe.shouldComponentUpdate,a=oe.componentWillUpdate;oe.componentWillUpdate=function(u,s,l){if(this.__e){var d=i;i=void 0,o(u,s,l),i=d}a&&a.call(this,u,s,l)},oe.shouldComponentUpdate=o}return r.__N||r.__}function ie(e,t){var n=pt(Je++,3);!W.__s&&ho(n.__H,t)&&(n.__=e,n.i=t,oe.__H.__h.push(n))}function Xe(e,t){var n=pt(Je++,4);!W.__s&&ho(n.__H,t)&&(n.__=e,n.i=t,oe.__h.push(n))}function q(e){return kt=5,ae(function(){return{current:e}},[])}function ir(e,t,n){kt=6,Xe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ae(e,t){var n=pt(Je++,7);return ho(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function _e(e,t){return kt=8,ae(function(){return e},t)}function ne(e){var t=oe.context[e.__c],n=pt(Je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(oe)),t.props.value):e.__}function fo(e,t){W.useDebugValue&&W.useDebugValue(t?t(e):e)}function Gs(e){var t=pt(Je++,10),n=me();return t.__=e,oe.componentDidCatch||(oe.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function ya(){var e=pt(Je++,11);if(!e.__){for(var t=oe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ys(){for(var e;e=_a.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ln),e.__H.__h.forEach(Hr),e.__H.__h=[]}catch(t){e.__H.__h=[],W.__e(t,e.__v)}}W.__b=function(e){oe=null,Vo&&Vo(e)},W.__r=function(e){Jo&&Jo(e),Je=0;var t=(oe=e.__c).__H;t&&(gr===oe?(t.__h=[],oe.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Rn,n.__N=n.i=void 0})):(t.__h.forEach(Ln),t.__h.forEach(Hr),t.__h=[],Je=0)),gr=oe},W.diffed=function(e){Xo&&Xo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(_a.push(t)!==1&&Zo===W.requestAnimationFrame||((Zo=W.requestAnimationFrame)||Zs)(Ys)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Rn&&(n.__=n.__V),n.i=void 0,n.__V=Rn})),gr=oe=null},W.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ln),n.__h=n.__h.filter(function(r){return!r.__||Hr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],W.__e(r,n.__v)}}),Qo&&Qo(e,t)},W.unmount=function(e){ei&&ei(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ln(r)}catch(o){t=o}}),n.__H=void 0,t&&W.__e(t,n.__v))};var ti=typeof requestAnimationFrame=="function";function Zs(e){var t,n=function(){clearTimeout(r),ti&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ti&&(t=requestAnimationFrame(n))}function Ln(e){var t=oe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),oe=t}function Hr(e){var t=oe;e.__c=e.__(),oe=t}function ho(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function va(e,t){return typeof t=="function"?t(e):t}function ga(e,t){for(var n in t)e[n]=t[n];return e}function Br(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Nn(e){this.props=e}function vn(e,t){function n(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Br(this.props,o)}function r(o){return this.shouldComponentUpdate=n,te(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Nn.prototype=new Pe).isPureReactComponent=!0,Nn.prototype.shouldComponentUpdate=function(e,t){return Br(this.props,e)||Br(this.state,t)};var ni=W.__b;W.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ni&&ni(e)};var Vs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function it(e){function t(n){var r=ga({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Vs,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ri=function(e,t){return e==null?null:Ve(Ve(e).map(t))},ar={map:ri,forEach:ri,count:function(e){return e?Ve(e).length:0},only:function(e){var t=Ve(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ve},Js=W.__e;W.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Js(e,t,n,r)};var oi=W.unmount;function wa(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ga({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return wa(r,t,n)})),e}function ba(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return ba(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function on(){this.__u=0,this.t=null,this.__b=null}function Ea(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Sa(e){var t,n,r;function o(i){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return te(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Mt(){this.u=null,this.o=null}W.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),oi&&oi(e)},(on.prototype=new Pe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Ea(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var s=r.state.__a;r.__v.__k[0]=ba(s,s.__c.__P,s.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.t.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},on.prototype.componentWillUnmount=function(){this.t=[]},on.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=wa(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&te(De,null,e.fallback);return o&&(o.__u&=-33),[te(De,null,t.__a?null:e.children),o]};var ii=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),cn(te(Xs,{context:t.context},e.__v),t.l)}function ln(e,t){var n=te(Qs,{__v:e,i:t});return n.containerInfo=t,n}(Mt.prototype=new Pe).__a=function(e){var t=this,n=Ea(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),ii(t,e,r)):o()};n?n(i):i()}},Mt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ve(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Mt.prototype.componentDidUpdate=Mt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ii(e,n,t)})};var Ta=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,eu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,nu=/[A-Z0-9]/g,ru=typeof document<"u",ou=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function xa(e,t,n){return t.__k==null&&(t.textContent=""),cn(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ca(e,t,n){return ma(e,t),typeof n=="function"&&n(),e?e.__c:null}Pe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Pe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ai=W.event;function iu(){}function au(){return this.cancelBubble}function su(){return this.defaultPrevented}W.event=function(e){return ai&&(e=ai(e)),e.persist=iu,e.isPropagationStopped=au,e.isDefaultPrevented=su,e.nativeEvent=e};var po,uu={enumerable:!1,configurable:!0,get:function(){return this.class}},si=W.vnode;W.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||ru&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var u=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===!0?a="":u==="ondoubleclick"?i="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||ou(n.type)?u==="onfocus"?i="onfocusin":u==="onblur"?i="onfocusout":tu.test(i)?i=u:r.indexOf("-")===-1&&eu.test(i)?i=i.replace(nu,"-$&").toLowerCase():a===null&&(a=void 0):u=i="oninput",u==="oninput"&&o[i=u]&&(i="oninputCapture"),o[i]=a}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Ve(n.children).forEach(function(s){s.props.selected=o.value.indexOf(s.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=Ve(n.children).forEach(function(s){s.props.selected=o.multiple?o.defaultValue.indexOf(s.props.value)!=-1:o.defaultValue==s.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",uu)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Ta,si&&si(e)};var ui=W.__r;W.__r=function(e){ui&&ui(e),po=e.__c};var ci=W.diffed;W.diffed=function(e){ci&&ci(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),po=null};var Aa={ReactCurrentDispatcher:{current:{readContext:function(e){return po.__n[e.__c].props.value}}}},cu="17.0.2";function Ma(e){return te.bind(null,e)}function Ht(e){return!!e&&e.$$typeof===Ta}function Oa(e){return Ht(e)&&e.type===De}function sr(e){return Ht(e)?qs.apply(null,arguments):e}function Pa(e){return!!e.__k&&(cn(null,e),!0)}function Ra(e){return e&&(e.base||e.nodeType===1&&e)||null}var mo=function(e,t){return e(t)},_o=function(e,t){return e(t)},La=De;function yo(e){e()}function Da(e){return e}function Ia(){return[!1,yo]}var Na=Xe,ka=Ht;function $a(e,t){var n=t(),r=me({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Xe(function(){o.__=n,o.v=t,wr(o)&&i({h:o})},[e,n,t]),ie(function(){return wr(o)&&i({h:o}),e(function(){wr(o)&&i({h:o})})},[e]),n}function wr(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Ot={useState:me,useId:ya,useReducer:or,useEffect:ie,useLayoutEffect:Xe,useInsertionEffect:Na,useTransition:Ia,useDeferredValue:Da,useSyncExternalStore:$a,startTransition:yo,useRef:q,useImperativeHandle:ir,useMemo:ae,useCallback:_e,useContext:ne,useDebugValue:fo,version:"17.0.2",Children:ar,render:xa,hydrate:Ca,unmountComponentAtNode:Pa,createPortal:ln,createElement:te,createContext:be,createFactory:Ma,cloneElement:sr,createRef:uo,Fragment:De,isValidElement:Ht,isElement:ka,isFragment:Oa,findDOMNode:Ra,Component:Pe,PureComponent:Nn,memo:vn,forwardRef:it,flushSync:_o,unstable_batchedUpdates:mo,StrictMode:La,Suspense:on,SuspenseList:Mt,lazy:Sa,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Aa};const kn=Object.freeze(Object.defineProperty({__proto__:null,Children:ar,Component:Pe,Fragment:De,PureComponent:Nn,StrictMode:La,Suspense:on,SuspenseList:Mt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Aa,cloneElement:sr,createContext:be,createElement:te,createFactory:Ma,createPortal:ln,createRef:uo,default:Ot,findDOMNode:Ra,flushSync:_o,forwardRef:it,hydrate:Ca,isElement:ka,isFragment:Oa,isValidElement:Ht,lazy:Sa,memo:vn,render:xa,startTransition:yo,unmountComponentAtNode:Pa,unstable_batchedUpdates:mo,useCallback:_e,useContext:ne,useDebugValue:fo,useDeferredValue:Da,useEffect:ie,useErrorBoundary:Gs,useId:ya,useImperativeHandle:ir,useInsertionEffect:Na,useLayoutEffect:Xe,useMemo:ae,useReducer:or,useRef:q,useState:me,useSyncExternalStore:$a,useTransition:Ia,version:cu},Symbol.toStringTag,{value:"Module"}));/** * @remix-run/router v1.2.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function $n(){return $n=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function du(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fu(){return Math.random().toString(36).substr(2,8)}function di(e){return{usr:e.state,key:e.key}}function Ur(e,t,n,r){return n===void 0&&(n=null),$n({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?mt(t):t,{state:n,key:t&&t.key||r||fu()})}function vo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function mt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function hu(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,n=typeof e=="string"?e:vo(e);return ye(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function pu(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,u=tt.Pop,s=null;function l(){u=tt.Pop,s&&s({action:u,location:f.location})}function d(h,p){u=tt.Push;let m=Ur(f.location,h,p);n&&n(m,h);let y=di(m),_=f.createHref(m);try{a.pushState(y,"",_)}catch{o.location.assign(_)}i&&s&&s({action:u,location:f.location})}function c(h,p){u=tt.Replace;let m=Ur(f.location,h,p);n&&n(m,h);let y=di(m),_=f.createHref(m);a.replaceState(y,"",_),i&&s&&s({action:u,location:f.location})}let f={get action(){return u},get location(){return e(o,a)},listen(h){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(li,l),s=h,()=>{o.removeEventListener(li,l),s=null}},createHref(h){return t(o,h)},encodeLocation(h){let p=hu(typeof h=="string"?h:vo(h));return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:c,go(h){return a.go(h)}};return f}var fi;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fi||(fi={}));function mu(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?mt(t):t,o=Fa(r.pathname||"/",n);if(o==null)return null;let i=za(e);_u(i);let a=null;for(let u=0;a==null&&u{let s={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};s.relativePath.startsWith("/")&&(ye(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let l=dt([r,s.relativePath]),d=n.concat(s);i.children&&i.children.length>0&&(ye(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),za(i.children,t,d,l)),!(i.path==null&&!i.index)&&t.push({path:l,score:Su(l,i.index),routesMeta:d})};return e.forEach((i,a)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))o(i,a);else for(let s of ja(i.path))o(i,a,s)}),t}function ja(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=ja(r.join("/")),u=[];return u.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&u.push(...a),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function _u(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Tu(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const yu=/^:\w+$/,vu=3,gu=2,wu=1,bu=10,Eu=-2,hi=e=>e==="*";function Su(e,t){let n=e.split("/"),r=n.length;return n.some(hi)&&(r+=Eu),t&&(r+=gu),n.filter(o=>!hi(o)).reduce((o,i)=>o+(yu.test(i)?vu:i===""?wu:bu),r)}function Tu(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function xu(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a{if(d==="*"){let f=u[c]||"";a=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return l[d]=Ou(u[c]||"",d),l},{}),pathname:i,pathnameBase:a,pattern:e}}function Au(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),go(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,u)=>(r.push(u),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Mu(e){try{return decodeURI(e)}catch(t){return go(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ou(e,t){try{return decodeURIComponent(e)}catch(n){return go(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Fa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function go(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Pu(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?mt(e):e;return{pathname:n?n.startsWith("/")?n:Ru(n,t):t,search:Nu(r),hash:ku(o)}}function Ru(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function br(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Lu(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Du(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=mt(e):(o=$n({},e),ye(!o.pathname||!o.pathname.includes("?"),br("?","pathname","search",o)),ye(!o.pathname||!o.pathname.includes("#"),br("#","pathname","hash",o)),ye(!o.search||!o.search.includes("#"),br("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,u;if(r||a==null)u=n;else{let c=t.length-1;if(a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),c-=1;o.pathname=f.join("/")}u=c>=0?t[c]:"/"}let s=Pu(o,u),l=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(l||d)&&(s.pathname+="/"),s}const dt=e=>e.join("/").replace(/\/\/+/g,"/"),Iu=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Nu=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ku=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class $u{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function zu(e){return e instanceof $u}const Ha=["post","put","patch","delete"],wh=new Set(Ha),ju=["get",...Ha],bh=new Set(ju);const Eh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";/** * React Router v6.6.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.value=r,o.getSnapshot=t,Er(o)&&i({inst:o})},[e,r,t]),Uu(()=>(Er(o)&&i({inst:o}),e(()=>{Er(o)&&i({inst:o})})),[e]),Wu(r),r}function Er(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!Hu(n,r)}catch{return!0}}function Gu(e,t,n){return t()}const Yu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Zu=!Yu,Vu=Zu?Gu:qu,Sh="useSyncExternalStore"in kn?(e=>e.useSyncExternalStore)(kn):Vu,Ba=be(null),Ua=be(null);const wo=be(null),ur=be(null),Bt=be({outlet:null,matches:[]}),Ka=be(null);function cr(){return ne(ur)!=null}function bo(){return cr()||ye(!1),ne(ur).location}function Ju(){cr()||ye(!1);let{basename:e,navigator:t}=ne(wo),{matches:n}=ne(Bt),{pathname:r}=bo(),o=JSON.stringify(Lu(n).map(u=>u.pathnameBase)),i=q(!1);return ie(()=>{i.current=!0}),_e(function(u,s){if(s===void 0&&(s={}),!i.current)return;if(typeof u=="number"){t.go(u);return}let l=Du(u,JSON.parse(o),r,s.relative==="path");e!=="/"&&(l.pathname=l.pathname==="/"?e:dt([e,l.pathname])),(s.replace?t.replace:t.push)(l,s.state,s)},[e,t,o,r])}function Th(){let{matches:e}=ne(Bt),t=e[e.length-1];return t?t.params:{}}function Xu(e,t){cr()||ye(!1);let{navigator:n}=ne(wo),r=ne(Ua),{matches:o}=ne(Bt),i=o[o.length-1],a=i?i.params:{},u=i?i.pathname:"/",s=i?i.pathnameBase:"/",l=i&&i.route,d=bo(),c;if(t){var f;let _=typeof t=="string"?mt(t):t;s==="/"||(f=_.pathname)!=null&&f.startsWith(s)||ye(!1),c=_}else c=d;let h=c.pathname||"/",p=s==="/"?h:h.slice(s.length)||"/",m=mu(e,{pathname:p}),y=nc(m&&m.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:dt([s,n.encodeLocation?n.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?s:dt([s,n.encodeLocation?n.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,r||void 0);return t&&y?te(ur.Provider,{value:{location:Kr({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:tt.Pop}},y):y}function Qu(){let e=ac(),t=zu(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r};return te(De,null,te("h2",null,"Unhandled Thrown Error!"),te("h3",{style:{fontStyle:"italic"}},t),n?te("pre",{style:o},n):null,te("p",null,"💿 Hey developer 👋"),te("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",te("code",{style:i},"errorElement")," props on ",te("code",{style:i},"")))}class ec extends Pe{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?te(Bt.Provider,{value:this.props.routeContext},te(Ka.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tc(e){let{routeContext:t,match:n,children:r}=e,o=ne(Ba);return o&&o.static&&o.staticContext&&n.route.errorElement&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),te(Bt.Provider,{value:t},r)}function nc(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,o=n==null?void 0:n.errors;if(o!=null){let i=r.findIndex(a=>a.route.id&&(o==null?void 0:o[a.route.id]));i>=0||ye(!1),r=r.slice(0,Math.min(r.length,i+1))}return r.reduceRight((i,a,u)=>{let s=a.route.id?o==null?void 0:o[a.route.id]:null,l=n?a.route.errorElement||te(Qu,null):null,d=t.concat(r.slice(0,u+1)),c=()=>te(tc,{match:a,routeContext:{outlet:i,matches:d}},s?l:a.route.element!==void 0?a.route.element:i);return n&&(a.route.errorElement||u===0)?te(ec,{location:n.location,component:l,error:s,children:c(),routeContext:{outlet:null,matches:d}}):c()},null)}var pi;(function(e){e.UseRevalidator="useRevalidator"})(pi||(pi={}));var zn;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(zn||(zn={}));function rc(e){let t=ne(Ua);return t||ye(!1),t}function oc(e){let t=ne(Bt);return t||ye(!1),t}function ic(e){let t=oc(e),n=t.matches[t.matches.length-1];return n.route.id||ye(!1),n.route.id}function ac(){var e;let t=ne(Ka),n=rc(zn.UseRouteError),r=ic(zn.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function sc(e){ye(!1)}function uc(e){let{basename:t="/",children:n=null,location:r,navigationType:o=tt.Pop,navigator:i,static:a=!1}=e;cr()&&ye(!1);let u=t.replace(/^\/*/,"/"),s=ae(()=>({basename:u,navigator:i,static:a}),[u,i,a]);typeof r=="string"&&(r=mt(r));let{pathname:l="/",search:d="",hash:c="",state:f=null,key:h="default"}=r,p=ae(()=>{let m=Fa(l,u);return m==null?null:{pathname:m,search:d,hash:c,state:f,key:h}},[u,l,d,c,f,h]);return p==null?null:te(wo.Provider,{value:s},te(ur.Provider,{children:n,value:{location:p,navigationType:o}}))}function xh(e){let{children:t,location:n}=e,r=ne(Ba),o=r&&!t?r.router.routes:Wr(t);return Xu(o,n)}var mi;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(mi||(mi={}));const Ch=new Promise(()=>{});function Wr(e,t){t===void 0&&(t=[]);let n=[];return ar.forEach(e,(r,o)=>{if(!Ht(r))return;if(r.type===De){n.push.apply(n,Wr(r.props.children,t));return}r.type!==sc&&ye(!1),!r.props.index||!r.props.children||ye(!1);let i=[...t,o],a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(a.children=Wr(r.props.children,i)),n.push(a)}),n}/** * React Router DOM v6.6.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function qr(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function cc(e,t){let n=qr(e);for(let r of t.keys())n.has(r)||t.getAll(r).forEach(o=>{n.append(r,o)});return n}function Ah(e){let{basename:t,children:n,window:r}=e,o=q();o.current==null&&(o.current=lu({window:r,v5Compat:!0}));let i=o.current,[a,u]=me({action:i.action,location:i.location});return Xe(()=>i.listen(u),[i]),te(uc,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i})}var _i;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(_i||(_i={}));var yi;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(yi||(yi={}));function Mh(e){let t=q(qr(e)),n=bo(),r=ae(()=>cc(n.search,t.current),[n.search]),o=Ju(),i=_e((a,u)=>{const s=qr(typeof a=="function"?a(r):a);o("?"+s,u)},[o,r]);return[r,i]}var Oh=lc;function lc(e,t,n){var r=null,o=null,i=function(){r&&(clearTimeout(r),o=null,r=null)},a=function(){var s=o;i(),s&&s()},u=function(){if(!t)return e.apply(this,arguments);var s=this,l=arguments,d=n&&!r;if(i(),o=function(){e.apply(s,l)},r=setTimeout(function(){if(r=null,!d){var c=o;return o=null,c()}},t),d)return o()};return u.cancel=i,u.flush=a,u}/*! * swiped-events.js - v@version@ * Pure JavaScript swipe events * https://github.com/john-doherty/swiped-events * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element * @author John Doherty * @license MIT */(function(e,t){"use strict";typeof e.CustomEvent!="function"&&(e.CustomEvent=function(h,p){p=p||{bubbles:!1,cancelable:!1,detail:void 0};var m=t.createEvent("CustomEvent");return m.initCustomEvent(h,p.bubbles,p.cancelable,p.detail),m},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener("touchstart",d,!1),t.addEventListener("touchmove",c,!1),t.addEventListener("touchend",l,!1);var n=null,r=null,o=null,i=null,a=null,u=null,s=0;function l(h){if(u===h.target){var p=parseInt(f(u,"data-swipe-threshold","20"),10),m=f(u,"data-swipe-unit","px"),y=parseInt(f(u,"data-swipe-timeout","500"),10),_=Date.now()-a,v="",T=h.changedTouches||h.touches||[];if(m==="vh"&&(p=Math.round(p/100*t.documentElement.clientHeight)),m==="vw"&&(p=Math.round(p/100*t.documentElement.clientWidth)),Math.abs(o)>Math.abs(i)?Math.abs(o)>p&&_0?v="swiped-left":v="swiped-right"):Math.abs(i)>p&&_0?v="swiped-up":v="swiped-down"),v!==""){var O={dir:v.replace(/swiped-/,""),touchType:(T[0]||{}).touchType||"direct",fingers:s,xStart:parseInt(n,10),xEnd:parseInt((T[0]||{}).clientX||-1,10),yStart:parseInt(r,10),yEnd:parseInt((T[0]||{}).clientY||-1,10)};u.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:O})),u.dispatchEvent(new CustomEvent(v,{bubbles:!0,cancelable:!0,detail:O}))}n=null,r=null,a=null}}function d(h){h.target.getAttribute("data-swipe-ignore")!=="true"&&(u=h.target,a=Date.now(),n=h.touches[0].clientX,r=h.touches[0].clientY,o=0,i=0,s=h.touches.length)}function c(h){if(!(!n||!r)){var p=h.touches[0].clientX,m=h.touches[0].clientY;o=n-p,i=r-m}}function f(h,p,m){for(;h&&h!==t.documentElement;){var y=h.getAttribute(p);if(y)return y;h=h.parentNode}return m}})(window,document);const dc=Symbol(),Eo=Symbol(),Zt="a",an="w";let fc=(e,t)=>new Proxy(e,t);const Gr=Object.getPrototypeOf,Yr=new WeakMap,Wa=e=>e&&(Yr.has(e)?Yr.get(e):Gr(e)===Object.prototype||Gr(e)===Array.prototype),jn=e=>typeof e=="object"&&e!==null,vi=new WeakMap,So=e=>e[Eo]||e,qa=(e,t,n)=>{if(!Wa(e))return e;const r=So(e),o=(a=>Object.isFrozen(a)||Object.values(Object.getOwnPropertyDescriptors(a)).some(u=>!u.writable))(r);let i=n&&n.get(r);return i&&i[1].f===o||(i=((a,u)=>{const s={f:u};let l=!1;const d=(f,h)=>{if(!l){let p=s[Zt].get(a);if(p||(p={},s[Zt].set(a,p)),f===an)p[an]=!0;else{let m=p[f];m||(m=new Set,p[f]=m),m.add(h)}}},c={get:(f,h)=>h===Eo?a:(d("k",h),qa(Reflect.get(f,h),s[Zt],s.c)),has:(f,h)=>h===dc?(l=!0,s[Zt].delete(a),!0):(d("h",h),Reflect.has(f,h)),getOwnPropertyDescriptor:(f,h)=>(d("o",h),Reflect.getOwnPropertyDescriptor(f,h)),ownKeys:f=>(d(an),Reflect.ownKeys(f))};return u&&(c.set=c.deleteProperty=()=>!1),[c,s]})(r,o),i[1].p=fc(o?(a=>{let u=vi.get(a);if(!u){if(Array.isArray(a))u=Array.from(a);else{const s=Object.getOwnPropertyDescriptors(a);Object.values(s).forEach(l=>{l.configurable=!0}),u=Object.create(Gr(a),s)}vi.set(a,u)}return u})(r):r,i[0]),n&&n.set(r,i)),i[1][Zt]=t,i[1].c=n,i[1].p},Ga=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!jn(e)||!jn(t))return!0;const o=n.get(So(e));if(!o)return!0;if(r){const a=r.get(e);if(a&&a.n===t)return a.g;r.set(e,{n:t,g:!1})}let i=null;try{for(const a of o.h||[])if(i=Reflect.has(e,a)!==Reflect.has(t,a),i)return i;if(o[an]===!0){if(i=((a,u)=>{const s=Reflect.ownKeys(a),l=Reflect.ownKeys(u);return s.length!==l.length||s.some((d,c)=>d!==l[c])})(e,t),i)return i}else for(const a of o.o||[])if(i=!!Reflect.getOwnPropertyDescriptor(e,a)!=!!Reflect.getOwnPropertyDescriptor(t,a),i)return i;for(const a of o.k||[])if(i=Ga(e[a],t[a],n,r),i)return i;return i===null&&(i=!0),i}finally{r&&r.set(e,{n:t,g:i})}};const hc=e=>Wa(e)&&e[Eo]||null,gi=(e,t=!0)=>{Yr.set(e,t)},pc=(e,t,n)=>{const r=[],o=new WeakSet,i=(a,u)=>{if(o.has(a))return;jn(a)&&o.add(a);const s=jn(a)&&t.get(So(a));if(s){var l,d;if((l=s.h)==null||l.forEach(f=>{const h=`:has(${String(f)})`;r.push(u?[...u,h]:[h])}),s[an]===!0){const f=":ownKeys";r.push(u?[...u,f]:[f])}else{var c;(c=s.o)==null||c.forEach(f=>{const h=`:hasOwn(${String(f)})`;r.push(u?[...u,h]:[h])})}(d=s.k)==null||d.forEach(f=>{n&&!("value"in(Object.getOwnPropertyDescriptor(a,f)||{}))||i(a[f],u?[...u,f]:[f])})}else u&&r.push(u)};return i(e),r};var Fn={PHANPY_CLIENT_NAME:"Phanpy",PHANPY_WEBSITE:"https://phanpy.social",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",VITE_APP_ENV:"production",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Sr=e=>typeof e=="object"&&e!==null,lt=new WeakMap,Sn=new WeakSet,mc=(e=Object.is,t=(l,d)=>new Proxy(l,d),n=l=>Sr(l)&&!Sn.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),r=l=>{switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:throw l}},o=new WeakMap,i=(l,d,c=r)=>{const f=o.get(l);if((f==null?void 0:f[0])===d)return f[1];const h=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return gi(h,!0),o.set(l,[d,h]),Reflect.ownKeys(l).forEach(p=>{const m=Reflect.get(l,p);Sn.has(m)?(gi(m,!1),h[p]=m):m instanceof Promise?Object.defineProperty(h,p,{get(){return c(m)}}):lt.has(m)?h[p]=Zr(m,c):h[p]=m}),Object.freeze(h)},a=new WeakMap,u=[1,1],s=l=>{if(!Sr(l))throw new Error("object required");const d=a.get(l);if(d)return d;let c=u[0];const f=new Set,h=(E,L=++u[0])=>{c!==L&&(c=L,f.forEach(w=>w(E,L)))};let p=u[1];const m=(E=++u[1])=>(p!==E&&!f.size&&(p=E,_.forEach(([L])=>{const w=L[1](E);w>c&&(c=w)})),c),y=E=>(L,w)=>{const I=[...L];I[1]=[E,...I[1]],h(I,w)},_=new Map,v=(E,L)=>{if((Fn&&"production")!=="production"&&_.has(E))throw new Error("prop listener already exists");if(f.size){const w=L[3](y(E));_.set(E,[L,w])}else _.set(E,[L])},T=E=>{var L;const w=_.get(E);w&&(_.delete(E),(L=w[1])==null||L.call(w))},O=E=>(f.add(E),f.size===1&&_.forEach(([w,I],K)=>{if((Fn&&"production")!=="production"&&I)throw new Error("remove already exists");const D=w[3](y(K));_.set(K,[w,D])}),()=>{f.delete(E),f.size===0&&_.forEach(([w,I],K)=>{I&&(I(),_.set(K,[w]))})}),x=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),M=t(x,{deleteProperty(E,L){const w=Reflect.get(E,L);T(L);const I=Reflect.deleteProperty(E,L);return I&&h(["delete",[L],w]),I},set(E,L,w,I){var K;const D=Reflect.has(E,L),C=Reflect.get(E,L,I);if(D&&e(C,w))return!0;T(L),Sr(w)&&(w=hc(w)||w);let A=w;if(!((K=Object.getOwnPropertyDescriptor(E,L))!=null&&K.set))if(w instanceof Promise)w.then(P=>{w.status="fulfilled",w.value=P,h(["resolve",[L],P])}).catch(P=>{w.status="rejected",w.reason=P,h(["reject",[L],P])});else{!lt.has(w)&&n(w)&&(A=yc(w));const P=!Sn.has(A)&<.get(A);P&&v(L,P)}return Reflect.set(E,L,A,I),h(["set",[L],w,C]),!0}});a.set(l,M);const H=[x,m,i,O];return lt.set(M,H),Reflect.ownKeys(l).forEach(E=>{const L=Object.getOwnPropertyDescriptor(l,E);L.get||L.set?Object.defineProperty(x,E,L):M[E]=l[E]}),M})=>[s,lt,Sn,e,t,n,r,o,i,a,u],[_c]=mc();function yc(e={}){return _c(e)}function Ya(e,t,n){const r=lt.get(e);(Fn&&"production")!=="production"&&!r&&console.warn("Please use proxy object");let o;const i=[],a=r[3];let u=!1;const l=a(d=>{if(i.push(d),n){t(i.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,u&&t(i.splice(0))}))});return u=!0,()=>{u=!1,l()}}function Zr(e,t){const n=lt.get(e);(Fn&&"production")!=="production"&&!n&&console.warn("Please use proxy object");const[r,o,i]=n;return i(r,o(),t)}var at=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vc(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var To={exports:{}},Za={};const gc=vc(kn);/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $t=gc;function wc(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bc=typeof Object.is=="function"?Object.is:wc,Ec=$t.useState,Sc=$t.useEffect,Tc=$t.useLayoutEffect,xc=$t.useDebugValue;function Cc(e,t){var n=t(),r=Ec({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Tc(function(){o.value=n,o.getSnapshot=t,Tr(o)&&i({inst:o})},[e,n,t]),Sc(function(){return Tr(o)&&i({inst:o}),e(function(){Tr(o)&&i({inst:o})})},[e]),xc(n),n}function Tr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bc(e,n)}catch{return!0}}function Ac(e,t){return t()}var Mc=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ac:Cc,Ph=Za.useSyncExternalStore=$t.useSyncExternalStore!==void 0?$t.useSyncExternalStore:Mc,Rh=To.exports;To.exports=Za;var Oc=To.exports;const Pc=qe(Oc);var Rc={PHANPY_CLIENT_NAME:"Phanpy",PHANPY_WEBSITE:"https://phanpy.social",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",VITE_APP_ENV:"production",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{use:wi}=Ot,{useSyncExternalStore:Lc}=Pc,Dc=(e,t)=>{const n=q();ie(()=>{n.current=pc(e,t,!0)}),fo(n.current)};function Lh(e,t){const n=t==null?void 0:t.sync,r=q(),o=q();let i=!0;const a=Lc(_e(l=>{const d=Ya(e,l,n);return l(),d},[e,n]),()=>{const l=Zr(e,wi);try{if(!i&&r.current&&o.current&&!Ga(r.current,l,o.current,new WeakMap))return r.current}catch{}return l},()=>Zr(e,wi));i=!1;const u=new WeakMap;ie(()=>{r.current=a,o.current=u}),(Rc&&"production")!=="production"&&Dc(a,u);const s=ae(()=>new WeakMap,[]);return qa(a,u,s)}var Ic=0,Dh=Array.isArray;function se(e,t,n,r,o,i){var a,u,s={};for(u in t)u=="ref"?a=t[u]:s[u]=t[u];var l={type:e,props:s,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ic,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(u in a)s[u]===void 0&&(s[u]=a[u]);return W.vnode&&W.vnode(l),l}function Vr(){return Vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Bc=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,i=n.meta,a=n.mod,u=n.shift,s=n.ctrl,l=n.keys,d=t.key,c=t.code,f=t.ctrlKey,h=t.metaKey,p=t.shiftKey,m=t.altKey,y=nt(c),_=d.toLowerCase();if(!r){if(o===!m&&_!=="alt"||u===!p&&_!=="shift")return!1;if(a){if(!h&&!f)return!1}else if(i===!h&&_!=="meta"&&_!=="os"||s===!f&&_!=="ctrl"&&_!=="control")return!1}return l&&l.length===1&&(l.includes(_)||l.includes(y))?!0:l?$c(l):!l},Uc=be(void 0),Kc=function(){return ne(Uc)};function es(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&es(e[r],t[r])},!0):e===t}var Wc=be({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),qc=function(){return ne(Wc)};function Gc(e){var t=q(void 0);return es(t.current,e)||(t.current=e),t.current}var bi=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Yc=typeof window<"u"?Xe:ie;function Ih(e,t,n,r){var o=q(null),i=q(!1),a=n instanceof Array?r instanceof Array?void 0:r:n,u=xo(e)?e.join(a==null?void 0:a.splitKey):e,s=n instanceof Array?n:r instanceof Array?r:void 0,l=_e(t,s??[]),d=q(l);s?d.current=l:d.current=t;var c=Gc(a),f=qc(),h=f.enabledScopes,p=Kc();return Yc(function(){if(!((c==null?void 0:c.enabled)===!1||!Hc(h,c==null?void 0:c.scopes))){var m=function(O,x){var b;if(x===void 0&&(x=!1),!(Fc(O)&&!Qa(O,c==null?void 0:c.enableOnFormTags))&&!(c!=null&&c.ignoreEventWhen!=null&&c.ignoreEventWhen(O))){if(o.current!==null&&document.activeElement!==o.current&&!o.current.contains(document.activeElement)){bi(O);return}(b=O.target)!=null&&b.isContentEditable&&!(c!=null&&c.enableOnContentEditable)||xr(u,c==null?void 0:c.splitKey).forEach(function(M){var H,E=Cr(M,c==null?void 0:c.combinationKey);if(Bc(O,E,c==null?void 0:c.ignoreModifiers)||(H=E.keys)!=null&&H.includes("*")){if(x&&i.current)return;if(zc(O,E,c==null?void 0:c.preventDefault),!jc(O,E,c==null?void 0:c.enabled)){bi(O);return}d.current(O,E),x||(i.current=!0)}})}},y=function(O){O.key!==void 0&&(Ja(nt(O.code)),((c==null?void 0:c.keydown)===void 0&&(c==null?void 0:c.keyup)!==!0||c!=null&&c.keydown)&&m(O))},_=function(O){O.key!==void 0&&(Xa(nt(O.code)),i.current=!1,c!=null&&c.keyup&&m(O,!0))},v=o.current||(a==null?void 0:a.document)||document;return v.addEventListener("keyup",_),v.addEventListener("keydown",y),p&&xr(u,c==null?void 0:c.splitKey).forEach(function(T){return p.addHotkey(Cr(T,c==null?void 0:c.combinationKey,c==null?void 0:c.description))}),function(){v.removeEventListener("keyup",_),v.removeEventListener("keydown",y),p&&xr(u,c==null?void 0:c.splitKey).forEach(function(T){return p.removeHotkey(Cr(T,c==null?void 0:c.combinationKey,c==null?void 0:c.description))})}}},[u,c,h]),o}function Zc(e,t){var n=Object.setPrototypeOf;n?n(e,t):e.__proto__=t}function Vc(e,t){t===void 0&&(t=e.constructor);var n=Error.captureStackTrace;n&&n(e,t)}var Jc=function(){var e=function(n,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=i[a])},e(n,r)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(e){Jc(t,e);function t(n,r){var o=this.constructor,i=e.call(this,n,r)||this;return Object.defineProperty(i,"name",{value:o.name,enumerable:!1,configurable:!0}),Zc(i,o.prototype),Vc(i),i}return t}(Error);var Jr=function(e,t){return Jr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Jr(e,t)};function Xc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jr(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function nl(e,t){return t===void 0&&(t={}),ts(e,fe({delimiter:"",transform:ns},t))}function rl(e,t){return t===0?e.toLowerCase():ns(e,t)}function ol(e,t){return t===void 0&&(t={}),nl(e,fe({transform:rl},t))}function il(e,t){return t===void 0&&(t={}),ts(e,fe({delimiter:"."},t))}function Co(e,t){return t===void 0&&(t={}),il(e,fe({delimiter:"_"},t))}var al=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const Ao=qe(al);function sl(){let e,t;const n=new Promise((...r)=>[e,t]=r);return Object.freeze({resolve:e,reject:t,promise:n})}function ul(e,t){const n=[],r=[],o=e((...d)=>{const c=r.shift();c?c.resolve({value:d,done:!1}):n.push(d)}),i=t==null?void 0:t.signal;let a=!1,u=null;const s=()=>{u=new Error("Abort Error")},l=()=>{o==null||o(),i==null||i.removeEventListener("abort",s)};return i==null||i.addEventListener("abort",s,{once:!0}),{async next(){const d=n.shift();if(d)return{value:d,done:!1};if(a)return{value:void 0,done:!0};if(u)return Promise.reject(u);const c=sl();return r.push(c),c.promise},async return(){a=!0,l();for(const d of r)d.resolve({value:void 0,done:!0});return{value:void 0,done:!0}},async throw(d){return u=d,l(),{value:void 0,done:!0}},[Symbol.asyncIterator](){return this}}}class ft extends Ut{}class Si extends Ut{constructor(t,n,r,o){super(t,o),this.contentType=n,this.data=r}}class rs extends Ut{constructor(t,n){super(t.message,n),this.statusCode=t.statusCode,this.message=t.message,this.description=t.description,this.additionalProperties=t.additionalProperties,this.details=t.details}}class os extends Ut{}class Ti extends Ut{constructor(t,n){super(t,n),this.message=t}}function is(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Te(e){return this instanceof Te?(this.v=e,this):new Te(e)}function Bn(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(f){r[f]&&(o[f]=function(h){return new Promise(function(p,m){i.push([f,h,p,m])>1||u(f,h)})})}function u(f,h){try{s(r[f](h))}catch(p){c(i[0][3],p)}}function s(f){f.value instanceof Te?Promise.resolve(f.value.v).then(l,d):c(i[0][2],f)}function l(f){u("next",f)}function d(f){u("throw",f)}function c(f,h){f(h),i.shift(),i.length&&u(i[0][0],i[0][1])}}function Un(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof xi=="function"?xi(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(a){return new Promise(function(u,s){a=e[i](a),o(u,s,a.done,a.value)})}}function o(i,a,u,s){Promise.resolve(s).then(function(l){i({value:l,done:u})},a)}}const as=e=>new Promise(t=>setTimeout(()=>t(),e));function cl(){}class ll extends Ut{constructor(t,n){super(`Maximum number of attempts reached: ${t}`,n)}}class dl{constructor(t={}){this.props=t,this.attempts=0}sleep(){return $e(this,void 0,void 0,function*(){if(this.attempts>=this.maxAttempts)throw new ll(this.attempts);yield as(this.getTimeout()),this.attempts++})}clear(){this.attempts=0}get factor(){var t;return(t=this.props.factor)!==null&&t!==void 0?t:1e3}get base(){var t;return(t=this.props.base)!==null&&t!==void 0?t:2}get maxAttempts(){var t;return(t=this.props.maxAttempts)!==null&&t!==void 0?t:Number.POSITIVE_INFINITY}getTimeout(){return this.factor*Math.pow(this.base,this.attempts)}values(){return Bn(this,arguments,function*(){for(;this.attempts{let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}},hl=e=>{const t=new Map;for(const n of e.split(",")){const r=n.match(/<([^>]+)>;\s*rel="([^"]+)"/);r&&t.set(r[2],r[1])}return t};class Kn{constructor(t,n,r,o,i="next"){this.http=t,this.nextPath=n,this.nextParams=r,this.meta=o,this.direction=i}next(){return $e(this,void 0,void 0,function*(){if(this.nextPath==null)return{done:!0,value:void 0};const t=yield this.http.request(Object.assign({method:"GET",path:this.nextPath,search:this.nextParams},this.meta)),n=this.getLink(t.headers.get("link"));return this.nextPath=n==null?void 0:n.pathname,this.nextParams=n==null?void 0:n.search.replace(/^\?/,""),{done:!1,value:yield t.data}})}return(t){return $e(this,void 0,void 0,function*(){return this.clear(),{done:!0,value:yield t}})}throw(t){return $e(this,void 0,void 0,function*(){throw this.clear(),t})}then(t=Promise.resolve.bind(Promise),n=Promise.reject.bind(Promise)){return this.next().then(r=>t(r.value),n)}values(){return this[Symbol.asyncIterator]()}getDirection(){return this.direction}setDirection(t){return new Kn(this.http,this.nextPath,this.nextParams,this.meta,t)}[Symbol.asyncIterator](){return this}getLink(t){if(t==null)return;const n=hl(t).get(this.direction);if(n!=null)return new URL(n)}clear(){this.nextPath=void 0,this.nextParams=void 0}clone(){return new Kn(this.http,this.nextPath,this.nextParams,this.meta,this.direction)}}class pl{constructor(t,n={}){this.http=t,this.params=n,this.waitForMediaAttachment=r=>$e(this,void 0,void 0,function*(){let o;const i=AbortSignal.timeout(this.mediaTimeout);for(;o==null;){if(i.aborted)throw new os(`Media processing timed out of ${this.mediaTimeout}ms`);try{yield as(1e3);const a=yield this.http.get(`/api/v1/media/${r}`);a.url!=null&&(o=a)}catch(a){if(a instanceof rs&&a.statusCode===404)continue;throw a}}return o})}dispatch(t){const n=this.toPrimitiveAction(t.type),r=this.isPrimitiveAction(t.type)?t.path:t.path+"/"+Co(t.type),o=this.inferEncoding(n,r),i=Object.assign(Object.assign({},t.meta),{encoding:o});switch(n){case"fetch":return this.http.get(r,t.data,i);case"create":return r==="/api/v2/media"?this.http.post(r,t.data,i).then(a=>this.waitForMediaAttachment(a.id)):this.http.post(r,t.data,i);case"update":return this.http.patch(r,t.data,i);case"remove":return this.http.delete(r,t.data,i);case"list":return new Kn(this.http,r,t.data)}}isPrimitiveAction(t){switch(t){case"fetch":case"create":case"update":case"remove":case"list":return!0;default:return!1}}toPrimitiveAction(t){if(this.isPrimitiveAction(t))return t;switch(t){case"lookup":case"verify_credentials":return"fetch";case"update_credentials":return"update";default:return"create"}}inferEncoding(t,n){return t==="create"&&n==="/api/v1/accounts"||t==="update"&&n==="/api/v1/accounts/update_credentials"||t==="create"&&n==="/api/v1/email"||t==="create"&&n==="/api/v1/featured_tag"||t==="create"&&n==="/api/v1/media"||t==="create"&&n==="/api/v2/media"?"multipart-form":"json"}get mediaTimeout(){var t;return(t=this.params.mediaTimeout)!==null&&t!==void 0?t:60*1e3}}function ml(e){return e.readyState===Ao.OPEN?Promise.resolve():new Promise((t,n)=>{const r=a=>{n(a)},o=()=>{n(new Error("WebSocket closed"))},i=()=>{t()};e.addEventListener("error",r,{once:!0}),e.addEventListener("close",o,{once:!0}),e.addEventListener("open",i,{once:!0})})}function _l(e){return e.readyState===Ao.CLOSED?Promise.resolve():new Promise(t=>{const n=()=>{t()};e.addEventListener("error",n,{once:!0}),e.addEventListener("close",n,{once:!0})})}class yl{constructor(t,n){this.props=t,this.logger=n,this.queue=[],this.disableRetry=!1,this.initialized=!1,this.init=()=>$e(this,void 0,void 0,function*(){var r,o,i,a,u,s,l,d,c,f;if(!this.initialized){this.initialized=!0;try{for(var h=!0,p=Un(this.backoff),m;m=yield p.next(),r=m.done,!r;h=!0){a=m.value,h=!1;const y=a;(u=this.ws)===null||u===void 0||u.close();try{(s=this.logger)===null||s===void 0||s.log("info","Connecting to WebSocket...");{const _=(l=this.props.implementation)!==null&&l!==void 0?l:Ao,v=new _(...this.props.constructorParameters);yield ml(v),this.ws=v}(d=this.logger)===null||d===void 0||d.log("info","Connected to WebSocket");for(const{resolve:_}of this.queue)_(this.ws);this.queue=[],yield _l(this.ws),(c=this.logger)===null||c===void 0||c.log("info","WebSocket closed"),this.backoff.clear()}catch(_){(f=this.logger)===null||f===void 0||f.log("error","WebSocket error:",_)}if(this.disableRetry)break}}catch(y){o={error:y}}finally{try{!h&&!r&&(i=p.return)&&(yield i.call(p))}finally{if(o)throw o.error}}for(const{reject:y}of this.queue)y(new Ti(`Failed to connect to WebSocket after ${this.props.maxAttempts} attempts`));this.queue=[]}}),this.backoff=new dl({maxAttempts:this.props.maxAttempts})}canAcquire(){return!this.disableRetry}acquire(){return $e(this,void 0,void 0,function*(){if(this.init(),this.ws!=null)return this.ws;const t=fl();return this.queue.push(t),yield t.promise})}close(){var t;this.disableRetry=!0,(t=this.ws)===null||t===void 0||t.close(),this.backoff.clear();for(const{reject:n}of this.queue)n(new Ti("WebSocket closed"));this.queue=[]}}function vl(e){return Bn(this,arguments,function*(){var n,r,o,i;const a=f=>$e(this,void 0,void 0,function*(){if(s.return==null)throw new ft("events.return is undefined");yield s.return(f)}),u=f=>$e(this,void 0,void 0,function*(){if(s.return==null)throw new ft("events.return is undefined");yield s.return(f)}),s=ul(f=>(e.addEventListener("message",f),e.addEventListener("error",u),e.addEventListener("close",a),()=>{e.removeEventListener("message",f),e.removeEventListener("error",u),e.removeEventListener("close",a)}));try{for(var l=!0,d=Un(s),c;c=yield Te(d.next()),n=c.done,!n;l=!0){i=c.value,l=!1;const[f]=i;yield yield Te(f)}}catch(f){r={error:f}}finally{try{!l&&!n&&(o=d.return)&&(yield Te(o.call(d)))}finally{if(r)throw r.error}}})}class gl{constructor(t,n,r,o,i){this.connector=t,this.serializer=n,this.stream=r,this.logger=o,this.params=i}values(){var t,n,r;return Bn(this,arguments,function*(){var i,a,u,s;for((t=this.logger)===null||t===void 0||t.log("info","Subscribing to stream",this.stream);this.connector.canAcquire();){this.connection=yield Te(this.connector.acquire());const f=vl(this.connection),h=this.serializer.serialize("json",Object.assign({type:"subscribe",stream:this.stream},this.params));(n=this.logger)===null||n===void 0||n.log("debug","↑ WEBSOCKET",h),this.connection.send(h);try{for(var l=!0,d=(a=void 0,Un(this.transformIntoEvents(f))),c;c=yield Te(d.next()),i=c.done,!i;l=!0){s=c.value,l=!1;const p=s;this.matches(p)&&((r=this.logger)===null||r===void 0||r.log("debug","↓ WEBSOCKET",p),yield yield Te(p))}}catch(p){a={error:p}}finally{try{!l&&!i&&(u=d.return)&&(yield Te(u.call(d)))}finally{if(a)throw a.error}}}})}unsubscribe(){if(this.connection==null)return;const t=this.serializer.serialize("json",Object.assign({type:"unsubscribe",stream:this.stream},this.params));this.connection.send(t)}[Symbol.asyncIterator](){return this.values()}[Symbol.dispose](){this.unsubscribe()}matches(t){var n;const r=(n=this.params)!==null&&n!==void 0?n:{},o=Object.values(r);return[this.stream,...o].every(a=>t.stream.includes(a))}transformIntoEvents(t){return Bn(this,arguments,function*(){var r,o,i,a;try{for(var u=!0,s=Un(t),l;l=yield Te(s.next()),r=l.done,!r;u=!0){a=l.value,u=!1;const d=a,c=yield Te(this.parseMessage(d.data));yield yield Te(c)}}catch(d){o={error:d}}finally{try{!u&&!r&&(i=s.return)&&(yield Te(i.call(s)))}finally{if(o)throw o.error}}})}parseMessage(t){return $e(this,void 0,void 0,function*(){const n=this.serializer.deserialize("json",t);if("error"in n)throw new ft(n.error);const r=n.event==="delete"||n.payload==null?n.payload:this.serializer.deserialize("json",n.payload);return{stream:n.stream,event:n.event,payload:r}})}}class wl{constructor(t,n,r){this.connector=t,this.serializer=n,this.logger=r}dispatch(t){var n;if(t.type==="close")return this.connector.close(),{};if(t.type==="prepare")return this.connector.acquire();if(t.type!=="subscribe")throw new ft("Unknown action type");const r=(n=t.data)!==null&&n!==void 0?n:{},o=t.path.replace(/^\//,"").replaceAll("/",":");return new gl(this.connector,this.serializer,o,this.logger,Object.assign({},r))}}const dn=(e,t=[])=>new Proxy(cl,{get:El(e,t),apply:Sl(e,t)}),bl=new Set(["then","catch","finally","inspect","toString","valueOf","toJSON","constructor","prototype","length","name","caller","callee","arguments","bind","apply","call"]),El=(e,t)=>(n,r)=>{if(!(typeof r=="string"&&bl.has(r))&&typeof r!="symbol")return r==="$select"?dn(e,[...t,r]):dn(e,[...t,Co(r)])},Sl=(e,t)=>(n,r,o)=>{const i=t.pop();if(i==null)throw new Error("No action specified");if(i==="$select")return dn(e,[...t,...o]);const a="/"+t.join("/"),[u,s]=o;return e.dispatch({type:i,path:a,data:u,meta:s})},Tl=e=>{const t=new AbortController;for(const n of e)n.addEventListener("abort",()=>t.abort(),{once:!0});return t.signal},xl=([e,...t])=>{const n=new Headers(e);for(const r of t)for(const[o,i]of new Headers(r).entries())n.set(o,i);return n},Cl=1e3*300;class Al{constructor(t,n){this.props=t,this.serializer=n}mergeRequestInitWithDefaults(t={}){const n=Object.assign({},this.props.requestInit);{const{headers:r,signal:o}=t,i=is(t,["headers","signal"]);Object.assign(n,i),n.headers=this.mergeHeadersWithDefaults(r),n.signal=this.mergeAbortSignalWithDefaults(o)}return n}resolvePath(t,n){const r=new URL(t,this.props.url);return typeof n=="string"?r.search=n:n!=null&&(r.search=this.serializer.serialize("querystring",n)),r}createTimeout(){var t;return AbortSignal.timeout((t=this.props.timeout)!==null&&t!==void 0?t:Cl)}mergeHeadersWithDefaults(t={}){var n,r;const o=xl([(r=(n=this.props.requestInit)===null||n===void 0?void 0:n.headers)!==null&&r!==void 0?r:{},t]),i=new Headers(o);return this.props.accessToken&&i.set("Authorization",`Bearer ${this.props.accessToken}`),new Headers(i)}mergeAbortSignalWithDefaults(t){var n;const o=[this.createTimeout()];return!((n=this.props.requestInit)===null||n===void 0)&&n.signal&&o.push(this.props.requestInit.signal),t!=null&&o.push(t),Tl(o)}}class Ml{constructor(t,n){this.props=t,this.serializer=n}getProtocols(t=[]){return this.props.useInsecureAccessToken||this.props.accessToken==null?[...t]:[this.props.accessToken,...t]}resolvePath(t,n={}){const r=new URL(t,this.props.streamingApiUrl);return this.props.useInsecureAccessToken&&(n.accessToken=this.props.accessToken),r.search=this.serializer.serialize("querystring",n),r}getMaxAttempts(){return this.props.retry===!0||this.props.retry==null?Number.POSITIVE_INFINITY:this.props.retry===!1?1:this.props.retry}}class Ol{get(t,n,r={}){return this.request(Object.assign({method:"GET",path:t,search:n},r)).then(o=>o.data)}post(t,n,r={}){return this.request(Object.assign({method:"POST",path:t,body:n},r)).then(o=>o.data)}delete(t,n,r={}){return this.request(Object.assign({method:"DELETE",path:t,body:n},r)).then(o=>o.data)}put(t,n,r={}){return this.request(Object.assign({method:"PUT",path:t,body:n},r)).then(o=>o.data)}patch(t,n,r={}){return this.request(Object.assign({method:"PATCH",path:t,body:n},r)).then(o=>o.data)}}const Ci=e=>{var t;const n=(t=e.get("Content-Type"))===null||t===void 0?void 0:t.replace(/\s*;.*$/,"");if(typeof n=="string")switch(n){case"application/json":return"json";case"multipart/form-data":return"multipart-form";default:return}};class Pl extends Ol{constructor(t,n,r){super(),this.serializer=t,this.config=n,this.logger=r}request(t){var n,r,o,i,a;return $e(this,void 0,void 0,function*(){const u=this.createRequest(t);try{(n=this.logger)===null||n===void 0||n.log("info",`↑ ${u.method} ${u.url}`),(r=this.logger)===null||r===void 0||r.log("debug"," body",{encoding:t.encoding,body:t.body});const s=yield fetch(u);if(!s.ok)throw s;const l=yield s.text(),d=Ci(s.headers);if(d==null)throw new ft("The server returned data with an unknown encoding.");const c=this.serializer.deserialize(d,l);return(o=this.logger)===null||o===void 0||o.log("info",`↓ ${u.method} ${u.url}`),(i=this.logger)===null||i===void 0||i.log("debug"," body",l),{headers:s.headers,data:c}}catch(s){throw(a=this.logger)===null||a===void 0||a.log("debug","HTTP failed",s),yield this.createError(s)}})}createRequest(t){const{method:n,path:r,search:o,encoding:i="json",requestInit:a={}}=t,u=this.config.resolvePath(r,o),s=this.serializer.serialize(i,t.body),l=this.config.mergeRequestInitWithDefaults(a),d=new Request(u,Object.assign({method:n,body:s},l));return typeof s=="string"&&i==="json"&&d.headers.set("Content-Type","application/json"),d}createError(t){return $e(this,void 0,void 0,function*(){if(t instanceof Response){const n=Ci(t.headers);if(n==null)throw new ft("The server returned data with an unknown encoding. The server may be down.");const r=this.serializer.deserialize(n,yield t.text()),{error:o,errorDescription:i,details:a}=r,u=is(r,["error","errorDescription","details"]);return new rs({statusCode:t.status,message:o,description:i,details:a,additionalProperties:u},{cause:t})}return t!=null&&t.name==="AbortError"?new os("Request timed out",{cause:t}):t})}}class Rl{constructor(t){this.level=t}log(t,n,r){if(!this.level.satisfies(t))return;const o=r==null?[n]:[n,r];switch(t){case"debug":{console.debug(...o);return}case"info":{console.info(...o);return}case"warn":{console.warn(...o);return}case"error":{console.error(...o);return}}}}const Oe=Object.freeze({DEBUG:1,INFO:2,WARN:4,ERROR:8});class Pt{constructor(t){this.level=t}satisfies(t){switch(t){case"debug":return!!(this.level&Oe.DEBUG);case"info":return!!(this.level&Oe.INFO);case"warn":return!!(this.level&Oe.WARN);case"error":return!!(this.level&Oe.ERROR)}}static from(t){switch(t){case"debug":return new Pt(Oe.DEBUG|Oe.INFO|Oe.WARN|Oe.ERROR);case"info":return new Pt(Oe.INFO|Oe.WARN|Oe.ERROR);case"warn":return new Pt(Oe.WARN|Oe.ERROR);case"error":return new Pt(Oe.ERROR)}}}const ss=e=>{const t=Pt.from(e??"warn");return new Rl(t)},Mo=e=>typeof e=="object"&&e!==null&&e.constructor.name==="Object",Xr=(e,t="")=>Array.isArray(e)?e.map((n,r)=>Xr(n,t==""?r.toString():`${t}[${r}]`)).reduce((n,r)=>Object.assign(n,r),{}):Mo(e)?Object.entries(e).map(([n,r])=>Xr(r,t===""?n:`${t}[${n}]`)).reduce((n,r)=>Object.assign(n,r),{}):t===""?e:{[t]:e},Qr=(e,t="")=>Array.isArray(e)?e.flatMap((n,r)=>Qr(n,t==""?r.toString():`${t}[]`)):Mo(e)?Object.entries(e).flatMap(([n,r])=>Qr(r,t===""?n:`${t}[${n}]`)):[[t,e]],Ll=e=>Qr(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}=${encodeURIComponent(n)}`).join("&"),Dl={stringify:Ll},eo=(e,t)=>Array.isArray(e)?e.map(n=>eo(n,t)):Mo(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>[t(n),eo(r,t)])):e,Ai=(e,t)=>eo(e,r=>r.includes(":")||r.startsWith("_")?r:t(r));class us{serialize(t,n){const r=Ai(n,Co);switch(t){case"json":return JSON.stringify(r);case"multipart-form":{const o=new FormData;for(const[i,a]of Object.entries(Xr(r)))o.append(i,a);return o}case"querystring":return Dl.stringify(r);default:throw new ft(`Unknown content type ${t} to serialize.`)}}deserialize(t,n){switch(t){case"json":try{return Ai(JSON.parse(n),ol)}catch{throw new Si(`Malformed JSON ${n} returned from the server.`,t,n)}default:throw new Si(`Unknown content type ${t} returned from the server.`,t,n)}}}const Nh=e=>{const t=new us,n=new Al(e,t),r=ss(e.log),o=new Pl(t,n,r),i=new pl(o);return dn(i,["api"])};function kh(e){const t=new us,n=new Ml(e,t),r=ss(e.log),o=new yl({constructorParameters:[n.resolvePath("/api/v1/streaming"),n.getProtocols()],implementation:e.implementation,maxAttempts:n.getMaxAttempts()},r),i=new wl(o,t,r);return dn(i)}var Oo={exports:{}};/*! * Toastify js 1.12.0 * https://github.com/apvarun/toastify-js * @license MIT licensed * * Copyright (C) 2018 Varun A P */var $h=Oo.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(at,function(t){var n=function(a){return new n.lib.init(a)},r="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:r,constructor:n,init:function(a){return a||(a={}),this.options={},this.toastElement=null,this.options.text=a.text||n.defaults.text,this.options.node=a.node||n.defaults.node,this.options.duration=a.duration===0?0:a.duration||n.defaults.duration,this.options.selector=a.selector||n.defaults.selector,this.options.callback=a.callback||n.defaults.callback,this.options.destination=a.destination||n.defaults.destination,this.options.newWindow=a.newWindow||n.defaults.newWindow,this.options.close=a.close||n.defaults.close,this.options.gravity=a.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=a.positionLeft||n.defaults.positionLeft,this.options.position=a.position||n.defaults.position,this.options.backgroundColor=a.backgroundColor||n.defaults.backgroundColor,this.options.avatar=a.avatar||n.defaults.avatar,this.options.className=a.className||n.defaults.className,this.options.stopOnFocus=a.stopOnFocus===void 0?n.defaults.stopOnFocus:a.stopOnFocus,this.options.onClick=a.onClick||n.defaults.onClick,this.options.offset=a.offset||n.defaults.offset,this.options.escapeMarkup=a.escapeMarkup!==void 0?a.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=a.ariaLive||n.defaults.ariaLive,this.options.style=a.style||n.defaults.style,a.backgroundColor&&(this.options.style.background=a.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var a=document.createElement("div");a.className="toastify on "+this.options.className,this.options.position?a.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(a.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):a.className+=" toastify-right",a.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var u in this.options.style)a.style[u]=this.options.style[u];if(this.options.ariaLive&&a.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)a.appendChild(this.options.node);else if(this.options.escapeMarkup?a.innerText=this.options.text:a.innerHTML=this.options.text,this.options.avatar!==""){var s=document.createElement("img");s.src=this.options.avatar,s.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(s):a.insertAdjacentElement("afterbegin",s)}if(this.options.close===!0){var l=document.createElement("button");l.type="button",l.setAttribute("aria-label","Close"),l.className="toast-close",l.innerHTML="✖",l.addEventListener("click",(function(y){y.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var d=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&d>360?a.insertAdjacentElement("afterbegin",l):a.appendChild(l)}if(this.options.stopOnFocus&&this.options.duration>0){var c=this;a.addEventListener("mouseover",function(y){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){c.removeElement(a)},c.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(y){y.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}).bind(this)),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&a.addEventListener("click",(function(y){y.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var f=o("x",this.options),h=o("y",this.options),p=this.options.position=="left"?f:"-"+f,m=this.options.gravity=="toastify-top"?h:"-"+h;a.style.transform="translate("+p+","+m+")"}return a},showToast:function(){this.toastElement=this.buildToast();var a;if(typeof this.options.selector=="string"?a=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?a=this.options.selector:a=document.body,!a)throw"Root element is not defined";var u=n.defaults.oldestFirst?a.firstChild:a.lastChild;return a.insertBefore(this.toastElement,u),n.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout((function(){this.removeElement(this.toastElement)}).bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(a){a.className=a.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),a.parentNode&&a.parentNode.removeChild(a),this.options.callback.call(a),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var a={top:15,bottom:15},u={top:15,bottom:15},s={top:15,bottom:15},l=document.getElementsByClassName("toastify"),d,c=0;c0?window.innerWidth:screen.width;p<=360?(l[c].style[d]=s[d]+"px",s[d]+=f+h):i(l[c],"toastify-left")===!0?(l[c].style[d]=a[d]+"px",a[d]+=f+h):(l[c].style[d]=u[d]+"px",u[d]+=f+h)}return this};function o(a,u){return u.offset[a]?isNaN(u.offset[a])?u.offset[a]:u.offset[a]+"px":"0px"}function i(a,u){return!a||typeof u!="string"?!1:!!(a.className&&a.className.trim().split(/\s+/gi).indexOf(u)>-1)}return n.lib.init.prototype=n.lib,n})})(Oo);var Il=Oo.exports;const zh=qe(Il);function jh(e,t,n,r){let o=e[t];return Ya(e,()=>{const i=e[t];Object.is(o,i)||n(o=i)},r)}const Fh=Symbol();var Wn={exports:{}},Xt={exports:{}},Hh=Xt.exports,Mi;function Nl(){return Mi||(Mi=1,function(e,t){(function(n,r){e.exports=r()})(at,function(){"use strict";var n={isEqual:!0,isMatchingKey:!0,isPromise:!0,maxSize:!0,onCacheAdd:!0,onCacheChange:!0,onCacheHit:!0,transformKey:!0},r=Array.prototype.slice;function o(c){var f=c.length;return f?f===1?[c[0]]:f===2?[c[0],c[1]]:f===3?[c[0],c[1],c[2]]:r.call(c,0):[]}function i(c){var f={};for(var h in c)n[h]||(f[h]=c[h]);return f}function a(c){return typeof c=="function"&&c.isMemoized}function u(c,f){return c===f||c!==c&&f!==f}function s(c,f){var h={};for(var p in c)h[p]=c[p];for(var p in f)h[p]=f[p];return h}var l=function(){function c(f){this.keys=[],this.values=[],this.options=f;var h=typeof f.isMatchingKey=="function";h?this.getKeyIndex=this._getKeyIndexFromMatchingKey:f.maxSize>1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey=typeof f.transformKey=="function",this.shouldCloneArguments=this.canTransformKey||h,this.shouldUpdateOnAdd=typeof f.onCacheAdd=="function",this.shouldUpdateOnChange=typeof f.onCacheChange=="function",this.shouldUpdateOnHit=typeof f.onCacheHit=="function"}return Object.defineProperty(c.prototype,"size",{get:function(){return this.keys.length},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"snapshot",{get:function(){return{keys:o(this.keys),size:this.size,values:o(this.values)}},enumerable:!1,configurable:!0}),c.prototype._getKeyIndexFromMatchingKey=function(f){var h=this.options,p=h.isMatchingKey,m=h.maxSize,y=this.keys,_=y.length;if(!_)return-1;if(p(y[0],f))return 0;if(m>1){for(var v=1;v<_;v++)if(p(y[v],f))return v}return-1},c.prototype._getKeyIndexForMany=function(f){var h=this.options.isEqual,p=this.keys,m=p.length;if(!m)return-1;if(m===1)return this._getKeyIndexForSingle(f);var y=f.length,_,v;if(y>1){for(var T=0;T1){for(var _=0;_=T&&(m.length=y.length=T)},c.prototype.updateAsyncCache=function(f){var h=this,p=this.options,m=p.onCacheChange,y=p.onCacheHit,_=this.keys[0],v=this.values[0];this.values[0]=v.then(function(T){return h.shouldUpdateOnHit&&y(h,h.options,f),h.shouldUpdateOnChange&&m(h,h.options,f),T},function(T){var O=h.getKeyIndex(_);throw O!==-1&&(h.keys.splice(O,1),h.values.splice(O,1)),T})},c}();function d(c,f){if(f===void 0&&(f={}),a(c))return d(c.fn,s(c.options,f));if(typeof c!="function")throw new TypeError("You must pass a function to `memoize`.");var h=f.isEqual,p=h===void 0?u:h,m=f.isMatchingKey,y=f.isPromise,_=y===void 0?!1:y,v=f.maxSize,T=v===void 0?1:v,O=f.onCacheAdd,x=f.onCacheChange,b=f.onCacheHit,M=f.transformKey,H=s({isEqual:p,isMatchingKey:m,isPromise:_,maxSize:T,onCacheAdd:O,onCacheChange:x,onCacheHit:b,transformKey:M},i(f)),E=new l(H),L=E.keys,w=E.values,I=E.canTransformKey,K=E.shouldCloneArguments,D=E.shouldUpdateOnAdd,C=E.shouldUpdateOnChange,A=E.shouldUpdateOnHit,P=function(){var R=K?o(arguments):arguments;I&&(R=M(R));var U=L.length?E.getKeyIndex(R):-1;if(U!==-1)A&&b(E,H,P),U&&(E.orderByLru(L[U],w[U],U),C&&x(E,H,P));else{var F=c.apply(this,arguments),G=K?R:o(arguments);E.orderByLru(G,F,L.length),_&&E.updateAsyncCache(P),D&&O(E,H,P),C&&x(E,H,P)}return w[0]};return P.cache=E,P.fn=c,P.isMemoized=!0,P.options=H,P}return d})}(Xt,Xt.exports)),Xt.exports}var Qt={exports:{}},Bh=Qt.exports,Oi;function kl(){return Oi||(Oi=1,function(e,t){(function(n,r){r(t)})(at,function(n){"use strict";var r=typeof WeakMap=="function",o=Object.keys;function i(w,I){return w===I||w!==w&&I!==I}function a(w){return w.constructor===Object||w.constructor==null}function u(w){return!!w&&typeof w.then=="function"}function s(w){return!!(w&&w.$$typeof)}function l(){var w=[];return{delete:function(I){for(var K=0;K0;)if(!K(w[C],I[C],C,C,w,I,D))return!1;return!0}function h(w,I,K,D){var C=w.size===I.size;if(C&&w.size){var A={},P=0;w.forEach(function(R,U){if(C){var F=!1,G=0;I.forEach(function(Z,Q){!F&&!A[G]&&(F=K(U,Q,P,G,w,I,D)&&K(R,Z,U,Q,w,I,D),F&&(A[G]=!0)),G++}),P++,C=F}})}return C}var p="_owner",m=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function y(w,I,K,D){var C=o(w),A=C.length;if(o(I).length!==A)return!1;if(A)for(var P=void 0;A-- >0;){if(P=C[A],P===p){var R=s(w),U=s(I);if((R||U)&&R!==U)return!1}if(!m(I,P)||!K(w[P],I[P],P,P,w,I,D))return!1}return!0}var _=function(){return/foo/g.flags==="g"?function(I,K){return I.source===K.source&&I.flags===K.flags}:function(I,K){return I.source===K.source&&I.global===K.global&&I.ignoreCase===K.ignoreCase&&I.multiline===K.multiline&&I.unicode===K.unicode&&I.sticky===K.sticky&&I.lastIndex===K.lastIndex}}();function v(w,I,K,D){var C=w.size===I.size;if(C&&w.size){var A={};w.forEach(function(P,R){if(C){var U=!1,F=0;I.forEach(function(G,Z){!U&&!A[F]&&(U=K(P,G,R,Z,w,I,D),U&&(A[F]=!0)),F++}),C=U}})}return C}var T=typeof Map=="function",O=typeof Set=="function",x=Object.prototype.valueOf;function b(w){var I=typeof w=="function"?w(K):function(D,C,A,P,R,U,F){return K(D,C,F)};function K(D,C,A){if(D===C)return!0;if(D&&C&&typeof D=="object"&&typeof C=="object"){if(a(D)&&a(C))return y(D,C,I,A);var P=Array.isArray(D),R=Array.isArray(C);return P||R?P===R&&f(D,C,I,A):(P=D instanceof Date,R=C instanceof Date,P||R?P===R&&i(D.getTime(),C.getTime()):(P=D instanceof RegExp,R=C instanceof RegExp,P||R?P===R&&_(D,C):u(D)||u(C)?D===C:T&&(P=D instanceof Map,R=C instanceof Map,P||R)?P===R&&h(D,C,I,A):O&&(P=D instanceof Set,R=C instanceof Set,P||R)?P===R&&v(D,C,I,A):D.valueOf!==x||C.valueOf!==x?i(D.valueOf(),C.valueOf()):y(D,C,I,A)))}return D!==D&&C!==C}return K}var M=b(),H=b(function(){return i}),E=b(c()),L=b(c(i));n.circularDeepEqual=E,n.circularShallowEqual=L,n.createCustomEqual=b,n.deepEqual=M,n.sameValueZeroEqual=i,n.shallowEqual=H,Object.defineProperty(n,"__esModule",{value:!0})})}(Qt,Qt.exports)),Qt.exports}var Uh=Wn.exports;(function(e,t){(function(n,r){e.exports=r(Nl(),kl())})(at,function(n,r){"use strict";function o(){return o=Object.assign?Object.assign.bind():function(g){for(var S=1;S=0)&&(z[j]=g[j]);return z}var a={isDeepEqual:!1,isPromise:!1,isReact:!1,isSerialized:!1,isShallowEqual:!1,matchesArg:void 0,matchesKey:void 0,maxAge:void 0,maxArgs:void 0,maxSize:1,onExpire:void 0,profileName:void 0,serializer:void 0,updateCacheForKey:void 0,transformArgs:void 0,updateExpire:!1};function u(){for(var g=arguments.length,S=new Array(g),z=0;zMe&&(ee.keys.length=Me,ee.values.length=Me),ee.keys.unshift(et),ee.values.unshift(V),le.isPromise&&ee.updateAsyncCache(k),de&&de(ee,le,k),Ne&&Ne(ee,le,k)}else{var st=ee.keys[He];ee.values[He]=V,He>0&&ee.orderByLru(st,V,He),le.isPromise&&ee.updateAsyncCache(k),typeof Ne=="function"&&Ne(ee,le,k)}},k.values=function(){return k.cacheSnapshot.values}}function A(g,S){var z=S.expirations,N=S.options,j=S.originalFunction,k=g.options;Object.defineProperties(g,{_microMemoizeOptions:{configurable:!0,get:function(){return k}},cacheSnapshot:{configurable:!0,get:function(){var J=g.cache;return{keys:J.keys.slice(0),size:J.size,values:J.values.slice(0)}}},expirations:{configurable:!0,get:function(){return z}},expirationsSnapshot:{configurable:!0,get:function(){return z.slice(0)}},isMoized:{configurable:!0,get:function(){return!0}},options:{configurable:!0,get:function(){return N}},originalFunction:{configurable:!0,get:function(){return j}}});var $=g;D(j,$)}function P(g,S){return C(g,S),A(g,S),g}var R=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function U(g,S,z){var N=g(o({maxArgs:2,isShallowEqual:!0},z,{isReact:!1}));S.displayName||(S.displayName=S.name||"Component");function j(k,$,V){this.props=k,this.context=$,this.updater=V,this.MoizedComponent=N(S)}return j.prototype.isReactComponent={},j.prototype.render=function(){return{$$typeof:R,type:this.MoizedComponent,props:this.props,ref:null,key:null,_owner:null}},D(S,j,["contextType","contextTypes"]),j.displayName="Moized("+(S.displayName||S.name||"Component")+")",h(j,S.name,z.profileName),j}function F(g){return function(S){if(g>=S.length)return S;if(g===0)return[];if(g===1)return[S[0]];if(g===2)return[S[0],S[1]];if(g===3)return[S[0],S[1],S[2]];for(var z=[],N=0;N=0?N.maxAge:a.maxAge,maxArgs:typeof N.maxArgs=="number"&&N.maxArgs>=0?N.maxArgs:a.maxArgs,maxSize:typeof N.maxSize=="number"&&N.maxSize>=0?N.maxSize:a.maxSize,profileName:N.profileName||E(S)}),V=[];$.matchesArg,$.isDeepEqual;var J=$.isPromise;$.isReact,$.isSerialized,$.isShallowEqual,$.matchesKey,$.maxAge,$.maxArgs;var ee=$.maxSize,le=$.onCacheAdd,de=$.onCacheChange,Ne=$.onCacheHit;$.onExpire,$.profileName,$.serializer;var Fe=$.updateCacheForKey;$.transformArgs,$.updateExpire;var et=i($,Ie),He=je($),Me=Ce($),st=v(V,$,He,Me),gn=I($),qt=ce($),Gt=o({},et,{isEqual:He,isMatchingKey:Me,isPromise:J,maxSize:ee,onCacheAdd:pe(u(le,st.onCacheAdd,gn.onCacheAdd)),onCacheChange:pe(de),onCacheHit:pe(u(Ne,st.onCacheHit,gn.onCacheHit)),transformKey:qt}),pr=n(S,Gt),gt=P(pr,{expirations:V,options:$,originalFunction:S});return Fe&&(gt=Ae(gt)),h(gt,S.name,N.profileName),gt};B.clearStats=x,B.collectStats=b,B.compose=function(){return s.apply(void 0,arguments)||B},B.deep=B({isDeepEqual:!0}),B.getStats=w,B.infinite=B({maxSize:1/0}),B.isCollectingStats=function(){return T.isCollectingStats},B.isMoized=function(S){return typeof S=="function"&&!!S.isMoized},B.matchesArg=function(g){return B({matchesArg:g})},B.matchesKey=function(g){return B({matchesKey:g})};function ve(g,S){if(S===!0)return B({maxAge:g,updateExpire:S});if(typeof S=="object"){var z=S.onExpire,N=S.updateExpire;return B({maxAge:g,onExpire:z,updateExpire:N})}return B(typeof S=="function"?{maxAge:g,onExpire:S,updateExpire:!0}:{maxAge:g})}return B.maxAge=ve,B.maxArgs=function(g){return B({maxArgs:g})},B.maxSize=function(g){return B({maxSize:g})},B.profile=function(g){return B({profileName:g})},B.promise=B({isPromise:!0,updateExpire:!0}),B.react=B({isReact:!0}),B.serialize=B({isSerialized:!0}),B.serializeWith=function(g){return B({isSerialized:!0,serializer:g})},B.shallow=B({isShallowEqual:!0}),B.transformArgs=function(g){return B({transformArgs:g})},B.updateCacheForKey=function(g){return B({updateCacheForKey:g})},Object.defineProperty(B,"default",{configurable:!1,enumerable:!1,value:B,writable:!1}),B})})(Wn,Wn.exports);var $l=Wn.exports;const Kh=qe($l);let zl=class extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}};function qh({limit:e,interval:t,strict:n,onDelay:r}){if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const o=new Map;let i=0,a=0;function u(){const c=Date.now();return c-i>t?(a=1,i=c,0):(a0&&c-s.at(-1)>t&&(s.length=0),s.length{const f=function(...h){if(!f.isEnabled)return(async()=>c.apply(this,h))();let p;return new Promise((m,y)=>{const _=()=>{m(c.apply(this,h)),o.delete(p)},v=d();v>0?(p=setTimeout(_,v),o.set(p,y),r==null||r()):_()})};return f.abort=()=>{for(const h of o.keys())clearTimeout(h),o.get(h)(new zl);o.clear(),s.splice(0,s.length)},f.isEnabled=!0,Object.defineProperty(f,"queueSize",{get(){return o.size}}),f}}const cs=new Set,Re=new WeakMap,zt=new WeakMap,ht=new WeakMap,to=new WeakMap,jl=new WeakMap,jt=new WeakMap,qn=new WeakMap,en=new WeakSet;let ot,Po=0,Ro=0;const Ze="__aa_tgt",fn="__aa_del",Gn="__aa_new",Fl=e=>{const t=Wl(e);t&&t.forEach(n=>ql(n))},Hl=e=>{e.forEach(t=>{t.target===ot&&Ul(),Re.has(t.target)&&_t(t.target)})};function Bl(e){const t=to.get(e);t==null||t.disconnect();let n=Re.get(e),r=0;const o=5;n||(n=Ft(e),Re.set(e,n));const{offsetWidth:i,offsetHeight:a}=ot,s=[n.top-o,i-(n.left+o+n.width),a-(n.top+o+n.height),n.left-o].map(d=>`${-1*Math.floor(d)}px`).join(" "),l=new IntersectionObserver(()=>{++r>1&&_t(e)},{root:ot,threshold:1,rootMargin:s});l.observe(e),to.set(e,l)}function _t(e){clearTimeout(qn.get(e));const t=lr(e),n=hn(t)?500:t.duration;qn.set(e,setTimeout(async()=>{const r=ht.get(e);try{await(r==null?void 0:r.finished),Re.set(e,Ft(e)),Bl(e)}catch{}},n))}function Ul(){clearTimeout(qn.get(ot)),qn.set(ot,setTimeout(()=>{cs.forEach(e=>hs(e,t=>ls(()=>_t(t))))},100))}function Kl(e){setTimeout(()=>{jl.set(e,setInterval(()=>ls(_t.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function ls(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let no,Rt;typeof window<"u"&&(ot=document.documentElement,no=new MutationObserver(Fl),Rt=new ResizeObserver(Hl),window.addEventListener("scroll",()=>{Ro=window.scrollY,Po=window.scrollX}),Rt.observe(ot));function Wl(e){return e.reduce((r,o)=>[...r,...Array.from(o.addedNodes),...Array.from(o.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:e.reduce((r,o)=>{if(r===!1)return!1;if(o.target instanceof Element){if(Ar(o.target),!r.has(o.target)){r.add(o.target);for(let i=0;in(e,jt.has(e)));for(let n=0;no(r,jt.has(r)))}}function Do(e){return Array.isArray(e)?e:[e]}function hn(e){return typeof e=="function"}function Yl(e){const t=Re.get(e),n=Ft(e);if(!Lo(e))return Re.set(e,n);let r;if(!t)return;const o=lr(e);if(typeof o!="function"){const i=t.left-n.left,a=t.top-n.top,[u,s,l,d]=ds(e,t,n),c={transform:`translate(${i}px, ${a}px)`},f={transform:"translate(0, 0)"};u!==s&&(c.width=`${u}px`,f.width=`${s}px`),l!==d&&(c.height=`${l}px`,f.height=`${d}px`),r=e.animate([c,f],{duration:o.duration,easing:o.easing})}else{const[i]=Do(o(e,"remain",t,n));r=new Animation(i),r.play()}ht.set(e,r),Re.set(e,n),r.addEventListener("finish",_t.bind(null,e))}function Pi(e){Gn in e&&delete e[Gn];const t=Ft(e);Re.set(e,t);const n=lr(e);if(!Lo(e))return;let r;if(typeof n!="function")r=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"});else{const[o]=Do(n(e,"add",t));r=new Animation(o),r.play()}ht.set(e,r),r.addEventListener("finish",_t.bind(null,e))}function Ri(e,t){var n;e.remove(),Re.delete(e),zt.delete(e),ht.delete(e),(n=to.get(e))===null||n===void 0||n.disconnect(),setTimeout(()=>{if(fn in e&&delete e[fn],Object.defineProperty(e,Gn,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(const r in t)e.style[r]=""},0)}function Zl(e){var t;if(!zt.has(e)||!Re.has(e))return;const[n,r]=zt.get(e);Object.defineProperty(e,fn,{value:!0,configurable:!0});const o=window.scrollX,i=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=fs(e))===null||t===void 0||t.appendChild(e),!Lo(e))return Ri(e);const[a,u,s,l]=Jl(e),d=lr(e),c=Re.get(e);(o!==Po||i!==Ro)&&Vl(e,o,i,d);let f,h={position:"absolute",top:`${a}px`,left:`${u}px`,width:`${s}px`,height:`${l}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!hn(d))Object.assign(e.style,h),f=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:d.duration,easing:"ease-out"});else{const[p,m]=Do(d(e,"remove",c));(m==null?void 0:m.styleReset)!==!1&&(h=(m==null?void 0:m.styleReset)||h,Object.assign(e.style,h)),f=new Animation(p),f.play()}ht.set(e,f),f.addEventListener("finish",Ri.bind(null,e,h))}function Vl(e,t,n,r){const o=Po-t,i=Ro-n,a=document.documentElement.style.scrollBehavior;if(getComputedStyle(ot).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+o,window.scrollY+i),!e.parentElement)return;const s=e.parentElement;let l=s.clientHeight,d=s.clientWidth;const c=performance.now();function f(){requestAnimationFrame(()=>{if(!hn(r)){const h=l-s.clientHeight,p=d-s.clientWidth;c+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-p,top:window.scrollY-h}),l=s.clientHeight,d=s.clientWidth,f()):document.documentElement.style.scrollBehavior=a}})}f()}function Jl(e){const t=Re.get(e),[n,,r]=ds(e,t,Ft(e));let o=e.parentElement;for(;o&&(getComputedStyle(o).position==="static"||o instanceof HTMLBodyElement);)o=o.parentElement;o||(o=document.body);const i=getComputedStyle(o),a=Re.get(o)||Ft(o),u=Math.round(t.top-a.top)-Ue(i.borderTopWidth),s=Math.round(t.left-a.left)-Ue(i.borderLeftWidth);return[u,s,n,r]}function Xl(e,t={}){return no&&Rt&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!hn(t)&&!t.disrespectUserMotionPreference||(en.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),hs(e,_t,Kl,o=>Rt==null?void 0:Rt.observe(o)),hn(t)?jt.set(e,t):jt.set(e,{duration:250,easing:"ease-in-out",...t}),no.observe(e,{childList:!0}),cs.add(e))),Object.freeze({parent:e,enable:()=>{en.add(e)},disable:()=>{en.delete(e)},isEnabled:()=>en.has(e)})}function Gh(e){const t=q(null),[n,r]=me(),o=i=>{n&&(i?n.enable():n.disable())};return ie(()=>{t.current instanceof HTMLElement&&r(Xl(t.current,e||{}))},[]),[t,o]}var Io={exports:{}},Ql="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ed=Ql;var td=ed;function ps(){}function ms(){}ms.resetWarningCache=ps;var nd=function(){function e(r,o,i,a,u,s){if(s!==td){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ms,resetWarningCache:ps};return n.PropTypes=n,n};var Yh=Io.exports;if(!1)var Zh,Vh;else Io.exports=nd();var Y=Io.exports;const No=e=>!!e&&e[0]==="o",ro=mo||(e=>e());const xt=(e,t,n=1e-4)=>Math.abs(e-t)e===!0||!!(e&&e[t]),xe=(e,t)=>typeof e=="function"?e(t):e,rd="_szhsinMenu",od=e=>e[rd];const Kt=(e,t)=>(t&&Object.keys(t).forEach(n=>{const r=e[n],o=t[n];typeof o=="function"&&r?e[n]=(...i)=>{o(...i),r(...i)}:e[n]=o}),e),id=e=>{if(typeof e!="string")return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],r=isNaN(t[1])?n:t[1];return{top:n,right:r,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?r:t[3]}},Mr=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+r+n))return e}};function dr(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Li(e,t){for(let n=0;n({[e?`${e}ClassName`:"className"]:Y.oneOfType([Y.string,Y.func])}),sd={className:Y.string,...ad("menu"),arrowProps:Y.object,focusProps:Y.object,menuStyle:Y.object,arrow:Y.bool,setDownOverflow:Y.bool,gap:Y.number,shift:Y.number,align:Y.oneOf(["start","center","end"]),direction:Y.oneOf(["left","right","top","bottom"]),position:Y.oneOf(["auto","anchor","initial"]),overflow:Y.oneOf(["auto","visible","hidden"])},Jh={...sd,containerProps:Y.object,initialMounted:Y.bool,unmountOnClose:Y.bool,transition:Y.oneOfType([Y.bool,Y.exact({open:Y.bool,close:Y.bool,item:Y.bool})]),transitionTimeout:Y.number,boundingBoxRef:Y.object,boundingBoxPadding:Y.string,reposition:Y.oneOf(["auto","initial"]),repositionFlag:Y.oneOfType([Y.string,Y.number]),viewScroll:Y.oneOf(["auto","close","initial"]),submenuOpenDelay:Y.number,submenuCloseDelay:Y.number,portal:Y.oneOfType([Y.bool,Y.exact({target:Y.object,stablePosition:Y.bool})]),theming:Y.string,onItemClick:Y.func},Xh={instanceRef:Y.oneOfType([Y.object,Y.func]),onMenuChange:Y.func},We=({block:e,element:t,modifiers:n,className:r})=>ae(()=>{const o=t?`${e}__${t}`:e;let i=o;n&&Object.keys(n).forEach(u=>{const s=n[u];s&&(i+=` ${o}--${s===!0?u:`${u}-${s}`}`)});let a=typeof r=="function"?r(n):r;return typeof a=="string"&&(a=a.trim(),a&&(i+=` ${a}`)),i},[e,t,n,r]),ud="szh-menu-container",Ke="szh-menu";const cd="arrow",ko="item",ld="divider",dd="header",fd="group",hd="submenu";const _s=be(),$o=be({}),Yn=be({}),zo=be({}),pd=be({}),fr=be({}),we=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),he=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),mn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Dt=Object.freeze({FIRST:"first",LAST:"last"}),md=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Or="absolute",jo="presentation",hr="menuitem",Di={"aria-hidden":!0,role:hr};const _d=({className:e,containerRef:t,containerProps:n,children:r,isOpen:o,theming:i,transition:a,onClose:u})=>{const s=pn(a,"item");return se("div",{...Kt({onKeyDown:({key:c})=>{switch(c){case we.ESC:xe(u,{key:c,reason:mn.CANCEL});break}},onBlur:c=>{o&&!c.currentTarget.contains(c.relatedTarget)&&xe(u,{reason:mn.BLUR})}},n),className:We({block:ud,modifiers:ae(()=>({theme:i,itemTransition:s}),[i,s]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:r})},yd=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,r,o)=>{t?e||(e=setTimeout(()=>{e=0,r()},n)):o==null||o()},off:()=>{e&&(clearTimeout(e),e=0)}}},vd=(e,t)=>{const[n,r]=me(),i=q({items:[],hoverIndex:-1,sorted:!1}).current,a=_e((s,l)=>{const{items:d}=i;if(!s)i.items=[];else if(l)d.push(s);else{const c=d.indexOf(s);c>-1&&(d.splice(c,1),s.contains(document.activeElement)&&(t.current.focus(),r()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),u=_e((s,l,d)=>{const{items:c,hoverIndex:f}=i,h=()=>{if(i.sorted)return;const y=e.current.querySelectorAll(".szh-menu__item");c.sort((_,v)=>Li(y,_)-Li(y,v)),i.sorted=!0};let p=-1,m;switch(s){case he.RESET:break;case he.SET:m=l;break;case he.UNSET:m=y=>y===l?void 0:y;break;case he.FIRST:h(),p=0,m=c[p];break;case he.LAST:h(),p=c.length-1,m=c[p];break;case he.SET_INDEX:h(),p=d,m=c[p];break;case he.INCREASE:h(),p=f,p<0&&(p=c.indexOf(l)),p++,p>=c.length&&(p=0),m=c[p];break;case he.DECREASE:h(),p=f,p<0&&(p=c.indexOf(l)),p--,p<0&&(p=c.length-1),m=c[p];break;default:}m||(p=-1),r(m),i.hoverIndex=p},[e,i]);return{hoverItem:n,dispatch:u,updateItems:a}},gd=(e,t,n,r)=>{const o=t.current.getBoundingClientRect(),i=e.current.getBoundingClientRect(),a=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),u=id(r),s=p=>p+i.left-a.left-u.left,l=p=>p+i.left+o.width-a.right+u.right,d=p=>p+i.top-a.top-u.top,c=p=>p+i.top+o.height-a.bottom+u.bottom;return{menuRect:o,containerRect:i,getLeftOverflow:s,getRightOverflow:l,getTopOverflow:d,getBottomOverflow:c,confineHorizontally:p=>{let m=s(p);if(m<0)p-=m;else{const y=l(p);y>0&&(p-=y,m=s(p),m<0&&(p-=m))}return p},confineVertically:p=>{let m=d(p);if(m<0)p-=m;else{const y=c(p);y>0&&(p-=y,m=d(p),m<0&&(p-=m))}return p}}},wd=({arrowRef:e,menuY:t,anchorRect:n,containerRect:r,menuRect:o})=>{let i=n.top-r.top-t+n.height/2;const a=e.current.offsetHeight*1.25;return i=Math.max(a,i),i=Math.min(i,o.height-a),i},bd=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:r,placeLeftX:o,placeRightX:i,getLeftOverflow:a,getRightOverflow:u,confineHorizontally:s,confineVertically:l,arrowRef:d,arrow:c,direction:f,position:h})=>{let p=f,m=r;h!=="initial"&&(m=l(m),h==="anchor"&&(m=Math.min(m,e.bottom-t.top),m=Math.max(m,e.top-t.top-n.height)));let y,_,v;return p==="left"?(y=o,h!=="initial"&&(_=a(y),_<0&&(v=u(i),(v<=0||-_>v)&&(y=i,p="right")))):(y=i,h!=="initial"&&(v=u(y),v>0&&(_=a(o),(_>=0||-_{let i=n.left-r.left-t+n.width/2;const a=e.current.offsetWidth*1.25;return i=Math.max(a,i),i=Math.min(i,o.width-a),i},Sd=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:r,placeTopY:o,placeBottomY:i,getTopOverflow:a,getBottomOverflow:u,confineHorizontally:s,confineVertically:l,arrowRef:d,arrow:c,direction:f,position:h})=>{let p=f==="top"?"top":"bottom",m=r;h!=="initial"&&(m=s(m),h==="anchor"&&(m=Math.min(m,e.right-t.left),m=Math.max(m,e.left-t.left-n.width)));let y,_,v;return p==="top"?(y=o,h!=="initial"&&(_=a(y),_<0&&(v=u(i),(v<=0||-_>v)&&(y=i,p="bottom")))):(y=i,h!=="initial"&&(v=u(y),v>0&&(_=a(o),(_>=0||-_{const{menuRect:l,containerRect:d}=s,c=n==="left"||n==="right";let f=c?r:o,h=c?o:r;if(e){const x=u.current;c?f+=x.offsetWidth:h+=x.offsetHeight}const p=a.left-d.left-l.width-f,m=a.right-d.left+f,y=a.top-d.top-l.height-h,_=a.bottom-d.top+h;let v,T;t==="end"?(v=a.right-d.left-l.width,T=a.bottom-d.top-l.height):t==="center"?(v=a.left-d.left-(l.width-a.width)/2,T=a.top-d.top-(l.height-a.height)/2):(v=a.left-d.left,T=a.top-d.top),v+=f,T+=h;const O={...s,anchorRect:a,placeLeftX:p,placeRightX:m,placeLeftorRightY:T,placeTopY:y,placeBottomY:_,placeToporBottomX:v,arrowRef:u,arrow:e,direction:n,position:i};switch(n){case"left":case"right":return bd(O);case"top":case"bottom":default:return Sd(O)}},It=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Xe:ie;function Ii(e,t){typeof e=="function"?e(t):e.current=t}const Wt=(e,t)=>ae(()=>e?t?n=>{Ii(e,n),Ii(t,n)}:e:t,[e,t]),Ni=-9999,ys=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:r,arrowProps:o={},anchorPoint:i,anchorRef:a,containerRef:u,containerProps:s,focusProps:l,externalRef:d,parentScrollingRef:c,align:f="start",direction:h="bottom",position:p="auto",overflow:m="visible",setDownOverflow:y,repositionFlag:_,captureFocus:v=!0,state:T,endTransition:O,isDisabled:x,menuItemFocus:b,gap:M=0,shift:H=0,children:E,onClose:L,...w})=>{const[I,K]=me({x:Ni,y:Ni}),[D,C]=me({}),[A,P]=me(),[R,U]=me(h),[F]=me(yd),[G,Z]=or(X=>X+1,1),{transition:Q,boundingBoxRef:re,boundingBoxPadding:ue,rootMenuRef:Ee,rootAnchorRef:pe,scrollNodesRef:je,reposition:Ce,viewScroll:ce,submenuCloseDelay:Ae}=ne(fr),{submenuCtx:Ie,reposSubmenu:B=_}=ne(Yn),ve=q(null),g=q(),S=q(),z=q(!1),N=q({width:0,height:0}),j=q(()=>{}),{hoverItem:k,dispatch:$,updateItems:V}=vd(ve,g),J=No(T),ee=pn(Q,"open"),le=pn(Q,"close"),de=je.current,Ne=X=>{switch(X.key){case we.HOME:$(he.FIRST);break;case we.END:$(he.LAST);break;case we.UP:$(he.DECREASE,k);break;case we.DOWN:$(he.INCREASE,k);break;case we.SPACE:X.target&&X.target.className.indexOf(Ke)!==-1&&X.preventDefault();return;default:return}X.preventDefault(),X.stopPropagation()},Fe=()=>{T==="closing"&&P(),xe(O)},et=X=>{X.stopPropagation(),F.on(Ae,()=>{$(he.RESET),g.current.focus()})},He=X=>{X.target===X.currentTarget&&F.off()},Me=_e(X=>{var Se;const Be=a?(Se=a.current)==null?void 0:Se.getBoundingClientRect():i?{left:i.x,right:i.x,top:i.y,bottom:i.y,width:0,height:0}:null;if(!Be)return;de.menu||(de.menu=(re?re.current:Mr(Ee.current))||window);const ke=gd(u,ve,de.menu,ue);let{arrowX:ge,arrowY:bt,x:Et,y:Ge,computedDirection:yr}=Td({arrow:r,align:f,direction:h,gap:M,shift:H,position:p,anchorRect:Be,arrowRef:S,positionHelpers:ke});const{menuRect:Uo}=ke;let St=Uo.height;if(!X&&m!=="visible"){const{getTopOverflow:zs,getBottomOverflow:js}=ke;let Tt,vr;const Ko=N.current.height,bn=js(Ge);if(bn>0||xt(bn,0)&&xt(St,Ko))Tt=St-bn,vr=bn;else{const Yt=zs(Ge);(Yt<0||xt(Yt,0)&&xt(St,Ko))&&(Tt=St+Yt,vr=0-Yt,Tt>=0&&(Ge-=Yt))}Tt>=0?(St=Tt,P({height:Tt,overflowAmt:vr})):P()}r&&C({x:ge,y:bt}),K({x:Et,y:Ge}),U(yr),N.current={width:Uo.width,height:St}},[r,f,ue,h,M,H,p,m,i,a,u,re,Ee,de]);It(()=>{J&&(Me(),z.current&&Z()),z.current=J,j.current=Me},[J,Me,B]),It(()=>{A&&!y&&(ve.current.scrollTop=0)},[A,y]),It(()=>V,[V]),ie(()=>{let{menu:X}=de;if(!J||!X)return;if(X=X.addEventListener?X:window,!de.anchors){de.anchors=[];let ge=Mr(pe&&pe.current);for(;ge&&ge!==X;)de.anchors.push(ge),ge=Mr(ge)}let Se=ce;if(de.anchors.length&&Se==="initial"&&(Se="auto"),Se==="initial")return;const Be=()=>{Se==="auto"?ro(()=>Me(!0)):xe(L,{reason:mn.SCROLL})},ke=de.anchors.concat(ce!=="initial"?X:[]);return ke.forEach(ge=>ge.addEventListener("scroll",Be)),()=>ke.forEach(ge=>ge.removeEventListener("scroll",Be))},[pe,de,J,L,ce,Me]);const st=!!A&&A.overflowAmt>0;ie(()=>{if(st||!J||!c)return;const X=()=>ro(Me),Se=c.current;return Se.addEventListener("scroll",X),()=>Se.removeEventListener("scroll",X)},[J,st,c,Me]),ie(()=>{if(typeof ResizeObserver!="function"||Ce==="initial")return;const X=new ResizeObserver(([Be])=>{const{borderBoxSize:ke,target:ge}=Be;let bt,Et;if(ke){const{inlineSize:Ge,blockSize:yr}=ke[0]||ke;bt=Ge,Et=yr}else{const Ge=ge.getBoundingClientRect();bt=Ge.width,Et=Ge.height}bt===0||Et===0||xt(bt,N.current.width,1)&&xt(Et,N.current.height,1)||_o(()=>{j.current(),Z()})}),Se=ve.current;return X.observe(Se,{box:"border-box"}),()=>X.unobserve(Se)},[Ce]),ie(()=>{if(!J){$(he.RESET),le||P();return}const{position:X,alwaysUpdate:Se}=b||{},Be=()=>{X===Dt.FIRST?$(he.FIRST):X===Dt.LAST?$(he.LAST):X>=-1&&$(he.SET_INDEX,void 0,X)};if(Se)Be();else if(v){const ke=setTimeout(()=>{const ge=ve.current;ge&&!ge.contains(document.activeElement)&&(g.current.focus(),Be())},ee?170:100);return()=>clearTimeout(ke)}},[J,ee,le,v,b,$]);const gn=ae(()=>({isParentOpen:J,submenuCtx:F,dispatch:$,updateItems:V}),[J,F,$,V]);let qt,Gt;A&&(y?Gt=A.overflowAmt:qt=A.height);const pr=ae(()=>({reposSubmenu:G,submenuCtx:F,overflow:m,overflowAmt:Gt,parentMenuRef:ve,parentDir:R}),[G,F,m,Gt,R]),gt=qt>=0?{maxHeight:qt,overflow:m}:void 0,wt=ae(()=>({state:T,dir:R}),[T,R]),mr=ae(()=>({dir:R}),[R]),_r=We({block:Ke,element:cd,modifiers:mr,className:o.className}),wn=se("ul",{role:"menu","aria-label":e,...dr(x),...Kt({onPointerEnter:Ie==null?void 0:Ie.off,onPointerMove:et,onPointerLeave:He,onKeyDown:Ne,onAnimationEnd:Fe},w),ref:Wt(d,ve),className:We({block:Ke,modifiers:wt,className:t}),style:{...n,...gt,margin:0,display:T==="closed"?"none":void 0,position:Or,left:I.x,top:I.y},children:[se("li",{tabIndex:-1,style:{position:Or,left:0,top:0,display:"block",outline:"none"},ref:g,...Di,...l}),r&&se("li",{...Di,...o,className:_r,style:{display:"block",position:Or,left:D.x,top:D.y,...o.style},ref:S}),se(Yn.Provider,{value:pr,children:se($o.Provider,{value:gn,children:se(_s.Provider,{value:k,children:xe(E,wt)})})})]});return s?se(_d,{...s,isOpen:J,children:wn}):wn},xd=it(function({"aria-label":t,className:n,containerProps:r,initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:u,boundingBoxRef:s,boundingBoxPadding:l,reposition:d="auto",submenuOpenDelay:c=300,submenuCloseDelay:f=150,viewScroll:h="initial",portal:p,theming:m,onItemClick:y,..._},v){const T=q(null),O=q({}),{anchorRef:x,state:b,onClose:M}=_,H=ae(()=>({initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:u,boundingBoxRef:s,boundingBoxPadding:l,rootMenuRef:T,rootAnchorRef:x,scrollNodesRef:O,reposition:d,viewScroll:h,submenuOpenDelay:c,submenuCloseDelay:f}),[o,i,a,u,x,s,l,d,h,c,f]),E=ae(()=>({handleClick(w,I){w.stopPropagation||xe(y,w);let K=w.keepOpen;K===void 0&&(K=I&&w.key===we.SPACE),K||xe(M,{value:w.value,key:w.key,reason:mn.CLICK})},handleClose(w){xe(M,{key:w,reason:mn.CLICK})}}),[y,M]);if(!b)return null;const L=se(fr.Provider,{value:H,children:se(zo.Provider,{value:E,children:se(ys,{..._,ariaLabel:t||"Menu",externalRef:v,containerRef:T,containerProps:{className:n,containerRef:T,containerProps:r,theming:m,transition:a,onClose:M}})})});return p===!0&&typeof document<"u"?ln(L,document.body):p?p.target?ln(L,p.target):p.stablePosition?null:L:L}),oo=0,io=1,Zn=2,Vn=3,Jn=4,Cd=5,vs=6,Ad=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],gs=e=>({_s:e,status:Ad[e],isEnter:eJn}),ao=e=>e?vs:Cd,Md=(e,t)=>{switch(e){case io:case oo:return Zn;case Jn:case Vn:return ao(t)}},Od=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],ki=(e,t,n,r,o)=>{clearTimeout(r.current);const i=gs(e);t(i),n.current=i,o&&o({current:i})},Pd=({enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:o,initialEntered:i,mountOnEnter:a,unmountOnExit:u,onStateChange:s}={})=>{const[l,d]=me(()=>gs(i?Zn:ao(a))),c=q(l),f=q(),[h,p]=Od(o),m=_e(()=>{const _=Md(c.current._s,u);_&&ki(_,d,c,f,s)},[s,u]),y=_e(_=>{const v=O=>{switch(ki(O,d,c,f,s),O){case io:h>=0&&(f.current=setTimeout(m,h));break;case Jn:p>=0&&(f.current=setTimeout(m,p));break;case oo:case Vn:f.current=setTimeout(()=>v(O+1),0);break}},T=c.current.isEnter;typeof _!="boolean"&&(_=!T),_?!T&&v(e?n?oo:io:Zn):T&&v(t?r?Vn:Jn:ao(u))},[m,s,e,t,n,r,h,p,u]);return ie(()=>()=>clearTimeout(f.current),[]),[l,y,m]};const Rd=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:r,transitionTimeout:o=500}={})=>{const[{status:i},a,u]=Pd({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:o,enter:pn(r,"open"),exit:pn(r,"close")});return[{state:md[i],endTransition:u},a]},ws=e=>{const[t,n]=Rd(e),[r,o]=me(),i=(a,u)=>{o({position:a,alwaysUpdate:u}),n(!0)};return[{menuItemFocus:r,...t},n,i]},Ld=(e,t)=>{const[n]=me({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:r=>n.v?n.v=!1:t(!0,r)}},bs=(e,t)=>{const n=q(t);ie(()=>{n.current!==t&&xe(e,{open:t}),n.current=t},[e,t])},Qh=it(function({"aria-label":t,captureFocus:n,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:a,...u},s){const[l,d,c]=ws(u),{state:f}=l,h=No(f),p=q(null),m=Ld(f,(x,b)=>c(b.detail?void 0:Dt.FIRST)),y=_e(x=>{d(!1),x.key&&p.current.focus()},[d]),_=x=>{switch(x.key){case we.UP:c(Dt.LAST);break;case we.DOWN:c(Dt.FIRST);break;default:return}x.preventDefault()},v=xe(o,{open:h});if(!v||!v.type)throw new Error("Menu requires a menuButton prop.");const T={ref:Wt(v.ref,p),...Kt({onKeyDown:_,...m},v.props)};od(v.type)==="MenuButton"&&(T.isOpen=h);const O=sr(v,T);return bs(a,h),ir(i,()=>({openMenu:c,closeMenu:()=>d(!1)})),se(De,{children:[O,se(xd,{...u,...l,"aria-label":t||(typeof v.props.children=="string"?v.props.children:"Menu"),anchorRef:p,ref:s,onClose:y})]})}),Fo=(e,t)=>{const n=vn(t),r=it((o,i)=>{const a=q(null);return se(n,{...o,itemRef:a,externalRef:i,isHovering:ne(_s)===a.current})});return r.displayName=`WithHovering(${e})`,r},Es=(e,t,n)=>{It(()=>{if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])},ep=Fo("SubMenu",function({"aria-label":t,className:n,disabled:r,direction:o,label:i,openTrigger:a,onMenuChange:u,isHovering:s,instanceRef:l,itemRef:d,captureFocus:c,repositionFlag:f,itemProps:h={},...p}){const m=ne(fr),{rootMenuRef:y,submenuOpenDelay:_,submenuCloseDelay:v}=m,{parentMenuRef:T,parentDir:O,overflow:x}=ne(Yn),{isParentOpen:b,submenuCtx:M,dispatch:H,updateItems:E}=ne($o),L=x!=="visible",[w,I,K]=ws(m),{state:D}=w,C=!!r,A=No(D),P=q(null),[R]=me({v:0}),U=()=>{M.off(),R.v&&(clearTimeout(R.v),R.v=0)},F=(...B)=>{U(),G(),!C&&K(...B)},G=()=>!s&&!C&&H(he.SET,d.current),Z=B=>{G(),a||(R.v=setTimeout(()=>ro(F),Math.max(B,0)))},Q=B=>{C||(B.stopPropagation(),!(R.v||A)&&M.on(v,()=>Z(_-v),()=>Z(_)))},re=()=>{U(),A||H(he.UNSET,d.current)},ue=B=>{if(s)switch(B.key){case we.ENTER:B.preventDefault();case we.SPACE:case we.RIGHT:a!=="none"&&F(Dt.FIRST)}},Ee=B=>{let ve=!1;switch(B.key){case we.LEFT:A&&(d.current.focus(),I(!1),ve=!0);break;case we.RIGHT:A||(ve=!0);break}ve&&(B.preventDefault(),B.stopPropagation())};Es(C,d,E),bs(u,A),ie(()=>M.toggle(A),[M,A]),ie(()=>()=>clearTimeout(R.v),[R]),ie(()=>{s&&b?d.current.focus():I(!1)},[s,b,I,d]),ir(l,()=>({openMenu:(...B)=>{b&&F(...B)},closeMenu:()=>{A&&(d.current.focus(),I(!1))}}));const pe=ae(()=>({open:A,hover:s,disabled:C,submenu:!0}),[A,s,C]),{ref:je,className:Ce,...ce}=h,Ae=Kt({onPointerEnter:M.off,onPointerMove:Q,onPointerLeave:re,onKeyDown:ue,onClick:()=>a!=="none"&&F()},ce),Ie=()=>{const B=se(ys,{...p,...w,ariaLabel:t||(typeof i=="string"?i:"Submenu"),anchorRef:d,containerRef:L?y:P,direction:o||(O==="right"||O==="left"?O:"right"),parentScrollingRef:L&&T,isDisabled:C}),ve=y.current;return L&&ve?ln(B,ve):B};return se("li",{className:We({block:Ke,element:hd,className:n}),style:{position:"relative"},role:jo,ref:P,onKeyDown:Ee,children:[se("div",{role:hr,"aria-haspopup":!0,"aria-expanded":A,...dr(C,s),...Ae,ref:Wt(je,d),className:We({block:Ke,element:ko,modifiers:pe,className:Ce}),children:ae(()=>xe(i,pe),[i,pe])}),D&&Ie()]})}),Ss=(e,t,n,r)=>{const{submenuCloseDelay:o}=ne(fr),{isParentOpen:i,submenuCtx:a,dispatch:u,updateItems:s}=ne($o),l=()=>{!n&&!r&&u(he.SET,e.current)},d=()=>{!r&&u(he.UNSET,e.current)},c=p=>{n&&!p.currentTarget.contains(p.relatedTarget)&&d()},f=p=>{r||(p.stopPropagation(),a.on(o,l,l))},h=(p,m)=>{a.off(),!m&&d()};return Es(r,e,s),ie(()=>{n&&i&&t.current&&t.current.focus()},[t,n,i]),{setHover:l,onBlur:c,onPointerMove:f,onPointerLeave:h}},tp=Fo("MenuItem",function({className:t,value:n,href:r,type:o,checked:i,disabled:a,children:u,onClick:s,isHovering:l,itemRef:d,externalRef:c,...f}){const h=!!a,{setHover:p,...m}=Ss(d,d,l,h),y=ne(zo),_=ne(pd),v=o==="radio",T=o==="checkbox",O=!!r&&!h&&!v&&!T,x=v?_.value===n:T?!!i:!1,b=w=>{if(h){w.stopPropagation(),w.preventDefault();return}const I={value:n,syntheticEvent:w};w.key!==void 0&&(I.key=w.key),T&&(I.checked=!x),v&&(I.name=_.name),xe(s,I),v&&xe(_.onRadioChange,I),y.handleClick(I,T||v)},M=w=>{if(l)switch(w.key){case we.ENTER:w.preventDefault();case we.SPACE:O?d.current.click():b(w)}},H=ae(()=>({type:o,disabled:h,hover:l,checked:x,anchor:O}),[o,h,l,x,O]),E=Kt({...m,onPointerDown:p,onKeyDown:M,onClick:b},f),L={role:v?"menuitemradio":T?"menuitemcheckbox":hr,"aria-checked":v||T?x:void 0,...dr(h,l),...E,ref:Wt(c,d),className:We({block:Ke,element:ko,modifiers:H,className:t}),children:ae(()=>xe(u,H),[u,H])};return O?se("li",{role:jo,children:se("a",{href:r,...L})}):se("li",{...L})}),np=Fo("FocusableItem",function({className:t,disabled:n,children:r,isHovering:o,itemRef:i,externalRef:a,...u}){const s=!!n,l=q(null),{setHover:d,onPointerLeave:c,...f}=Ss(i,l,o,s),{handleClose:h}=ne(zo),p=ae(()=>({disabled:s,hover:o,focusable:!0}),[s,o]),m=ae(()=>xe(r,{...p,ref:l,closeMenu:h}),[r,p,h]),y=Kt({...f,onPointerLeave:_=>c(_,!0),onFocus:d},u);return se("li",{role:hr,...dr(s),...y,ref:Wt(a,i),className:We({block:Ke,element:ko,modifiers:p,className:t}),children:m})}),rp=vn(it(function({className:t,...n},r){return se("li",{role:"separator",...n,ref:r,className:We({block:Ke,element:ld,className:t})})})),op=vn(it(function({className:t,...n},r){return se("li",{role:jo,...n,ref:r,className:We({block:Ke,element:dd,className:t})})})),ip=it(function({className:t,style:n,takeOverflow:r,...o},i){const a=q(null),[u,s]=me(),{overflow:l,overflowAmt:d}=ne(Yn);return It(()=>{let c;r&&d>=0&&(c=a.current.getBoundingClientRect().height-d,c<0&&(c=0)),s(c>=0?{maxHeight:c,overflow:l}:void 0)},[r,l,d]),It(()=>{u&&(a.current.scrollTop=0)},[u]),se("div",{...o,ref:Wt(i,a),className:We({block:Ke,element:fd,className:t}),style:{...n,...u}})});function ap(){const[e,t]=me({width:null,height:null});return Xe(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e}var Xn={exports:{}},sp=Xn.exports;(function(e,t){(function(n,r){e.exports=r()})(at,function(){"use strict";var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",u="minute",s="hour",l="day",d="week",c="month",f="quarter",h="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var C=["th","st","nd","rd"],A=D%100;return"["+D+(C[(A-20)%10]||C[A]||C[0])+"]"}},T=function(D,C,A){var P=String(D);return!P||P.length>=C?D:""+Array(C+1-P.length).join(A)+D},O={s:T,z:function(D){var C=-D.utcOffset(),A=Math.abs(C),P=Math.floor(A/60),R=A%60;return(C<=0?"+":"-")+T(P,2,"0")+":"+T(R,2,"0")},m:function D(C,A){if(C.date()1)return D(F[0])}else{var G=C.name;b[G]=C,R=G}return!P&&R&&(x=R),R||!P&&x},L=function(D,C){if(H(D))return D.clone();var A=typeof C=="object"?C:{};return A.date=D,A.args=arguments,new I(A)},w=O;w.l=E,w.i=H,w.w=function(D,C){return L(D,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var I=function(){function D(A){this.$L=E(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[M]=!0}var C=D.prototype;return C.parse=function(A){this.$d=function(P){var R=P.date,U=P.utc;if(R===null)return new Date(NaN);if(w.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var F=R.match(y);if(F){var G=F[2]-1||0,Z=(F[7]||"0").substring(0,3);return U?new Date(Date.UTC(F[1],G,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Z)):new Date(F[1],G,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Z)}}return new Date(R)}(A),this.init()},C.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},C.$utils=function(){return w},C.isValid=function(){return this.$d.toString()!==m},C.isSame=function(A,P){var R=L(A);return this.startOf(P)<=R&&R<=this.endOf(P)},C.isAfter=function(A,P){return L(A)new s(l).valueOf()},s.prototype.isLessThan=function(l){return this.valueOf()-1)||(y=new a.a(p)[m]()),m==="days"||m==="years"){var _=u[h][m];return c.format(_)}return u[h][m].replace("%d",y)}(this)}}}])})})(Qn,Qn.exports);var Id=Qn.exports;const lp=qe(Id);var er={exports:{}},dp=er.exports;(function(e,t){(function(n,r){e.exports=r()})(at,function(){"use strict";var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var a=o.prototype,u=a.format;i.en.formats=n,a.format=function(s){s===void 0&&(s="YYYY-MM-DDTHH:mm:ssZ");var l=this.$locale().formats,d=function(c,f){return c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(h,p,m){var y=m&&m.toUpperCase();return p||f[m]||n[m]||f[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(_,v,T){return v||T.slice(1)})})}(s,l===void 0?{}:l);return u.call(this,d)}}})})(er,er.exports);var Nd=er.exports;const fp=qe(Nd);var tr={exports:{}},hp=tr.exports;(function(e,t){(function(n,r){e.exports=r()})(at,function(){"use strict";return function(n,r,o){n=n||{};var i=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(l,d,c,f){return i.fromToBase(l,d,c,f)}o.en.relativeTime=a,i.fromToBase=function(l,d,c,f,h){for(var p,m,y,_=c.$locale().relativeTime||a,v=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],T=v.length,O=0;O0,b<=x.r||!x.r){b<=1&&O>0&&(x=v[O-1]);var M=_[x.l];h&&(b=h(""+b)),m=typeof M=="string"?M.replace("%d",b):M(b,d,x.l,y);break}}if(d)return m;var H=y?_.future:_.past;return typeof H=="function"?H(m):H.replace("%s",m)},i.to=function(l,d){return u(l,d,this,!0)},i.from=function(l,d){return u(l,d,this)};var s=function(l){return l.$u?o.utc():o()};i.toNow=function(l){return this.to(s(this),l)},i.fromNow=function(l){return this.from(s(this),l)}}})})(tr,tr.exports);var kd=tr.exports;const pp=qe(kd);function $d(e){return Intl.getCanonicalLocales(e)}var Pr={supplemental:{languageMatching:{"written-new":[{paradigmLocales:{_locales:"en en_GB es es_419 pt_BR pt_PT"}},{$enUS:{_value:"AS+CA+GU+MH+MP+PH+PR+UM+US+VI"}},{$cnsar:{_value:"HK+MO"}},{$americas:{_value:"019"}},{$maghreb:{_value:"MA+DZ+TN+LY+MR+EH"}},{no:{_desired:"nb",_distance:"1"}},{bs:{_desired:"hr",_distance:"4"}},{bs:{_desired:"sh",_distance:"4"}},{hr:{_desired:"sh",_distance:"4"}},{sr:{_desired:"sh",_distance:"4"}},{aa:{_desired:"ssy",_distance:"4"}},{de:{_desired:"gsw",_distance:"4",_oneway:"true"}},{de:{_desired:"lb",_distance:"4",_oneway:"true"}},{no:{_desired:"da",_distance:"8"}},{nb:{_desired:"da",_distance:"8"}},{ru:{_desired:"ab",_distance:"30",_oneway:"true"}},{en:{_desired:"ach",_distance:"30",_oneway:"true"}},{nl:{_desired:"af",_distance:"20",_oneway:"true"}},{en:{_desired:"ak",_distance:"30",_oneway:"true"}},{en:{_desired:"am",_distance:"30",_oneway:"true"}},{es:{_desired:"ay",_distance:"20",_oneway:"true"}},{ru:{_desired:"az",_distance:"30",_oneway:"true"}},{ur:{_desired:"bal",_distance:"20",_oneway:"true"}},{ru:{_desired:"be",_distance:"20",_oneway:"true"}},{en:{_desired:"bem",_distance:"30",_oneway:"true"}},{hi:{_desired:"bh",_distance:"30",_oneway:"true"}},{en:{_desired:"bn",_distance:"30",_oneway:"true"}},{zh:{_desired:"bo",_distance:"20",_oneway:"true"}},{fr:{_desired:"br",_distance:"20",_oneway:"true"}},{es:{_desired:"ca",_distance:"20",_oneway:"true"}},{fil:{_desired:"ceb",_distance:"30",_oneway:"true"}},{en:{_desired:"chr",_distance:"20",_oneway:"true"}},{ar:{_desired:"ckb",_distance:"30",_oneway:"true"}},{fr:{_desired:"co",_distance:"20",_oneway:"true"}},{fr:{_desired:"crs",_distance:"20",_oneway:"true"}},{sk:{_desired:"cs",_distance:"20"}},{en:{_desired:"cy",_distance:"20",_oneway:"true"}},{en:{_desired:"ee",_distance:"30",_oneway:"true"}},{en:{_desired:"eo",_distance:"30",_oneway:"true"}},{es:{_desired:"eu",_distance:"20",_oneway:"true"}},{da:{_desired:"fo",_distance:"20",_oneway:"true"}},{nl:{_desired:"fy",_distance:"20",_oneway:"true"}},{en:{_desired:"ga",_distance:"20",_oneway:"true"}},{en:{_desired:"gaa",_distance:"30",_oneway:"true"}},{en:{_desired:"gd",_distance:"20",_oneway:"true"}},{es:{_desired:"gl",_distance:"20",_oneway:"true"}},{es:{_desired:"gn",_distance:"20",_oneway:"true"}},{hi:{_desired:"gu",_distance:"30",_oneway:"true"}},{en:{_desired:"ha",_distance:"30",_oneway:"true"}},{en:{_desired:"haw",_distance:"20",_oneway:"true"}},{fr:{_desired:"ht",_distance:"20",_oneway:"true"}},{ru:{_desired:"hy",_distance:"30",_oneway:"true"}},{en:{_desired:"ia",_distance:"30",_oneway:"true"}},{en:{_desired:"ig",_distance:"30",_oneway:"true"}},{en:{_desired:"is",_distance:"20",_oneway:"true"}},{id:{_desired:"jv",_distance:"20",_oneway:"true"}},{en:{_desired:"ka",_distance:"30",_oneway:"true"}},{fr:{_desired:"kg",_distance:"30",_oneway:"true"}},{ru:{_desired:"kk",_distance:"30",_oneway:"true"}},{en:{_desired:"km",_distance:"30",_oneway:"true"}},{en:{_desired:"kn",_distance:"30",_oneway:"true"}},{en:{_desired:"kri",_distance:"30",_oneway:"true"}},{tr:{_desired:"ku",_distance:"30",_oneway:"true"}},{ru:{_desired:"ky",_distance:"30",_oneway:"true"}},{it:{_desired:"la",_distance:"20",_oneway:"true"}},{en:{_desired:"lg",_distance:"30",_oneway:"true"}},{fr:{_desired:"ln",_distance:"30",_oneway:"true"}},{en:{_desired:"lo",_distance:"30",_oneway:"true"}},{en:{_desired:"loz",_distance:"30",_oneway:"true"}},{fr:{_desired:"lua",_distance:"30",_oneway:"true"}},{hi:{_desired:"mai",_distance:"20",_oneway:"true"}},{en:{_desired:"mfe",_distance:"30",_oneway:"true"}},{fr:{_desired:"mg",_distance:"30",_oneway:"true"}},{en:{_desired:"mi",_distance:"20",_oneway:"true"}},{en:{_desired:"ml",_distance:"30",_oneway:"true"}},{ru:{_desired:"mn",_distance:"30",_oneway:"true"}},{hi:{_desired:"mr",_distance:"30",_oneway:"true"}},{id:{_desired:"ms",_distance:"30",_oneway:"true"}},{en:{_desired:"mt",_distance:"30",_oneway:"true"}},{en:{_desired:"my",_distance:"30",_oneway:"true"}},{en:{_desired:"ne",_distance:"30",_oneway:"true"}},{nb:{_desired:"nn",_distance:"20"}},{no:{_desired:"nn",_distance:"20"}},{en:{_desired:"nso",_distance:"30",_oneway:"true"}},{en:{_desired:"ny",_distance:"30",_oneway:"true"}},{en:{_desired:"nyn",_distance:"30",_oneway:"true"}},{fr:{_desired:"oc",_distance:"20",_oneway:"true"}},{en:{_desired:"om",_distance:"30",_oneway:"true"}},{en:{_desired:"or",_distance:"30",_oneway:"true"}},{en:{_desired:"pa",_distance:"30",_oneway:"true"}},{en:{_desired:"pcm",_distance:"20",_oneway:"true"}},{en:{_desired:"ps",_distance:"30",_oneway:"true"}},{es:{_desired:"qu",_distance:"30",_oneway:"true"}},{de:{_desired:"rm",_distance:"20",_oneway:"true"}},{en:{_desired:"rn",_distance:"30",_oneway:"true"}},{fr:{_desired:"rw",_distance:"30",_oneway:"true"}},{hi:{_desired:"sa",_distance:"30",_oneway:"true"}},{en:{_desired:"sd",_distance:"30",_oneway:"true"}},{en:{_desired:"si",_distance:"30",_oneway:"true"}},{en:{_desired:"sn",_distance:"30",_oneway:"true"}},{en:{_desired:"so",_distance:"30",_oneway:"true"}},{en:{_desired:"sq",_distance:"30",_oneway:"true"}},{en:{_desired:"st",_distance:"30",_oneway:"true"}},{id:{_desired:"su",_distance:"20",_oneway:"true"}},{en:{_desired:"sw",_distance:"30",_oneway:"true"}},{en:{_desired:"ta",_distance:"30",_oneway:"true"}},{en:{_desired:"te",_distance:"30",_oneway:"true"}},{ru:{_desired:"tg",_distance:"30",_oneway:"true"}},{en:{_desired:"ti",_distance:"30",_oneway:"true"}},{ru:{_desired:"tk",_distance:"30",_oneway:"true"}},{en:{_desired:"tlh",_distance:"30",_oneway:"true"}},{en:{_desired:"tn",_distance:"30",_oneway:"true"}},{en:{_desired:"to",_distance:"30",_oneway:"true"}},{ru:{_desired:"tt",_distance:"30",_oneway:"true"}},{en:{_desired:"tum",_distance:"30",_oneway:"true"}},{zh:{_desired:"ug",_distance:"20",_oneway:"true"}},{ru:{_desired:"uk",_distance:"20",_oneway:"true"}},{en:{_desired:"ur",_distance:"30",_oneway:"true"}},{ru:{_desired:"uz",_distance:"30",_oneway:"true"}},{fr:{_desired:"wo",_distance:"30",_oneway:"true"}},{en:{_desired:"xh",_distance:"30",_oneway:"true"}},{en:{_desired:"yi",_distance:"30",_oneway:"true"}},{en:{_desired:"yo",_distance:"30",_oneway:"true"}},{zh:{_desired:"za",_distance:"20",_oneway:"true"}},{en:{_desired:"zu",_distance:"30",_oneway:"true"}},{ar:{_desired:"aao",_distance:"10",_oneway:"true"}},{ar:{_desired:"abh",_distance:"10",_oneway:"true"}},{ar:{_desired:"abv",_distance:"10",_oneway:"true"}},{ar:{_desired:"acm",_distance:"10",_oneway:"true"}},{ar:{_desired:"acq",_distance:"10",_oneway:"true"}},{ar:{_desired:"acw",_distance:"10",_oneway:"true"}},{ar:{_desired:"acx",_distance:"10",_oneway:"true"}},{ar:{_desired:"acy",_distance:"10",_oneway:"true"}},{ar:{_desired:"adf",_distance:"10",_oneway:"true"}},{ar:{_desired:"aeb",_distance:"10",_oneway:"true"}},{ar:{_desired:"aec",_distance:"10",_oneway:"true"}},{ar:{_desired:"afb",_distance:"10",_oneway:"true"}},{ar:{_desired:"ajp",_distance:"10",_oneway:"true"}},{ar:{_desired:"apc",_distance:"10",_oneway:"true"}},{ar:{_desired:"apd",_distance:"10",_oneway:"true"}},{ar:{_desired:"arq",_distance:"10",_oneway:"true"}},{ar:{_desired:"ars",_distance:"10",_oneway:"true"}},{ar:{_desired:"ary",_distance:"10",_oneway:"true"}},{ar:{_desired:"arz",_distance:"10",_oneway:"true"}},{ar:{_desired:"auz",_distance:"10",_oneway:"true"}},{ar:{_desired:"avl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayh",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayn",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayp",_distance:"10",_oneway:"true"}},{ar:{_desired:"bbz",_distance:"10",_oneway:"true"}},{ar:{_desired:"pga",_distance:"10",_oneway:"true"}},{ar:{_desired:"shu",_distance:"10",_oneway:"true"}},{ar:{_desired:"ssh",_distance:"10",_oneway:"true"}},{az:{_desired:"azb",_distance:"10",_oneway:"true"}},{et:{_desired:"vro",_distance:"10",_oneway:"true"}},{ff:{_desired:"ffm",_distance:"10",_oneway:"true"}},{ff:{_desired:"fub",_distance:"10",_oneway:"true"}},{ff:{_desired:"fue",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuf",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuh",_distance:"10",_oneway:"true"}},{ff:{_desired:"fui",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuq",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuv",_distance:"10",_oneway:"true"}},{gn:{_desired:"gnw",_distance:"10",_oneway:"true"}},{gn:{_desired:"gui",_distance:"10",_oneway:"true"}},{gn:{_desired:"gun",_distance:"10",_oneway:"true"}},{gn:{_desired:"nhd",_distance:"10",_oneway:"true"}},{iu:{_desired:"ikt",_distance:"10",_oneway:"true"}},{kln:{_desired:"enb",_distance:"10",_oneway:"true"}},{kln:{_desired:"eyo",_distance:"10",_oneway:"true"}},{kln:{_desired:"niq",_distance:"10",_oneway:"true"}},{kln:{_desired:"oki",_distance:"10",_oneway:"true"}},{kln:{_desired:"pko",_distance:"10",_oneway:"true"}},{kln:{_desired:"sgc",_distance:"10",_oneway:"true"}},{kln:{_desired:"tec",_distance:"10",_oneway:"true"}},{kln:{_desired:"tuy",_distance:"10",_oneway:"true"}},{kok:{_desired:"gom",_distance:"10",_oneway:"true"}},{kpe:{_desired:"gkp",_distance:"10",_oneway:"true"}},{luy:{_desired:"ida",_distance:"10",_oneway:"true"}},{luy:{_desired:"lkb",_distance:"10",_oneway:"true"}},{luy:{_desired:"lko",_distance:"10",_oneway:"true"}},{luy:{_desired:"lks",_distance:"10",_oneway:"true"}},{luy:{_desired:"lri",_distance:"10",_oneway:"true"}},{luy:{_desired:"lrm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lsm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lto",_distance:"10",_oneway:"true"}},{luy:{_desired:"lts",_distance:"10",_oneway:"true"}},{luy:{_desired:"lwg",_distance:"10",_oneway:"true"}},{luy:{_desired:"nle",_distance:"10",_oneway:"true"}},{luy:{_desired:"nyd",_distance:"10",_oneway:"true"}},{luy:{_desired:"rag",_distance:"10",_oneway:"true"}},{lv:{_desired:"ltg",_distance:"10",_oneway:"true"}},{mg:{_desired:"bhr",_distance:"10",_oneway:"true"}},{mg:{_desired:"bjq",_distance:"10",_oneway:"true"}},{mg:{_desired:"bmm",_distance:"10",_oneway:"true"}},{mg:{_desired:"bzc",_distance:"10",_oneway:"true"}},{mg:{_desired:"msh",_distance:"10",_oneway:"true"}},{mg:{_desired:"skg",_distance:"10",_oneway:"true"}},{mg:{_desired:"tdx",_distance:"10",_oneway:"true"}},{mg:{_desired:"tkg",_distance:"10",_oneway:"true"}},{mg:{_desired:"txy",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmv",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmw",_distance:"10",_oneway:"true"}},{mn:{_desired:"mvf",_distance:"10",_oneway:"true"}},{ms:{_desired:"bjn",_distance:"10",_oneway:"true"}},{ms:{_desired:"btj",_distance:"10",_oneway:"true"}},{ms:{_desired:"bve",_distance:"10",_oneway:"true"}},{ms:{_desired:"bvu",_distance:"10",_oneway:"true"}},{ms:{_desired:"coa",_distance:"10",_oneway:"true"}},{ms:{_desired:"dup",_distance:"10",_oneway:"true"}},{ms:{_desired:"hji",_distance:"10",_oneway:"true"}},{ms:{_desired:"id",_distance:"10",_oneway:"true"}},{ms:{_desired:"jak",_distance:"10",_oneway:"true"}},{ms:{_desired:"jax",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvb",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvr",_distance:"10",_oneway:"true"}},{ms:{_desired:"kxd",_distance:"10",_oneway:"true"}},{ms:{_desired:"lce",_distance:"10",_oneway:"true"}},{ms:{_desired:"lcf",_distance:"10",_oneway:"true"}},{ms:{_desired:"liw",_distance:"10",_oneway:"true"}},{ms:{_desired:"max",_distance:"10",_oneway:"true"}},{ms:{_desired:"meo",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfa",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfb",_distance:"10",_oneway:"true"}},{ms:{_desired:"min",_distance:"10",_oneway:"true"}},{ms:{_desired:"mqg",_distance:"10",_oneway:"true"}},{ms:{_desired:"msi",_distance:"10",_oneway:"true"}},{ms:{_desired:"mui",_distance:"10",_oneway:"true"}},{ms:{_desired:"orn",_distance:"10",_oneway:"true"}},{ms:{_desired:"ors",_distance:"10",_oneway:"true"}},{ms:{_desired:"pel",_distance:"10",_oneway:"true"}},{ms:{_desired:"pse",_distance:"10",_oneway:"true"}},{ms:{_desired:"tmw",_distance:"10",_oneway:"true"}},{ms:{_desired:"urk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkt",_distance:"10",_oneway:"true"}},{ms:{_desired:"xmm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zlm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zmi",_distance:"10",_oneway:"true"}},{ne:{_desired:"dty",_distance:"10",_oneway:"true"}},{om:{_desired:"gax",_distance:"10",_oneway:"true"}},{om:{_desired:"hae",_distance:"10",_oneway:"true"}},{om:{_desired:"orc",_distance:"10",_oneway:"true"}},{or:{_desired:"spv",_distance:"10",_oneway:"true"}},{ps:{_desired:"pbt",_distance:"10",_oneway:"true"}},{ps:{_desired:"pst",_distance:"10",_oneway:"true"}},{qu:{_desired:"qub",_distance:"10",_oneway:"true"}},{qu:{_desired:"qud",_distance:"10",_oneway:"true"}},{qu:{_desired:"quf",_distance:"10",_oneway:"true"}},{qu:{_desired:"qug",_distance:"10",_oneway:"true"}},{qu:{_desired:"quh",_distance:"10",_oneway:"true"}},{qu:{_desired:"quk",_distance:"10",_oneway:"true"}},{qu:{_desired:"qul",_distance:"10",_oneway:"true"}},{qu:{_desired:"qup",_distance:"10",_oneway:"true"}},{qu:{_desired:"qur",_distance:"10",_oneway:"true"}},{qu:{_desired:"qus",_distance:"10",_oneway:"true"}},{qu:{_desired:"quw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qux",_distance:"10",_oneway:"true"}},{qu:{_desired:"quy",_distance:"10",_oneway:"true"}},{qu:{_desired:"qva",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qve",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvi",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvj",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvm",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvs",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvz",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qws",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxr",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxt",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxu",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxw",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdc",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdn",_distance:"10",_oneway:"true"}},{sc:{_desired:"sro",_distance:"10",_oneway:"true"}},{sq:{_desired:"aae",_distance:"10",_oneway:"true"}},{sq:{_desired:"aat",_distance:"10",_oneway:"true"}},{sq:{_desired:"aln",_distance:"10",_oneway:"true"}},{syr:{_desired:"aii",_distance:"10",_oneway:"true"}},{uz:{_desired:"uzs",_distance:"10",_oneway:"true"}},{yi:{_desired:"yih",_distance:"10",_oneway:"true"}},{zh:{_desired:"cdo",_distance:"10",_oneway:"true"}},{zh:{_desired:"cjy",_distance:"10",_oneway:"true"}},{zh:{_desired:"cpx",_distance:"10",_oneway:"true"}},{zh:{_desired:"czh",_distance:"10",_oneway:"true"}},{zh:{_desired:"czo",_distance:"10",_oneway:"true"}},{zh:{_desired:"gan",_distance:"10",_oneway:"true"}},{zh:{_desired:"hak",_distance:"10",_oneway:"true"}},{zh:{_desired:"hsn",_distance:"10",_oneway:"true"}},{zh:{_desired:"lzh",_distance:"10",_oneway:"true"}},{zh:{_desired:"mnp",_distance:"10",_oneway:"true"}},{zh:{_desired:"nan",_distance:"10",_oneway:"true"}},{zh:{_desired:"wuu",_distance:"10",_oneway:"true"}},{zh:{_desired:"yue",_distance:"10",_oneway:"true"}},{"*":{_desired:"*",_distance:"80"}},{"en-Latn":{_desired:"am-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"az-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"bn-Beng",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"bo-Tibt",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"hy-Armn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ka-Geor",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"km-Khmr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"kn-Knda",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"lo-Laoo",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ml-Mlym",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"my-Mymr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ne-Deva",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"or-Orya",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"pa-Guru",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ps-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"sd-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"si-Sinh",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ta-Taml",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"te-Telu",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ti-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"tk-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ur-Arab",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"uz-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"yi-Hebr",_distance:"10",_oneway:"true"}},{"sr-Cyrl":{_desired:"sr-Latn",_distance:"5"}},{"zh-Hans":{_desired:"za-Latn",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"zh-Hant":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"ar-Arab":{_desired:"ar-Latn",_distance:"20",_oneway:"true"}},{"bn-Beng":{_desired:"bn-Latn",_distance:"20",_oneway:"true"}},{"gu-Gujr":{_desired:"gu-Latn",_distance:"20",_oneway:"true"}},{"hi-Deva":{_desired:"hi-Latn",_distance:"20",_oneway:"true"}},{"kn-Knda":{_desired:"kn-Latn",_distance:"20",_oneway:"true"}},{"ml-Mlym":{_desired:"ml-Latn",_distance:"20",_oneway:"true"}},{"mr-Deva":{_desired:"mr-Latn",_distance:"20",_oneway:"true"}},{"ta-Taml":{_desired:"ta-Latn",_distance:"20",_oneway:"true"}},{"te-Telu":{_desired:"te-Latn",_distance:"20",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Latn",_distance:"20",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Latn",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hani",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hrkt",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hani",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hang",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"ko-Hang":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"*-*":{_desired:"*-*",_distance:"50"}},{"ar-*-$maghreb":{_desired:"ar-*-$maghreb",_distance:"4"}},{"ar-*-$!maghreb":{_desired:"ar-*-$!maghreb",_distance:"4"}},{"ar-*-*":{_desired:"ar-*-*",_distance:"5"}},{"en-*-$enUS":{_desired:"en-*-$enUS",_distance:"4"}},{"en-*-GB":{_desired:"en-*-$!enUS",_distance:"3"}},{"en-*-$!enUS":{_desired:"en-*-$!enUS",_distance:"4"}},{"en-*-*":{_desired:"en-*-*",_distance:"5"}},{"es-*-$americas":{_desired:"es-*-$americas",_distance:"4"}},{"es-*-$!americas":{_desired:"es-*-$!americas",_distance:"4"}},{"es-*-*":{_desired:"es-*-*",_distance:"5"}},{"pt-*-$americas":{_desired:"pt-*-$americas",_distance:"4"}},{"pt-*-$!americas":{_desired:"pt-*-$!americas",_distance:"4"}},{"pt-*-*":{_desired:"pt-*-*",_distance:"5"}},{"zh-Hant-$cnsar":{_desired:"zh-Hant-$cnsar",_distance:"4"}},{"zh-Hant-$!cnsar":{_desired:"zh-Hant-$!cnsar",_distance:"4"}},{"zh-Hant-*":{_desired:"zh-Hant-*",_distance:"5"}},{"*-*-*":{_desired:"*-*-*",_distance:"4"}}]}}},zd={"001":["001","001-status-grouping","002","005","009","011","013","014","015","017","018","019","021","029","030","034","035","039","053","054","057","061","142","143","145","150","151","154","155","AC","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CQ","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","QO","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UN","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"002":["002","002-status-grouping","011","014","015","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EA","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","IC","IO","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"],"003":["003","013","021","029","AG","AI","AW","BB","BL","BM","BQ","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"],"005":["005","AR","BO","BR","BV","CL","CO","EC","FK","GF","GS","GY","PE","PY","SR","UY","VE"],"009":["009","053","054","057","061","AC","AQ","AS","AU","CC","CK","CP","CX","DG","FJ","FM","GU","HM","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","QO","SB","TA","TK","TO","TV","UM","VU","WF","WS"],"011":["011","BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"],"013":["013","BZ","CR","GT","HN","MX","NI","PA","SV"],"014":["014","BI","DJ","ER","ET","IO","KE","KM","MG","MU","MW","MZ","RE","RW","SC","SO","SS","TF","TZ","UG","YT","ZM","ZW"],"015":["015","DZ","EA","EG","EH","IC","LY","MA","SD","TN"],"017":["017","AO","CD","CF","CG","CM","GA","GQ","ST","TD"],"018":["018","BW","LS","NA","SZ","ZA"],"019":["003","005","013","019","019-status-grouping","021","029","419","AG","AI","AR","AW","BB","BL","BM","BO","BQ","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"],"021":["021","BM","CA","GL","PM","US"],"029":["029","AG","AI","AW","BB","BL","BQ","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"],"030":["030","CN","HK","JP","KP","KR","MN","MO","TW"],"034":["034","AF","BD","BT","IN","IR","LK","MV","NP","PK"],"035":["035","BN","ID","KH","LA","MM","MY","PH","SG","TH","TL","VN"],"039":["039","AD","AL","BA","ES","GI","GR","HR","IT","ME","MK","MT","PT","RS","SI","SM","VA","XK"],"053":["053","AU","CC","CX","HM","NF","NZ"],"054":["054","FJ","NC","PG","SB","VU"],"057":["057","FM","GU","KI","MH","MP","NR","PW","UM"],"061":["061","AS","CK","NU","PF","PN","TK","TO","TV","WF","WS"],142:["030","034","035","142","143","145","AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","HK","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MO","MV","MY","NP","OM","PH","PK","PS","QA","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"],143:["143","KG","KZ","TJ","TM","UZ"],145:["145","AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"],150:["039","150","151","154","155","AD","AL","AT","AX","BA","BE","BG","BY","CH","CQ","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GR","HR","HU","IE","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SJ","SK","SM","UA","VA","XK"],151:["151","BG","BY","CZ","HU","MD","PL","RO","RU","SK","UA"],154:["154","AX","CQ","DK","EE","FI","FO","GB","GG","IE","IM","IS","JE","LT","LV","NO","SE","SJ"],155:["155","AT","BE","CH","DE","FR","LI","LU","MC","NL"],202:["011","014","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","IO","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TZ","UG","YT","ZA","ZM","ZW"],419:["005","013","029","419","AG","AI","AR","AW","BB","BL","BO","BQ","BR","BS","BV","BZ","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SR","SV","SX","TC","TT","UY","VC","VE","VG","VI"],EU:["AT","BE","BG","CY","CZ","DE","DK","EE","ES","EU","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],EZ:["AT","BE","CY","DE","EE","ES","EZ","FI","FR","GR","IE","IT","LT","LU","LV","MT","NL","PT","SI","SK"],QO:["AC","AQ","CP","DG","QO","TA"],UN:["AD","AE","AF","AG","AL","AM","AO","AR","AT","AU","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CD","CF","CG","CH","CI","CL","CM","CN","CO","CR","CU","CV","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FM","FR","GA","GB","GD","GE","GH","GM","GN","GQ","GR","GT","GW","GY","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MR","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NG","NI","NL","NO","NP","NR","NZ","OM","PA","PE","PG","PH","PK","PL","PT","PW","PY","QA","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SY","SZ","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TV","TZ","UA","UG","UN","US","UY","UZ","VC","VE","VN","VU","WS","YE","ZA","ZM","ZW"]},Ts=/-u(?:-[0-9a-z]{2,8})+/gi;function At(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var jd=840,Rr;function Fd(){var e,t;if(!Rr){var n=(t=(e=Pr.supplemental.languageMatching["written-new"][0])===null||e===void 0?void 0:e.paradigmLocales)===null||t===void 0?void 0:t._locales.split(" "),r=Pr.supplemental.languageMatching["written-new"].slice(1,5),o=Pr.supplemental.languageMatching["written-new"].slice(5),i=o.map(function(a){var u=Object.keys(a)[0],s=a[u];return{supported:u,desired:s._desired,distance:+s._distance,oneway:s.oneway==="true"}},{});Rr={matches:i,matchVariables:r.reduce(function(a,u){var s=Object.keys(u)[0],l=u[s];return a[s.slice(1)]=l._value.split("+"),a},{}),paradigmLocales:Hn(Hn([],n,!0),n.map(function(a){return new Intl.Locale(a.replace(/_/g,"-")).maximize().toString()}),!0)}}return Rr}function Tn(e,t,n){var r=t.split("-"),o=r[0],i=r[1],a=r[2],u=!0;if(a&&a[0]==="$"){var s=a[1]!=="!",l=s?n[a.slice(1)]:n[a.slice(2)],d=l.map(function(c){return zd[c]||[c]}).reduce(function(c,f){return Hn(Hn([],c,!0),f,!0)},[]);u&&(u=d.indexOf(e.region||"")>1==s)}else u&&(u=e.region?a==="*"||a===e.region:!0);return u&&(u=e.script?i==="*"||i===e.script:!0),u&&(u=e.language?o==="*"||o===e.language:!0),u}function $i(e){return[e.language,e.script,e.region].filter(Boolean).join("-")}function Lr(e,t,n){for(var r=0,o=n.matches;r-1!=n.paradigmLocales.indexOf($i(t))>-1?u-1:u}}throw new Error("No matching distance found")}function Hd(e,t){var n=new Intl.Locale(e).maximize(),r=new Intl.Locale(t).maximize(),o={language:n.language,script:n.script||"",region:n.region||""},i={language:r.language,script:r.script||"",region:r.region||""},a=0,u=Fd();return o.language!==i.language&&(a+=Lr({language:n.language,script:"",region:""},{language:r.language,script:"",region:""},u)),o.script!==i.script&&(a+=Lr({language:n.language,script:o.script,region:""},{language:r.language,script:o.script,region:""},u)),o.region!==i.region&&(a+=Lr(o,i,u)),a}function Bd(e,t,n){n===void 0&&(n=jd);var r=1/0,o={matchedDesiredLocale:"",distances:{}};return e.forEach(function(i,a){o.distances[i]||(o.distances[i]={}),t.forEach(function(u,s){var l=Hd(i,u)+s+a*40;o.distances[i][u]=l,l=n&&(o.matchedDesiredLocale=void 0,o.matchedSupportedLocale=void 0),o}function Ud(e,t,n){var r,o,i=[],a=t.reduce(function(s,l){var d=l.replace(Ts,"");return i.push(d),s[d]=l,s},{}),u=Bd(i,e);return u.matchedSupportedLocale&&u.matchedDesiredLocale&&(r=u.matchedSupportedLocale,o=a[u.matchedDesiredLocale].slice(u.matchedDesiredLocale.length)||void 0),r?{locale:r,extension:o}:{locale:n()}}function Kd(e,t){for(var n=t;;){if(e.indexOf(n)>-1)return n;var r=n.lastIndexOf("-");if(!~r)return;r>=2&&n[r-2]==="-"&&(r-=2),n=n.slice(0,r)}}function Wd(e,t,n){for(var r={locale:""},o=0,i=t;o"u"||T===null,"optionsValue must be String, Undefined or Null"),~m.indexOf(T)&&T!==y&&(y=T,_="")}l[h]=y,d+=_}if(d.length>2){var O=s.indexOf("-x-");if(O===-1)s=s+d;else{var x=s.slice(0,O),b=s.slice(O,s.length);s=x+d+b}s=Intl.getCanonicalLocales(s)[0]}return l.locale=s,l}function mp(e,t,n,r){return Gd(t,$d(e),{localeMatcher:(r==null?void 0:r.algorithm)||"best fit"},[],{},function(){return n}).locale}const Yd=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,nr=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Yd);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},zi=e=>e==="*"||e==="x"||e==="X",ji=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Zd=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Vd=(e,t)=>{if(zi(e)||zi(t))return 0;const[n,r]=Zd(ji(e),ji(t));return n>r?1:n{for(let n=0;n{const n=nr(e),r=nr(t),o=n.pop(),i=r.pop(),a=Lt(n,r);return a!==0?a:o&&i?Lt(o.split("."),i.split(".")):o||i?o?-1:1:0},Xd=(e,t,n)=>{Qd(n);const r=Jd(e,t);return xs[n].includes(r)},xs={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Fi=Object.keys(xs),Qd=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Fi.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Fi.join("|")}`)},Dr=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(y=>Dr(e,y));if(t.includes(" - ")){const[y,_]=t.split(" - ",2);return Dr(e,`>=${y} <=${_}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(y=>Dr(e,y));const n=t.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return Xd(e,t,r);const[o,i,a,,u]=nr(e),[s,l,d,,c]=nr(t),f=[o,i,a],h=[s,l??"x",d??"x"];if(c&&(!u||Lt(f,h)!==0||Lt(u.split("."),c.split("."))===-1))return!1;const p=h.findIndex(y=>y!=="0")+1,m=r==="~"?2:p>1?p:1;return!(Lt(f.slice(0,m),h.slice(0,m))!==0||Lt(f.slice(m),h.slice(m))===-1)};var Cs={};function ze(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var ef=ze;ze.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};ze.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};ze.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0};ze.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};ze.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};ze.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};ze.prototype.start=ze.prototype.try;ze.prototype.errors=function(){return this._errors};ze.prototype.attempts=function(){return this._attempts};ze.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r=n&&(t=o,n=a)}return t};(function(e){var t=ef;e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var o in n)r[o]=n[o];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],a=0;arf.call(e)==="[object Error]",af=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function sf(e){return e&&of(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:af.has(e.message):!1}class uf extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Hi=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function _p(e,t){return new Promise((n,r)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const o=nf.operation(t),i=()=>{var u;o.stop(),r((u=t.signal)==null?void 0:u.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",i,{once:!0});const a=()=>{var u;(u=t.signal)==null||u.removeEventListener("abort",i),o.stop()};o.attempt(async u=>{try{const s=await e(u);a(),n(s)}catch(s){try{if(!(s instanceof Error))throw new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`);if(s instanceof uf)throw s.originalError;if(s instanceof TypeError&&!sf(s))throw s;if(Hi(s,u,t),await t.shouldRetry(s)||(o.stop(),r(s)),await t.onFailedAttempt(s),!o.retry(s))throw o.mainError()}catch(l){Hi(l,u,t),a(),r(l)}}})})}class cf{constructor(t,n,{tabInsertsSuggestions:r,defaultFirstOption:o}={}){this.input=t,this.list=n,this.tabInsertsSuggestions=r??!0,this.defaultFirstOption=o??!1,this.isComposing=!1,n.id||(n.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=i=>lf(i,this),this.compositionEventHandler=i=>ff(i,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",Bi),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",Bi)}indicateDefaultOption(){var t;this.defaultFirstOption&&((t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Ir)[0])===null||t===void 0||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const n=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Ir)[0],r=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Ir),o=r.indexOf(n);if(o===r.length-1&&t===1||o===0&&t===-1){this.clearSelection(),this.input.focus();return}let i=t===1?0:r.length-1;if(n&&o>=0){const u=o+t;u>=0&&u0||e.offsetHeight>0)}function ff(e,t){t.isComposing=e.type==="compositionstart",document.getElementById(t.input.getAttribute("aria-controls")||"")&&t.clearSelection()}function hf(e,t){pf(e,t)||(e.scrollTop=t.offsetTop)}function pf(e,t){const n=e.scrollTop,r=n+e.clientHeight,o=t.offsetTop,i=o+t.clientHeight;return o>=n&&i<=r}const mf=/\s|\(|\[/;function _f(e,t,n,{multiWord:r,lookBackIndex:o,lastMatchPosition:i}={multiWord:!1,lookBackIndex:0,lastMatchPosition:null}){let a=e.lastIndexOf(t,n-1);if(a===-1||a=a+t.length+1||e.lastIndexOf(` `,n-1)>a||e.lastIndexOf(".",n-1)>a)return}else if(e.lastIndexOf(" ",n-1)>a)return;const u=e[a-1];return u&&!mf.test(u)?void 0:{text:e.substring(a+t.length,n),position:a+t.length}}const yf=["position:absolute;","overflow:auto;","word-wrap:break-word;","top:0px;","left:-9999px;"],Ki=["box-sizing","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","line-height","max-height","min-height","padding-bottom","padding-left","padding-right","padding-top","border-bottom","border-left","border-right","border-top","text-decoration","text-indent","text-transform","width","word-spacing"],Wi=new WeakMap;function vf(e,t){const n=e.nodeName.toLowerCase();if(n!=="textarea"&&n!=="input")throw new Error("expected textField to a textarea or input");let r=Wi.get(e);if(r&&r.parentElement===e.parentElement)r.innerHTML="";else{r=document.createElement("div"),Wi.set(e,r);const u=window.getComputedStyle(e),s=yf.slice(0);n==="textarea"?s.push("white-space:pre-wrap;"):s.push("white-space:nowrap;");for(let l=0,d=Ki.length;l{n.remove()},5e3),{top:i.top-o.top,left:i.left-o.left}}const xn=new WeakMap;function wf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{if(e.matches("dialog:modal"))return!0}catch{}try{if(e.matches(":fullscreen"))return!0}catch{}return!1}class bf{constructor(t,n){this.expander=t,this.input=n,this.combobox=null,this.menu=null,this.match=null,this.justPasted=!1,this.lookBackIndex=0,this.oninput=this.onInput.bind(this),this.onpaste=this.onPaste.bind(this),this.onkeydown=this.onKeydown.bind(this),this.oncommit=this.onCommit.bind(this),this.onmousedown=this.onMousedown.bind(this),this.onblur=this.onBlur.bind(this),this.interactingWithList=!1,n.addEventListener("paste",this.onpaste),n.addEventListener("input",this.oninput),n.addEventListener("keydown",this.onkeydown),n.addEventListener("blur",this.onblur)}destroy(){this.input.removeEventListener("paste",this.onpaste),this.input.removeEventListener("input",this.oninput),this.input.removeEventListener("keydown",this.onkeydown),this.input.removeEventListener("blur",this.onblur)}dismissMenu(){this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex)}activate(t,n){var r,o;if(this.input!==document.activeElement&&this.input!==((o=(r=document.activeElement)===null||r===void 0?void 0:r.shadowRoot)===null||o===void 0?void 0:o.activeElement))return;this.deactivate(),this.menu=n,n.id||(n.id=`text-expander-${Math.floor(Math.random()*1e5).toString()}`),this.expander.append(n),this.combobox=new cf(this.input,n),this.expander.dispatchEvent(new Event("text-expander-activate"));let{top:i,left:a}=gf(this.input,t.position);if(wf(n)){const u=this.input.getBoundingClientRect();i+=u.top,a+=u.left,getComputedStyle(n).position==="absolute"&&(i+=window.scrollY,a+=window.scrollX)}n.style.top=`${i}px`,n.style.left=`${a}px`,this.combobox.start(),n.addEventListener("combobox-commit",this.oncommit),n.addEventListener("mousedown",this.onmousedown),this.combobox.navigate(1)}deactivate(){const t=this.menu;return!t||!this.combobox?!1:(this.expander.dispatchEvent(new Event("text-expander-deactivate")),this.menu=null,t.removeEventListener("combobox-commit",this.oncommit),t.removeEventListener("mousedown",this.onmousedown),this.combobox.destroy(),this.combobox=null,t.remove(),!0)}onCommit({target:t}){var n;const r=t;if(!(r instanceof HTMLElement)||!this.combobox)return;const o=this.match;if(!o)return;const i=this.input.value.substring(0,o.position-o.key.length),a=this.input.value.substring(o.position+o.text.length),u={item:r,key:o.key,value:null,continue:!1};if(!this.expander.dispatchEvent(new CustomEvent("text-expander-value",{cancelable:!0,detail:u}))||!u.value)return;let l=(n=this.expander.getAttribute("suffix"))!==null&&n!==void 0?n:" ";u.continue&&(l="");const d=`${u.value}${l}`;this.input.value=i+d+a;const c=i.length+d.length;this.deactivate(),this.input.focus({preventScroll:!0}),this.input.selectionStart=c,this.input.selectionEnd=c,u.continue||(this.lookBackIndex=c,this.match=null),this.expander.dispatchEvent(new CustomEvent("text-expander-committed",{cancelable:!1,detail:{input:this.input}}))}onBlur(){if(this.interactingWithList){this.interactingWithList=!1;return}this.deactivate()}onPaste(){this.justPasted=!0}async onInput(){if(this.justPasted){this.justPasted=!1;return}const t=this.findMatch();if(t){this.match=t;const n=await this.notifyProviders(t);if(!this.match)return;n?this.activate(t,n):this.deactivate()}else this.match=null,this.deactivate()}findMatch(){const t=this.input.selectionEnd||0,n=this.input.value;t<=this.lookBackIndex&&(this.lookBackIndex=t-1);for(const{key:r,multiWord:o}of this.expander.keys){const i=_f(n,r,t,{multiWord:o,lookBackIndex:this.lookBackIndex,lastMatchPosition:this.match?this.match.position:null});if(i)return{text:i.text,key:r,position:i.position}}}async notifyProviders(t){const n=[],r=u=>n.push(u);return this.expander.dispatchEvent(new CustomEvent("text-expander-change",{cancelable:!0,detail:{provide:r,text:t.text,key:t.key}}))?(await Promise.all(n)).filter(u=>u.matched).map(u=>u.fragment)[0]:void 0}onMousedown(){this.interactingWithList=!0}onKeydown(t){t.key==="Escape"&&(this.match=null,this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex,t.stopImmediatePropagation(),t.preventDefault()))}}class qi extends HTMLElement{get keys(){const t=this.getAttribute("keys"),n=t?t.split(" "):[],r=this.getAttribute("multiword"),o=r?r.split(" "):[],i=o.length===0&&this.hasAttribute("multiword");return n.map(a=>({key:a,multiWord:i||o.includes(a)}))}connectedCallback(){const t=this.querySelector('input[type="text"], textarea');if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return;const n=new bf(this,t);xn.set(this,n)}disconnectedCallback(){const t=xn.get(this);t&&(t.destroy(),xn.delete(this))}dismiss(){const t=xn.get(this);t&&t.dismissMenu()}}window.customElements.get("text-expander")||(window.TextExpanderElement=qi,window.customElements.define("text-expander",qi));var Ef=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 r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))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(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};const yp=qe(Ef);var Gi;(function(e){e[e.HIGH_SURROGATE_START=55296]="HIGH_SURROGATE_START",e[e.HIGH_SURROGATE_END=56319]="HIGH_SURROGATE_END",e[e.LOW_SURROGATE_START=56320]="LOW_SURROGATE_START",e[e.REGIONAL_INDICATOR_START=127462]="REGIONAL_INDICATOR_START",e[e.REGIONAL_INDICATOR_END=127487]="REGIONAL_INDICATOR_END",e[e.FITZPATRICK_MODIFIER_START=127995]="FITZPATRICK_MODIFIER_START",e[e.FITZPATRICK_MODIFIER_END=127999]="FITZPATRICK_MODIFIER_END",e[e.VARIATION_MODIFIER_START=65024]="VARIATION_MODIFIER_START",e[e.VARIATION_MODIFIER_END=65039]="VARIATION_MODIFIER_END",e[e.DIACRITICAL_MARKS_START=8400]="DIACRITICAL_MARKS_START",e[e.DIACRITICAL_MARKS_END=8447]="DIACRITICAL_MARKS_END",e[e.SUBDIVISION_INDICATOR_START=127988]="SUBDIVISION_INDICATOR_START",e[e.TAGS_START=917504]="TAGS_START",e[e.TAGS_END=917631]="TAGS_END",e[e.ZWJ=8205]="ZWJ"})(Gi||(Gi={}));const Sf=Object.freeze([776,2359,2367,2984,3007,3021,3633,3635,3648,3657,4352,4449,4520]);var Yi;function Tf(e){if(typeof e!="string")throw new TypeError("string cannot be undefined or null");const t=[];let n=0,r=0;for(;n=t&&e<=n}function vp(e,t,n){const r=Tf(e);if(t===void 0)return e;if(t>=r.length)return"";const o=r.length-t;let i=t+(n===void 0?o:n);return i>t+o&&(i=void 0),r.slice(t,i).join("")}(function(e){e[e.unit_1=1]="unit_1",e[e.unit_2=2]="unit_2",e[e.unit_4=4]="unit_4"})(Yi||(Yi={}));function If({onlyFirst:e=!1}={}){const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}const Nf=If();function kf(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Nf,"")}function $f(){const e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o="\\u1ab0-\\u1aff",i="\\u1dc0-\\u1dff",a=t+n+r+o+i,u="\\ufe0e\\ufe0f",s="\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c14\\u0c60-\\u0c61",l="\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4c\\u0c62-\\u0c63",d="\\u0c15-\\u0c28\\u0c2a-\\u0c39",c="\\u0c58-\\u0c5a",f="\\u0c01-\\u0c03\\u0c4d\\u0c55\\u0c56",p=`[${s}(?:${d}(?!\\u0c4d))\\u0c66-\\u0c6f\\u0c78-\\u0c7e${c}]`,m=`[${d}${c}][${l}]|[${d}${c}][${f}`,_=`(?:${`[${d}]\\u0c4d[${d}]`}|${m}|${p})`,v=`[${e}]`,T=`[${a}]`,O="\\ud83c[\\udffb-\\udfff]",x=`(?:${T}|${O})`,b=`[^${e}]`,M="(?:\\ud83c[\\udde6-\\uddff]){2}",H="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",L="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",w=`${x}?`,I=`[${u}]?`,K=`(?:${E}(?:${[b,M,H].join("|")})${I+w})*`,D=I+w+K,C=`${b}${T}?`,A=`(?:${[L,C,T,M,H,v].join("|")})`;return new RegExp(`${O}(?=${O})|${_}|${A+D}`,"g")}function gp(e,{countAnsiEscapeCodes:t=!1}={}){return e===""||(t||(e=kf(e)),e==="")?0:e.match($f()).length}var Vi=36,As="";for(;Vi--;)As+=Vi.toString(36);function wp(e){for(var t="",n=e||11;n--;)t+=As[Math.random()*36|0];return t}function zf(e,t,n){var r=this,o=q(null),i=q(0),a=q(null),u=q([]),s=q(),l=q(),d=q(e),c=q(!0);d.current=e;var f=typeof window<"u",h=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,y="maxWait"in n,_="debounceOnServer"in n&&!!n.debounceOnServer,v=y?Math.max(+n.maxWait||0,t):null;ie(function(){return c.current=!0,function(){c.current=!1}},[]);var T=ae(function(){var O=function(L){var w=u.current,I=s.current;return u.current=s.current=null,i.current=L,l.current=d.current.apply(I,w)},x=function(L,w){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(L):setTimeout(L,w)},b=function(L){if(!c.current)return!1;var w=L-o.current;return!o.current||w>=t||w<0||y&&L-i.current>=v},M=function(L){return a.current=null,m&&u.current?O(L):(u.current=s.current=null,l.current)},H=function L(){var w=Date.now();if(b(w))return M(w);if(c.current){var I=t-(w-o.current),K=y?Math.min(I,v-(w-i.current)):I;x(L,K)}},E=function(){if(f||_){var L=Date.now(),w=b(L);if(u.current=[].slice.call(arguments),s.current=r,o.current=L,w){if(!a.current&&c.current)return i.current=o.current,x(H,t),p?O(o.current):l.current;if(y)return x(H,t),O(o.current)}return a.current||x(H,t),l.current}};return E.cancel=function(){a.current&&(h?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,u.current=o.current=s.current=a.current=null},E.isPending=function(){return!!a.current},E.flush=function(){return a.current?M(Date.now()):l.current},E},[p,y,t,v,m,h,f,_]);return T}function bp(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return zf(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}function Qe(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function jf(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Qe(n);return(o,i)=>r.then(a=>i(a.transaction(t,o).objectStore(t)))}let Nr;function vt(){return Nr||(Nr=jf("keyval-store","keyval")),Nr}function Ep(e,t=vt()){return t("readonly",n=>Qe(n.get(e)))}function Sp(e,t,n=vt()){return n("readwrite",r=>(r.put(t,e),Qe(r.transaction)))}function Tp(e,t=vt()){return t("readonly",n=>Promise.all(e.map(r=>Qe(n.get(r)))))}function xp(e,t=vt()){return t("readwrite",n=>(n.delete(e),Qe(n.transaction)))}function Cp(e,t=vt()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),Qe(n.transaction)))}function Ap(e=vt()){return e("readwrite",t=>(t.clear(),Qe(t.transaction)))}function Ff(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Qe(e.transaction)}function Mp(e=vt()){return e("readonly",t=>{if(t.getAllKeys)return Qe(t.getAllKeys());const n=[];return Ff(t,r=>n.push(r.key)).then(()=>n)})}class Le extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid"]}connectedCallback(){this.addEventListener("pointerover",Le.warmConnections,{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(t){this.setAttribute("videoid",t)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(t){this.setAttribute("playlistid",t)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(t){this.setAttribute("videotitle",t)}get videoPlay(){return this.getAttribute("videoPlay")||"Play"}set videoPlay(t){this.setAttribute("videoPlay",t)}get videoStartAt(){return this.getAttribute("videoStartAt")||"0"}get autoLoad(){return this.hasAttribute("autoload")}get noCookie(){return this.hasAttribute("nocookie")}get posterQuality(){return this.getAttribute("posterquality")||"hqdefault"}get posterLoading(){return this.getAttribute("posterloading")||"lazy"}get params(){return`start=${this.videoStartAt}&${this.getAttribute("params")}`}set params(t){this.setAttribute("params",t)}setupDom(){const t=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),t.innerHTML=`
`,this.domRefFrame=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort())&&this.initIntersectionObserver()}attributeChangedCallback(t,n,r){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==r&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1));break}default:break}}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const r=this.noCookie?"-nocookie":"";let o;this.playlistId?o=`?listType=playlist&list=${this.playlistId}&`:o=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const i=` `;this.domRefFrame.insertAdjacentHTML("beforeend",i),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){var r,o;const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.webp.srcset=t,this.domRefImg.jpeg.srcset=n,this.domRefImg.fallback.src=n,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(o=(r=this.domRefImg)==null?void 0:r.fallback)==null||o.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((r,o)=>{r.forEach(i=>{i.isIntersecting&&!this.isIframeLoaded&&(Le.warmConnections(),this.addIframe(!0),o.unobserve(this))})},t).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var t,n;(n=(t=this.shadowRoot.querySelector("iframe"))==null?void 0:t.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,n){const r=document.createElement("link");r.rel=t,r.href=n,r.crossOrigin="true",document.head.append(r)}static warmConnections(){Le.isPreconnected||window.liteYouTubeIsPreconnected||(Le.addPrefetch("preconnect","https://i.ytimg.com/"),Le.addPrefetch("preconnect","https://s.ytimg.com"),Le.addPrefetch("preconnect","https://www.youtube.com"),Le.addPrefetch("preconnect","https://www.google.com"),Le.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Le.addPrefetch("preconnect","https://static.doubleclick.net"),Le.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Le.isPreconnected=!1;customElements.define("lite-youtube",Le);const Hf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~",Dn=(e,t,n)=>{let r=0;for(;te>10.31475?Ms(e/Ps+.052132,2.4):e/Os,kr=e=>~~(e>1227e-8?Ps*Ms(e,.416666)-13.025:e*Os+1),sn=e=>(e<0?-1:1)*e*e,Ji=e=>{for(e+=_n/2;e>_n;)e-=Bf;const t=1.27323954*e-.405284735*sn(e);return .225*(sn(t)-t)+t};function Kf(e){const t=Dn(e,2,6);return[t>>16,t>>8&255,t&255]}function Op(e,t,n,r){const o=Dn(e,0,1),i=o%9+1,a=~~(o/9)+1,u=i*a;let s=0,l=0,d=0,c=0,f=0,h=0,p=0,m=0,y=0,_=0,v=0,T=0,O=0,x=0;const b=(Dn(e,1,2)+1)/13446*(r|1),M=new Float64Array(u*3),H=Kf(e);for(s=0;s<3;s++)M[s]=Uf(H[s]);for(s=1;s(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(tn||{}),nn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(nn||{});const Rs=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Wf=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Ls(e){const{nativeEvent:t}=e,n=Wf();return n&&t instanceof n||"touches"in e}function Ds(e){const t=Rs();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Is(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Rs();return n&&t instanceof n||"pointerId"in t}function Xi(e){return Ds(e)||Ls(e)||Is(e)}function Qi(e){return Ls(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:Ds(e)||Is(e)?{x:e.pageX,y:e.pageY}:null}function qf(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Pp(e,{threshold:t=400,captureEvent:n=!1,detect:r=tn.Pointer,cancelOnMovement:o=!1,cancelOutsideElement:i=!0,filterEvents:a,onStart:u,onMove:s,onFinish:l,onCancel:d}={}){const c=q(!1),f=q(!1),h=q(),p=q(),m=q(e),y=q(null),_=_e(x=>b=>{f.current||Xi(b)&&(a!==void 0&&!a(b)||(n&&b.persist(),u==null||u(b,{context:x}),y.current=Qi(b),f.current=!0,h.current=b.currentTarget,p.current=setTimeout(()=>{m.current&&(m.current(b,{context:x}),c.current=!0)},t)))},[n,a,u,t]),v=_e(x=>(b,M)=>{Xi(b)&&f.current&&(y.current=null,n&&b.persist(),c.current?l==null||l(b,{context:x}):f.current&&(d==null||d(b,{context:x,reason:M??nn.CancelledByRelease})),c.current=!1,f.current=!1,p.current!==void 0&&clearTimeout(p.current))},[n,l,d]),T=_e(x=>b=>{if(s==null||s(b,{context:x}),o!==!1&&y.current){const M=Qi(b);if(M){const H=o===!0?25:o,E={x:Math.abs(M.x-y.current.x),y:Math.abs(M.y-y.current.y)};(E.x>H||E.y>H)&&v(x)(b,nn.CancelledByMovement)}}},[v,o,s]),O=_e(x=>{if(e===null)return{};switch(r){case tn.Mouse:{const b={onMouseDown:_(x),onMouseMove:T(x),onMouseUp:v(x)};return i&&(b.onMouseLeave=M=>{v(x)(M,nn.CancelledOutsideElement)}),b}case tn.Touch:return{onTouchStart:_(x),onTouchMove:T(x),onTouchEnd:v(x)};case tn.Pointer:{const b={onPointerDown:_(x),onPointerMove:T(x),onPointerUp:v(x)};return i&&(b.onPointerLeave=M=>v(x)(M,nn.CancelledOutsideElement)),b}}},[e,v,i,r,T,_]);return ie(()=>{if(!window)return;function x(b){const M=qf(b);v()(M)}return window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("pointerup",x),()=>{window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("pointerup",x)}},[v]),ie(()=>()=>{p.current!==void 0&&clearTimeout(p.current)},[]),ie(()=>{m.current=e},[e]),O}function Gf(e,t){var n=q(null),r=q(null);r.current=t;var o=q(null);ie(function(){i()});var i=_e(function(){var a=o.current,u=r.current,s=a||(u?u instanceof Element?u:u.current:null);n.current&&n.current.element===s&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:s,subscriber:e,cleanup:s?e(s):void 0})},[e]);return ie(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),_e(function(a){o.current=a,i()},[i])}function ea(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function Rp(e){e===void 0&&(e={});var t=e.onResize,n=q(void 0);n.current=t;var r=e.round||Math.round,o=q(),i=me({width:void 0,height:void 0}),a=i[0],u=i[1],s=q(!1);ie(function(){return s.current=!1,function(){s.current=!0}},[]);var l=q({width:void 0,height:void 0}),d=Gf(_e(function(c){return(!o.current||o.current.box!==e.box||o.current.round!==r)&&(o.current={box:e.box,round:r,instance:new ResizeObserver(function(f){var h=f[0],p=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",m=ea(h,p,"inlineSize"),y=ea(h,p,"blockSize"),_=m?r(m):void 0,v=y?r(y):void 0;if(l.current.width!==_||l.current.height!==v){var T={width:_,height:v};l.current.width=_,l.current.height=v,n.current?n.current(T):s.current||u(T)}})}),o.current.instance.observe(c,{box:e.box}),function(){o.current&&o.current.instance.unobserve(c)}},[e.box,r]),e.ref);return ae(function(){return{ref:d,width:a.width,height:a.height}},[d,a.width,a.height])}var Ns="kvfysmfp",ks="ufhsfnkm",Yf=".".concat(Ns,"{overflow:hidden;touch-action:none}.").concat(ks,"{transform-origin: 0 0}"),Zf=typeof window>"u",Vf=function(){return!Zf&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Lp=function(e){var t=e.x,n=e.y,r=e.scale;return"scale3d(".concat(r,",").concat(r,", 1) translate3d(").concat(t,"px, ").concat(n,"px, 0)")};var Jf=Math.min,Xf=Math.max;function ta(e){var t=e.containerDimension,n=e.childDimension,r=e.padding,o=e.centerContained,i=n-t;return i+2*r<=0&&o?[i/2,i/2]:[Jf(i+r,0)-r,Xf(0,i+r)]}var na=function(e,t){return t?"".concat(e," ").concat(t):e},Cn=Math.abs,Qf=Math.min,eh=Math.sqrt,$s=typeof window>"u",th=$s?!1:/(Mac)/i.test(navigator.platform),Ct=function(e){return e==="drag"},Vt=function(e){return e==="zoom"},nh=function(e){return th&&e.ctrlKey},Jt=function(e){e.stopPropagation(),e.preventDefault()},ra=function(e,t){var n=e.x-t.x,r=e.y-t.y;return eh(n*n+r*r)},rh=function(e,t){var n=ra(e[0],e[1]),r=ra(t[0],t[1]);return r/n},oh=function(e,t){return e>t-.01&&et?t:n},uh=function(e){return!(e.ctrlKey||e.metaKey)},ch=function(e){if(e){var t=e.offsetWidth,n=e.offsetHeight;if(t&&n)return{width:t,height:n};var r=getComputedStyle(e),o=parseFloat(r.width),i=parseFloat(r.height);if(i&&o)return{width:o,height:i}}return{width:0,height:0}},lh=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},dh=function(e,t){return e.x===t.x&&e.y===t.y},ut=function(){},Mn={x:0,y:0},Dp=function(e){Xc(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=fe({},Mn),n._interaction=null,n._isDoubleTap=!1,n._isOffsetsSet=!1,n._lastDragPosition=null,n._lastScale=1,n._lastTouchStart=0,n._lastZoomCenter=null,n._listenMouseMove=!1,n._nthZoom=0,n._offset=fe({},Mn),n._startOffset=fe({},Mn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=fe({},Mn),n._ignoreNextClick=!1,n._containerRef=uo(),n._handleClick=function(r){n._ignoreNextClick&&(n._ignoreNextClick=!1,r.stopPropagation())},n._onResize=function(){var r;!((r=n._containerRef)===null||r===void 0)&&r.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(r){n._fingers=r.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(Vt(n._interaction)||Ct(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&Jt(r),Ct(n._interaction)&&!n._enoughToDrag()&&n._handleClick(r),n._updateInteraction(r)}),n._handlerOnTouchStart=n._handlerIfEnable(function(r){n._firstMove=!0,n._fingers=r.touches.length,n._detectDoubleTap(r)}),n._handlerOnTouchMove=n._handlerIfEnable(function(r){n._isDoubleTap||(n._collectInertia(r),n._firstMove?(n._updateInteraction(r),n._interaction&&Jt(r),n._startOffset=fe({},n._offset),n._startTouches=An(r.touches)):(Vt(n._interaction)?n._startTouches&&n._startTouches.length===2&&r.touches.length===2&&n._handleZoom(r,rh(n._startTouches,An(r.touches))):Ct(n._interaction)&&n._handleDrag(r),n._interaction&&(Jt(r),n._update())),n._firstMove=!1)}),n._handlerWheel=function(r){if(!n.props.shouldInterceptWheel(r)){Jt(r);var o=r.pageX,i=r.pageY,a=r.deltaY,u=r.deltaMode,s=1;(nh(r)||u===1)&&(s=15);var l={touches:[{pageX:o,pageY:i}]},d=n._getOffsetByFirstTouch(l),c=a*s;n._stopAnimation(),n._scaleTo(n._zoomFactor-c/n.props.wheelScaleFactor,d),n._update(),clearTimeout(n._wheelTimeOut),n._wheelTimeOut=setTimeout(function(){return n._sanitize()},100)}},n._handlers=n.props.isTouch()?[["touchstart",n._handlerOnTouchStart],["touchend",n._handlerOnTouchEnd],["touchmove",n._handlerOnTouchMove]]:[["mousemove",n.simulate(n._handlerOnTouchMove),n.props._document],["mouseup",n.simulate(n._handlerOnTouchEnd),n.props._document],["mousedown",n.simulate(n._handlerOnTouchStart)],["click",n._handleClick],["wheel",n._handlerWheel]],n}return t.prototype._handleDragStart=function(n){this._ignoreNextClick=!0,this.props.onDragStart(),this._stopAnimation(),this._resetInertia(),this._lastDragPosition=null,this._hasInteraction=!0,this._draggingPoint=this._offset,this._handleDrag(n)},t.prototype._handleDrag=function(n){var r=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(r,this._lastDragPosition):this._virtualDrag(r,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=r},t.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},t.prototype._realizeInertia=function(){var n=this,r=this.props,o=r.inertiaFriction,i=r.inertia;if(!(!i||!this._velocity)){var a=this._velocity,u=a.x,s=a.y;if(u||s){this._stopAnimation(),this._resetInertia();var l=function(){if(u*=o,s*=o,!u&&!s)return n._stopAnimation();var d=fe({},n._offset);if(n._addOffset({x:u,y:s}),n._offset=n._sanitizeOffset(n._offset),dh(d,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(l,{duration:9999})}}},t.prototype._collectInertia=function(n){var r=n.touches;if(this.props.inertia){var o=An(r)[0],i=this._prevDragMovePoint;i&&(this._velocity=lh(o,i)),this._prevDragMovePoint=o}},t.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},t.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},t.prototype._handleZoom=function(n,r){var o=sh(this._getOffsetTouches(n)),i=r/this._lastScale;this._lastScale=r,this._nthZoom+=1,this._nthZoom>3&&(this._scale(i,o),this._drag(o,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=o},t.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},t.prototype._handleDoubleTap=function(n){var r=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var o=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var i=this._zoomFactor+this.props.tapZoomFactor,a=this._zoomFactor,u=function(l){r._scaleTo(a+l*(i-a),s)},s=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,a>i&&(s=this._getCurrentZoomCenter()),o?this._zoomOutAnimation():this._animate(u)}},t.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),r=this._getChildSize(),o=r.width,i=r.height,a=-Cn(o*this._getInitialZoomFactor()-n.width)/2,u=-Cn(i*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:a,y:u}},t.prototype._resetOffset=function(){this._offset=fe({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var r=this._getContainerRect(),o=this._getChildSize(),i=o.width,a=o.height,u=i*this._getInitialZoomFactor()*this._zoomFactor,s=a*this._getInitialZoomFactor()*this._zoomFactor,l=ta({containerDimension:r.width,childDimension:u,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),d=l[0],c=l[1],f=ta({containerDimension:r.height,childDimension:s,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),h=f[0],p=f[1];return{x:$r(d,c,n.x),y:$r(h,p,n.y)}},t.prototype.alignCenter=function(n){var r=this,o=fe({duration:250,animated:!0},n),i=o.x,a=o.y,u=o.scale,s=o.animated,l=o.duration,d=i*this._initialZoomFactor,c=a*this._initialZoomFactor,f=this._zoomFactor,h=fe({},this._offset),p=this._getContainerRect(),m={x:p.width/2,y:p.height/2};if(this._zoomFactor=1,this._offset={x:-(m.x-d),y:-(m.y-c)},this._scaleTo(u,m),this._stopAnimation(),!s)return this._update();var y=this._zoomFactor-f,_={x:this._offset.x-h.x,y:this._offset.y-h.y};this._zoomFactor=f,this._offset=fe({},h);var v=function(T){var O=h.x+_.x*T,x=h.y+_.y*T;r._zoomFactor=f+y*T,r._offset=r._sanitizeOffset({x:O,y:x}),r._update()};this._animate(v,{callback:function(){return r._sanitize()},duration:l})},t.prototype.scaleTo=function(n){var r=this,o=fe({duration:250,animated:!0},n),i=o.x,a=o.y,u=o.scale,s=o.animated,l=o.duration,d=this._zoomFactor,c=fe({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(u,{x:i,y:a}),this._stopAnimation(),!s)return this._update();var f=this._zoomFactor-d,h={x:this._offset.x-c.x,y:this._offset.y-c.y};this._zoomFactor=d,this._offset=fe({},c);var p=function(m){var y=c.x+h.x*m,_=c.y+h.y*m;r._zoomFactor=d+f*m,r._offset={x:y,y:_},r._update()};this._animate(p,{callback:function(){return r._sanitize()},duration:l})},t.prototype._scaleTo=function(n,r){this._scale(n/this._zoomFactor,r),this._offset=this._sanitizeOffset(this._offset)},t.prototype._scale=function(n,r){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(r.x+this._offset.x),y:(n-1)*(r.y+this._offset.y)}),this.props.onZoomUpdate()},t.prototype._scaleZoomFactor=function(n){var r=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=$r(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/r},t.prototype._canDrag=function(){return this.props.draggableUnZoomed||!oh(this._zoomFactor,1)},t.prototype._drag=function(n,r){if(r){var o=-(n.y-r.y),i=-(n.x-r.x);this.props.lockDragAxis?Cn(i)>Cn(o)?this._addOffset({x:i,y:0}):this._addOffset({y:o,x:0}):this._addOffset({x:i,y:o}),this.props.onDragUpdate()}},t.prototype._virtualDrag=function(n,r){if(r){var o=-(n.y-r.y),i=-(n.x-r.x);this._draggingPoint={x:i+this._draggingPoint.x,y:o+this._draggingPoint.y}}},t.prototype._addOffset=function(n){var r=this._offset,o=r.x,i=r.y;this._offset={x:o+n.x,y:i+n.y}},t.prototype._sanitize=function(){this._zoomFactor=l?(n(1),o._stopAnimation(),s(),o._update()):(f=u(f),n(f),o._update({isAnimation:!0}),requestAnimationFrame(d))}};this._inAnimation=!0,requestAnimationFrame(d)},t.prototype._stopAnimation=function(){this._inAnimation=!1},t.prototype._end=function(){this._hasInteraction=!1,this._sanitize(),this._update()},t.prototype._getContainerRect=function(){var n=this._containerRef.current;return n.getBoundingClientRect()},t.prototype._getChildSize=function(){var n=this._containerRef.current;return ch(n==null?void 0:n.firstElementChild)},t.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),r=this._getChildSize(),o=n.width/r.width,i=n.height/r.height;this._initialZoomFactor=Qf(o,i)},t.prototype._bindEvents=function(){var n=this,r=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(r)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(o){var i=o[0],a=o[1],u=o[2];(u||r).addEventListener(i,a,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(o){return o.addEventListener("load",n._onResize)})},t.prototype._unSubscribe=function(){var n=this,r=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(o){var i=o[0],a=o[1],u=o[2];(u||r).removeEventListener(i,a,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(o){return o.removeEventListener("load",n._onResize)})},t.prototype._update=function(n){var r=this;if(!this._updatePlaned){var o=function(){var i=r._getInitialZoomFactor()*r._zoomFactor,a=-r._offset.x/i,u=-r._offset.y/i;r.props.onUpdate({scale:i,x:a,y:u})};if(n!=null&&n.isAnimation)return o();this._updatePlaned=!0,requestAnimationFrame(function(){r._updatePlaned=!1,o()})}},t.prototype._handlerIfEnable=function(n){var r=this;return function(){for(var o=[],i=0;ir?n-r:r-n},t.prototype._enoughToDrag=function(){return this._distanceBetweenNumbers(this._startOffset.x,this._draggingPoint.x)>5||this._distanceBetweenNumbers(this._startOffset.y,this._draggingPoint.y)>5},t.prototype._updateInteraction=function(n){var r=this._fingers;if(r===2)return this._setInteraction("zoom",n);if(r===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},t.prototype._detectDoubleTap=function(n){var r=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),r-this._lastTouchStart<300?(Jt(n),this._handleDoubleTap(n),Vt(this._interaction)?this._handleZoomEnd():Ct(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=r)},t.prototype.simulate=function(n){var r=this;return function(o){var i=o.pageX,a=o.pageY,u=o.type,s=u==="mouseup",l=u==="mousedown";l&&(o.preventDefault(),r._listenMouseMove=!0),r._listenMouseMove&&(o.touches=s?[]:[{pageX:i,pageY:a}],n(o)),s&&(r._listenMouseMove=!1)}},t.prototype.componentDidMount=function(){this._bindEvents(),this._update()},t.prototype.componentWillUnmount=function(){this._stopAnimation(),this._unSubscribe()},t.prototype.render=function(){var n=this.props,r=n.children,o=n.containerProps,i=ar.only(r),a=o||{};return Ot.createElement(Ot.Fragment,null,Ot.createElement("style",null,Yf),Ot.createElement("div",fe({},a,{ref:this._containerRef,className:na(Ns,a.className)}),sr(i,{className:na(ks,i.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Vf,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:ut,onDragEnd:ut,onDragStart:ut,onDragUpdate:ut,onZoomEnd:ut,onZoomStart:ut,onZoomUpdate:ut,setOffsetsOnce:!1,shouldInterceptWheel:uh,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:$s?null:window.document},t}(Pe);if(!1)var Ip,Np,kp,$p,zp,jp,Fp;var fh=Object.defineProperty,hh=(e,t,n)=>t in e?fh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,On=(e,t,n)=>(hh(e,typeof t!="symbol"?t+"":t,n),n),so=new Map,Pn=new WeakMap,ia=0,ph=void 0;function mh(e){return e?(Pn.has(e)||(ia+=1,Pn.set(e,ia.toString())),Pn.get(e)):"0"}function _h(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?mh(e.root):e[t]}`).toString()}function yh(e){let t=_h(e),n=so.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(a=>{a.forEach(u=>{var s;const l=u.isIntersecting&&o.some(d=>u.intersectionRatio>=d);e.trackVisibility&&typeof u.isVisible>"u"&&(u.isVisible=l),(s=r.get(u.target))==null||s.forEach(d=>{d(l,u)})})},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},so.set(t,n)}return n}function vh(e,t,n={},r=ph){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const s=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}const{id:o,observer:i,elements:a}=yh(n);let u=a.get(e)||[];return a.has(e)||a.set(e,u),u.push(t),i.observe(e),function(){u.splice(u.indexOf(t),1),u.length===0&&(a.delete(e),i.unobserve(e)),a.size===0&&(i.disconnect(),so.delete(o))}}function gh(e){return typeof e.children!="function"}var Hp=class extends Pe{constructor(e){super(e),On(this,"node",null),On(this,"_unobserveCb",null),On(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()}),On(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),gh(this.props)||this.setState({inView:t,entry:n}),this.props.onChange&&this.props.onChange(t,n)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:o,fallbackInView:i}=this.props;this._unobserveCb=vh(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:o},i)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:h,entry:p}=this.state;return e({inView:h,entry:p,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:r,root:o,rootMargin:i,onChange:a,skip:u,trackVisibility:s,delay:l,initialInView:d,fallbackInView:c,...f}=this.props;return te(t||"div",{ref:this.handleNode,...f},e)}};var Bo={exports:{}},Bp=Bo.exports;(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(s,l){if(!i[s]){i[s]={};for(var d=0;d>>8,d[c*2+1]=h%256}return d},decompressFromUint8Array:function(s){if(s==null)return u.decompress(s);for(var l=new Array(s.length/2),d=0,c=l.length;d>1}else{for(f=1,c=0;c>1}v--,v==0&&(v=Math.pow(2,O),O++),delete p[_]}else for(f=h[_],c=0;c>1;v--,v==0&&(v=Math.pow(2,O),O++),h[y]=T++,_=String(m)}if(_!==""){if(Object.prototype.hasOwnProperty.call(p,_)){if(_.charCodeAt(0)<256){for(c=0;c>1}else{for(f=1,c=0;c>1}v--,v==0&&(v=Math.pow(2,O),O++),delete p[_]}else for(f=h[_],c=0;c>1;v--,v==0&&(v=Math.pow(2,O),O++)}for(f=2,c=0;c>1;for(;;)if(b=b<<1,M==l-1){x.push(d(b));break}else M++;return x.join("")},decompress:function(s){return s==null?"":s==""?null:u._decompress(s.length,32768,function(l){return s.charCodeAt(l)})},_decompress:function(s,l,d){var c=[],f,h=4,p=4,m=3,y="",_=[],v,T,O,x,b,M,H,E={val:d(0),position:l,index:1};for(v=0;v<3;v+=1)c[v]=v;for(O=0,b=Math.pow(2,2),M=1;M!=b;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=l,E.val=d(E.index++)),O|=(x>0?1:0)*M,M<<=1;switch(f=O){case 0:for(O=0,b=Math.pow(2,8),M=1;M!=b;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=l,E.val=d(E.index++)),O|=(x>0?1:0)*M,M<<=1;H=n(O);break;case 1:for(O=0,b=Math.pow(2,16),M=1;M!=b;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=l,E.val=d(E.index++)),O|=(x>0?1:0)*M,M<<=1;H=n(O);break;case 2:return""}for(c[3]=H,T=H,_.push(H);;){if(E.index>s)return"";for(O=0,b=Math.pow(2,m),M=1;M!=b;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=l,E.val=d(E.index++)),O|=(x>0?1:0)*M,M<<=1;switch(H=O){case 0:for(O=0,b=Math.pow(2,8),M=1;M!=b;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=l,E.val=d(E.index++)),O|=(x>0?1:0)*M,M<<=1;c[p++]=n(O),H=p-1,h--;break;case 1:for(O=0,b=Math.pow(2,16),M=1;M!=b;)x=E.val&E.position,E.position>>=1,E.position==0&&(E.position=l,E.val=d(E.index++)),O|=(x>0?1:0)*M,M<<=1;c[p++]=n(O),H=p-1,h--;break;case 2:return _.join("")}if(h==0&&(h=Math.pow(2,m),m++),c[H])y=c[H];else if(H===p)y=T+T.charAt(0);else return null;_.push(y),c[p++]=T+y.charAt(0),h--,T=y,h==0&&(h=Math.pow(2,m),m++)}}};return u}();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(Bo);var Up=Bo.exports;export{up as $,ir as A,_p as B,xd as C,zh as D,sc as E,ae as F,cn as G,Ah as H,Hp as I,Pp as J,Nh as K,kh as L,tp as M,it as N,Kh as O,qh as P,Zr as Q,xh as R,ep as S,_e as T,yc as U,ln as V,ap as W,Qh as X,qs as Y,lp as Z,q as _,se as a,fp as a0,pp as a1,mp as a2,Dr as a3,jf as a4,Sp as a5,Ep as a6,Tp as a7,xp as a8,Cp as a9,Ap as aa,Mp as ab,be as ac,bp as ad,Rp as ae,Lp as af,Dp as ag,Op as ah,vp as ai,wp as aj,gp as ak,yp as al,Lh as b,Gh as c,rp as d,bo as e,Kf as f,De as g,me as h,Ya as i,Ju as j,Mh as k,Up as l,zf as m,Th as n,op as o,ie as p,ne as q,np as r,or as s,ip as t,Ih as u,jh as v,vn as w,Cu as x,Xe as y,Oh as z}; //# sourceMappingURL=vendor--8C7Txey.js.map