vendor: 4,254 bytes, lines 1-9
1var dw=e=>{throw TypeError(e)};var Cm=(e,t,n)=>t.has(e)||dw("Cannot "+n);var K=(e,t,n)=>(Cm(e,t,"read from private field"),n?n.call(e):t.get(e)),ke=(e,t,n)=>t.has(e)?dw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),fe=(e,t,n,r)=>(Cm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),De=(e,t,n)=>(Cm(e,t,"access private method"),n);var jd=(e,t,n,r)=>({set _(s){fe(e,t,s,n)},get _(){return K(e,t,r)}});function J4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var On=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q2={exports:{}},dp={},V2={exports:{}},Le={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var qu=Symbol.for("react.element"),Z4=Symbol.for("react.portal"),e5=Symbol.for("react.fragment"),t5=Symbol.for("react.strict_mode"),n5=Symbol.for("react.profiler"),r5=Symbol.for("react.provider"),s5=Symbol.for("react.context"),i5=Symbol.for("react.forward_ref"),a5=Symbol.for("react.suspense"),o5=Symbol.for("react.memo"),l5=Symbol.for("react.lazy"),hw=Symbol.iterator;function c5(e){return e===null||typeof e!="object"?null:(e=hw&&e[hw]||e["@@iterator"],typeof e=="function"?e:null)}var W2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H2=Object.assign,K2={};function gl(e,t,n){this.props=e,this.context=t,this.refs=K2,this.updater=n||W2}gl.prototype.isReactComponent={};gl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};gl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function G2(){}G2.prototype=gl.prototype;function Cv(e,t,n){this.props=e,this.context=t,this.refs=K2,this.updater=n||W2}var Tv=Cv.prototype=new G2;Tv.constructor=Cv;H2(Tv,gl.prototype);Tv.isPureReactComponent=!0;var fw=Array.isArray,Y2=Object.prototype.hasOwnProperty,Av={current:null},X2={key:!0,ref:!0,__self:!0,__source:!0};function Q2(e,t,n){var r,s={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)Y2.call(t,r)&&!X2.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:qu,type:e,key:a,ref:o,props:s,_owner:Av.current}}function u5(e,t){return{$$typeof:qu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pv(e){return typeof e=="object"&&e!==null&&e.$$typeof===qu}function d5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pw=/\/+/g;function Tm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?d5(""+e.key):t.toString(36)}
vendor: 10,977 bytes, lines 9-33
9function xh(e,t,n,r,s){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case qu:case Z4:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Tm(o,0):r,fw(s)?(n="",e!=null&&(n=e.replace(pw,"$&/")+"/"),xh(s,t,n,"",function(u){return u})):s!=null&&(Pv(s)&&(s=u5(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(pw,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",fw(e))for(var l=0;l<e.length;l++){a=e[l];var c=r+Tm(a,l);o+=xh(a,t,n,c,s)}else if(c=c5(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=r+Tm(a,l++),o+=xh(a,t,n,c,s);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Nd(e,t,n){if(e==null)return e;var r=[],s=0;return xh(e,r,"","",function(a){return t.call(n,a,s++)}),r}function h5(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dn={current:null},yh={transition:null},f5={ReactCurrentDispatcher:dn,ReactCurrentBatchConfig:yh,ReactCurrentOwner:Av};function J2(){throw Error("act(...) is not supported in production builds of React.")}Le.Children={map:Nd,forEach:function(e,t,n){Nd(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Nd(e,function(){t++}),t},toArray:function(e){return Nd(e,function(t){return t})||[]},only:function(e){if(!Pv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Le.Component=gl;Le.Fragment=e5;Le.Profiler=n5;Le.PureComponent=Cv;Le.StrictMode=t5;Le.Suspense=a5;Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f5;Le.act=J2;Le.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=H2({},e.props),s=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=Av.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Y2.call(t,c)&&!X2.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:qu,type:e.type,key:s,ref:a,props:r,_owner:o}};Le.createContext=function(e){return e={$$typeof:s5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:r5,_context:e},e.Consumer=e};Le.createElement=Q2;Le.createFactory=function(e){var t=Q2.bind(null,e);return t.type=e,t};Le.createRef=function(){return{current:null}};Le.forwardRef=function(e){return{$$typeof:i5,render:e}};Le.isValidElement=Pv;Le.lazy=function(e){return{$$typeof:l5,_payload:{_status:-1,_result:e},_init:h5}};Le.memo=function(e,t){return{$$typeof:o5,type:e,compare:t===void 0?null:t}};Le.startTransition=function(e){var t=yh.transition;yh.transition={};try{e()}finally{yh.transition=t}};Le.unstable_act=J2;Le.useCallback=function(e,t){return dn.current.useCallback(e,t)};Le.useContext=function(e){return dn.current.useContext(e)};Le.useDebugValue=function(){};Le.useDeferredValue=function(e){return dn.current.useDeferredValue(e)};Le.useEffect=function(e,t){return dn.current.useEffect(e,t)};Le.useId=function(){return dn.current.useId()};Le.useImperativeHandle=function(e,t,n){return dn.current.useImperativeHandle(e,t,n)};Le.useInsertionEffect=function(e,t){return dn.current.useInsertionEffect(e,t)};Le.useLayoutEffect=function(e,t){return dn.current.useLayoutEffect(e,t)};Le.useMemo=function(e,t){return dn.current.useMemo(e,t)};Le.useReducer=function(e,t,n){return dn.current.useReducer(e,t,n)};Le.useRef=function(e){return dn.current.useRef(e)};Le.useState=function(e){return dn.current.useState(e)};Le.useSyncExternalStore=function(e,t,n){return dn.current.useSyncExternalStore(e,t,n)};Le.useTransition=function(){return dn.current.useTransition()};Le.version="18.3.1";V2.exports=Le;var N=V2.exports;const ne=up(N),Ov=J4({__proto__:null,default:ne},[N]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var p5=N,m5=Symbol.for("react.element"),g5=Symbol.for("react.fragment"),x5=Object.prototype.hasOwnProperty,y5=p5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v5={key:!0,ref:!0,__self:!0,__source:!0};function Z2(e,t,n){var r,s={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)x5.call(t,r)&&!v5.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:m5,type:e,key:a,ref:o,props:s,_owner:y5.current}}dp.Fragment=g5;dp.jsx=Z2;dp.jsxs=Z2;q2.exports=dp;var i=q2.exports,eS={exports:{}},Fn={},tS={exports:{}},nS={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(q,L){var D=q.length;q.push(L);e:for(;0<D;){var R=D-1>>>1,F=q[R];if(0<s(F,L))q[R]=L,q[D]=F,D=R;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var L=q[0],D=q.pop();if(D!==L){q[0]=D;e:for(var R=0,F=q.length,U=F>>>1;R<U;){var V=2*(R+1)-1,W=q[V],M=V+1,z=q[M];if(0>s(W,D))M<F&&0>s(z,W)?(q[R]=z,q[M]=D,R=M):(q[R]=W,q[V]=D,R=V);else if(M<F&&0>s(z,D))q[R]=z,q[M]=D,R=M;else break e}}return L}function s(q,L){var D=q.sortIndex-L.sortIndex;return D!==0?D:q.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,x=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(q){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=q)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function w(q){if(m=!1,b(q),!x)if(n(c)!==null)x=!0,B(j);else{var L=n(u);L!==null&&$(w,L.startTime-q)}}function j(q,L){x=!1,m&&(m=!1,g(S),S=-1),p=!0;var D=f;try{for(b(L),h=n(c);h!==null&&(!(h.expirationTime>L)||q&&!T());){var R=h.callback;if(typeof R=="function"){h.callback=null,f=h.priorityLevel;var F=R(h.expirationTime<=L);L=e.unstable_now(),typeof F=="function"?h.callback=F:h===n(c)&&r(c),b(L)}else r(c);h=n(c)}if(h!==null)var U=!0;else{var V=n(u);V!==null&&$(w,V.startTime-L),U=!1}return U}finally{h=null,f=D,p=!1}}var E=!1,k=null,S=-1,A=5,C=-1;function T(){return!(e.unstable_now()-C<A)}function _(){if(k!==null){var q=e.unstable_now();C=q;var L=!0;try{L=k(!0,q)}finally{L?P():(E=!1,k=null)}}else E=!1}var P;if(typeof v=="function")P=function(){v(_)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,I=O.port2;O.port1.onmessage=_,P=function(){I.postMessage(null)}}else P=function(){y(_,0)};function B(q){k=q,E||(E=!0,P())}function $(q,L){S=y(function(){q(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){x||p||(x=!0,B(j))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(q){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var D=f;f=L;try{return q()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,L){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var D=f;f=q;try{return L()}finally{f=D}},e.unstable_scheduleCallback=function(q,L,D){var R=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?R+D:R):D=R,q){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=D+F,q={id:d++,callback:L,priorityLevel:q,startTime:D,expirationTime:F,sortIndex:-1},D>R?(q.sortIndex=D,t(u,q),n(c)===null&&q===n(u)&&(m?(g(S),S=-1):m=!0,$(w,D-R))):(q.sortIndex=F,t(c,q),x||p||(x=!0,B(j))),q},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(q){var L=f;return function(){var D=f;f=L;try{return q.apply(this,arguments)}finally{f=D}}}})(nS);tS.exports=nS;var b5=tS.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var w5=N,In=b5;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rS=new Set,Yc={};function Ea(e,t){Xo(e,t),Xo(e+"Capture",t)}function Xo(e,t){for(Yc[e]=t,e=0;e<t.length;e++)rS.add(t[e])}var fs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xg=Object.prototype.hasOwnProperty,j5=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,mw={},gw={};function N5(e){return Xg.call(gw,e)?!0:Xg.call(mw,e)?!1:j5.test(e)?gw[e]=!0:(mw[e]=!0,!1)}function k5(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S5(e,t,n,r){if(t===null||typeof t>"u"||k5(e,t,n,r))return!0;
vendor: 4,774 bytes, lines 33-34
33if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function hn(e,t,n,r,s,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ht[e]=new hn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ht[t]=new hn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new hn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new hn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ht[e]=new hn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new hn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new hn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new hn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new hn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rv=/[\-:]([a-z])/g;function Mv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rv,Mv);Ht[t]=new hn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rv,Mv);Ht[t]=new hn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rv,Mv);Ht[t]=new hn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new hn(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new hn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new hn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dv(e,t,n,r){var s=Ht.hasOwnProperty(t)?Ht[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(S5(t,n,s,r)&&(n=null),r||s===null?N5(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ks=w5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,kd=Symbol.for("react.element"),io=Symbol.for("react.portal"),ao=Symbol.for("react.fragment"),Iv=Symbol.for("react.strict_mode"),Qg=Symbol.for("react.profiler"),sS=Symbol.for("react.provider"),iS=Symbol.for("react.context"),Lv=Symbol.for("react.forward_ref"),Jg=Symbol.for("react.suspense"),Zg=Symbol.for("react.suspense_list"),Fv=Symbol.for("react.memo"),$s=Symbol.for("react.lazy"),aS=Symbol.for("react.offscreen"),xw=Symbol.iterator;function Gl(e){return e===null||typeof e!="object"?null:(e=xw&&e[xw]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,Am;function hc(e){if(Am===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Am=t&&t[1]||""}return` 34`+Am+e}var Pm=!1;
vendor: 4,723 bytes, lines 34-37
34function Om(e,t){if(!e||Pm)return"";Pm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),a=r.stack.split(` 36`),o=s.length-1,l=a.length-1;1<=o&&0<=l&&s[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==a[l]){var c=` 37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Pm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hc(e):""}function _5(e){switch(e.tag){case 5:return hc(e.type);case 16:return hc("Lazy");case 13:return hc("Suspense");case 19:return hc("SuspenseList");case 0:case 2:case 15:return e=Om(e.type,!1),e;case 11:return e=Om(e.type.render,!1),e;case 1:return e=Om(e.type,!0),e;default:return""}}function ex(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ao:return"Fragment";case io:return"Portal";case Qg:return"Profiler";case Iv:return"StrictMode";case Jg:return"Suspense";case Zg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iS:return(e.displayName||"Context")+".Consumer";case sS:return(e._context.displayName||"Context")+".Provider";case Lv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fv:return t=e.displayName||null,t!==null?t:ex(e.type)||"Memo";case $s:t=e._payload,e=e._init;try{return ex(e(t))}catch{}}return null}function E5(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ex(t);case 8:return t===Iv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function oS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function C5(e){var t=oS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sd(e){e._valueTracker||(e._valueTracker=C5(e))}function lS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=oS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function tx(e,t){var n=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function yw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cS(e,t){t=t.checked,t!=null&&Dv(e,"checked",t,!1)}function nx(e,t){cS(e,t);var n=yi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?rx(e,t.type,n):t.hasOwnProperty("defaultValue")&&rx(e,t.type,yi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}
vendor: 4,187 bytes, line 37
37function vw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function rx(e,t,n){(t!=="number"||Yh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fc=Array.isArray;function ko(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+yi(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function sx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ae(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function bw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ae(92));if(fc(n)){if(1<n.length)throw Error(ae(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:yi(n)}}function uS(e,t){var n=yi(t.value),r=yi(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ww(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function dS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ix(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _d,hS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(_d=_d||document.createElement("div"),_d.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_d.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Sc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},T5=["Webkit","ms","Moz","O"];Object.keys(Sc).forEach(function(e){T5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Sc[t]=Sc[e]})});function fS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Sc.hasOwnProperty(e)&&Sc[e]?(""+t).trim():t+"px"}function pS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=fS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var A5=pt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ax(e,t){if(t){if(A5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function ox(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
37ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lx=null;function $v(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cx=null,So=null,_o=null;function jw(e){if(e=Hu(e)){if(typeof cx!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=gp(t),cx(e.stateNode,e.type,t))}}function mS(e){So?_o?_o.push(e):_o=[e]:So=e}function gS(){if(So){var e=So,t=_o;if(_o=So=null,jw(e),t)for(e=0;e<t.length;e++)jw(t[e])}}function xS(e,t){return e(t)}function yS(){}var Rm=!1;function vS(e,t,n){if(Rm)return e(t,n);Rm=!0;try{return xS(e,t,n)}finally{Rm=!1,(So!==null||_o!==null)&&(yS(),gS())}}function Qc(e,t){var n=e.stateNode;if(n===null)return null;var r=gp(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ae(231,t,typeof n));return n}var ux=!1;if(fs)try{var Yl={};Object.defineProperty(Yl,"passive",{get:function(){ux=!0}}),window.addEventListener("test",Yl,Yl),window.removeEventListener("test",Yl,Yl)}catch{ux=!1}function P5(e,t,n,r,s,a,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var _c=!1,Xh=null,Qh=!1,dx=null,O5={onError:function(e){_c=!0,Xh=e}};function R5(e,t,n,r,s,a,o,l,c){_c=!1,Xh=null,P5.apply(O5,arguments)}function M5(e,t,n,r,s,a,o,l,c){if(R5.apply(this,arguments),_c){if(_c){var u=Xh;_c=!1,Xh=null}else throw Error(ae(198));Qh||(Qh=!0,dx=u)}}function Ca(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function bS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Nw(e){if(Ca(e)!==e)throw Error(ae(188))}function D5(e){var t=e.alternate;if(!t){if(t=Ca(e),t===null)throw Error(ae(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var a=s.alternate;if(a===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===n)return Nw(s),e;if(a===r)return Nw(s),t;a=a.sibling}throw Error(ae(188))}if(n.return!==r.return)n=s,r=a;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=a;break}if(l===r){o=!0,r=s,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=s;break}if(l===r){o=!0,r=a,n=s;break}l=l.sibling}if(!o)throw Error(ae(189))}}if(n.alternate!==r)throw Error(ae(190))}if(n.tag!==3)throw Error(ae(188));return n.stateNode.current===n?e:t}function wS(e){return e=D5(e),e!==null?jS(e):null}function jS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=jS(e);if(t!==null)return t;e=e.sibling}return null}var NS=In.unstable_scheduleCallback,kw=In.unstable_cancelCallback,I5=In.unstable_shouldYield,L5=In.unstable_requestPaint,bt=In.unstable_now,F5=In.unstable_getCurrentPriorityLevel,zv=In.unstable_ImmediatePriority,kS=In.unstable_UserBlockingPriority,Jh=In.unstable_NormalPriority,$5=In.unstable_LowPriority,SS=In.unstable_IdlePriority,hp=null,zr=null;function z5(e){if(zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(hp,e,void 0,(e.current.flags&128)===128)}catch{}}var gr=Math.clz32?Math.clz32:q5,B5=Math.log,U5=Math.LN2;function q5(e){return e>>>=0,e===0?32:31-(B5(e)/U5|0)|0}var Ed=64,Cd=4194304;function pc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=pc(l):(a&=o,a!==0&&(r=pc(a)))}else o=n&~s,o!==0?r=pc(o):a!==0&&(r=pc(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-gr(t),s=1<<n,r|=e[n],t&=~s;return r}function V5(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function W5(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-gr(a),l=1<<o,c=s[o];c===-1?(!(l&n)||l&r)&&(s[o]=V5(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function hx(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _S(){var e=Ed;return Ed<<=1,!(Ed&4194240)&&(Ed=64),e}function Mm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gr(t),e[t]=n}function H5(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-gr(n),a=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~a}}function Bv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Ke=0;function ES(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var CS,Uv,TS,AS,PS,fx=!1,Td=[],oi=null,li=null,ci=null,Jc=new Map,Zc=new Map,Us=[],K5="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sw(e,t){switch(e){case"focusin":case"focusout":oi=null;break;case"dragenter":case"dragleave":li=null;break;case"mouseover":case"mouseout":ci=null;break;case"pointerover":case"pointerout":Jc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zc.delete(t.pointerId)}}function Xl(e,t,n,r,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[s]},t!==null&&(t=Hu(t),t!==null&&Uv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 11,707 bytes, line 37
37function G5(e,t,n,r,s){switch(t){case"focusin":return oi=Xl(oi,e,t,n,r,s),!0;case"dragenter":return li=Xl(li,e,t,n,r,s),!0;case"mouseover":return ci=Xl(ci,e,t,n,r,s),!0;case"pointerover":var a=s.pointerId;return Jc.set(a,Xl(Jc.get(a)||null,e,t,n,r,s)),!0;case"gotpointercapture":return a=s.pointerId,Zc.set(a,Xl(Zc.get(a)||null,e,t,n,r,s)),!0}return!1}function OS(e){var t=Ki(e.target);if(t!==null){var n=Ca(t);if(n!==null){if(t=n.tag,t===13){if(t=bS(n),t!==null){e.blockedOn=t,PS(e.priority,function(){TS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=px(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);lx=r,n.target.dispatchEvent(r),lx=null}else return t=Hu(n),t!==null&&Uv(t),e.blockedOn=n,!1;t.shift()}return!0}function _w(e,t,n){vh(e)&&n.delete(t)}function Y5(){fx=!1,oi!==null&&vh(oi)&&(oi=null),li!==null&&vh(li)&&(li=null),ci!==null&&vh(ci)&&(ci=null),Jc.forEach(_w),Zc.forEach(_w)}function Ql(e,t){e.blockedOn===t&&(e.blockedOn=null,fx||(fx=!0,In.unstable_scheduleCallback(In.unstable_NormalPriority,Y5)))}function eu(e){function t(s){return Ql(s,e)}if(0<Td.length){Ql(Td[0],e);for(var n=1;n<Td.length;n++){var r=Td[n];r.blockedOn===e&&(r.blockedOn=null)}}for(oi!==null&&Ql(oi,e),li!==null&&Ql(li,e),ci!==null&&Ql(ci,e),Jc.forEach(t),Zc.forEach(t),n=0;n<Us.length;n++)r=Us[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Us.length&&(n=Us[0],n.blockedOn===null);)OS(n),n.blockedOn===null&&Us.shift()}var Eo=ks.ReactCurrentBatchConfig,ef=!0;function X5(e,t,n,r){var s=Ke,a=Eo.transition;Eo.transition=null;try{Ke=1,qv(e,t,n,r)}finally{Ke=s,Eo.transition=a}}function Q5(e,t,n,r){var s=Ke,a=Eo.transition;Eo.transition=null;try{Ke=4,qv(e,t,n,r)}finally{Ke=s,Eo.transition=a}}function qv(e,t,n,r){if(ef){var s=px(e,t,n,r);if(s===null)Vm(e,t,r,tf,n),Sw(e,r);else if(G5(s,e,t,n,r))r.stopPropagation();else if(Sw(e,r),t&4&&-1<K5.indexOf(e)){for(;s!==null;){var a=Hu(s);if(a!==null&&CS(a),a=px(e,t,n,r),a===null&&Vm(e,t,r,tf,n),a===s)break;s=a}s!==null&&r.stopPropagation()}else Vm(e,t,r,null,n)}}var tf=null;function px(e,t,n,r){if(tf=null,e=$v(r),e=Ki(e),e!==null)if(t=Ca(e),t===null)e=null;else if(n=t.tag,n===13){if(e=bS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return tf=e,null}function RS(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(F5()){case zv:return 1;case kS:return 4;case Jh:case $5:return 16;case SS:return 536870912;default:return 16}default:return 16}}var ri=null,Vv=null,bh=null;function MS(){if(bh)return bh;var e,t=Vv,n=t.length,r,s="value"in ri?ri.value:ri.textContent,a=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[a-r];r++);return bh=s.slice(e,1<r?1-r:void 0)}function wh(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ad(){return!0}function Ew(){return!1}function $n(e){function t(n,r,s,a,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ad:Ew,this.isPropagationStopped=Ew,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ad)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ad)},persist:function(){},isPersistent:Ad}),t}var xl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wv=$n(xl),Wu=pt({},xl,{view:0,detail:0}),J5=$n(Wu),Dm,Im,Jl,fp=pt({},Wu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Jl&&(Jl&&e.type==="mousemove"?(Dm=e.screenX-Jl.screenX,Im=e.screenY-Jl.screenY):Im=Dm=0,Jl=e),Dm)},movementY:function(e){return"movementY"in e?e.movementY:Im}}),Cw=$n(fp),Z5=pt({},fp,{dataTransfer:0}),eM=$n(Z5),tM=pt({},Wu,{relatedTarget:0}),Lm=$n(tM),nM=pt({},xl,{animationName:0,elapsedTime:0,pseudoElement:0}),rM=$n(nM),sM=pt({},xl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),iM=$n(sM),aM=pt({},xl,{data:0}),Tw=$n(aM),oM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uM(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cM[e])?!!t[e]:!1}function Hv(){return uM}var dM=pt({},Wu,{key:function(e){if(e.key){var t=oM[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lM[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hv,charCode:function(e){return e.type==="keypress"?wh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hM=$n(dM),fM=pt({},fp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Aw=$n(fM),pM=pt({},Wu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hv}),mM=$n(pM),gM=pt({},xl,{propertyName:0,elapsedTime:0,pseudoElement:0}),xM=$n(gM),yM=pt({},fp,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),vM=$n(yM),bM=[9,13,27,32],Kv=fs&&"CompositionEvent"in window,Ec=null;fs&&"documentMode"in document&&(Ec=document.documentMode);var wM=fs&&"TextEvent"in window&&!Ec,DS=fs&&(!Kv||Ec&&8<Ec&&11>=Ec),Pw=" ",Ow=!1;function IS(e,t){switch(e){case"keyup":return bM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var oo=!1;function jM(e,t){switch(e){case"compositionend":return LS(t);case"keypress":return t.which!==32?null:(Ow=!0,Pw);case"textInput":return e=t.data,e===Pw&&Ow?null:e;default:return null}}function NM(e,t){if(oo)return e==="compositionend"||!Kv&&IS(e,t)?(e=MS(),bh=Vv=ri=null,oo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return DS&&t.locale!=="ko"?null:t.data;default:return null}}var kM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Rw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kM[e.type]:t==="textarea"}function FS(e,t,n,r){mS(r),t=nf(t,"onChange"),0<t.length&&(n=new Wv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cc=null,tu=null;function SM(e){YS(e,0)}function pp(e){var t=uo(e);if(lS(t))return e}function _M(e,t){if(e==="change")return t}var $S=!1;if(fs){var Fm;if(fs){var $m="oninput"in document;if(!$m){var Mw=document.createElement("div");Mw.setAttribute("oninput","return;"),$m=typeof Mw.oninput=="function"}Fm=$m}else Fm=!1;$S=Fm&&(!document.documentMode||9<document.documentMode)}function Dw(){Cc&&(Cc.detachEvent("onpropertychange",zS),tu=Cc=null)}function zS(e){if(e.propertyName==="value"&&pp(tu)){var t=[];FS(t,tu,e,$v(e)),vS(SM,t)}}function EM(e,t,n){e==="focusin"?(Dw(),Cc=t,tu=n,Cc.attachEvent("onpropertychange",zS)):e==="focusout"&&Dw()}function CM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pp(tu)}function TM(e,t){if(e==="click")return pp(t)}function AM(e,t){if(e==="input"||e==="change")return pp(t)}function PM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var br=typeof Object.is=="function"?Object.is:PM;function nu(e,t){if(br(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Xg.call(t,s)||!br(e[s],t[s]))return!1}return!0}function Iw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lw(e,t){var n=Iw(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Iw(n)}}function BS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?BS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function US(){for(var e=window,t=Yh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yh(e.document)}return t}function Gv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function OM(e){var t=US(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&BS(n.ownerDocument.documentElement,n)){if(r!==null&&Gv(n)){if
vendor: 4,424 bytes, line 37
37(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!e.extend&&a>r&&(s=r,r=a,a=s),s=Lw(n,a);var o=Lw(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var RM=fs&&"documentMode"in document&&11>=document.documentMode,lo=null,mx=null,Tc=null,gx=!1;function Fw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gx||lo==null||lo!==Yh(r)||(r=lo,"selectionStart"in r&&Gv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tc&&nu(Tc,r)||(Tc=r,r=nf(mx,"onSelect"),0<r.length&&(t=new Wv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lo)))}function Pd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var co={animationend:Pd("Animation","AnimationEnd"),animationiteration:Pd("Animation","AnimationIteration"),animationstart:Pd("Animation","AnimationStart"),transitionend:Pd("Transition","TransitionEnd")},zm={},qS={};fs&&(qS=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function mp(e){if(zm[e])return zm[e];if(!co[e])return e;var t=co[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qS)return zm[e]=t[n];return e}var VS=mp("animationend"),WS=mp("animationiteration"),HS=mp("animationstart"),KS=mp("transitionend"),GS=new Map,$w="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ei(e,t){GS.set(e,t),Ea(t,[e])}for(var Bm=0;Bm<$w.length;Bm++){var Um=$w[Bm],MM=Um.toLowerCase(),DM=Um[0].toUpperCase()+Um.slice(1);Ei(MM,"on"+DM)}Ei(VS,"onAnimationEnd");Ei(WS,"onAnimationIteration");Ei(HS,"onAnimationStart");Ei("dblclick","onDoubleClick");Ei("focusin","onFocus");Ei("focusout","onBlur");Ei(KS,"onTransitionEnd");Xo("onMouseEnter",["mouseout","mouseover"]);Xo("onMouseLeave",["mouseout","mouseover"]);Xo("onPointerEnter",["pointerout","pointerover"]);Xo("onPointerLeave",["pointerout","pointerover"]);Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),IM=new Set("cancel close invalid load scroll toggle".split(" ").concat(mc));function zw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,M5(r,t,void 0,e),e.currentTarget=null}
vendor: 5,164 bytes, line 37
37function YS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&s.isPropagationStopped())break e;zw(s,l,u),a=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&s.isPropagationStopped())break e;zw(s,l,u),a=c}}}if(Qh)throw e=dx,Qh=!1,dx=null,e}function nt(e,t){var n=t[wx];n===void 0&&(n=t[wx]=new Set);var r=e+"__bubble";n.has(r)||(XS(t,e,2,!1),n.add(r))}function qm(e,t,n){var r=0;t&&(r|=4),XS(n,e,r,t)}var Od="_reactListening"+Math.random().toString(36).slice(2);function ru(e){if(!e[Od]){e[Od]=!0,rS.forEach(function(n){n!=="selectionchange"&&(IM.has(n)||qm(n,!1,e),qm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Od]||(t[Od]=!0,qm("selectionchange",!1,t))}}function XS(e,t,n,r){switch(RS(t)){case 1:var s=X5;break;case 4:s=Q5;break;default:s=qv}n=s.bind(null,t,n,e),s=void 0,!ux||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Vm(e,t,n,r,s){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=Ki(l),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue e}l=l.parentNode}}r=r.return}vS(function(){var u=a,d=$v(n),h=[];e:{var f=GS.get(e);if(f!==void 0){var p=Wv,x=e;switch(e){case"keypress":if(wh(n)===0)break e;case"keydown":case"keyup":p=hM;break;case"focusin":x="focus",p=Lm;break;case"focusout":x="blur",p=Lm;break;case"beforeblur":case"afterblur":p=Lm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Cw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=eM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=mM;break;case VS:case WS:case HS:p=rM;break;case KS:p=xM;break;case"scroll":p=J5;break;case"wheel":p=vM;break;case"copy":case"cut":case"paste":p=iM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Aw}var m=(t&4)!==0,y=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,b;v!==null;){b=v;var w=b.stateNode;if(b.tag===5&&w!==null&&(b=w,g!==null&&(w=Qc(v,g),w!=null&&m.push(su(v,w,b)))),y)break;v=v.return}0<m.length&&(f=new p(f,x,null,n,d),h.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==lx&&(x=n.relatedTarget||n.fromElement)&&(Ki(x)||x[ps]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(x=n.relatedTarget||n.toElement,p=u,x=x?Ki(x):null,x!==null&&(y=Ca(x),x!==y||x.tag!==5&&x.tag!==6)&&(x=null)):(p=null,x=u),p!==x)){if(m=Cw,w="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=Aw,w="onPointerLeave",g="onPointerEnter",v="pointer"),y=p==null?f:uo(p),b=x==null?f:uo(x),f=new m(w,v+"leave",p,n,d),f.target=y,f.relatedTarget=b,w=null,Ki(d)===u&&(m=new m(g,v+"enter",x,n,d),m.target=b,m.relatedTarget=y,w=m),y=w,p&&x)t:{for(m=p,g=x,v=0,b=m;b;b=Ua(b))v++;for(b=0,w=g;w;w=Ua(w))b++;for(;0<v-b;)m=Ua(m),v--;for(;0<b-v;)g=Ua(g),b--;for(;v--;){if(m===g||g!==null&&m===g.alternate)break t;m=Ua(m),g=Ua(g)}m=null}else m=null;p!==null&&Bw(h,f,p,m,!1),x!==null&&y!==null&&Bw(h,y,x,m,!0)}}e:{if(f=u?uo(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var j=_M;else if(Rw(f))if($S)j=AM;else{j=CM;var E=EM}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=TM);if(j&&(j=j(e,u))){FS(h,j,n,d);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&rx(f,"number",f.value)}switch(E=u?uo(u):window,e){case"focusin":(Rw(E)||E.contentEditable==="true")&&(lo=E,mx=u,Tc=null);break;case"focusout":Tc=mx=lo=null;break;case"mousedown":gx=!0;break;case"contextmenu":case"mouseup":case"dragend":gx=!1,Fw(h,n,d);break;case"selectionchange":if(RM)break;case"keydown":case"keyup":Fw(h,n,d)}var k;if(Kv)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else oo?IS(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(DS&&n.locale!=="ko"&&(oo||S!=="onCompositionStart"?S==="onCompositionEnd"&&oo&&(k=MS()):(ri=d,Vv="value"in ri?ri.value:ri.textContent,oo=!0)),E=nf(u,S),0<E.length&&(S=new Tw(S,e,null,n,d),h.push({event:S,listeners:E}),k?S.data=k:(k=LS(n),k!==null&&(S.data=k)))),(k=wM?jM(e,n):NM(e,n))&&
vendor: 5,091 bytes, lines 37-38
37(u=nf(u,"onBeforeInput"),0<u.length&&(d=new Tw("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=k))}YS(h,t)})}function su(e,t,n){return{instance:e,listener:t,currentTarget:n}}function nf(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,a=s.stateNode;s.tag===5&&a!==null&&(s=a,a=Qc(e,n),a!=null&&r.unshift(su(e,a,s)),a=Qc(e,t),a!=null&&r.push(su(e,a,s))),e=e.return}return r}function Ua(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Bw(e,t,n,r,s){for(var a=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=Qc(n,a),c!=null&&o.unshift(su(n,c,l))):s||(c=Qc(n,a),c!=null&&o.push(su(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var LM=/\r\n?/g,FM=/\u0000|\uFFFD/g;function Uw(e){return(typeof e=="string"?e:""+e).replace(LM,` 38`).replace(FM,"")}function Rd(e,t,n){if(t=Uw(t),Uw(e)!==t&&n)throw Error(ae(425))}function rf(){}var xx=null,yx=null;function vx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bx=typeof setTimeout=="function"?setTimeout:void 0,$M=typeof clearTimeout=="function"?clearTimeout:void 0,qw=typeof Promise=="function"?Promise:void 0,zM=typeof queueMicrotask=="function"?queueMicrotask:typeof qw<"u"?function(e){return qw.resolve(null).then(e).catch(BM)}:bx;function BM(e){setTimeout(function(){throw e})}function Wm(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),eu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);eu(t)}function ui(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Vw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var yl=Math.random().toString(36).slice(2),Lr="__reactFiber$"+yl,iu="__reactProps$"+yl,ps="__reactContainer$"+yl,wx="__reactEvents$"+yl,UM="__reactListeners$"+yl,qM="__reactHandles$"+yl;function Ki(e){var t=e[Lr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ps]||n[Lr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Vw(e);e!==null;){if(n=e[Lr])return n;e=Vw(e)}return t}e=n,n=e.parentNode}return null}function Hu(e){return e=e[Lr]||e[ps],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function uo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ae(33))}function gp(e){return e[iu]||null}var jx=[],ho=-1;function Ci(e){return{current:e}}function st(e){0>ho||(e.current=jx[ho],jx[ho]=null,ho--)}function Ze(e,t){ho++,jx[ho]=e.current,e.current=t}var vi={},en=Ci(vi),jn=Ci(!1),fa=vi;function Qo(e,t){var n=e.type.contextTypes;if(!n)return vi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Nn(e){return e=e.childContextTypes,e!=null}function sf(){st(jn),st(en)}function Ww(e,t,n){if(en.current!==vi)throw Error(ae(168));Ze(en,t),Ze(jn,n)}function QS(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ae(108,E5(e)||"Unknown",s));return pt({},n,r)}function af(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vi,fa=en.current,Ze(en,e),Ze(jn,jn.current),!0}function Hw(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=QS(e,t,fa),r.__reactInternalMemoizedMergedChildContext=e,st(jn),st(en),Ze(en,e)):st(jn),Ze(jn,n)}var ss=null,xp=!1,Hm=!1;function JS(e){ss===null?ss=[e]:ss.push(e)}function VM(e){xp=!0,JS(e)}function Ti(){if(!Hm&&ss!==null){Hm=!0;var e=0,t=Ke;try{var n=ss;for(Ke=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ss=null,xp=!1}catch(s){throw ss!==null&&(ss=ss.slice(e+1)),NS(zv,Ti),s}finally{Ke=t,Hm=!1}}return null}var fo=[],po=0,of=null,lf=0,Wn=[],Hn=0,pa=null,os=1,ls="";function Li(e,t){fo[po++]=lf,fo[po++]=of,of=e,lf=t}function ZS(e,t,n){Wn[Hn++]=os,Wn[Hn++]=ls,Wn[Hn++]=pa,pa=e;var r=os;e=ls;var s=32-gr(r)-1;r&=~(1<<s),n+=1;var a=32-gr(t)+s;if(30<a){var o=s-s%5;a=(r&(1<<o)-1).toString(32),r>>=o,s-=o,os=1<<32-gr(t)+s|n<<s|r,ls=a+e}else os=1<<a|n<<s|r,ls=e}function Yv(e){e.return!==null&&(Li(e,1),ZS(e,1,0))}function Xv(e){for(;e===of;)of=fo[--po],fo[po]=null,lf=fo[--po],fo[po]=null;for(;e===pa;)pa=Wn[--Hn],Wn[Hn]=null,ls=Wn[--Hn],Wn[Hn]=null,os=Wn[--Hn],Wn[Hn]=null}var Mn=null,Rn=null,it=!1,pr=null;function e_(e,t){var n=Kn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Kw(e,t){switch(e.tag){case 5:var n=e.type;
vendor: 26,344 bytes, lines 38-40
38return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Mn=e,Rn=ui(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mn=e,Rn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=pa!==null?{id:os,overflow:ls}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Kn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mn=e,Rn=null,!0):!1;default:return!1}}function Nx(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kx(e){if(it){var t=Rn;if(t){var n=t;if(!Kw(e,t)){if(Nx(e))throw Error(ae(418));t=ui(n.nextSibling);var r=Mn;t&&Kw(e,t)?e_(r,n):(e.flags=e.flags&-4097|2,it=!1,Mn=e)}}else{if(Nx(e))throw Error(ae(418));e.flags=e.flags&-4097|2,it=!1,Mn=e}}}function Gw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function Md(e){if(e!==Mn)return!1;if(!it)return Gw(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vx(e.type,e.memoizedProps)),t&&(t=Rn)){if(Nx(e))throw t_(),Error(ae(418));for(;t;)e_(e,t),t=ui(t.nextSibling)}if(Gw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ae(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Rn=ui(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Rn=null}}else Rn=Mn?ui(e.stateNode.nextSibling):null;return!0}function t_(){for(var e=Rn;e;)e=ui(e.nextSibling)}function Jo(){Rn=Mn=null,it=!1}function Qv(e){pr===null?pr=[e]:pr.push(e)}var WM=ks.ReactCurrentBatchConfig;function Zl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ae(309));var r=n.stateNode}if(!r)throw Error(ae(147,e));var s=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=s.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(ae(284));if(!n._owner)throw Error(ae(290,e))}return e}function Dd(e,t){throw e=Object.prototype.toString.call(t),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yw(e){var t=e._init;return t(e._payload)}function n_(e){function t(g,v){if(e){var b=g.deletions;b===null?(g.deletions=[v],g.flags|=16):b.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function r(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function s(g,v){return g=pi(g,v),g.index=0,g.sibling=null,g}function a(g,v,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<v?(g.flags|=2,v):b):(g.flags|=2,v)):(g.flags|=1048576,v)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,v,b,w){return v===null||v.tag!==6?(v=Zm(b,g.mode,w),v.return=g,v):(v=s(v,b),v.return=g,v)}function c(g,v,b,w){var j=b.type;return j===ao?d(g,v,b.props.children,w,b.key):v!==null&&(v.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===$s&&Yw(j)===v.type)?(w=s(v,b.props),w.ref=Zl(g,v,b),w.return=g,w):(w=Ch(b.type,b.key,b.props,null,g.mode,w),w.ref=Zl(g,v,b),w.return=g,w)}function u(g,v,b,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=eg(b,g.mode,w),v.return=g,v):(v=s(v,b.children||[]),v.return=g,v)}function d(g,v,b,w,j){return v===null||v.tag!==7?(v=ca(b,g.mode,w,j),v.return=g,v):(v=s(v,b),v.return=g,v)}function h(g,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Zm(""+v,g.mode,b),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case kd:return b=Ch(v.type,v.key,v.props,null,g.mode,b),b.ref=Zl(g,null,v),b.return=g,b;case io:return v=eg(v,g.mode,b),v.return=g,v;case $s:var w=v._init;return h(g,w(v._payload),b)}if(fc(v)||Gl(v))return v=ca(v,g.mode,b,null),v.return=g,v;Dd(g,v)}return null}function f(g,v,b,w){var j=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return j!==null?null:l(g,v,""+b,w);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case kd:return b.key===j?c(g,v,b,w):null;case io:return b.key===j?u(g,v,b,w):null;case $s:return j=b._init,f(g,v,j(b._payload),w)}if(fc(b)||Gl(b))return j!==null?null:d(g,v,b,w,null);Dd(g,b)}return null}function p(g,v,b,w,j){if(typeof w=="string"&&w!==""||typeof w=="number")return g=g.get(b)||null,l(v,g,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case kd:return g=g.get(w.key===null?b:w.key)||null,c(v,g,w,j);case io:return g=g.get(w.key===null?b:w.key)||null,u(v,g,w,j);case $s:var E=w._init;return p(g,v,b,E(w._payload),j)}if(fc(w)||Gl(w))return g=g.get(b)||null,d(v,g,w,j,null);Dd(v,w)}return null}function x(g,v,b,w){for(var j=null,E=null,k=v,S=v=0,A=null;k!==null&&S<b.length;S++){k.index>S?(A=k,k=null):A=k.sibling;var C=f(g,k,b[S],w);if(C===null){k===null&&(k=A);break}e&&k&&C.alternate===null&&t(g,k),v=a(C,v,S),E===null?j=C:E.sibling=C,E=C,k=A}if(S===b.length)return n(g,k),it&&Li(g,S),j;if(k===null){for(;S<b.length;S++)k=h(g,b[S],w),k!==null&&(v=a(k,v,S),E===null?j=k:E.sibling=k,E=k);return it&&Li(g,S),j}for(k=r(g,k);S<b.length;S++)A=p(k,g,S,b[S],w),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?S:A.key),v=a(A,v,S),E===null?j=A:E.sibling=A,E=A);return e&&k.forEach(function(T){return t(g,T)}),it&&Li(g,S),j}function m(g,v,b,w){var j=Gl(b);if(typeof j!="function")throw Error(ae(150));if(b=j.call(b),b==null)throw Error(ae(151));for(var E=j=null,k=v,S=v=0,A=null,C=b.next();k!==null&&!C.done;S++,C=b.next()){k.index>S?(A=k,k=null):A=k.sibling;var T=f(g,k,C.value,w);if(T===null){k===null&&(k=A);break}e&&k&&T.alternate===null&&t(g,k),v=a(T,v,S),E===null?j=T:E.sibling=T,E=T,k=A}if(C.done)return n(g,k),it&&Li(g,S),j;if(k===null){for(;!C.done;S++,C=b.next())C=h(g,C.value,w),C!==null&&(v=a(C,v,S),E===null?j=C:E.sibling=C,E=C);return it&&Li(g,S),j}for(k=r(g,k);!C.done;S++,C=b.next())C=p(k,g,S,C.value,w),C!==null&&(e&&C.alternate!==null&&k.delete(C.key===null?S:C.key),v=a(C,v,S),E===null?j=C:E.sibling=C,E=C);return e&&k.forEach(function(_){return t(g,_)}),it&&Li(g,S),j}function y(g,v,b,w){if(typeof b=="object"&&b!==null&&b.type===ao&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case kd:e:{for(var j=b.key,E=v;E!==null;){if(E.key===j){if(j=b.type,j===ao){if(E.tag===7){n(g,E.sibling),v=s(E,b.props.children),v.return=g,g=v;break e}}else if(E.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===$s&&Yw(j)===E.type){n(g,E.sibling),v=s(E,b.props),v.ref=Zl(g,E,b),v.return=g,g=v;break e}n(g,E);break}else t(g,E);E=E.sibling}b.type===ao?(v=ca(b.props.children,g.mode,w,b.key),v.return=g,g=v):(w=Ch(b.type,b.key,b.props,null,g.mode,w),w.ref=Zl(g,v,b),w.return=g,g=w)}return o(g);case io:e:{for(E=b.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=s(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=eg(b,g.mode,w),v.return=g,g=v}return o(g);case $s:return E=b._init,y(g,v,E(b._payload),w)}if(fc(b))return x(g,v,b,w);if(Gl(b))return m(g,v,b,w);Dd(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,b),v.return=g,g=v):(n(g,v),v=Zm(b,g.mode,w),v.return=g,g=v),o(g)):n(g,v)}return y}var Zo=n_(!0),r_=n_(!1),cf=Ci(null),uf=null,mo=null,Jv=null;function Zv(){Jv=mo=uf=null}function eb(e){var t=cf.current;st(cf),e._currentValue=t}function Sx(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Co(e,t){uf=e,Jv=mo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wn=!0),e.firstContext=null)}function er(e){var t=e._currentValue;if(Jv!==e)if(e={context:e,memoizedValue:t,next:null},mo===null){if(uf===null)throw Error(ae(308));mo=e,uf.dependencies={lanes:0,firstContext:e}}else mo=mo.next=e;return t}var Gi=null;function tb(e){Gi===null?Gi=[e]:Gi.push(e)}function s_(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,tb(t)):(n.next=s.next,s.next=n),t.interleaved=n,ms(e,r)}function ms(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var zs=!1;function nb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function i_(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function us(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function di(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ue&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,ms(e,n)}return s=r.interleaved,s===null?(t.next=t,tb(r)):(t.next=s.next,s.next=t),r.interleaved=t,ms(e,n)}function jh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bv(e,n)}}function Xw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?s=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?s=a=t:a=a.next=t}else s=a=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function df(e,t,n,r){var s=e.updateQueue;zs=!1;var a=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(a!==null){var h=s.baseState;o=0,d=u=c=null,l=a;do{var f=l.lane,p=l.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,m=l;switch(f=t,p=n,m.tag){case 1:if(x=m.payload,typeof x=="function"){h=x.call(p,h,f);break e}h=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=m.payload,f=typeof x=="function"?x.call(p,h,f):x,f==null)break e;h=pt({},h,f);break e;case 2:zs=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,o|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else a===null&&(s.shared.lanes=0);ga|=o,e.lanes=o,e.memoizedState=h}}function Qw(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(ae(191,s));s.call(r)}}}var Ku={},Br=Ci(Ku),au=Ci(Ku),ou=Ci(Ku);function Yi(e){if(e===Ku)throw Error(ae(174));return e}function rb(e,t){switch(Ze(ou,t),Ze(au,e),Ze(Br,Ku),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ix(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ix(t,e)}st(Br),Ze(Br,t)}function el(){st(Br),st(au),st(ou)}function a_(e){Yi(ou.current);var t=Yi(Br.current),n=ix(t,e.type);t!==n&&(Ze(au,e),Ze(Br,n))}function sb(e){au.current===e&&(st(Br),st(au))}var ut=Ci(0);function hf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Km=[];function ib(){for(var e=0;e<Km.length;e++)Km[e]._workInProgressVersionPrimary=null;Km.length=0}var Nh=ks.ReactCurrentDispatcher,Gm=ks.ReactCurrentBatchConfig,ma=0,ft=null,_t=null,Mt=null,ff=!1,Ac=!1,lu=0,HM=0;function Gt(){throw Error(ae(321))}function ab(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function ob(e,t,n,r,s,a){if(ma=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nh.current=e===null||e.memoizedState===null?XM:QM,e=n(r,s),Ac){a=0;do{if(Ac=!1,lu=0,25<=a)throw Error(ae(301));a+=1,Mt=_t=null,t.updateQueue=null,Nh.current=JM,e=n(r,s)}while(Ac)}if(Nh.current=pf,t=_t!==null&&_t.next!==null,ma=0,Mt=_t=ft=null,ff=!1,t)throw Error(ae(300));return e}function lb(){var e=lu!==0;return lu=0,e}function Ar(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?ft.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function tr(){if(_t===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=_t.next;var t=Mt===null?ft.memoizedState:Mt.next;if(t!==null)Mt=t,_t=e;else{if(e===null)throw Error(ae(310));_t=e,e={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},Mt===null?ft.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function cu(e,t){return typeof t=="function"?t(e):t}function Ym(e){var t=tr(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=_t,s=r.baseQueue,a=n.pending;if(a!==null){if(s!==null){var o=s.next;s.next=a.next,a.next=o}r.baseQueue=s=a,n.pending=null}if(s!==null){a=s.next,r=r.baseState;var l=o=null,c=null,u=a;do{var d=u.lane;if((ma&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,o=r):c=c.next=h,ft.lanes|=d,ga|=d}u=u.next}while(u!==null&&u!==a);c===null?o=r:c.next=l,br(r,t.memoizedState)||(wn=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do a=s.lane,ft.lanes|=a,ga|=a,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Xm(e){var t=tr(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,a=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do a=e(a,o.action),o=o.next;while(o!==s);br(a,t.memoizedState)||(wn=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function o_(){}function l_(e,t){var n=ft,r=tr(),s=t(),a=!br(r.memoizedState,s);if(a&&(r.memoizedState=s,wn=!0),r=r.queue,cb(d_.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Mt!==null&&Mt.memoizedState.tag&1){if(n.flags|=2048,uu(9,u_.bind(null,n,r,s,t),void 0,null),It===null)throw Error(ae(349));ma&30||c_(n,t,s)}return s}function c_(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function u_(e,t,n,r){t.value=n,t.getSnapshot=r,h_(t)&&f_(e)}function d_(e,t,n){return n(function(){h_(t)&&f_(e)})}function h_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function f_(e){var t=ms(e,1);t!==null&&xr(t,e,1,-1)}function Jw(e){var t=Ar();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:cu,lastRenderedState:e},t.queue=e,e=e.dispatch=YM.bind(null,ft,e),[t.memoizedState,e]}function uu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function p_(){return tr().memoizedState}function kh(e,t,n,r){var s=Ar();ft.flags|=e,s.memoizedState=uu(1|t,n,void 0,r===void 0?null:r)}function yp(e,t,n,r){var s=tr();r=r===void 0?null:r;var a=void 0;if(_t!==null){var o=_t.memoizedState;if(a=o.destroy,r!==null&&ab(r,o.deps)){s.memoizedState=uu(t,n,a,r);return}}ft.flags|=e,s.memoizedState=uu(1|t,n,a,r)}function Zw(e,t){return kh(8390656,8,e,t)}function cb(e,t){return yp(2048,8,e,t)}function m_(e,t){return yp(4,2,e,t)}function g_(e,t){return yp(4,4,e,t)}function x_(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function y_(e,t,n){return n=n!=null?n.concat([e]):null,yp(4,4,x_.bind(null,t,e),n)}function ub(){}function v_(e,t){var n=tr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ab(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function b_(e,t){var n=tr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ab(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function w_(e,t,n){return ma&21?(br(n,t)||(n=_S(),ft.lanes|=n,ga|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wn=!0),e.memoizedState=n)}function KM(e,t){var n=Ke;Ke=n!==0&&4>n?n:4,e(!0);var r=Gm.transition;Gm.transition={};try{e(!1),t()}finally{Ke=n,Gm.transition=r}}function j_(){return tr().memoizedState}function GM(e,t,n){var r=fi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},N_(e))k_(t,n);else if(n=s_(e,t,n,r),n!==null){var s=un();xr(n,e,r,s),S_(n,t,r)}}function YM(e,t,n){var r=fi(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(N_(e))k_(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,n);if(s.hasEagerState=!0,s.eagerState=l,br(l,o)){var c=t.interleaved;c===null?(s.next=s,tb(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=s_(e,t,s,r),n!==null&&(s=un(),xr(n,e,r,s),S_(n,t,r))}}function N_(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function k_(e,t){Ac=ff=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function S_(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bv(e,n)}}var pf={readContext:er,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useInsertionEffect:Gt,useLayoutEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useMutableSource:Gt,useSyncExternalStore:Gt,useId:Gt,unstable_isNewReconciler:!1},XM={readContext:er,useCallback:function(e,t){return Ar().memoizedState=[e,t===void 0?null:t],e},useContext:er,useEffect:Zw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kh(4194308,4,x_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kh(4194308,4,e,t)},useInsertionEffect:function(e,t){return kh(4,2,e,t)},useMemo:function(e,t){var n=Ar();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ar();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=GM.bind(null,ft,e),[r.memoizedState,e]},useRef:function(e){var t=Ar();return e={current:e},t.memoizedState=e},useState:Jw,useDebugValue:ub,useDeferredValue:function(e){return Ar().memoizedState=e},useTransition:function(){var e=Jw(!1),t=e[0];return e=KM.bind(null,e[1]),Ar().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ft,s=Ar();if(it){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),It===null)throw Error(ae(349));ma&30||c_(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,Zw(d_.bind(null,r,a,e),[e]),r.flags|=2048,uu(9,u_.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Ar(),t=It.identifierPrefix;if(it){var n=ls,r=os;n=(r&~(1<<32-gr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=lu++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=HM++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},QM={readContext:er,useCallback:v_,useContext:er,useEffect:cb,useImperativeHandle:y_,useInsertionEffect:m_,useLayoutEffect:g_,useMemo:b_,useReducer:Ym,useRef:p_,useState:function(){return Ym(cu)},useDebugValue:ub,useDeferredValue:function(e){var t=tr();return w_(t,_t.memoizedState,e)},useTransition:function(){var e=Ym(cu)[0],t=tr().memoizedState;return[e,t]},useMutableSource:o_,useSyncExternalStore:l_,useId:j_,unstable_isNewReconciler:!1},JM={readContext:er,useCallback:v_,useContext:er,useEffect:cb,useImperativeHandle:y_,useInsertionEffect:m_,useLayoutEffect:g_,useMemo:b_,useReducer:Xm,useRef:p_,useState:function(){return Xm(cu)},useDebugValue:ub,useDeferredValue:function(e){var t=tr();return _t===null?t.memoizedState=e:w_(t,_t.memoizedState,e)},useTransition:function(){var e=Xm(cu)[0],t=tr().memoizedState;return[e,t]},useMutableSource:o_,useSyncExternalStore:l_,useId:j_,unstable_isNewReconciler:!1};function cr(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function _x(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:pt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vp={isMounted:function(e){return(e=e._reactInternals)?Ca(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=un(),s=fi(e),a=us(r,s);a.payload=t,n!=null&&(a.callback=n),t=di(e,a,s),t!==null&&(xr(t,e,s,r),jh(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=un(),s=fi(e),a=us(r,s);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=di(e,a,s),t!==null&&(xr(t,e,s,r),jh(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=un(),r=fi(e),s=us(n,r);s.tag=2,t!=null&&(s.callback=t),t=di(e,s,r),t!==null&&(xr(t,e,r,n),jh(t,e,r))}};function e1(e,t,n,r,s,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!nu(n,r)||!nu(s,a):!0}function __(e,t,n){var r=!1,s=vi,a=t.contextType;return typeof a=="object"&&a!==null?a=er(a):(s=Nn(t)?fa:en.current,r=t.contextTypes,a=(r=r!=null)?Qo(e,s):vi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vp,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=a),t}function t1(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vp.enqueueReplaceState(t,t.state,null)}function Ex(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},nb(e);var a=t.contextType;typeof a=="object"&&a!==null?s.context=er(a):(a=Nn(t)?fa:en.current,s.context=Qo(e,a)),s.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(_x(e,t,a,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&vp.enqueueReplaceState(s,s.state,null),df(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function tl(e,t){try{var n="",r=t;do n+=_5(r),r=r.return;while(r);var s=n}catch(a){s=` 39Error generating stack: `+a.message+` 40`+a.stack}return{value:e,source:t,stack:s,digest:null}}function Qm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Cx(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ZM=typeof WeakMap=="function"?WeakMap:Map;function E_(e,t,n){n=us(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gf||(gf=!0,Fx=r),Cx(e,t)},n}function C_(e,t,n){n=us(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Cx(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Cx(e,t),typeof r!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function n1(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ZM;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=fD.bind(null,e,t,n),t.then(e,e))}function r1(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function s1(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=us(-1,1),t.tag=2,di(n,t,1))),n.lanes|=1),e)}var eD=ks.ReactCurrentOwner,wn=!1;function an(e,t,n,r){t.child=e===null?r_(t,null,n,r):Zo(t,e.child,n,r)}function i1(e,t,n,r,s){n=n.render;var a=t.ref;return Co(t,s),r=ob(e,t,n,r,a,s),n=lb(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gs(e,t,s)):(it&&n&&Yv(t),t.flags|=1,an(e,t,r,s),t.child)}function a1(e,t,n,r,s){if(e===null){var a=n.type;return typeof a=="function"&&!yb(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,T_(e,t,a,r,s)):(e=Ch(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&s)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:nu,n(o,r)&&e.ref===t.ref)return gs(e,t,s)}return t.flags|=1,e=pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function T_(e,t,n,r,s){if(e!==null){var a=e.memoizedProps;if(nu(a,r)&&e.ref===t.ref)if(wn=!1,t.pendingProps=r=a,(e.lanes&s)!==0)e.flags&131072&&(wn=!0);else return t.lanes=e.lanes,gs(e,t,s)}return Tx(e,t,n,r,s)}function A_(e,t,n){var r=t.pendingProps,s=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null}
vendor: 7,245 bytes, line 40
40,Ze(xo,Cn),Cn|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ze(xo,Cn),Cn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Ze(xo,Cn),Cn|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ze(xo,Cn),Cn|=r;return an(e,t,s,n),t.child}function P_(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tx(e,t,n,r,s){var a=Nn(n)?fa:en.current;return a=Qo(t,a),Co(t,s),n=ob(e,t,n,r,a,s),r=lb(),e!==null&&!wn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gs(e,t,s)):(it&&r&&Yv(t),t.flags|=1,an(e,t,n,s),t.child)}function o1(e,t,n,r,s){if(Nn(n)){var a=!0;af(t)}else a=!1;if(Co(t,s),t.stateNode===null)Sh(e,t),__(t,n,r),Ex(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=er(u):(u=Nn(n)?fa:en.current,u=Qo(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&t1(t,o,r,u),zs=!1;var f=t.memoizedState;o.state=f,df(t,r,o,s),c=t.memoizedState,l!==r||f!==c||jn.current||zs?(typeof d=="function"&&(_x(t,n,d,r),c=t.memoizedState),(l=zs||e1(t,n,l,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,i_(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:cr(t.type,l),o.props=u,h=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=er(c):(c=Nn(n)?fa:en.current,c=Qo(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||f!==c)&&t1(t,o,r,c),zs=!1,f=t.memoizedState,o.state=f,df(t,r,o,s);var x=t.memoizedState;l!==h||f!==x||jn.current||zs?(typeof p=="function"&&(_x(t,n,p,r),x=t.memoizedState),(u=zs||e1(t,n,u,r,f,x,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,x,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,x,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),o.props=r,o.state=x,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ax(e,t,n,r,a,s)}function Ax(e,t,n,r,s,a){P_(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Hw(t,n,!1),gs(e,t,a);r=t.stateNode,eD.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Zo(t,e.child,null,a),t.child=Zo(t,null,l,a)):an(e,t,l,a),t.memoizedState=r.state,s&&Hw(t,n,!0),t.child}function O_(e){var t=e.stateNode;t.pendingContext?Ww(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ww(e,t.context,!1),rb(e,t.containerInfo)}function l1(e,t,n,r,s){return Jo(),Qv(s),t.flags|=256,an(e,t,n,r),t.child}var Px={dehydrated:null,treeContext:null,retryLane:0};function Ox(e){return{baseLanes:e,cachePool:null,transitions:null}}function R_(e,t,n){var r=t.pendingProps,s=ut.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Ze(ut,s&1),e===null)return kx(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=jp(o,r,0,null),e=ca(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ox(n),t.memoizedState=Px,e):db(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return tD(e,t,o,r,l,s,n);if(a){a=r.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=pi(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?a=pi(l,a):(a=ca(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Ox(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Px,r}return a=e.child,e=a.sibling,r=pi(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function db(e,t){return t=jp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Id(e,t,n,r){return r!==null&&Qv(r),Zo(t,e.child,null,n),e=db(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tD(e,t,n,r,s,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Qm(Error(ae(422))),Id(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,s=t.mode,r=jp({mode:"visible",children:r.children},s,0,null),a=ca(a,s,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Zo(t,e.child,null,o),t.child.memoizedState=Ox(o),t.memoizedState=Px,a);if(!(t.mode&1))return Id(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,a=Error(ae(419)),r=Qm(a,r,void 0),Id(e,t,o,r)}if(l=(o&e.childLanes)!==0,wn||l){if(r=It,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,ms(e,s),xr(r,e,s,-1))}return xb(),r=Qm(Error(ae(421))),Id(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=pD.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,Rn=ui(s.nextSibling),Mn=t,it=!0,pr=null,e!==null&&(Wn[Hn++]=os,Wn[Hn++]=ls,Wn[Hn++]=pa,os=e.id,ls=e.overflow,pa=t),t=db(t,r.children),t.flags|=4096,t)}function c1(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sx(e.return,t,n)}
vendor: 5,382 bytes, line 40
40function Jm(e,t,n,r,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=s)}function M_(e,t,n){var r=t.pendingProps,s=r.revealOrder,a=r.tail;if(an(e,t,r.children,n),r=ut.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&c1(e,n,t);else if(e.tag===19)c1(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ze(ut,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&hf(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Jm(t,!1,s,n,a);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&hf(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Jm(t,!0,n,null,a);break;case"together":Jm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Sh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ga|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nD(e,t,n){switch(t.tag){case 3:O_(t),Jo();break;case 5:a_(t);break;case 1:Nn(t.type)&&af(t);break;case 4:rb(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Ze(cf,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ze(ut,ut.current&1),t.flags|=128,null):n&t.child.childLanes?R_(e,t,n):(Ze(ut,ut.current&1),e=gs(e,t,n),e!==null?e.sibling:null);Ze(ut,ut.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return M_(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ze(ut,ut.current),r)break;return null;case 22:case 23:return t.lanes=0,A_(e,t,n)}return gs(e,t,n)}var D_,Rx,I_,L_;D_=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rx=function(){};I_=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Yi(Br.current);var a=null;switch(n){case"input":s=tx(e,s),r=tx(e,r),a=[];break;case"select":s=pt({},s,{value:void 0}),r=pt({},r,{value:void 0}),a=[];break;case"textarea":s=sx(e,s),r=sx(e,r),a=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=rf)}ax(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Yc.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Yc.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&nt("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};L_=function(e,t,n,r){n!==r&&(t.flags|=4)};function ec(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function rD(e,t,n){var r=t.pendingProps;switch(Xv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(t),null;case 1:return Nn(t.type)&&sf(),Yt(t),null;case 3:return r=t.stateNode,el(),st(jn),st(en),ib(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Md(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pr!==null&&(Bx(pr),pr=null))),Rx(e,t),Yt(t),null;case 5:sb(t);var s=Yi(ou.current);
vendor: 32,979 bytes, line 40
40if(n=t.type,e!==null&&t.stateNode!=null)I_(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return Yt(t),null}if(e=Yi(Br.current),Md(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Lr]=t,r[iu]=a,e=(t.mode&1)!==0,n){case"dialog":nt("cancel",r),nt("close",r);break;case"iframe":case"object":case"embed":nt("load",r);break;case"video":case"audio":for(s=0;s<mc.length;s++)nt(mc[s],r);break;case"source":nt("error",r);break;case"img":case"image":case"link":nt("error",r),nt("load",r);break;case"details":nt("toggle",r);break;case"input":yw(r,a),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},nt("invalid",r);break;case"textarea":bw(r,a),nt("invalid",r)}ax(n,a),s=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?r.textContent!==l&&(a.suppressHydrationWarning!==!0&&Rd(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Rd(r.textContent,l,e),s=["children",""+l]):Yc.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&nt("scroll",r)}switch(n){case"input":Sd(r),vw(r,a,!0);break;case"textarea":Sd(r),ww(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=rf)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=dS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Lr]=t,e[iu]=r,D_(e,t,!1,!1),t.stateNode=e;e:{switch(o=ox(n,r),n){case"dialog":nt("cancel",e),nt("close",e),s=r;break;case"iframe":case"object":case"embed":nt("load",e),s=r;break;case"video":case"audio":for(s=0;s<mc.length;s++)nt(mc[s],e);s=r;break;case"source":nt("error",e),s=r;break;case"img":case"image":case"link":nt("error",e),nt("load",e),s=r;break;case"details":nt("toggle",e),s=r;break;case"input":yw(e,r),s=tx(e,r),nt("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=pt({},r,{value:void 0}),nt("invalid",e);break;case"textarea":bw(e,r),s=sx(e,r),nt("invalid",e);break;default:s=r}ax(n,s),l=s;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?pS(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&hS(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Xc(e,c):typeof c=="number"&&Xc(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Yc.hasOwnProperty(a)?c!=null&&a==="onScroll"&&nt("scroll",e):c!=null&&Dv(e,a,c,o))}switch(n){case"input":Sd(e),vw(e,r,!1);break;case"textarea":Sd(e),ww(e);break;case"option":r.value!=null&&e.setAttribute("value",""+yi(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?ko(e,!!r.multiple,a,!1):r.defaultValue!=null&&ko(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=rf)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Yt(t),null;case 6:if(e&&t.stateNode!=null)L_(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ae(166));if(n=Yi(ou.current),Yi(Br.current),Md(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lr]=t,(a=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:Rd(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Rd(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lr]=t,t.stateNode=r}return Yt(t),null;case 13:if(st(ut),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&Rn!==null&&t.mode&1&&!(t.flags&128))t_(),Jo(),t.flags|=98560,a=!1;else if(a=Md(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(ae(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(ae(317));a[Lr]=t}else Jo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Yt(t),a=!1}else pr!==null&&(Bx(pr),pr=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ut.current&1?Tt===0&&(Tt=3):xb())),t.updateQueue!==null&&(t.flags|=4),Yt(t),null);case 4:return el(),Rx(e,t),e===null&&ru(t.stateNode.containerInfo),Yt(t),null;case 10:return eb(t.type._context),Yt(t),null;case 17:return Nn(t.type)&&sf(),Yt(t),null;case 19:if(st(ut),a=t.memoizedState,a===null)return Yt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)ec(a,!1);else{if(Tt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=hf(e),o!==null){for(t.flags|=128,ec(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ze(ut,ut.current&1|2),t.child}e=e.sibling}a.tail!==null&&bt()>nl&&(t.flags|=128,r=!0,ec(a,!1),t.lanes=4194304)}else{if(!r)if(e=hf(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ec(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!it)return Yt(t),null}else 2*bt()-a.renderingStartTime>nl&&n!==1073741824&&(t.flags|=128,r=!0,ec(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=bt(),t.sibling=null,n=ut.current,Ze(ut,r?n&1|2:n&1),t):(Yt(t),null);case 22:case 23:return gb(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Cn&1073741824&&(Yt(t),t.subtreeFlags&6&&(t.flags|=8192)):Yt(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function sD(e,t){switch(Xv(t),t.tag){case 1:return Nn(t.type)&&sf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return el(),st(jn),st(en),ib(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sb(t),null;case 13:if(st(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));Jo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return st(ut),null;case 4:return el(),null;case 10:return eb(t.type._context),null;case 22:case 23:return gb(),null;case 24:return null;default:return null}}var Ld=!1,Jt=!1,iD=typeof WeakSet=="function"?WeakSet:Set,pe=null;function go(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){vt(e,t,r)}else n.current=null}function Mx(e,t,n){try{n()}catch(r){vt(e,t,r)}}var u1=!1;function aD(e,t){if(xx=ef,e=US(),Gv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(l=o+s),h!==a||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===s&&(l=o),f===a&&++d===r&&(c=o),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(yx={focusedElem:e,selectionRange:n},ef=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var m=x.memoizedProps,y=x.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:cr(t.type,m),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(w){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return x=u1,u1=!1,x}function Pc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&Mx(t,n,a)}s=s.next}while(s!==r)}}function bp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Dx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function F_(e){var t=e.alternate;t!==null&&(e.alternate=null,F_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[iu],delete t[wx],delete t[UM],delete t[qM])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $_(e){return e.tag===5||e.tag===3||e.tag===4}function d1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ix(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rf));else if(r!==4&&(e=e.child,e!==null))for(Ix(e,t,n),e=e.sibling;e!==null;)Ix(e,t,n),e=e.sibling}function Lx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Lx(e,t,n),e=e.sibling;e!==null;)Lx(e,t,n),e=e.sibling}var Ut=null,fr=!1;function Ps(e,t,n){for(n=n.child;n!==null;)z_(e,t,n),n=n.sibling}function z_(e,t,n){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(hp,n)}catch{}switch(n.tag){case 5:Jt||go(n,t);case 6:var r=Ut,s=fr;Ut=null,Ps(e,t,n),Ut=r,fr=s,Ut!==null&&(fr?(e=Ut,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ut.removeChild(n.stateNode));break;case 18:Ut!==null&&(fr?(e=Ut,n=n.stateNode,e.nodeType===8?Wm(e.parentNode,n):e.nodeType===1&&Wm(e,n),eu(e)):Wm(Ut,n.stateNode));break;case 4:r=Ut,s=fr,Ut=n.stateNode.containerInfo,fr=!0,Ps(e,t,n),Ut=r,fr=s;break;case 0:case 11:case 14:case 15:if(!Jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Mx(n,t,o),s=s.next}while(s!==r)}Ps(e,t,n);break;case 1:if(!Jt&&(go(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){vt(n,t,l)}Ps(e,t,n);break;case 21:Ps(e,t,n);break;case 22:n.mode&1?(Jt=(r=Jt)||n.memoizedState!==null,Ps(e,t,n),Jt=r):Ps(e,t,n);break;default:Ps(e,t,n)}}function h1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new iD),t.forEach(function(r){var s=mD.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function rr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Ut=l.stateNode,fr=!1;break e;case 3:Ut=l.stateNode.containerInfo,fr=!0;break e;case 4:Ut=l.stateNode.containerInfo,fr=!0;break e}l=l.return}if(Ut===null)throw Error(ae(160));z_(a,o,s),Ut=null,fr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){vt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)B_(t,e),t=t.sibling}function B_(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rr(t,e),Er(e),r&4){try{Pc(3,e,e.return),bp(3,e)}catch(m){vt(e,e.return,m)}try{Pc(5,e,e.return)}catch(m){vt(e,e.return,m)}}break;case 1:rr(t,e),Er(e),r&512&&n!==null&&go(n,n.return);break;case 5:if(rr(t,e),Er(e),r&512&&n!==null&&go(n,n.return),e.flags&32){var s=e.stateNode;try{Xc(s,"")}catch(m){vt(e,e.return,m)}}if(r&4&&(s=e.stateNode,s!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&cS(s,a),ox(l,o);var u=ox(l,a);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?pS(s,h):d==="dangerouslySetInnerHTML"?hS(s,h):d==="children"?Xc(s,h):Dv(s,d,h,u)}switch(l){case"input":nx(s,a);break;case"textarea":uS(s,a);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?ko(s,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?ko(s,!!a.multiple,a.defaultValue,!0):ko(s,!!a.multiple,a.multiple?[]:"",!1))}s[iu]=a}catch(m){vt(e,e.return,m)}}break;case 6:if(rr(t,e),Er(e),r&4){if(e.stateNode===null)throw Error(ae(162));s=e.stateNode,a=e.memoizedProps;try{s.nodeValue=a}catch(m){vt(e,e.return,m)}}break;case 3:if(rr(t,e),Er(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{eu(t.containerInfo)}catch(m){vt(e,e.return,m)}break;case 4:rr(t,e),Er(e);break;case 13:rr(t,e),Er(e),s=e.child,s.flags&8192&&(a=s.memoizedState!==null,s.stateNode.isHidden=a,!a||s.alternate!==null&&s.alternate.memoizedState!==null||(pb=bt())),r&4&&h1(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Jt=(u=Jt)||d,rr(t,e),Jt=u):rr(t,e),Er(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(pe=e,d=e.child;d!==null;){for(h=pe=d;pe!==null;){switch(f=pe,p=f.child,f.tag){case 0:case 11:case 14:case 15:Pc(4,f,f.return);break;case 1:go(f,f.return);var x=f.stateNode;if(typeof x.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(m){vt(r,n,m)}}break;case 5:go(f,f.return);break;case 22:if(f.memoizedState!==null){p1(h);continue}}p!==null?(p.return=f,pe=p):p1(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=fS("display",o))}catch(m){vt(e,e.return,m)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){vt(e,e.return,m)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:rr(t,e),Er(e),r&4&&h1(e);break;case 21:break;default:rr(t,e),Er(e)}}function Er(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($_(n)){var r=n;break e}n=n.return}throw Error(ae(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Xc(s,""),r.flags&=-33);var a=d1(e);Lx(e,a,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=d1(e);Ix(e,l,o);break;default:throw Error(ae(161))}}catch(c){vt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function oD(e,t,n){pe=e,U_(e)}function U_(e,t,n){for(var r=(e.mode&1)!==0;pe!==null;){var s=pe,a=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Ld;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Jt;l=Ld;var u=Jt;if(Ld=o,(Jt=c)&&!u)for(pe=s;pe!==null;)o=pe,c=o.child,o.tag===22&&o.memoizedState!==null?m1(s):c!==null?(c.return=o,pe=c):m1(s);for(;a!==null;)pe=a,U_(a),a=a.sibling;pe=s,Ld=l,Jt=u}f1(e)}else s.subtreeFlags&8772&&a!==null?(a.return=s,pe=a):f1(e)}}function f1(e){for(;pe!==null;){var t=pe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Jt||bp(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Jt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:cr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Qw(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Qw(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&eu(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ae(163))}Jt||t.flags&512&&Dx(t)}catch(f){vt(t,t.return,f)}}if(t===e){pe=null;break}if(n=t.sibling,n!==null){n.return=t.return,pe=n;break}pe=t.return}}function p1(e){for(;pe!==null;){var t=pe;if(t===e){pe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,pe=n;break}pe=t.return}}function m1(e){for(;pe!==null;){var t=pe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bp(4,t)}catch(c){vt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){vt(t,s,c)}}var a=t.return;try{Dx(t)}catch(c){vt(t,a,c)}break;case 5:var o=t.return;try{Dx(t)}catch(c){vt(t,o,c)}}}catch(c){vt(t,t.return,c)}if(t===e){pe=null;break}var l=t.sibling;if(l!==null){l.return=t.return,pe=l;break}pe=t.return}}var lD=Math.ceil,mf=ks.ReactCurrentDispatcher,hb=ks.ReactCurrentOwner,Yn=ks.ReactCurrentBatchConfig,Ue=0,It=null,Nt=null,Wt=0,Cn=0,xo=Ci(0),Tt=0,du=null,ga=0,wp=0,fb=0,Oc=null,bn=null,pb=0,nl=1/0,Qr=null,gf=!1,Fx=null,hi=null,Fd=!1,si=null,xf=0,Rc=0,$x=null,_h=-1,Eh=0;function un(){return Ue&6?bt():_h!==-1?_h:_h=bt()}function fi(e){return e.mode&1?Ue&2&&Wt!==0?Wt&-Wt:WM.transition!==null?(Eh===0&&(Eh=_S()),Eh):(e=Ke,e!==0||(e=window.event,e=e===void 0?16:RS(e.type)),e):1}function xr(e,t,n,r){if(50<Rc)throw Rc=0,$x=null,Error(ae(185));Vu(e,n,r),(!(Ue&2)||e!==It)&&(e===It&&(!(Ue&2)&&(wp|=n),Tt===4&&qs(e,Wt)),kn(e,r),n===1&&Ue===0&&!(t.mode&1)&&(nl=bt()+500,xp&&Ti()))}function kn(e,t){var n=e.callbackNode;W5(e,t);var r=Zh(e,e===It?Wt:0);if(r===0)n!==null&&kw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&kw(n),t===1)e.tag===0?VM(g1.bind(null,e)):JS(g1.bind(null,e)),zM(function(){!(Ue&6)&&Ti()}),n=null;else{switch(ES(r)){case 1:n=zv;break;case 4:n=kS;break;case 16:n=Jh;break;case 536870912:n=SS;break;default:n=Jh}n=X_(n,q_.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function q_(e,t){if(_h=-1,Eh=0,Ue&6)throw Error(ae(327));var n=e.callbackNode;if(To()&&e.callbackNode!==n)return null;var r=Zh(e,e===It?Wt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=yf(e,r);else{t=r;var s=Ue;Ue|=2;var a=W_();(It!==e||Wt!==t)&&(Qr=null,nl=bt()+500,la(e,t));do try{dD();break}catch(l){V_(e,l)}while(!0);Zv(),mf.current=a,Ue=s,Nt!==null?t=0:(It=null,Wt=0,t=Tt)}if(t!==0){if(t===2&&(s=hx(e),s!==0&&(r=s,t=zx(e,s))),t===1)throw n=du,la(e,0),qs(e,r),kn(e,bt()),n;if(t===6)qs(e,r);else{if(s=e.current.alternate,!(r&30)&&!cD(s)&&(t=yf(e,r),t===2&&(a=hx(e),a!==0&&(r=a,t=zx(e,a))),t===1))throw n=du,la(e,0),qs(e,r),kn(e,bt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(ae(345));case 2:Fi(e,bn,Qr);break;case 3:if(qs(e,r),(r&130023424)===r&&(t=pb+500-bt(),10<t)){if(Zh(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){un(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=bx(Fi.bind(null,e,bn,Qr),t);break}Fi(e,bn,Qr);break;case 4:if(qs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-gr(r);a=1<<o,o=t[o],o>s&&(s=o),r&=~a}if(r=s,r=bt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lD(r/1960))-r,10<r){e.timeoutHandle=bx(Fi.bind(null,e,bn,Qr),r);break}Fi(e,bn,Qr);break;case 5:Fi(e,bn,Qr);break;default:throw Error(ae(329))}}}return kn(e,bt()),e.callbackNode===n?q_.bind(null,e):null}function zx(e,t){var n=Oc;return e.current.memoizedState.isDehydrated&&(la(e,t).flags|=256),e=yf(e,t),e!==2&&(t=bn,bn=n,t!==null&&Bx(t)),e}function Bx(e){bn===null?bn=e:bn.push.apply(bn,e)}function cD(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],a=s.getSnapshot;s=s.value;try{if(!br(a(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function qs(e,t){for(t&=~fb,t&=~wp,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gr(t),r=1<<n;e[n]=-1,t&=~r}}function g1(e){if(Ue&6)throw Error(ae(327));To();var t=Zh(e,0);if(!(t&1))return kn(e,bt()),null;var n=yf(e,t);if(e.tag!==0&&n===2){var r=hx(e);r!==0&&(t=r,n=zx(e,r))}if(n===1)throw n=du,la(e,0),qs(e,t),kn(e,bt()),n;if(n===6)throw Error(ae(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fi(e,bn,Qr),kn(e,bt()),null}function mb(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(nl=bt()+500,xp&&Ti())}}function xa(e){si!==null&&si.tag===0&&!(Ue&6)&&To();var t=Ue;Ue|=1;var n=Yn.transition,r=Ke;try{if(Yn.transition=null,Ke=1,e)return e()}finally{Ke=r,Yn.transition=n,Ue=t,!(Ue&6)&&Ti()}}function gb(){Cn=xo.current,st(xo)}function la(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,$M(n)),Nt!==null)for(n=Nt.return;n!==null;){var r=n;switch(Xv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&sf();break;case 3:el(),st(jn),st(en),ib();break;case 5:sb(r);break;case 4:el();break;case 13:st(ut);break;case 19:st(ut);break;case 10:eb(r.type._context);break;case 22:case 23:gb()}n=n.return}if(It=e,Nt=e=pi(e.current,null),Wt=Cn=t,Tt=0,du=null,fb=wp=ga=0,bn=Oc=null,Gi!==null){for(t=0;t<Gi.length;t++)if(n=Gi[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=s,r.next=o}n.pending=r}Gi=null}return e}function V_(e,t){do{var n=Nt;try{if(Zv(),Nh.current=pf,ff){for(var r=ft.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ff=!1}if(ma=0,Mt=_t=ft=null,Ac=!1,lu=0,hb.current=null,n===null||n.return===null){Tt=1,du=t,Nt=null;break}e:{var a=e,o=n.return,l=n,c=t;if(t=Wt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=r1(o);if(p!==null){p.flags&=-257,s1(p,o,l,a,t),p.mode&1&&n1(a,u,t),t=p,c=u;var x=t.updateQueue;if(x===null){var m=new Set;m.add(c),t.updateQueue=m}else x.add(c);break e}else{if(!(t&1)){n1(a,u,t),xb();break e}c=Error(ae(426))}}else if(it&&l.mode&1){var y=r1(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),s1(y,o,l,a,t),Qv(tl(c,l));break e}}a=c=tl(c,l),Tt!==4&&(Tt=2),Oc===null?Oc=[a]:Oc.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=E_(a,c,t);Xw(a,g);break e;case 1:l=c;var v=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(hi===null||!hi.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=C_(a,l,t);Xw(a,w);break e}}a=a.return}while(a!==null)}K_(n)}catch(j){t=j,Nt===n&&n!==null&&(Nt=n=n.return);continue}break}while(!0)}function W_(){var e=mf.current;return mf.current=pf,e===null?pf:e}function xb(){(Tt===0||Tt===3||Tt===2)&&(Tt=4),It===null||!(ga&268435455)&&!(wp&268435455)||qs(It,Wt)}function yf(e,t){var n=Ue;Ue|=2;var r=W_();(It!==e||Wt!==t)&&(Qr=null,la(e,t));do try{uD();break}catch(s){V_(e,s)}while(!0);if(Zv(),Ue=n,mf.current=r,Nt!==null)throw Error(ae(261));return It=null,Wt=0,Tt}function uD(){for(;Nt!==null;)H_(Nt)}function dD(){for(;Nt!==null&&!I5();)H_(Nt)}function H_(e){var t=Y_(e.alternate,e,Cn);e.memoizedProps=e.pendingProps,t===null?K_(e):Nt=t,hb.current=null}function K_(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=sD(n,t),n!==null){n.flags&=32767,Nt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Tt=6,Nt=null;return}}else if(n=rD(n,t,Cn),n!==null){Nt=n;return}if(t=t.sibling,t!==null){Nt=t;return}Nt=t=e}while(t!==null);Tt===0&&(Tt=5)}function Fi(e,t,n){var r=Ke,s=Yn.transition;try{Yn.transition=null,Ke=1,hD(e,t,n,r)}finally{Yn.transition=s,Ke=r}return null}function hD(e,t,n,r){do To();while(si!==null);if(Ue&6)throw Error(ae(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ae(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(H5(e,a),e===It&&(Nt=It=null,Wt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fd||(Fd=!0,X_(Jh,function(){return To(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=Yn.transition,Yn.transition=null;var o=Ke;Ke=1;var l=Ue;Ue|=4,hb.current=null,aD(e,n),B_(n,e),OM(yx),ef=!!xx,yx=xx=null,e.current=n,oD(n),L5(),Ue=l,Ke=o,Yn.transition=a}else e.current=n;if(Fd&&(Fd=!1,si=e,xf=s),a=e.pendingLanes,a===0&&(hi=null),z5(n.stateNode),kn(e,bt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(gf)throw gf=!1,e=Fx,Fx=null,e;return xf&1&&e.tag!==0&&To(),a=e.pendingLanes,a&1?e===$x?Rc++:(Rc=0,$x=e):Rc=0,Ti(),null}function To(){if(si!==null){var e=ES(xf),t=Yn.transition,n=Ke;try{if(Yn.transition=null,Ke=16>e?16:e,si===null)var r=!1;else{if(e=si,si=null,xf=0,Ue&6)throw Error(ae(331));var s=Ue;for(Ue|=4,pe=e.current;pe!==null;){var a=pe,o=a.child;if(pe.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(pe=u;pe!==null;){var d=pe;switch(d.tag){case 0:case 11:case 15:Pc(8,d,a)}var h=d.child;if(h!==null)h.return=d,pe=h;else for(;pe!==null;){d=pe;var f=d.sibling,p=d.return;if(F_(d),d===u){pe=null;break}if(f!==null){f.return=p,pe=f;break}pe=p}}}var x=a.alternate;if(x!==null){var m=x.child;if(m!==null){x.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}pe=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,pe=o;else e:for(;pe!==null;){if(a=pe,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Pc(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,pe=g;break e}pe=a.return}}var v=e.current;for(pe=v;pe!==null;){o=pe;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,pe=b;else e:for(o=v;pe!==null;){if(l=pe,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:bp(9,l)}}catch(j){vt(l,l.return,j)}if(l===o){pe=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,pe=w;break e}pe=l.return}}if(Ue=s,Ti(),zr&&typeof zr.onPostCommitFiberRoot=="function")try{zr.onPostCommitFiberRoot(hp,e)}catch{}r=!0}return r}finally{Ke=n,Yn.transition=t}}return!1}function x1(e,t,n){t=tl(n,t),t=E_(e,t,1),e=di(e,t,1),t=un(),e!==null&&(Vu(e,1,t),kn(e,t))}function vt(e,t,n){if(e.tag===3)x1(e,e,n);else for(;t!==null;){if(t.tag===3){x1(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hi===null||!hi.has(r))){e=tl(n,e),e=C_(t,e,1),t=di(t,e,1),e=un(),t!==null&&(Vu(t,1,e),kn(t,e));break}}t=t.return}}function fD(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=un(),e.pingedLanes|=e.suspendedLanes&n,It===e&&(Wt&n)===n&&(Tt===4||Tt===3&&(Wt&130023424)===Wt&&500>bt()-pb?la(e,0):fb|=n),kn(e,t)}function G_(e,t){t===0&&(e.mode&1?(t=Cd,Cd<<=1,!(Cd&130023424)&&(Cd=4194304)):t=1);var n=un();e=ms(e,t),e!==null&&(Vu(e,t,n),kn(e,n))}function pD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),G_(e,n)}function mD(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),G_(e,n)}var Y_;Y_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||jn.current)wn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wn=!1,nD(e,t,n);wn=!!(e.flags&131072)}else wn=!1,it&&t.flags&1048576&&ZS(t,lf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Sh(e,t),e=t.pendingProps;var s=Qo(t,en.current);Co(t,n),s=ob(null,t,r,e,s,n);var a=lb();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Nn(r)?(a=!0,af(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,nb(t),s.updater=vp,t.stateNode=s,s._reactInternals=t,Ex(t,r,e,n),t=Ax(null,t,r,!0,a,n)):(t.tag=0,it&&a&&Yv(t),an(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Sh(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=xD(r),e=cr(r,e),s){case 0:t=Tx(null,t,r,e,n);break e;case 1:t=o1(null,t,r,e,n);break e;case 11:t=i1(null,t,r,e,n);break e;case 14:t=a1(null,t,r,cr(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cr(r,s),Tx(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cr(r,s),o1(e,t,r,s,n);case 3:e:{if(O_(t),e===null)throw Error(ae(387));r=t.pendingProps,a=t.memoizedState,s=a.element,i_(e,t),df(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=tl(Error(ae(423)),t),t=l1(e,t,r,n,s);break e}else if(r!==s){s=tl(Error(ae(424)),t),t=l1(e,t,r,n,s);break e}else for(Rn=ui(t.stateNode.containerInfo.firstChild),Mn=t,it=!0,pr=null,n=r_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Jo(),r===s){t=gs(e,t,n);break e}an(e,t,r,n)}t=t.child}return t;case 5:return a_(t),e===null&&kx(t),r=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,o=s.children,vx(r,s)?o=null:a!==null&&vx(r,a)&&(t.flags|=32),P_(e,t),an(e,t,o,n),t.child;case 6:return e===null&&kx(t),null;case 13:return R_(e,t,n);case 4:return rb(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zo(t,null,r,n):an(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cr(r,s),i1(e,t,r,s,n);case 7:return an(e,t,t.pendingProps,n),t.child;case 8:return an(e,t,t.pendingProps.children,n),t.child;case 12:return an(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,a=t.memoizedProps,o=s.value,Ze(cf,r._currentValue),r._currentValue=o,a!==null)if(br(a.value,o)){if(a.children===s.children&&!jn.current){t=gs(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=us(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Sx(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ae(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Sx(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}an(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Co(t,n),s=er(s),r=r(s),t.flags|=1,an(e,t,r,n),t.child;case 14:return r=t.type,s=cr(r,t.pendingProps),s=cr(r.type,s),a1(e,t,r,s,n);case 15:return T_(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:cr(r,s),Sh(e,t),t.tag=1,Nn(r)?(e=!0,af(t)):e=!1,Co(t,n),__(t,r,s),Ex(t,r,s,n),Ax(null,t,r,!0,e,n);case 19:return M_(e,t,n);case 22:return A_(e,t,n)}throw Error(ae(156,t.tag))};function X_(e,t){return NS(e,t)}function gD(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kn(e,t,n,r){return new gD(e,t,n,r)}function yb(e){return e=e.prototype,!(!e||!e.isReactComponent)}
vendor: 1,506 bytes, line 40
40function xD(e){if(typeof e=="function")return yb(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lv)return 11;if(e===Fv)return 14}return 2}function pi(e,t){var n=e.alternate;return n===null?(n=Kn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ch(e,t,n,r,s,a){var o=2;if(r=e,typeof e=="function")yb(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ao:return ca(n.children,s,a,t);case Iv:o=8,s|=8;break;case Qg:return e=Kn(12,n,t,s|2),e.elementType=Qg,e.lanes=a,e;case Jg:return e=Kn(13,n,t,s),e.elementType=Jg,e.lanes=a,e;case Zg:return e=Kn(19,n,t,s),e.elementType=Zg,e.lanes=a,e;case aS:return jp(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sS:o=10;break e;case iS:o=9;break e;case Lv:o=11;break e;case Fv:o=14;break e;case $s:o=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Kn(o,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function ca(e,t,n,r){return e=Kn(7,e,r,t),e.lanes=n,e}function jp(e,t,n,r){return e=Kn(22,e,r,t),e.elementType=aS,e.lanes=n,e.stateNode={isHidden:!1},e}
vendor: 4,415 bytes, line 40
40function Zm(e,t,n){return e=Kn(6,e,null,t),e.lanes=n,e}function eg(e,t,n){return t=Kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yD(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mm(0),this.expirationTimes=Mm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function vb(e,t,n,r,s,a,o,l,c){return e=new yD(e,t,n,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Kn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nb(a),e}function vD(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:io,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Q_(e){if(!e)return vi;e=e._reactInternals;e:{if(Ca(e)!==e||e.tag!==1)throw Error(ae(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Nn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ae(171))}if(e.tag===1){var n=e.type;if(Nn(n))return QS(e,n,t)}return t}function J_(e,t,n,r,s,a,o,l,c){return e=vb(n,r,!0,e,s,a,o,l,c),e.context=Q_(null),n=e.current,r=un(),s=fi(n),a=us(r,s),a.callback=t??null,di(n,a,s),e.current.lanes=s,Vu(e,s,r),kn(e,r),e}function Np(e,t,n,r){var s=t.current,a=un(),o=fi(s);return n=Q_(n),t.context===null?t.context=n:t.pendingContext=n,t=us(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=di(s,t,o),e!==null&&(xr(e,s,o,a),jh(e,s,o)),o}function vf(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function y1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bb(e,t){y1(e,t),(e=e.alternate)&&y1(e,t)}function bD(){return null}var Z_=typeof reportError=="function"?reportError:function(e){console.error(e)};function wb(e){this._internalRoot=e}kp.prototype.render=wb.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ae(409));Np(e,t,null,null)};kp.prototype.unmount=wb.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xa(function(){Np(null,e,null,null)}),t[ps]=null}};function kp(e){this._internalRoot=e}kp.prototype.unstable_scheduleHydration=function(e){if(e){var t=AS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Us.length&&t!==0&&t<Us[n].priority;n++);Us.splice(n,0,e),n===0&&OS(e)}};function jb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Sp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function v1(){}function wD(e,t,n,r,s){if(s){if(typeof r=="function"){var a=r;r=function(){var u=vf(o);a.call(u)}}var o=J_(t,r,e,0,null,!1,!1,"",v1);return e._reactRootContainer=o,e[ps]=o.current,ru(e.nodeType===8?e.parentNode:e),xa(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=vf(c);l.call(u)}}var c=vb(e,0,!1,null,null,!1,!1,"",v1);return e._reactRootContainer=c,e[ps]=c.current,ru(e.nodeType===8?e.parentNode:e),xa(function(){Np(t,c,n,r)}),c}function _p(e,t,n,r,s){var a=n._reactRootContainer;if(a){var o=a;if(typeof s=="function"){var l=s;s=function(){var c=vf(o);l.call(c)}}Np(t,o,e,s)}else o=wD(n,t,e,s,r);return vf(o)}CS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=pc(t.pendingLanes);n!==0&&(Bv(t,n|1),kn(t,bt()),!(Ue&6)&&(nl=bt()+500,Ti()))}break;case 13:xa(function(){var r=ms(e,1);if(r!==null){var s=un();xr(r,e,1,s)}}),bb(e,1)}};Uv=function(e){if(e.tag===13){var t=ms(e,134217728);if(t!==null){var n=un();xr(t,e,134217728,n)}bb(e,134217728)}};TS=function(e){if(e.tag===13){var t=fi(e),n=ms(e,t);if(n!==null){var r=un();xr(n,e,t,r)}bb(e,t)}};AS=function(){return Ke};PS=function(e,t){var n=Ke;try{return Ke=e,t()}finally{Ke=n}};
vendor: 3,701 bytes, line 40
40cx=function(e,t,n){switch(t){case"input":if(nx(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=gp(r);if(!s)throw Error(ae(90));lS(r),nx(r,s)}}}break;case"textarea":uS(e,n);break;case"select":t=n.value,t!=null&&ko(e,!!n.multiple,t,!1)}};xS=mb;yS=xa;var jD={usingClientEntryPoint:!1,Events:[Hu,uo,gp,mS,gS,mb]},tc={findFiberByHostInstance:Ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ND={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ks.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wS(e),e===null?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||bD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$d.isDisabled&&$d.supportsFiber)try{hp=$d.inject(ND),zr=$d}catch{}}Fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jD;Fn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jb(t))throw Error(ae(200));return vD(e,t,null,n)};Fn.createRoot=function(e,t){if(!jb(e))throw Error(ae(299));var n=!1,r="",s=Z_;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=vb(e,1,!1,null,null,n,!1,r,s),e[ps]=t.current,ru(e.nodeType===8?e.parentNode:e),new wb(t)};Fn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ae(188)):(e=Object.keys(e).join(","),Error(ae(268,e)));return e=wS(t),e=e===null?null:e.stateNode,e};Fn.flushSync=function(e){return xa(e)};Fn.hydrate=function(e,t,n){if(!Sp(t))throw Error(ae(200));return _p(null,e,t,!0,n)};Fn.hydrateRoot=function(e,t,n){if(!jb(e))throw Error(ae(405));var r=n!=null&&n.hydratedSources||null,s=!1,a="",o=Z_;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=J_(t,null,e,1,n??null,s,!1,a,o),e[ps]=t.current,ru(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new kp(t)};Fn.render=function(e,t,n){if(!Sp(t))throw Error(ae(200));return _p(null,e,t,!1,n)};Fn.unmountComponentAtNode=function(e){if(!Sp(e))throw Error(ae(40));return e._reactRootContainer?(xa(function(){_p(null,null,e,!1,function(){e._reactRootContainer=null,e[ps]=null})}),!0):!1};Fn.unstable_batchedUpdates=mb;Fn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Sp(n))throw Error(ae(200));if(e==null||e._reactInternals===void 0)throw Error(ae(38));return _p(e,t,n,!1,r)};Fn.version="18.3.1-next-f1338f8080-20240426";function eE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eE)}catch(e){console.error(e)}}eE(),eS.exports=Fn;var mr=eS.exports;const tE=up(mr);var nE,b1=mr;nE=b1.createRoot,b1.hydrateRoot;
40const kD=1,SD=1e6;let tg=0;function _D(){return tg=(tg+1)%Number.MAX_SAFE_INTEGER,tg.toString()}const ng=new Map,w1=e=>{if(ng.has(e))return;const t=setTimeout(()=>{ng.delete(e),Mc({type:"REMOVE_TOAST",toastId:e})},SD);ng.set(e,t)},ED=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,kD)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?w1(n):e.toasts.forEach(r=>{w1(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Th=[];let Ah={toasts:[]};function Mc(e){Ah=ED(Ah,e),Th.forEach(t=>{t(Ah)})}function CD({...e}){const t=_D(),n=s=>Mc({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Mc({type:"DISMISS_TOAST",toastId:t});return Mc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function rE(){const[e,t]=N.useState(Ah);return N.useEffect(()=>(Th.push(t),()=>{const n=Th.indexOf(t);n>-1&&Th.splice(n,1)}),[e]),{...e,toast:CD,dismiss:n=>Mc({type:"DISMISS_TOAST",toastId:n})}}function xe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function j1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ep(...e){return t=>{let n=!1;const r=e.map(s=>{const a=j1(s,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():j1(e[s],null)}}}}function Ge(...e){return N.useCallback(Ep(...e),e)}function TD(e,t){const n=N.createContext(t),r=a=>{const{children:o,...l}=a,c=N.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function s(a){const o=N.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,s]}function zn(e,t=[]){let n=[];function r(a,o){const l=N.createContext(o),c=n.length;n=[...n,o];const u=h=>{var g;const{scope:f,children:p,...x}=h,m=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,y=N.useMemo(()=>x,Object.values(x));return i.jsx(m.Provider,{value:y,children:p})};u.displayName=a+"Provider";function d(h,f){var m;const p=((m=f==null?void 0:f[e])==null?void 0:m[c])||l,x=N.useContext(p);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[u,d]}const s=()=>{const a=n.map(o=>N.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return N.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,AD(s,...t)]}function AD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(a)[`__scope${u}`];return{...l,...h}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function rl(e){const t=OD(e),n=N.forwardRef((r,s)=>{const{children:a,...o}=r,l=N.Children.toArray(a),c=l.find(MD);if(c){const u=c.props.children,d=l.map(h=>h===c?N.Children.count(u)>1?N.Children.only(null):N.isValidElement(u)?u.props.children:null:h);return i.jsx(t,{...o,ref:s,children:N.isValidElement(u)?N.cloneElement(u,void 0,d):null})}return i.jsx(t,{...o,ref:s,children:a})});return n.displayName=`${e}.Slot`,n}var PD=rl("Slot");function OD(e){const t=N.forwardRef((n,r)=>{const{children:s,...a}=n;if(N.isValidElement(s)){const o=ID(s),l=DD(a,s.props);return s.type!==N.Fragment&&(l.ref=r?Ep(r,o):o),N.cloneElement(s,l)}return N.Children.count(s)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sE=Symbol("radix.slottable");function RD(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sE,t}function MD(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sE}function DD(e,t){const n={...t};for(const r in t){const s=e[r],a=t[r];/^on[A-Z]/.test(r)?s&&a?n[r]=(...l)=>{const c=a(...l);return s(...l),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...a}
vendor: 6,975 bytes, line 40
40:r==="className"&&(n[r]=[s,a].filter(Boolean).join(" "))}return{...e,...n}}function ID(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Nb(e){const t=e+"CollectionProvider",[n,r]=zn(t),[s,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:y,children:g}=m,v=ne.useRef(null),b=ne.useRef(new Map).current;return i.jsx(s,{scope:y,itemMap:b,collectionRef:v,children:g})};o.displayName=t;const l=e+"CollectionSlot",c=rl(l),u=ne.forwardRef((m,y)=>{const{scope:g,children:v}=m,b=a(l,g),w=Ge(y,b.collectionRef);return i.jsx(c,{ref:w,children:v})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=rl(d),p=ne.forwardRef((m,y)=>{const{scope:g,children:v,...b}=m,w=ne.useRef(null),j=Ge(y,w),E=a(d,g);return ne.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),i.jsx(f,{[h]:"",ref:j,children:v})});p.displayName=d;function x(m){const y=a(e+"CollectionConsumer",m);return ne.useCallback(()=>{const v=y.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},x,r]}var LD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=LD.reduce((e,t)=>{const n=rl(`Primitive.${t}`),r=N.forwardRef((s,a)=>{const{asChild:o,...l}=s,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function kb(e,t){e&&mr.flushSync(()=>e.dispatchEvent(t))}function Ln(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function FD(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e);N.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var $D="DismissableLayer",Ux="dismissableLayer.update",zD="dismissableLayer.pointerDownOutside",BD="dismissableLayer.focusOutside",N1,iE=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gu=N.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,u=N.useContext(iE),[d,h]=N.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=N.useState({}),x=Ge(t,k=>h(k)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),v=d?m.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=g,j=qD(k=>{const S=k.target,A=[...u.branches].some(C=>C.contains(S));!w||A||(s==null||s(k),o==null||o(k),k.defaultPrevented||l==null||l())},f),E=VD(k=>{const S=k.target;[...u.branches].some(C=>C.contains(S))||(a==null||a(k),o==null||o(k),k.defaultPrevented||l==null||l())},f);return FD(k=>{v===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},f),N.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(N1=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),k1(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=N1)}},[d,f,n,u]),N.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),k1())},[d,u]),N.useEffect(()=>{const k=()=>p({});return document.addEventListener(Ux,k),()=>document.removeEventListener(Ux,k)},[]),i.jsx(Oe.div,{...c,ref:x,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:xe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:xe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:xe(e.onPointerDownCapture,j.onPointerDownCapture)})});Gu.displayName=$D;var UD="DismissableLayerBranch",aE=N.forwardRef((e,t)=>{const n=N.useContext(iE),r=N.useRef(null),s=Ge(t,r);return N.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),i.jsx(Oe.div,{...e,ref:s})});aE.displayName=UD;function qD(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e),r=N.useRef(!1),s=N.useRef(()=>{});return N.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){oE(zD,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function VD(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e),r=N.useRef(!1);return N.useEffect(()=>{const s=a=>{a.target&&!r.current&&oE(BD,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function k1(){const e=new CustomEvent(Ux);document.dispatchEvent(e)}function oE(e,t,n,{discrete:r}){const s=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?kb(s,a):s.dispatchEvent(a)}var WD=Gu,HD=aE,xs=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},KD="Portal",Cp=N.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,a]=N.useState(!1);xs(()=>a(!0),[]);const o=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?tE.createPortal(i.jsx(Oe.div,{...r,ref:t}),o):null});Cp.displayName=KD;function GD(e,t){return N.useReducer((n,r)=>t[n][r]??n,e)}var Bn=e=>{const{present:t,children:n}=e,r=YD(t),s=typeof n=="function"?n({present:r.isPresent}):N.Children.only(n),a=Ge(r.ref,XD(s));return typeof n=="function"||r.isPresent?N.cloneElement(s,{ref:a}):null};Bn.displayName="Presence";function YD(e){const[t,n]=N.useState(),r=N.useRef(null),s=N.useRef(e),a=N.useRef("none"),o=e?"mounted":"unmounted",[l,c]=GD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const u=zd(r.current);a.current=l==="mounted"?u:"none"},[l]),xs(()=>{const u=r.current,d=s.current;if(d!==e){const f=a.current,p=zd(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),xs(()=>
40{if(t){let u;const d=t.ownerDocument.defaultView??window,h=p=>{const m=zd(r.current).includes(p.animationName);if(p.target===t&&m&&(c("ANIMATION_END"),!s.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=p=>{p.target===t&&(a.current=zd(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:N.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function zd(e){return(e==null?void 0:e.animationName)||"none"}function XD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var QD=Ov[" useInsertionEffect ".trim().toString()]||xs;function Ai({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,a,o]=JD({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:s;{const d=N.useRef(e!==void 0);N.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=N.useCallback(d=>{var h;if(l){const f=ZD(d)?d(e):d;f!==e&&((h=o.current)==null||h.call(o,f))}else a(d)},[l,e,a,o]);return[c,u]}function JD({defaultProp:e,onChange:t}){const[n,r]=N.useState(e),s=N.useRef(n),a=N.useRef(t);return QD(()=>{a.current=t},[t]),N.useEffect(()=>{var o;s.current!==n&&((o=a.current)==null||o.call(a,n),s.current=n)},[n,s]),[n,r,a]}function ZD(e){return typeof e=="function"}var e3=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),t3="VisuallyHidden",Tp=N.forwardRef((e,t)=>i.jsx(Oe.span,{...e,ref:t,style:{...e3,...e.style}}));Tp.displayName=t3;var n3=Tp,Sb="ToastProvider",[_b,r3,s3]=Nb("Toast"),[lE,Hoe]=zn("Toast",[s3]),[i3,Ap]=lE(Sb),cE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:a=50,children:o}=e,[l,c]=N.useState(null),[u,d]=N.useState(0),h=N.useRef(!1),f=N.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Sb}\`. Expected non-empty \`string\`.`),i.jsx(_b.Provider,{scope:t,children:i.jsx(i3,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:N.useCallback(()=>d(p=>p+1),[]),onToastRemove:N.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};cE.displayName=Sb;var uE="ToastViewport",a3=["F8"],qx="toast.viewportPause",Vx="toast.viewportResume",dE=N.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=a3,label:s="Notifications ({hotkey})",...a}=e,o=Ap(uE,n),l=r3(n),c=N.useRef(null),u=N.useRef(null),d=N.useRef(null),h=N.useRef(null),f=Ge(t,h,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=o.toastCount>0;N.useEffect(()=>{const y=g=>{var b;r.length!==0&&r.every(w=>g[w]||g.code===w)&&((b=h.current)==null||b.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),N.useEffect(()=>{const y=c.current,g=h.current;if(x&&y&&g){const v=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(qx);g.dispatchEvent(E),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Vx);g.dispatchEvent(E),o.isClosePausedRef.current=!1}},w=E=>{!y.contains(E.relatedTarget)&&b()},j=()=>{y.contains(document.activeElement)||b()};return y.addEventListener("focusin",v),y.addEventListener("focusout",w),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",j),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",w),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",j),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[x,o.isClosePausedRef]);const m=N.useCallback(({tabbingDirection:y})=>{const v=l().map(b=>{const w=b.ref.current,j=[w,...v3(w)];return y==="forwards"?j:j.reverse()});return(y==="forwards"?v.reverse():v).flat()},[l]);return N.useEffect(()=>{const y=h.current;if(y){const g=v=>{var j,E,k;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const S=document.activeElement,A=v.shiftKey;if(v.target===y&&A){(j=u.current)==null||j.focus();return}const _=m({tabbingDirection:A?"backwards":"forwards"}),P=_.findIndex(O=>O===S);rg(_.slice(P+1))?v.preventDefault():A?(E=u.current)==null||E.focus():(k=d.current)==null||k.focus()}};return y.addEventListener("keydown",g),()=>y.removeEventListener("keydown",g)}},[l,m]),i.jsxs(HD,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&i.jsx(Wx,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});rg(y)}}),i.jsx(_b.Slot,{scope:n,children:i.jsx(Oe.ol,{tabIndex:-1,...a,ref:f})}),x&&i.jsx(Wx,{ref:d,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});rg(y)}})]})});dE.displayName=uE;var hE="ToastFocusProxy",Wx=N.forwardRef((e,t)=>
40{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,a=Ap(hE,n);return i.jsx(Tp,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=a.viewport)!=null&&u.contains(l))&&r()}})});Wx.displayName=hE;var Yu="Toast",o3="toast.swipeStart",l3="toast.swipeMove",c3="toast.swipeCancel",u3="toast.swipeEnd",fE=N.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:a,...o}=e,[l,c]=Ai({prop:r,defaultProp:s??!0,onChange:a,caller:Yu});return i.jsx(Bn,{present:n||l,children:i.jsx(f3,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:Ln(e.onPause),onResume:Ln(e.onResume),onSwipeStart:xe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:xe(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:xe(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:xe(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});fE.displayName=Yu;var[d3,h3]=lE(Yu,{onClose(){}}),f3=N.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:a,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:p,...x}=e,m=Ap(Yu,n),[y,g]=N.useState(null),v=Ge(t,O=>g(O)),b=N.useRef(null),w=N.useRef(null),j=s||m.duration,E=N.useRef(0),k=N.useRef(j),S=N.useRef(0),{onToastAdd:A,onToastRemove:C}=m,T=Ln(()=>{var I;(y==null?void 0:y.contains(document.activeElement))&&((I=m.viewport)==null||I.focus()),o()}),_=N.useCallback(O=>{!O||O===1/0||(window.clearTimeout(S.current),E.current=new Date().getTime(),S.current=window.setTimeout(T,O))},[T]);N.useEffect(()=>{const O=m.viewport;if(O){const I=()=>{_(k.current),u==null||u()},B=()=>{const $=new Date().getTime()-E.current;k.current=k.current-$,window.clearTimeout(S.current),c==null||c()};return O.addEventListener(qx,B),O.addEventListener(Vx,I),()=>{O.removeEventListener(qx,B),O.removeEventListener(Vx,I)}}},[m.viewport,j,c,u,_]),N.useEffect(()=>{a&&!m.isClosePausedRef.current&&_(j)},[a,j,m.isClosePausedRef,_]),N.useEffect(()=>(A(),()=>C()),[A,C]);const P=N.useMemo(()=>y?bE(y):null,[y]);return m.viewport?i.jsxs(i.Fragment,{children:[P&&i.jsx(p3,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:P}),i.jsx(d3,{scope:n,onClose:T,children:mr.createPortal(i.jsx(_b.ItemSlot,{scope:n,children:i.jsx(WD,{asChild:!0,onEscapeKeyDown:xe(l,()=>{m.isFocusedToastEscapeKeyDownRef.current||T(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(Oe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:xe(e.onKeyDown,O=>{O.key==="Escape"&&(l==null||l(O.nativeEvent),O.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:xe(e.onPointerDown,O=>{O.button===0&&(b.current={x:O.clientX,y:O.clientY})}),onPointerMove:xe(e.onPointerMove,O=>{if(!b.current)return;const I=O.clientX-b.current.x,B=O.clientY-b.current.y,$=!!w.current,q=["left","right"].includes(m.swipeDirection),L=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=q?L(0,I):0,R=q?0:L(0,B),F=O.pointerType==="touch"?10:2,U={x:D,y:R},V={originalEvent:O,delta:U};$?(w.current=U,Bd(l3,h,V,{discrete:!1})):S1(U,m.swipeDirection,F)?(w.current=U,Bd(o3,d,V,{discrete:!1}),O.target.setPointerCapture(O.pointerId)):(Math.abs(I)>F||Math.abs(B)>F)&&(b.current=null)}),onPointerUp:xe(e.onPointerUp,O=>{const I=w.current,B=O.target;if(B.hasPointerCapture(O.pointerId)&&B.releasePointerCapture(O.pointerId),w.current=null,b.current=null,I){const $=O.currentTarget,q={originalEvent:O,delta:I};S1(I,m.swipeDirection,m.swipeThreshold)?Bd(u3,p,q,{discrete:!0}):Bd(c3,f,q,{discrete:!0}),$.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),p3=e=>{const{__scopeToast:t,children:n,...r}=e,s=Ap(Yu,t),[a,o]=N.useState(!1),[l,c]=N.useState(!1);return x3(()=>o(!0)),N.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:i.jsx(Cp,{asChild:!0,children:i.jsx(Tp,{...r,children:a&&i.jsxs(i.Fragment,{children:[s.label," ",n]})})})},m3="ToastTitle",pE=N.forwardRef((e,t)=>
vendor: 10,976 bytes, lines 40-154
40{const{__scopeToast:n,...r}=e;return i.jsx(Oe.div,{...r,ref:t})});pE.displayName=m3;var g3="ToastDescription",mE=N.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(Oe.div,{...r,ref:t})});mE.displayName=g3;var gE="ToastAction",xE=N.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?i.jsx(vE,{altText:n,asChild:!0,children:i.jsx(Eb,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${gE}\`. Expected non-empty \`string\`.`),null)});xE.displayName=gE;var yE="ToastClose",Eb=N.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=h3(yE,n);return i.jsx(vE,{asChild:!0,children:i.jsx(Oe.button,{type:"button",...r,ref:t,onClick:xe(e.onClick,s.onClose)})})});Eb.displayName=yE;var vE=N.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return i.jsx(Oe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function bE(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),y3(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!s)if(a){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...bE(r))}}),t}function Bd(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?kb(s,a):s.dispatchEvent(a)}var S1=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),a=r>s;return t==="left"||t==="right"?a&&r>n:!a&&s>n};function x3(e=()=>{}){const t=Ln(e);xs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function y3(e){return e.nodeType===e.ELEMENT_NODE}function v3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rg(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var b3=cE,wE=dE,jE=fE,NE=pE,kE=mE,SE=xE,_E=Eb;function EE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=EE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function CE(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=EE(e))&&(r&&(r+=" "),r+=t);return r}const _1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,E1=CE,Cb=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return E1(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:a}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=a==null?void 0:a[u];if(d===null)return null;const f=_1(d)||_1(h);return s[u][f]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...p}=d;return Object.entries(p).every(x=>{let[m,y]=x;return Array.isArray(y)?y.includes({...a,...l}[m]):{...a,...l}[m]===y})?[...u,h,f]:u},[]);return E1(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const w3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),TE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var j3={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const N3=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:a,iconNode:o,...l},c)=>N.createElement("svg",{ref:c,...j3,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:TE("lucide",s),...l},[...o.map(([u,d])=>N.createElement(u,d)),...Array.isArray(a)?a:[a]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const se=(e,t)=>{const n=N.forwardRef(({className:r,...s},a)=>N.createElement(N3,{ref:a,iconNode:t,className:TE(`lucide-${w3(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const bi=se("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const bf=se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const k3=se("Beer",[["path",{d:"M17 11h1a3 3 0 0 1 0 6h-1",key:"1yp76v"}],["path",{d:"M9 12v6",key:"1u1cab"}],["path",{d:"M13 12v6",key:"1sugkk"}],["path",{d:"M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z",key:"1510fo"}],["path",{d:"M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"19jb7n"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const AE=se("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const S3=se("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const sl=se("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const _3=se("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const Xu=se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const il=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const Qu=se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const vl=se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const E3=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const PE=se("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const C3=se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const OE=se("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const RE=se("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const ME=se("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const bl=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree.
155 */const T3=se("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const Hx=se("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const C1=se("Crop",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const A3=se("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const P3=se("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const O3=se("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const ua=se("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const al=se("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const ol=se("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const DE=se("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const Ao=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const R3=se("GlassWater",[["path",{d:"M5.116 4.104A1 1 0 0 1 6.11 3h11.78a1 1 0 0 1 .994 1.105L17.19 20.21A2 2
2100 0 1 15.2 22H8.8a2 2 0 0 1-2-1.79z",key:"p55z4y"}],["path",{d:"M6 12a5 5 0 0 1 6 0 5 5 0 0 0 6 0",key:"mjntcy"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const M3=se("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const wf=se("Goal",[["path",{d:"M12 13V2l8 4-8 4",key:"5wlwwj"}],["path",{d:"M20.561 10.222a9 9 0 1 1-12.55-5.29",key:"1c0wjv"}],["path",{d:"M8.002 9.997a5 5 0 1 0 8.9 2.02",key:"gb1g7m"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const Ta=se("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const D3=se("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const I3=se("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const Ju=se("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const L3=se("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const ll=se("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const Kx=se("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const F3=se("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const $3=se("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree.
270 */const gc=se("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const z3=se("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const B3=se("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const U3=se("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const q3=se("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const Ie=se("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 296 * @license lucide-react v0.462.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const V3=se("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 301 * @license lucide-react v0.462.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const W3=se("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 306 * @license lucide-react v0.462.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const ys=se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 311 * @license lucide-react v0.462.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const Zu=se("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 316 * @license lucide-react v0.462.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const jf=se("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** 321 * @license lucide-react v0.462.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const IE=se("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 326 * @license lucide-react v0.462.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const H3=se("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** 331 * @license lucide-react v0.462.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const K3=se("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 336 * @license lucide-react v0.462.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const G3=se("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/** 341 * @license lucide-react v0.462.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const Y3=se("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 346 * @license lucide-react v0.462.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const X3=se("Music2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);/** 351 * @license lucide-react v0.462.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const LE=se("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 356 * @license lucide-react v0.462.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const Q3=se("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 361 * @license lucide-react v0.462.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const T1=se("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/** 366 * @license lucide-react v0.462.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const Aa=se("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/** 371 * @license lucide-react v0.462.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const Pp=se("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 376 * @license lucide-react v0.462.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const FE=se("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 381 * @license lucide-react v0.462.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const vs=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 386 * @license lucide-react v0.462.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const J3=se("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** 391 * @license lucide-react v0.462.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const Z3=se("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 396 * @license lucide-react v0.462.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const wi=se("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 401 * @license lucide-react v0.462.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const cl=se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 406 * @license lucide-react v0.462.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const Op=se("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 411 * @license lucide-react v0.462.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const $E=se("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 416 * @license lucide-react v0.462.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const A1=se("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
420y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 421 * @license lucide-react v0.462.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const Xn=se("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 426 * @license lucide-react v0.462.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const ed=se("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 431 * @license lucide-react v0.462.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const eI=se("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 436 * @license lucide-react v0.462.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const tI=se("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 441 * @license lucide-react v0.462.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const Gx=se("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 446 * @license lucide-react v0.462.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const nI=se("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 451 * @license lucide-react v0.462.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const rI=se("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 456 * @license lucide-react v0.462.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const Pi=se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 461 * @license lucide-react v0.462.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const sI=se("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 466 * @license lucide-react v0.462.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const zE=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 471 * @license lucide-react v0.462.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const Po=se("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}
475],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** 476 * @license lucide-react v0.462.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const P1=se("Tv",[["rect",{width:"20",height:"15",x:"2",y:"7",rx:"2",ry:"2",key:"10ag99"}],["polyline",{points:"17 2 12 7 7 2",key:"11pgbg"}]]);/** 481 * @license lucide-react v0.462.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const iI=se("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** 486 * @license lucide-react v0.462.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const aI=se("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 491 * @license lucide-react v0.462.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const BE=se("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 496 * @license lucide-react v0.462.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const UE=se("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 501 * @license lucide-react v0.462.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const Ph=se("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 506 * @license lucide-react v0.462.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const Zt=se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 511 * @license lucide-react v0.462.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const Tb=se("Utensils",[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]]);/** 516 * @license lucide-react v0.462.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const oI=se("Wine",[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M12 15v7",key:"t2xh3l"}],["path",{d:"M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z",key:"10ffi3"}]]);/** 521 * @license lucide-react v0.462.0 - ISC 522 * 523 * This source code is licensed under the ISC license. 524 * See the LICENSE file in the root directory of this source tree. 525 */const ul=se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 526 * @license lucide-react v0.462.0 - ISC 527 * 528 * This source code is licensed under the ISC license. 529 * See the LICENSE file in the root directory of this source tree. 530 */const qE=se("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.5
vendor: 12,684 bytes, lines 530-535
5305 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/** 531 * @license lucide-react v0.462.0 - ISC 532 * 533 * This source code is licensed under the ISC license. 534 * See the LICENSE file in the root directory of this source tree. 535 */const lI=se("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Ab="-",cI=e=>{const t=dI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Ab);return l[0]===""&&l.length!==1&&l.shift(),VE(l,t)||uI(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},VE=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?VE(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(Ab);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},O1=/^\[(.+)\]$/,uI=e=>{if(O1.test(e)){const t=O1.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},dI=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return fI(Object.entries(e.classGroups),n).forEach(([a,o])=>{Yx(o,r,a,t)}),r},Yx=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:R1(t,s);a.classGroupId=n;return}if(typeof s=="function"){if(hI(s)){Yx(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([a,o])=>{Yx(o,R1(t,a),n,r)})})},R1=(e,t)=>{let n=e;return t.split(Ab).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hI=e=>e.isThemeGetter,fI=(e,t)=>t?e.map(([n,r])=>{const s=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[n,s]}):e,pI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return s(a,o),o},set(a,o){n.has(a)?n.set(a,o):s(a,o)}}},WE="!",mI=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],a=t.length,o=l=>{const c=[];let u=0,d=0,h;for(let y=0;y<l.length;y++){let g=l[y];if(u===0){if(g===s&&(r||l.slice(y,y+a)===t)){c.push(l.slice(d,y)),d=y+a;continue}if(g==="/"){h=y;continue}}g==="["?u++:g==="]"&&u--}const f=c.length===0?l:l.substring(d),p=f.startsWith(WE),x=p?f.substring(1):f,m=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:m}};return n?l=>n({className:l,parseClassName:o}):o},gI=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},xI=e=>({cache:pI(e.cacheSize),parseClassName:mI(e),...cI(e)}),yI=/\s+/,vI=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,a=[],o=e.trim().split(yI);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let x=!!p,m=r(x?f.substring(0,p):f);if(!m){if(!x){l=u+(l.length>0?" "+l:l);continue}if(m=r(f),!m){l=u+(l.length>0?" "+l:l);continue}x=!1}const y=gI(d).join(":"),g=h?y+WE:y,v=g+m;if(a.includes(v))continue;a.push(v);const b=s(m,x);for(let w=0;w<b.length;++w){const j=b[w];a.push(g+j)}l=u+(l.length>0?" "+l:l)}return l};function bI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=HE(t))&&(r&&(r+=" "),r+=n);return r}const HE=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=HE(e[r]))&&(n&&(n+=" "),n+=t);return n};function wI(e,...t){let n,r,s,a=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=xI(u),r=n.cache.get,s=n.cache.set,a=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=vI(c,n);return s(c,d),d}return function(){return a(bI.apply(null,arguments))}}const tt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},KE=/^\[(?:([a-z-]+):)?(.+)\]$/i,jI=/^\d+\/\d+$/,NI=new Set(["px","full","screen"]),kI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_I=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,EI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yr=e=>Oo(e)||NI.has(e)||jI.test(e),Os=e=>wl(e,"length",II),Oo=e=>!!e&&!Number.isNaN(Number(e)),sg=e=>wl(e,"number",Oo),nc=e=>!!e&&Number.isInteger(Number(e)),TI=e=>e.endsWith("%")&&Oo(e.slice(0,-1)),Re=e=>KE.test(e),Rs=e=>kI.test(e),AI=new Set(["length","size","percentage"]),PI=e=>wl(e,AI,GE),OI=e=>wl(e,"position",GE),RI=new Set(["image","url"]),MI=e=>wl(e,RI,FI),DI=e=>wl(e,"",LI),rc=()=>!0,wl=(e,t,n)=>{const r=KE.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},II=e=>SI.test(e)&&!_I.test(e),GE=()=>!1,LI=e=>EI.test(e),FI=e=>CI.test(e),$I=()=>{const e=tt("colors"),t=tt("spacing"),n=tt("blur"),r=tt("brightness"),s=tt("borderColor"),a=tt("borderRadius"),o=tt("borderSpacing"),l=tt("borderWidth"),c=tt("contrast"),u=tt("grayscale"),d=tt("hueRotate"),h=tt("invert"),f=tt("gap"),p=tt("gradientColorStops"),x=tt("gradientColorStopPositions"),m=tt("inset"),y=tt("margin"),g=tt("opacity"),v=tt("padding"),b=tt("saturate"),w=tt("scale"),j=tt("sepia"),E=tt("skew"),k=tt("space"),S=tt("translate"),A=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",Re,t],_=()=>[Re,t],P=()=>["",Yr,Os],O=()=>["auto",Oo,Re],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",Re],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[Oo,Re];return{cacheSize:500,separator:":",theme:{colors:[rc],spacing:[Yr,Os],blur:["none","",Rs,Re],brightness:R(),borderColor:[e],borderRadius:["none","","full",Rs,Re],borderSpacing:_(),borderWidth:P(),contrast:R(),grayscale:L(),hueRotate:R(),invert:L(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[TI,Os],inset:T(),margin:T(),opacity:R(),padding:_(),saturate:R(),scale:R(),sepia:L(),skew:R(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",Re]}],container:["container"],columns:[{columns:[Rs]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),Re]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nc,Re]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Re]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",nc,Re]}],"grid-cols":[{"grid-cols":[rc]}],"col-start-end":[{col:["auto",{span:["full",nc,Re]},Re]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[rc]}],"row-start-end":[{row:["auto",{span:[nc,Re]},Re]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Re]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Re,t]}],"min-w":[{"min-w":[Re,t,"min","max","fit"]}],"max-w":[{"max-w":[Re,t,"none","full","min","max","fit","prose",{screen:[Rs]},Rs]}],h:[{h:[Re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Rs,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",sg]}],"font-family":[{font:[rc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Re]}],"line-clamp":[{"line-clamp":["none",Oo,sg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yr,Re]}],"list-image":[{"list-image":["none",Re]}],"list-style-type":[{list:["none","disc","decimal",Re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yr,Os]}],"underline-offset":[{"underline-offset":["auto",Yr,Re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),OI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",PI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},MI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}
vendor: 5,180 bytes, line 535
535],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Yr,Re]}],"outline-w":[{outline:[Yr,Os]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Yr,Os]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Rs,DI]}],"shadow-color":[{shadow:[rc]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Rs,Re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[b]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Re]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",Re]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",Re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[nc,Re]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 535
535],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yr,Os,sg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zI=wI($I);function Pe(...e){return zI(CE(e))}const BI=b3,YE=N.forwardRef(({className:e,...t},n)=>i.jsx(wE,{ref:n,className:Pe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));YE.displayName=wE.displayName;const UI=Cb("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),XE=N.forwardRef(({className:e,variant:t,...n},r)=>i.jsx(jE,{ref:r,className:Pe(UI({variant:t}),e),...n}));XE.displayName=jE.displayName;const qI=N.forwardRef(({className:e,...t},n)=>i.jsx(SE,{ref:n,className:Pe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));qI.displayName=SE.displayName;const QE=N.forwardRef(({className:e,...t},n)=>i.jsx(_E,{ref:n,className:Pe("absolute right-2 top-2 rounded-md p-1 text-foreground
535/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:i.jsx(ul,{className:"h-4 w-4"})}));QE.displayName=_E.displayName;const JE=N.forwardRef(({className:e,...t},n)=>i.jsx(NE,{ref:n,className:Pe("text-sm font-semibold",e),...t}));JE.displayName=NE.displayName;const ZE=N.forwardRef(({className:e,...t},n)=>i.jsx(kE,{ref:n,className:Pe("text-sm opacity-90",e),...t}));ZE.displayName=kE.displayName;function VI(){const{toasts:e}=rE();return i.jsxs(BI,{children:[e.map(function({id:t,title:n,description:r,action:s,...a}){return i.jsxs(XE,{...a,children:[i.jsxs("div",{className:"grid gap-1",children:[n&&i.jsx(JE,{children:n}),r&&i.jsx(ZE,{children:r})]}),s,i.jsx(QE,{})]},t)}),i.jsx(YE,{})]})}var M1=["light","dark"],WI="(prefers-color-scheme: dark)",HI=N.createContext(void 0),KI={setTheme:e=>{},themes:[]},GI=()=>{var e;return(e=N.useContext(HI))!=null?e:KI};N.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:a,value:o,attrs:l,nonce:c})=>{let u=a==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?M1.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(x,m=!1,y=!0)=>{let g=o?o[x]:x,v=m?x+"|| ''":`'${g}'`,b="";return s&&y&&!m&&M1.includes(x)&&(b+=`d.style.colorScheme = '${x}';`),n==="class"?m||g?b+=`c.add(${v})`:b+="null":g&&(b+=`d[s](n,${v})`),b},p=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${WI}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(a,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(a,!1,!1)};}${h}}catch(t){}}();`;return N.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var YI=e=>{switch(e){case"success":return JI;case"info":return eL;case"warning":return ZI;case"error":return tL;default:return null}},XI=Array(12).fill(0),QI=({visible:e,className:t})=>ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ne.createElement("div",{className:"sonner-spinner"},XI.map((n,r)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),JI=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ZI=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),eL=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),tL=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),nL=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}
535)),rL=()=>{let[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Xx=1,sL=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Xx++,a=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
535this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,a,o=r.then(async c=>{if(a=["resolve",c],ne.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(aL(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Xx++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},vn=new sL,iL=(e,t)=>{let n=(t==null?void 0:t.id)||Xx++;return vn.addToast({title:e,...t,id:n}),n},aL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",oL=iL,lL=()=>vn.toasts,cL=()=>vn.getActiveToasts(),ie=Object.assign(oL,{success:vn.success,info:vn.info,warning:vn.warning,error:vn.error,custom:vn.custom,message:vn.message,promise:vn.promise,dismiss:vn.dismiss,loading:vn.loading},{getHistory:lL,getToasts:cL});function uL(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}uL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
535left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
535:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
535--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 536`);function Ud(e){return e.label!==void 0}var dL=3,hL="32px",fL="16px",D1=4e3,pL=356,mL=14,gL=20,xL=200;function sr(...e){return e.filter(Boolean).join(" ")}function yL(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var vL=e=>{var t,n,r,s,a,o,l,c,u,d,h;let{invert:f,toast:p,unstyled:x,interacting:m,setHeights:y,visibleToasts:g,heights:v,index:b,toasts:w,expanded:j,removeToast:E,defaultRichColors:k,closeButton:S,style:A,cancelButtonStyle:C,actionButtonStyle:T,className:_="",descriptionClassName:P="",duration:O,position:I,gap:B,loadingIcon:$,expandByDefault:q,classNames:L,icons:D,closeButtonAriaLabel:R="Close toast",pauseWhenPageIsHidden:F}=e,[U,V]=ne.useState(null),[W,M]=ne.useState(null),[z,H]=ne.useState(!1),[G,Y]=ne.useState(!1),[Z,J]=ne.useState(!1),[oe,de]=ne.useState(!1),[ye,ve]=ne.useState(!1),[Ee,X]=ne.useState(0),[Q,ee]=ne.useState(0),ce=ne.useRef(p.duration||O||D1),te=ne.useRef(null),Ne=ne.useRef(null),Ce=b===0,Te=b+1<=g,Ve=p.type,Xe=p.dismissible!==!1,Be=p.className||"",_n=p.descriptionClassName||"",Fe=ne.useMemo(()=>v.findIndex(we=>we.toastId===p.id)||0,[v,p.id]),ot=ne.useMemo(()=>{var we;return(we=p.closeButton)!=null?we:S},[p.closeButton,S]),Gr=ne.useMemo(()=>p.duration||O||D1,[p.duration,O]),Sr=ne.useRef(0),_r=ne.useRef(0),Ts=ne.useRef(0),nr=ne.useRef(null),[Vl,$a]=I.split("-"),Ri=ne.useMemo(()=>v.reduce((we,Ae,Me)=>Me>=Fe?we:we+Ae.height,0),[v,Fe]),za=rL(),Ba=p.invert||f,lt=Ve==="loading";_r.current=ne.useMemo(()=>Fe*B+Ri,[Fe,Ri]),ne.useEffect(()=>{ce.current=Gr},[Gr]),ne.useEffect(()=>{H(!0)},[]),ne.useEffect(()=>{let we=Ne.current;if(we){let Ae=we.getBoundingClientRect().height;return ee(Ae),y(Me=>[{toastId:p.id,height:Ae,position:p.position},...Me]),()=>y(Me=>Me.filter(mt=>mt.toastId!==p.id))}},[y,p.id]),ne.useLayoutEffect(()=>{if(!z)return;let we=Ne.current,Ae=we.style.height;we.style.height="auto";let Me=we.getBoundingClientRect().height;we.style.height=Ae,ee(Me),y(mt=>mt.find(At=>At.toastId===p.id)?mt.map(At=>
536At.toastId===p.id?{...At,height:Me}:At):[{toastId:p.id,height:Me,position:p.position},...mt])},[z,p.title,p.description,y,p.id]);let et=ne.useCallback(()=>{Y(!0),X(_r.current),y(we=>we.filter(Ae=>Ae.toastId!==p.id)),setTimeout(()=>{E(p)},xL)},[p,E,y,_r]);ne.useEffect(()=>{if(p.promise&&Ve==="loading"||p.duration===1/0||p.type==="loading")return;let we;return j||m||F&&za?(()=>{if(Ts.current<Sr.current){let Ae=new Date().getTime()-Sr.current;ce.current=ce.current-Ae}Ts.current=new Date().getTime()})():ce.current!==1/0&&(Sr.current=new Date().getTime(),we=setTimeout(()=>{var Ae;(Ae=p.onAutoClose)==null||Ae.call(p,p),et()},ce.current)),()=>clearTimeout(we)},[j,m,p,Ve,F,za,et]),ne.useEffect(()=>{p.delete&&et()},[et,p.delete]);function $t(){var we,Ae,Me;return D!=null&&D.loading?ne.createElement("div",{className:sr(L==null?void 0:L.loader,(we=p==null?void 0:p.classNames)==null?void 0:we.loader,"sonner-loader"),"data-visible":Ve==="loading"},D.loading):$?ne.createElement("div",{className:sr(L==null?void 0:L.loader,(Ae=p==null?void 0:p.classNames)==null?void 0:Ae.loader,"sonner-loader"),"data-visible":Ve==="loading"},$):ne.createElement(QI,{className:sr(L==null?void 0:L.loader,(Me=p==null?void 0:p.classNames)==null?void 0:Me.loader),visible:Ve==="loading"})}return ne.createElement("li",{tabIndex:0,ref:Ne,className:sr(_,Be,L==null?void 0:L.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,L==null?void 0:L.default,L==null?void 0:L[Ve],(n=p==null?void 0:p.classNames)==null?void 0:n[Ve]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||x),"data-mounted":z,"data-promise":!!p.promise,"data-swiped":ye,"data-removed":G,"data-visible":Te,"data-y-position":Vl,"data-x-position":$a,"data-index":b,"data-front":Ce,"data-swiping":Z,"data-dismissible":Xe,"data-type":Ve,"data-invert":Ba,"data-swipe-out":oe,"data-swipe-direction":W,"data-expanded":!!(j||q&&z),style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${G?Ee:_r.current}px`,"--initial-height":q?"auto":`${Q}px`,...A,...p.style},onDragEnd:()=>{J(!1),V(null),nr.current=null},onPointerDown:we=>{lt||!Xe||(te.current=new Date,X(_r.current),we.target.setPointerCapture(we.pointerId),we.target.tagName!=="BUTTON"&&(J(!0),nr.current={x:we.clientX,y:we.clientY}))},onPointerUp:()=>{var we,Ae,Me,mt;if(oe||!Xe)return;nr.current=null;let At=Number(((we=Ne.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qe=Number(((Ae=Ne.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Kt=new Date().getTime()-((Me=te.current)==null?void 0:Me.getTime()),gt=U==="x"?At:Qe,Pt=Math.abs(gt)/Kt;if(Math.abs(gt)>=gL||Pt>.11){X(_r.current),(mt=p.onDismiss)==null||mt.call(p,p),M(U==="x"?At>0?"right":"left":Qe>0?"down":"up"),et(),de(!0),ve(!1);return}J(!1),V(null)},onPointerMove:we=>{var Ae,Me,mt,At;if(!nr.current||!Xe||((Ae=window.getSelection())==null?void 0:Ae.toString().length)>0)return;let Qe=we.clientY-nr.current.y,Kt=we.clientX-nr.current.x,gt=(Me=e.swipeDirections)!=null?Me:yL(I);!U&&(Math.abs(Kt)>1||Math.abs(Qe)>1)&&V(Math.abs(Kt)>Math.abs(Qe)?"x":"y");let Pt={x:0,y:0};U==="y"?(gt.includes("top")||gt.includes("bottom"))&&(gt.includes("top")&&Qe<0||gt.includes("bottom")&&Qe>0)&&(Pt.y=Qe):U==="x"&&(gt.includes("left")||gt.includes("right"))&&(gt.includes("left")&&Kt<0||gt.includes("right")&&Kt>0)&&(Pt.x=Kt),(Math.abs(Pt.x)>0||Math.abs(Pt.y)>0)&&ve(!0),(mt=Ne.current)==null||mt.style.setProperty("--swipe-amount-x",`${Pt.x}px`),(At=Ne.current)==null||At.style.setProperty("--swipe-amount-y",`${Pt.y}px`)}},ot&&!p.jsx?ne.createElement("button",{"aria-label":R,"data-disabled":lt,"data-close-button":!0,onClick:lt||!Xe?()=>{}:()=>{var we;et(),(we=p.onDismiss)==null||we.call(p,p)},className:sr(L==null?void 0:L.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(a=D==null?void 0:D.close)!=null?a:nL):null,p.jsx||N.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:ne.createElement(ne.Fragment,null,Ve||p.icon||p.promise?ne.createElement("div",{"data-icon":"",className:sr(L==null?void 0:L.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)}
536,p.promise||p.type==="loading"&&!p.icon?p.icon||$t():null,p.type!=="loading"?p.icon||(D==null?void 0:D[Ve])||YI(Ve):null):null,ne.createElement("div",{"data-content":"",className:sr(L==null?void 0:L.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},ne.createElement("div",{"data-title":"",className:sr(L==null?void 0:L.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?ne.createElement("div",{"data-description":"",className:sr(P,_n,L==null?void 0:L.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),N.isValidElement(p.cancel)?p.cancel:p.cancel&&Ud(p.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||C,onClick:we=>{var Ae,Me;Ud(p.cancel)&&Xe&&((Me=(Ae=p.cancel).onClick)==null||Me.call(Ae,we),et())},className:sr(L==null?void 0:L.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,N.isValidElement(p.action)?p.action:p.action&&Ud(p.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||T,onClick:we=>{var Ae,Me;Ud(p.action)&&((Me=(Ae=p.action).onClick)==null||Me.call(Ae,we),!we.defaultPrevented&&et())},className:sr(L==null?void 0:L.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function I1(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function bL(e,t){let n={};return[e,t].forEach((r,s)=>{let a=s===1,o=a?"--mobile-offset":"--offset",l=a?fL:hL;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var wL=N.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:p,visibleToasts:x=dL,toastOptions:m,dir:y=I1(),gap:g=mL,loadingIcon:v,icons:b,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:j}=e,[E,k]=ne.useState([]),S=ne.useMemo(()=>Array.from(new Set([r].concat(E.filter(F=>F.position).map(F=>F.position)))),[E,r]),[A,C]=ne.useState([]),[T,_]=ne.useState(!1),[P,O]=ne.useState(!1),[I,B]=ne.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=ne.useRef(null),q=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=ne.useRef(null),D=ne.useRef(!1),R=ne.useCallback(F=>{k(U=>{var V;return(V=U.find(W=>W.id===F.id))!=null&&V.delete||vn.dismiss(F.id),U.filter(({id:W})=>W!==F.id)})},[]);return ne.useEffect(()=>vn.subscribe(F=>{if(F.dismiss){k(U=>U.map(V=>V.id===F.id?{...V,delete:!0}:V));return}setTimeout(()=>{tE.flushSync(()=>{k(U=>{let V=U.findIndex(W=>W.id===F.id);return V!==-1?[...U.slice(0,V),{...U[V],...F},...U.slice(V+1)]:[F,...U]})})})}),[]),ne.useEffect(()=>{if(d!=="system"){B(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:U})=>{B(U?"dark":"light")})}catch{F.addListener(({matches:V})=>{try{B(V?"dark":"light")}catch(W){console.error(W)}})}},[d]),ne.useEffect(()=>{E.length<=1&&_(!1)},[E]),ne.useEffect(()=>{let F=U=>{var V,W;s.every(M=>U[M]||U.code===M)&&(_(!0),(V=$.current)==null||V.focus()),U.code==="Escape"&&(document.activeElement===$.current||(W=$.current)!=null&&W.contains(document.activeElement))&&_(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),ne.useEffect(()=>{if($.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,D.current=!1)}},[$.current]),ne.createElement("section",{ref:t,"aria-label":`${w} ${q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((F,U)=>{var V;let[W,M]=F.split("-");return E.length?ne.createElement("ol",{key:F,dir:y==="auto"?I1():y,tabIndex:-1,ref:$,className:l,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":W,"data-lifted":T&&E.length>1&&!a,"data-x-position":M,style:{"--front-toast-height":`${((V=A[0])==null?void 0:V.height)||0}px`,"--width":`${pL}px`,"--gap":`${g}px`,...p,...bL(c,u)},onBlur:z=>{D.current&&!z.currentTarget.contains(z.relatedTarget)&&(D.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||D.current||(D.current=!0,L.current=z.relatedTarget)},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{P||_(!1)},onDragEnd:()=>_(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},E.filter(z=>!z.position&&U===0||z.position===F).map((z,H)=>{var G,Y;return ne.createElement(vL,{key:z.id,icons:b,index:H,toast:z,defaultRichColors:h,duration:(G=m==null?void 0:m.duration)!=null?G:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:x,closeButton:(Y=m==null?void 0:m.closeButton)!=null?Y:o,interacting:P,position:F,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:R,toasts:E.filter(Z=>Z.position==z.position),heights:A.filter(Z=>Z.position==z.position),setHeights:C,expandByDefault:a,gap:g,loadingIcon:v,expanded:T,pauseWhenPageIsHidden:j,swipeDirections:e.swipeDirections})})):null}))});const jL=({...e})=>{const{theme:t="system"}=GI();return i.jsx(wL,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var NL=Ov[" useId ".trim().toString()]||(()=>{}),kL=0;function da(e){const[t,n]=N.useState(NL());return xs(()=>{e||n(r=>r??String(kL++))},[e]),e||(t?`radix-${t}`:"")}const SL=["top","right","bottom","left"],ji=Math.min,An=Math.max,Nf=Math.round,qd=Math.floor,Ur=e=>({x:e,y:e}
vendor: 10,346 bytes, line 536
536),_L={left:"right",right:"left",bottom:"top",top:"bottom"},EL={start:"end",end:"start"};function Qx(e,t,n){return An(e,ji(t,n))}function bs(e,t){return typeof e=="function"?e(t):e}function ws(e){return e.split("-")[0]}function jl(e){return e.split("-")[1]}function Pb(e){return e==="x"?"y":"x"}function Ob(e){return e==="y"?"height":"width"}const CL=new Set(["top","bottom"]);function $r(e){return CL.has(ws(e))?"y":"x"}function Rb(e){return Pb($r(e))}function TL(e,t,n){n===void 0&&(n=!1);const r=jl(e),s=Rb(e),a=Ob(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=kf(o)),[o,kf(o)]}function AL(e){const t=kf(e);return[Jx(e),t,Jx(t)]}function Jx(e){return e.replace(/start|end/g,t=>EL[t])}const L1=["left","right"],F1=["right","left"],PL=["top","bottom"],OL=["bottom","top"];function RL(e,t,n){switch(e){case"top":case"bottom":return n?t?F1:L1:t?L1:F1;case"left":case"right":return t?PL:OL;default:return[]}}function ML(e,t,n,r){const s=jl(e);let a=RL(ws(e),n==="start",r);return s&&(a=a.map(o=>o+"-"+s),t&&(a=a.concat(a.map(Jx)))),a}function kf(e){return e.replace(/left|right|bottom|top/g,t=>_L[t])}function DL(e){return{top:0,right:0,bottom:0,left:0,...e}}function eC(e){return typeof e!="number"?DL(e):{top:e,right:e,bottom:e,left:e}}function Sf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function $1(e,t,n){let{reference:r,floating:s}=e;const a=$r(t),o=Rb(t),l=Ob(o),c=ws(t),u=a==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[l]/2-s[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(jl(t)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const IL=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:o}=n,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=$1(u,r,c),f=r,p={},x=0;for(let m=0;m<l.length;m++){const{name:y,fn:g}=l[m],{x:v,y:b,data:w,reset:j}=await g({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=v??d,h=b??h,p={...p,[y]:{...p[y],...w}},j&&x<=50&&(x++,typeof j=="object"&&(j.placement&&(f=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:h}=$1(u,f,c)),m=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:p}};async function hu(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=bs(t,e),x=eC(p),y=l[f?h==="floating"?"reference":"floating":h],g=Sf(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),v=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),w=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},j=Sf(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:c}):v);return{top:(g.top-j.top+x.top)/w.y,bottom:(j.bottom-g.bottom+x.bottom)/w.y,left:(g.left-j.left+x.left)/w.x,right:(j.right-g.right+x.right)/w.x}}const LL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=bs(e,t)||{};if(u==null)return{};const h=eC(d),f={x:n,y:r},p=Rb(s),x=Ob(p),m=await o.getDimensions(u),y=p==="y",g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=a.reference[x]+a.reference[p]-f[p]-a.floating[x],j=f[p]-a.reference[p],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=E?E[b]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=l.floating[b]||a.floating[x]);const S=w/2-j/2,A=k/2-m[x]/2-1,C=ji(h[g],A),T=ji(h[v],A),_=C,P=k-m[x]-T,O=k/2-m[x]/2+S,I=Qx(_,O,P),B=!c.arrow&&jl(s)!=null&&O!==I&&a.reference[x]/2-(O<_?C:T)-m[x]/2<0,$=B?O<_?O-_:O-P:0;return{[p]:f[p]+$,data:{[p]:I,centerOffset:O-I-$,...B&&{alignmentOffset:$}},reset:B}}}),FL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:m=!0,...y}=bs(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const g=ws(s),v=$r(l),b=ws(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=f||(b||!m?[kf(l)]:AL(l)),E=x!=="none";!f&&E&&j.push(...ML(l,m,x,w));const k=[l,...j],S=await hu(t,y),A=[];let C=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&A.push(S[g]),h){const O=TL(s,o,w);A.push(S[O[0]],S[O[1]])}if(C=[...C,{placement:s,overflows:A}],!A.every(O=>O<=0)){var T,_;const O=(((T=a.flip)==null?void 0:T.index)||0)+1,I=k[O];if(I&&(!(h==="alignment"?v!==$r(I):!1)||C.every(q=>q.overflows[0]>0&&$r(q.placement)===v)))return{data:{index:O,overflows:C},reset:{placement:I}};let B=(_=C.filter($=>$.overflows[0]<=0).sort(($,q)=>$.overflows[1]-q.overflows[1])[0])==null?void 0:_.placement;if(!B)switch(p){case"bestFit":{var P;const $=(P=C.filter(q=>{if(E){const L=$r(q.placement);return L===v||L==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(L=>L>0).reduce((L,D)=>L+D,0)]).sort((q,L)=>q[1]-L[1])[0])==null?void 0:P[0];$&&(B=$);break}case"initialPlacement":B=l;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function z1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function B1(e){return SL.some(t=>e[t]>=0)}const $L=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=bs(e,t);switch(r){case"referenceHidden":{const a=await hu(t,{...s,elementContext:"reference"}),o=z1(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:B1(o)}}}case"escaped":{const a=await hu(t,{...s,altBoundary:!0}),o=z1(a,n.floating);return{data:{escapedOffsets:o,escaped:B1(o)}}}default:return{}}}}},tC=new Set(["left","top"]);async function zL(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=ws(n),l=jl(n),c=$r(n)==="y",u=tC.has(o)?-1:1,d=a&&c?-1:1,h=bs(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof x=="number"&&(p=l==="end"?x*-1:x),c?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const BL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:o,middlewareData:l}=t,c=await zL(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:o}}}}},UL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...c}=bs(e,t),u={x:n,y:r},d=await hu(t,c),h=$r(ws(s)),f=Pb(h);let p=u[f],x=u[h];if(a){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=p+d[y],b=p-d[g];p=Qx(v,p,b)}if(o){const y=h==="y"?"top":"left",g=h==="y"?"bottom":"right",v=x+d[y],b=x-d[g];x=Qx(v,x,b)}const m=l.fn({...t,[f]:p,[h]:x});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[h]:o}}}}}},qL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=bs(e,t),d={x:n,y:r},h=$r(s),f=Pb(h);let p=d[f],x=d[h];const m=bs(l,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const b=f==="y"?"height":"width",w=a.reference[f]-a.floating[b]+y.mainAxis,j=a.reference[f]+a.reference[b]-y.mainAxis;p<w?p=w:p>j&&(p=j)}if(u){var g,v;const b=f==="y"?"width":"height",w=tC.has(ws(s)),j=a.reference[h]-a.floating[b]+(w&&((g=o.offset)==null?void 0:g[h])||0)+(w?0:y.crossAxis),E=a.reference[h]+a.reference[b]+(w?0:((v=o.offset)==null?void 0:v[h])||0)-(w?y.crossAxis:0);x<j?x=j:x>E&&(x=E)}return{[f]:p,[h]:x}}}},VL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...u}=bs(e,t),d=await hu(t,u),h=ws(s),f=jl(s),p=$r(s)==="y",{width:x,height:m}=a.floating;let y,g;h==="top"||h==="bottom"?(y=h,g=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,y=f==="end"?"top":"bottom");const v=m-d.top-d.bottom,b=x-d.left-d.right,w=ji(m-d[y],v),j=ji(x-d[g],b),E=!t.middlewareData.shift;let k=w,S=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=v),E&&!f){const C=An(d.left,0),T=An(d.right,0),_=An(d.top,0),P=An(d.bottom,0);p?S=x-2*(C!==0||T!==0?C+T:An(d.left,d.right)):k=m-2*(_!==0||P!==0?_+P:An(d.top,d.bottom))}await c({...t,availableWidth:S,availableHeight:k});const A=await o.getDimensions(l.floating);return x!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Rp(){return typeof window<"u"}function Nl(e){return nC(e)?(e.nodeName||"").toLowerCase():"#document"}function Dn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kr(e){var t;return(t=(nC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nC(e){return Rp()?e instanceof Node||e instanceof Dn(e).Node:!1}function wr(e){return Rp()?e instanceof Element||e instanceof Dn(e).Element:!1}function Vr(e){return Rp()?e instanceof HTMLElement||e instanceof Dn(e).HTMLElement:!1}function U1(e){return!Rp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Dn(e).ShadowRoot}const WL=new Set(["inline","contents"]);function td(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=jr(e);
vendor: 4,121 bytes, line 536
536return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!WL.has(s)}const HL=new Set(["table","td","th"]);function KL(e){return HL.has(Nl(e))}const GL=[":popover-open",":modal"];function Mp(e){return GL.some(t=>{try{return e.matches(t)}catch{return!1}})}const YL=["transform","translate","scale","rotate","perspective"],XL=["transform","translate","scale","rotate","perspective","filter"],QL=["paint","layout","strict","content"];function Mb(e){const t=Db(),n=wr(e)?jr(e):e;return YL.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||XL.some(r=>(n.willChange||"").includes(r))||QL.some(r=>(n.contain||"").includes(r))}function JL(e){let t=Ni(e);for(;Vr(t)&&!dl(t);){if(Mb(t))return t;if(Mp(t))return null;t=Ni(t)}return null}function Db(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ZL=new Set(["html","body","#document"]);function dl(e){return ZL.has(Nl(e))}function jr(e){return Dn(e).getComputedStyle(e)}function Dp(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(Nl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||U1(e)&&e.host||Kr(e);return U1(t)?t.host:t}function rC(e){const t=Ni(e);return dl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&td(t)?t:rC(t)}function fu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=rC(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),o=Dn(s);if(a){const l=Zx(o);return t.concat(o,o.visualViewport||[],td(s)?s:[],l&&n?fu(l):[])}return t.concat(s,fu(s,[],n))}function Zx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sC(e){const t=jr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Vr(e),a=s?e.offsetWidth:n,o=s?e.offsetHeight:r,l=Nf(n)!==a||Nf(r)!==o;return l&&(n=a,r=o),{width:n,height:r,$:l}}function Ib(e){return wr(e)?e:e.contextElement}function Ro(e){const t=Ib(e);if(!Vr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=sC(t);let o=(a?Nf(n.width):n.width)/r,l=(a?Nf(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const e6=Ur(0);function iC(e){const t=Dn(e);return!Db()||!t.visualViewport?e6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function t6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Dn(e)?!1:t}function ya(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ib(e);let o=Ur(1);t&&(r?wr(r)&&(o=Ro(r)):o=Ro(e));const l=t6(a,n,r)?iC(a):Ur(0);let c=(s.left+l.x)/o.x,u=(s.top+l.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(a){const f=Dn(a),p=r&&wr(r)?Dn(r):r;let x=f,m=Zx(x);for(;m&&r&&p!==x;){const y=Ro(m),g=m.getBoundingClientRect(),v=jr(m),b=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,w=g.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,h*=y.y,c+=b,u+=w,x=Dn(m),m=Zx(x)}}return Sf({width:d,height:h,x:c,y:u})}function Lb(e,t){const n=Dp(e).scrollLeft;return t?t.left+n:ya(Kr(e)).left+n}function aC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Lb(e,r)),a=r.top+t.scrollTop;return{x:s,y:a}}function n6(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",o=Kr(r),l=t?Mp(t.floating):!1;if(r===o||l&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Ur(1);const d=Ur(0),h=Vr(r);if((h||!h&&!a)&&((Nl(r)!=="body"||td(o))&&(c=Dp(r)),Vr(r))){const p=ya(r);u=Ro(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const f=o&&!h&&!a?aC(o,c,!0):Ur(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function r6(e){return Array.from(e.getClientRects())}function s6(e){const t=Kr(e),n=Dp(e),r=e.ownerDocument.body,s=An(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=An(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Lb(e);const l=-n.scrollTop;return jr(r).direction==="rtl"&&(o+=An(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:o,y:l}}
vendor: 4,850 bytes, line 536
536function i6(e,t){const n=Dn(e),r=Kr(e),s=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,l=0,c=0;if(s){a=s.width,o=s.height;const u=Db();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:a,height:o,x:l,y:c}}const a6=new Set(["absolute","fixed"]);function o6(e,t){const n=ya(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Vr(e)?Ro(e):Ur(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=s*a.x,u=r*a.y;return{width:o,height:l,x:c,y:u}}function q1(e,t,n){let r;if(t==="viewport")r=i6(e,n);else if(t==="document")r=s6(Kr(e));else if(wr(t))r=o6(t,n);else{const s=iC(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Sf(r)}function oC(e,t){const n=Ni(e);return n===t||!wr(n)||dl(n)?!1:jr(n).position==="fixed"||oC(n,t)}function l6(e,t){const n=t.get(e);if(n)return n;let r=fu(e,[],!1).filter(l=>wr(l)&&Nl(l)!=="body"),s=null;const a=jr(e).position==="fixed";let o=a?Ni(e):e;for(;wr(o)&&!dl(o);){const l=jr(o),c=Mb(o);!c&&l.position==="fixed"&&(s=null),(a?!c&&!s:!c&&l.position==="static"&&!!s&&a6.has(s.position)||td(o)&&!c&&oC(e,o))?r=r.filter(d=>d!==o):s=l,o=Ni(o)}return t.set(e,r),r}function c6(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Mp(t)?[]:l6(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const h=q1(t,d,s);return u.top=An(h.top,u.top),u.right=ji(h.right,u.right),u.bottom=ji(h.bottom,u.bottom),u.left=An(h.left,u.left),u},q1(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function u6(e){const{width:t,height:n}=sC(e);return{width:t,height:n}}function d6(e,t,n){const r=Vr(t),s=Kr(t),a=n==="fixed",o=ya(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=Ur(0);function u(){c.x=Lb(s)}if(r||!r&&!a)if((Nl(t)!=="body"||td(s))&&(l=Dp(t)),r){const p=ya(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else s&&u();a&&!r&&s&&u();const d=s&&!r&&!a?aC(s,l):Ur(0),h=o.left+l.scrollLeft-c.x-d.x,f=o.top+l.scrollTop-c.y-d.y;return{x:h,y:f,width:o.width,height:o.height}}function ig(e){return jr(e).position==="static"}function V1(e,t){if(!Vr(e)||jr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Kr(e)===n&&(n=n.ownerDocument.body),n}function lC(e,t){const n=Dn(e);if(Mp(e))return n;if(!Vr(e)){let s=Ni(e);for(;s&&!dl(s);){if(wr(s)&&!ig(s))return s;s=Ni(s)}return n}let r=V1(e,t);for(;r&&KL(r)&&ig(r);)r=V1(r,t);return r&&dl(r)&&ig(r)&&!Mb(r)?n:r||JL(e)||n}const h6=async function(e){const t=this.getOffsetParent||lC,n=this.getDimensions,r=await n(e.floating);return{reference:d6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function f6(e){return jr(e).direction==="rtl"}const p6={convertOffsetParentRelativeRectToViewportRelativeRect:n6,getDocumentElement:Kr,getClippingRect:c6,getOffsetParent:lC,getElementRects:h6,getClientRects:r6,getDimensions:u6,getScale:Ro,isElement:wr,isRTL:f6};function cC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m6(e,t){let n=null,r;const s=Kr(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:p}=u;if(l||t(),!f||!p)return;const x=qd(h),m=qd(s.clientWidth-(d+f)),y=qd(s.clientHeight-(h+p)),g=qd(d),b={rootMargin:-x+"px "+-m+"px "+-y+"px "+-g+"px",threshold:An(0,ji(1,c))||1};let w=!0;function j(E){const k=E[0].intersectionRatio;if(k!==c){if(!w)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!cC(u,e.getBoundingClientRect())&&o(),w=!1}try{n=new IntersectionObserver(j,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,b)}n.observe(e)}return o(!0),a}function g6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ib(e),d=s||a?[...u?fu(u):[],...fu(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),a&&g.addEventListener("resize",n)});const h=u&&l?m6(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let x,m=c?ya(e):null;c&&y();function y(){const g=ya(e);m&&!cC(m,g)&&n(),m=g,x=requestAnimationFrame(y)}return n(),()=>{var g;d.forEach(v=>{s&&v.removeEventListener("scroll",n),a&&v.removeEventListener("resize",n)}),h==null||h(),(g=p)==null||g.disconnect(),p=null,c&&cancelAnimationFrame(x)}}const x6=BL,y6=UL,v6=FL,b6=VL,w6=$L,W1=LL,j6=qL,N6=(e,t,n)=>{const r=new Map,s={platform:p6,...n},a={...s.platform,_c:r};return IL(e,t,{...s,platform:a})};var k6=typeof document<"u",S6=function(){},Oh=k6?N.useLayoutEffect:S6;function _f(e,t){if(e===t)return!0;
vendor: 3,233 bytes, line 536
536if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_f(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!_f(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function uC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function H1(e,t){const n=uC(e);return Math.round(t*n)/n}function ag(e){const t=N.useRef(e);return Oh(()=>{t.current=e}),t}function _6(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=N.useState(r);_f(f,r)||p(r);const[x,m]=N.useState(null),[y,g]=N.useState(null),v=N.useCallback(q=>{q!==E.current&&(E.current=q,m(q))},[]),b=N.useCallback(q=>{q!==k.current&&(k.current=q,g(q))},[]),w=a||x,j=o||y,E=N.useRef(null),k=N.useRef(null),S=N.useRef(d),A=c!=null,C=ag(c),T=ag(s),_=ag(u),P=N.useCallback(()=>{if(!E.current||!k.current)return;const q={placement:t,strategy:n,middleware:f};T.current&&(q.platform=T.current),N6(E.current,k.current,q).then(L=>{const D={...L,isPositioned:_.current!==!1};O.current&&!_f(S.current,D)&&(S.current=D,mr.flushSync(()=>{h(D)}))})},[f,t,n,T,_]);Oh(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,h(q=>({...q,isPositioned:!1})))},[u]);const O=N.useRef(!1);Oh(()=>(O.current=!0,()=>{O.current=!1}),[]),Oh(()=>{if(w&&(E.current=w),j&&(k.current=j),w&&j){if(C.current)return C.current(w,j,P);P()}},[w,j,P,C,A]);const I=N.useMemo(()=>({reference:E,floating:k,setReference:v,setFloating:b}),[v,b]),B=N.useMemo(()=>({reference:w,floating:j}),[w,j]),$=N.useMemo(()=>{const q={position:n,left:0,top:0};if(!B.floating)return q;const L=H1(B.floating,d.x),D=H1(B.floating,d.y);return l?{...q,transform:"translate("+L+"px, "+D+"px)",...uC(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:D}},[n,l,B.floating,d.x,d.y]);return N.useMemo(()=>({...d,update:P,refs:I,elements:B,floatingStyles:$}),[d,P,I,B,$])}const E6=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?W1({element:r.current,padding:s}).fn(n):{}:r?W1({element:r,padding:s}).fn(n):{}}}},C6=(e,t)=>({...x6(e),options:[e,t]}),T6=(e,t)=>({...y6(e),options:[e,t]}),A6=(e,t)=>({...j6(e),options:[e,t]}),P6=(e,t)=>({...v6(e),options:[e,t]}),O6=(e,t)=>({...b6(e),options:[e,t]}),R6=(e,t)=>({...w6(e),options:[e,t]}),M6=(e,t)=>({...E6(e),options:[e,t]});var D6="Arrow",dC=N.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...a}=e;return i.jsx(Oe.svg,{...a,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});dC.displayName=D6;var I6=dC;function Ip(e){const[t,n]=N.useState(void 0);return xs(()=>
vendor: 4,629 bytes, line 536
536{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Fb="Popper",[hC,Lp]=zn(Fb),[L6,fC]=hC(Fb),pC=e=>{const{__scopePopper:t,children:n}=e,[r,s]=N.useState(null);return i.jsx(L6,{scope:t,anchor:r,onAnchorChange:s,children:n})};pC.displayName=Fb;var mC="PopperAnchor",gC=N.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,a=fC(mC,n),o=N.useRef(null),l=Ge(t,o);return N.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:i.jsx(Oe.div,{...s,ref:l})});gC.displayName=mC;var $b="PopperContent",[F6,$6]=hC($b),xC=N.forwardRef((e,t)=>{var z,H,G,Y,Z,J;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:x,...m}=e,y=fC($b,n),[g,v]=N.useState(null),b=Ge(t,oe=>v(oe)),[w,j]=N.useState(null),E=Ip(w),k=(E==null?void 0:E.width)??0,S=(E==null?void 0:E.height)??0,A=r+(a!=="center"?"-"+a:""),C=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(u)?u:[u],_=T.length>0,P={padding:C,boundary:T.filter(B6),altBoundary:_},{refs:O,floatingStyles:I,placement:B,isPositioned:$,middlewareData:q}=_6({strategy:"fixed",placement:A,whileElementsMounted:(...oe)=>g6(...oe,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[C6({mainAxis:s+S,alignmentAxis:o}),c&&T6({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?A6():void 0,...P}),c&&P6({...P}),O6({...P,apply:({elements:oe,rects:de,availableWidth:ye,availableHeight:ve})=>{const{width:Ee,height:X}=de.reference,Q=oe.floating.style;Q.setProperty("--radix-popper-available-width",`${ye}px`),Q.setProperty("--radix-popper-available-height",`${ve}px`),Q.setProperty("--radix-popper-anchor-width",`${Ee}px`),Q.setProperty("--radix-popper-anchor-height",`${X}px`)}}),w&&M6({element:w,padding:l}),U6({arrowWidth:k,arrowHeight:S}),f&&R6({strategy:"referenceHidden",...P})]}),[L,D]=bC(B),R=Ln(x);xs(()=>{$&&(R==null||R())},[$,R]);const F=(z=q.arrow)==null?void 0:z.x,U=(H=q.arrow)==null?void 0:H.y,V=((G=q.arrow)==null?void 0:G.centerOffset)!==0,[W,M]=N.useState();return xs(()=>{g&&M(window.getComputedStyle(g).zIndex)},[g]),i.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:$?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(Y=q.transformOrigin)==null?void 0:Y.x,(Z=q.transformOrigin)==null?void 0:Z.y].join(" "),...((J=q.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(F6,{scope:n,placedSide:L,onArrowChange:j,arrowX:F,arrowY:U,shouldHideArrow:V,children:i.jsx(Oe.div,{"data-side":L,"data-align":D,...m,ref:b,style:{...m.style,animation:$?void 0:"none"}})})})});xC.displayName=$b;var yC="PopperArrow",z6={top:"bottom",right:"left",bottom:"top",left:"right"},vC=N.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,a=$6(yC,r),o=z6[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:i.jsx(I6,{...s,ref:n,style:{...s.style,display:"block"}})})});vC.displayName=yC;function B6(e){return e!==null}var U6=e=>({name:"transformOrigin",options:e,fn(t){var y,g,v;const{placement:n,rects:r,middlewareData:s}=t,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=bC(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((g=s.arrow)==null?void 0:g.x)??0)+l/2,p=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let x="",m="";return u==="bottom"?(x=o?h:`${f}px`,m=`${-c}px`):u==="top"?(x=o?h:`${f}px`,m=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,m=o?h:`${p}px`):u==="left"&&(x=`${r.floating.width+c}px`,m=o?h:`${p}px`),{data:{x,y:m}}}});function bC(e){const[t,n="center"]=e.split("-");return[t,n]}var q6=pC,wC=gC,jC=xC,NC=vC,[Fp,Koe]=zn("Tooltip",[Lp]),zb=Lp(),kC="TooltipProvider",V6=700,K1="tooltip.open",[W6,SC]=
vendor: 4,226 bytes, line 536
536Fp(kC),_C=e=>{const{__scopeTooltip:t,delayDuration:n=V6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:a}=e,o=N.useRef(!0),l=N.useRef(!1),c=N.useRef(0);return N.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),i.jsx(W6,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:N.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:N.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:N.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:a})};_C.displayName=kC;var EC="Tooltip",[Goe,$p]=Fp(EC),ey="TooltipTrigger",H6=N.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=$p(ey,n),a=SC(ey,n),o=zb(n),l=N.useRef(null),c=Ge(t,l,s.onTriggerChange),u=N.useRef(!1),d=N.useRef(!1),h=N.useCallback(()=>u.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),i.jsx(wC,{asChild:!0,...o,children:i.jsx(Oe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:xe(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:xe(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:xe(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:xe(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:xe(e.onBlur,s.onClose),onClick:xe(e.onClick,s.onClose)})})});H6.displayName=ey;var K6="TooltipPortal",[Yoe,G6]=Fp(K6,{forceMount:void 0}),hl="TooltipContent",CC=N.forwardRef((e,t)=>{const n=G6(hl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...a}=e,o=$p(hl,e.__scopeTooltip);return i.jsx(Bn,{present:r||o.open,children:o.disableHoverableContent?i.jsx(TC,{side:s,...a,ref:t}):i.jsx(Y6,{side:s,...a,ref:t})})}),Y6=N.forwardRef((e,t)=>{const n=$p(hl,e.__scopeTooltip),r=SC(hl,e.__scopeTooltip),s=N.useRef(null),a=Ge(t,s),[o,l]=N.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=N.useCallback(()=>{l(null),h(!1)},[h]),p=N.useCallback((x,m)=>{const y=x.currentTarget,g={x:x.clientX,y:x.clientY},v=e8(g,y.getBoundingClientRect()),b=t8(g,v),w=n8(m.getBoundingClientRect()),j=s8([...b,...w]);l(j),h(!0)},[h]);return N.useEffect(()=>()=>f(),[f]),N.useEffect(()=>{if(c&&d){const x=y=>p(y,d),m=y=>p(y,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",m)}}},[c,d,p,f]),N.useEffect(()=>{if(o){const x=m=>{const y=m.target,g={x:m.clientX,y:m.clientY},v=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),b=!r8(g,o);v?f():b&&(f(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,o,u,f]),i.jsx(TC,{...e,ref:a})}),[X6,Q6]=Fp(EC,{isInside:!1}),J6=RD("TooltipContent"),TC=N.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,c=$p(hl,n),u=zb(n),{onClose:d}=c;return N.useEffect(()=>(document.addEventListener(K1,d),()=>document.removeEventListener(K1,d)),[d]),N.useEffect(()=>{if(c.trigger){const h=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),i.jsx(Gu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:i.jsxs(jC,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(J6,{children:r}),i.jsx(X6,{scope:n,isInside:!0,children:i.jsx(n3,{id:c.contentId,role:"tooltip",children:s||r})})]})})});CC.displayName=hl;
536var AC="TooltipArrow",Z6=N.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=zb(n);return Q6(AC,n).isInside?null:i.jsx(NC,{...s,...r,ref:t})});Z6.displayName=AC;function e8(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,s,a)){case a:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function t8(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function n8(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function r8(e,t){const{x:n,y:r}=e;let s=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],u=l.x,d=l.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function s8(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),i8(t)}function i8(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(s.y-o.y)>=(a.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(s.y-o.y)>=(a.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var a8=_C,PC=CC;const o8=a8,l8=N.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(PC,{ref:r,sideOffset:t,className:Pe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));l8.displayName=PC.displayName;var kl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},va=typeof window>"u"||"Deno"in globalThis;function on(){}function c8(e,t){return typeof e=="function"?e(t):e}function ty(e){return typeof e=="number"&&e>=0&&e!==1/0}function OC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function mi(e,t){return typeof e=="function"?e(t):e}function qn(e,t){return typeof e=="function"?e(t):e}function G1(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==Bb(o,t.options))return!1}else if(!pu(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||a&&!a(t))}function Y1(e,t){const{exact:n,status:r,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ba(t.options.mutationKey)!==ba(a))return!1}else if(!pu(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Bb(e,t){return((t==null?void 0:t.queryKeyHashFn)||ba)(e)}function ba(e){return JSON.stringify(e,(t,n)=>ny(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function pu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pu(e[n],t[n])):!1}function RC(e,t){if(e===t)return e;const n=X1(e)&&X1(t);if(n||ny(e)&&ny(t)){const r=n?e:Object.keys(e),s=r.length,a=n?t:Object.keys(t),o=a.length,l=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:a[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=RC(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return s===o&&u===s?e:l}return t}function Ef(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function X1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ny(e){if(!Q1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;
vendor: 31,423 bytes, line 536
536return!(!Q1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Q1(e){return Object.prototype.toString.call(e)==="[object Object]"}function u8(e){return new Promise(t=>{setTimeout(t,e)})}function ry(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?RC(e,t):t}function d8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function h8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ub=Symbol();function MC(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ub?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function DC(e,t){return typeof e=="function"?e(...t):!!e}var Zi,Ks,Fo,R2,f8=(R2=class extends kl{constructor(){super();ke(this,Zi);ke(this,Ks);ke(this,Fo);fe(this,Fo,t=>{if(!va&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,Ks)||this.setEventListener(K(this,Fo))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Ks))==null||t.call(this),fe(this,Ks,void 0))}setEventListener(t){var n;fe(this,Fo,t),(n=K(this,Ks))==null||n.call(this),fe(this,Ks,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(this,Zi)!==t&&(fe(this,Zi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof K(this,Zi)=="boolean"?K(this,Zi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zi=new WeakMap,Ks=new WeakMap,Fo=new WeakMap,R2),qb=new f8,$o,Gs,zo,M2,p8=(M2=class extends kl{constructor(){super();ke(this,$o,!0);ke(this,Gs);ke(this,zo);fe(this,zo,t=>{if(!va&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){K(this,Gs)||this.setEventListener(K(this,zo))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Gs))==null||t.call(this),fe(this,Gs,void 0))}setEventListener(t){var n;fe(this,zo,t),(n=K(this,Gs))==null||n.call(this),fe(this,Gs,t(this.setOnline.bind(this)))}setOnline(t){K(this,$o)!==t&&(fe(this,$o,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return K(this,$o)}},$o=new WeakMap,Gs=new WeakMap,zo=new WeakMap,M2),Cf=new p8;function sy(){let e,t;const n=new Promise((s,a)=>{e=s,t=a});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function m8(e){return Math.min(1e3*2**e,3e4)}function IC(e){return(e??"online")==="online"?Cf.isOnline():!0}var LC=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function og(e){return e instanceof LC}function FC(e){let t=!1,n=0,r=!1,s;const a=sy(),o=m=>{var y;r||(f(new LC(m)),(y=e.abort)==null||y.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>qb.isFocused()&&(e.networkMode==="always"||Cf.isOnline())&&e.canRun(),d=()=>IC(e.networkMode)&&e.canRun(),h=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),s==null||s(),a.resolve(m))},f=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),s==null||s(),a.reject(m))},p=()=>new Promise(m=>{var y;s=g=>{(r||u())&&m(g)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),x=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(h).catch(g=>{var E;if(r)return;const v=e.retry??(va?0:3),b=e.retryDelay??m8,w=typeof b=="function"?b(n,g):b,j=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,g);if(t||!j){f(g);return}n++,(E=e.onFail)==null||E.call(e,n,g),u8(w).then(()=>u()?void 0:p()).then(()=>{t?f(g):x()})})};return{promise:a,cancel:o,continue:()=>(s==null||s(),a),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?x():p().then(x),a)}}var g8=e=>setTimeout(e,0);function x8(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=g8;const a=l=>{t?e.push(l):s(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var Ct=x8(),ea,D2,$C=(D2=class{constructor(){ke(this,ea)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ty(this.gcTime)&&fe(this,ea,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(va?1/0:5*60*1e3))}clearGcTimeout(){K(this,ea)&&(clearTimeout(K(this,ea)),fe(this,ea,void 0))}},ea=new WeakMap,D2),Bo,ta,Un,na,Qt,$u,ra,dr,Xr,I2,y8=(I2=class extends $C{constructor(t){super();ke(this,dr);ke(this,Bo);ke(this,ta);ke(this,Un);ke(this,na);ke(this,Qt);ke(this,$u);ke(this,ra);fe(this,ra,!1),fe(this,$u,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,na,t.client),fe(this,Un,K(this,na).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,Bo,v8(this.options)),this.state=t.state??K(this,Bo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=K(this,Qt))==null?void 0:t.promise}setOptions(t){this.options={...K(this,$u),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&K(this,Un).remove(this)}setData(t,n){const r=ry(this.state.data,t,this.options);return De(this,dr,Xr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){De(this,dr,Xr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=K(this,Qt))==null?void 0:r.promise;return(s=K(this,Qt))==null||s.cancel(t),n?n.then(on).catch(on):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(K(this,Bo))}isActive(){return this.observers.some(t=>qn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ub||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>mi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!OC(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Qt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Qt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),K(this,Un).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(K(this,Qt)&&(K(this,ra)?K(this,Qt).cancel({revert:!0}):K(this,Qt).cancelRetry()),this.scheduleGc()),K(this,Un).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,dr,Xr).call(this,{type:"invalidate"})}fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,Qt))return K(this,Qt).continueRetry(),K(this,Qt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(fe(this,ra,!0),r.signal)})},a=()=>{const f=MC(this.options,n),x=(()=>{const m={client:K(this,na),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return fe(this,ra,!1),this.options.persister?this.options.persister(f,x,this):f(x)},l=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:K(this,na),state:this.state,fetchFn:a};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(l,this),fe(this,ta,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&De(this,dr,Xr).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=f=>{var p,x,m,y;og(f)&&f.silent||De(this,dr,Xr).call(this,{type:"error",error:f}),og(f)||((x=(p=K(this,Un).config).onError)==null||x.call(p,f,this),(y=(m=K(this,Un).config).onSettled)==null||y.call(m,this.state.data,f,this)),this.scheduleGc()};return fe(this,Qt,FC({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,x,m,y;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){c(g);return}(x=(p=K(this,Un).config).onSuccess)==null||x.call(p,f,this),(y=(m=K(this,Un).config).onSettled)==null||y.call(m,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,p)=>{De(this,dr,Xr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{De(this,dr,Xr).call(this,{type:"pause"})},onContinue:()=>{De(this,dr,Xr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),K(this,Qt).start()}},Bo=new WeakMap,ta=new WeakMap,Un=new WeakMap,na=new WeakMap,Qt=new WeakMap,$u=new WeakMap,ra=new WeakMap,dr=new WeakSet,Xr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...zC(r.data,this.options),fetchMeta:t.meta??null};case"success":return fe(this,ta,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return og(s)&&s.revert&&K(this,ta)?{...K(this,ta),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),K(this,Un).notify({query:this,type:"updated",action:t})})},I2);function zC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:IC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function v8(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Rr,L2,b8=(L2=class extends kl{constructor(t={}){super();ke(this,Rr);this.config=t,fe(this,Rr,new Map)}build(t,n,r){const s=n.queryKey,a=n.queryHash??Bb(s,n);let o=this.get(a);return o||(o=new y8({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){K(this,Rr).has(t.queryHash)||(K(this,Rr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=K(this,Rr).get(t.queryHash);n&&(t.destroy(),n===t&&K(this,Rr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,Rr).get(t)}getAll(){return[...K(this,Rr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>G1(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>G1(t,r)):n}notify(t){Ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Rr=new WeakMap,L2),Mr,rn,sa,Dr,Ds,F2,w8=(F2=class extends $C{constructor(t){super();ke(this,Dr);ke(this,Mr);ke(this,rn);ke(this,sa);this.mutationId=t.mutationId,fe(this,rn,t.mutationCache),fe(this,Mr,[]),this.state=t.state||BC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){K(this,Mr).includes(t)||(K(this,Mr).push(t),this.clearGcTimeout(),K(this,rn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Mr,K(this,Mr).filter(n=>n!==t)),this.scheduleGc(),K(this,rn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,Mr).length||(this.state.status==="pending"?this.scheduleGc():K(this,rn).remove(this))}continue(){var t;return((t=K(this,sa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,l,c,u,d,h,f,p,x,m,y,g,v,b,w,j,E,k,S;const n=()=>{De(this,Dr,Ds).call(this,{type:"continue"})};fe(this,sa,FC({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,C)=>{De(this,Dr,Ds).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{De(this,Dr,Ds).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>K(this,rn).canRun(this)}));const r=this.state.status==="pending",s=!K(this,sa).canStart();try{if(r)n();else{De(this,Dr,Ds).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(a=K(this,rn).config).onMutate)==null?void 0:o.call(a,t,this));const C=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));C!==this.state.context&&De(this,Dr,Ds).call(this,{type:"pending",context:C,variables:t,isPaused:s})}const A=await K(this,sa).start();return await((d=(u=K(this,rn).config).onSuccess)==null?void 0:d.call(u,A,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,A,t,this.state.context)),await((x=(p=K(this,rn).config).onSettled)==null?void 0:x.call(p,A,null,this.state.variables,this.state.context,this)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,A,null,t,this.state.context)),De(this,Dr,Ds).call(this,{type:"success",data:A}),A}catch(A){try{throw await((v=(g=K(this,rn).config).onError)==null?void 0:v.call(g,A,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,A,t,this.state.context)),await((E=(j=K(this,rn).config).onSettled)==null?void 0:E.call(j,void 0,A,this.state.variables,this.state.context,this)),await((S=(k=this.options).onSettled)==null?void 0:S.call(k,void 0,A,t,this.state.context)),A}finally{De(this,Dr,Ds).call(this,{type:"error",error:A})}}finally{K(this,rn).runNext(this)}}},Mr=new WeakMap,rn=new WeakMap,sa=new WeakMap,Dr=new WeakSet,Ds=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ct.batch(()=>{K(this,Mr).forEach(r=>{r.onMutationUpdate(t)}),K(this,rn).notify({mutation:this,type:"updated",action:t})})},F2);function BC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var is,hr,zu,$2,j8=($2=class extends kl{constructor(t={}){super();ke(this,is);ke(this,hr);ke(this,zu);this.config=t,fe(this,is,new Set),fe(this,hr,new Map),fe(this,zu,0)}build(t,n,r){const s=new w8({mutationCache:this,mutationId:++jd(this,zu)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){K(this,is).add(t);const n=Vd(t);if(typeof n=="string"){const r=K(this,hr).get(n);r?r.push(t):K(this,hr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(K(this,is).delete(t)){const n=Vd(t);if(typeof n=="string"){const r=K(this,hr).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&K(this,hr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Vd(t);if(typeof n=="string"){const r=K(this,hr).get(n),s=r==null?void 0:r.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Vd(t);if(typeof n=="string"){const s=(r=K(this,hr).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ct.batch(()=>{K(this,is).forEach(t=>{this.notify({type:"removed",mutation:t})}),K(this,is).clear(),K(this,hr).clear()})}getAll(){return Array.from(K(this,is))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Y1(n,r))}findAll(t={}){return this.getAll().filter(n=>Y1(t,n))}notify(t){Ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(on))))}},is=new WeakMap,hr=new WeakMap,zu=new WeakMap,$2);function Vd(e){var t;return(t=e.options.scope)==null?void 0:t.id}function J1(e){return{onFetch:(t,n)=>{var d,h,f,p,x;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((x=t.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const y=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=MC(t.options,t.fetchOptions),v=async(b,w,j)=>{if(m)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const k=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:w,direction:j?"backward":"forward",meta:t.options.meta};return y(T),T})(),S=await g(k),{maxPages:A}=t.options,C=j?h8:d8;return{pages:C(b.pages,S,A),pageParams:C(b.pageParams,w,A)}};if(s&&a.length){const b=s==="backward",w=b?N8:Z1,j={pages:a,pageParams:o},E=w(r,j);l=await v(j,E,b)}else{const b=e??a.length;do{const w=c===0?o[0]??r.initialPageParam:Z1(r,l);if(c>0&&w==null)break;l=await v(l,w),c++}while(c<b)}return l};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Z1(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function N8(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var xt,Ys,Xs,Uo,qo,Qs,Vo,Wo,z2,k8=(z2=class{constructor(e={}){ke(this,xt);ke(this,Ys);ke(this,Xs);ke(this,Uo);ke(this,qo);ke(this,Qs);ke(this,Vo);ke(this,Wo);fe(this,xt,e.queryCache||new b8),fe(this,Ys,e.mutationCache||new j8),fe(this,Xs,e.defaultOptions||{}),fe(this,Uo,new Map),fe(this,qo,new Map),fe(this,Qs,0)}mount(){jd(this,Qs)._++,K(this,Qs)===1&&(fe(this,Vo,qb.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,xt).onFocus())})),fe(this,Wo,Cf.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,xt).onOnline())})))}unmount(){var e,t;jd(this,Qs)._--,K(this,Qs)===0&&((e=K(this,Vo))==null||e.call(this),fe(this,Vo,void 0),(t=K(this,Wo))==null||t.call(this),fe(this,Wo,void 0))}isFetching(e){return K(this,xt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,Ys).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,xt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=K(this,xt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(mi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return K(this,xt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=K(this,xt).get(r.queryHash),a=s==null?void 0:s.state.data,o=c8(t,a);if(o!==void 0)return K(this,xt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ct.batch(()=>K(this,xt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,xt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,xt);Ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,xt);return Ct.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ct.batch(()=>K(this,xt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(on).catch(on)}invalidateQueries(e,t={}){return Ct.batch(()=>(K(this,xt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ct.batch(()=>K(this,xt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,n);return n.throwOnError||(a=a.catch(on)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(on)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,xt).build(this,t);return n.isStaleByTime(mi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(on).catch(on)}fetchInfiniteQuery(e){return e.behavior=J1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(on).catch(on)}ensureInfiniteQueryData(e){return e.behavior=J1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cf.isOnline()?K(this,Ys).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,xt)}getMutationCache(){return K(this,Ys)}getDefaultOptions(){return K(this,Xs)}setDefaultOptions(e){fe(this,Xs,e)}setQueryDefaults(e,t){K(this,Uo).set(ba(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,Uo).values()],n={};return t.forEach(r=>{pu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){K(this,qo).set(ba(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,qo).values()],n={};return t.forEach(r=>{pu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,Xs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ub&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,Xs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,xt).clear(),K(this,Ys).clear()}},xt=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,Uo=new WeakMap,qo=new WeakMap,Qs=new WeakMap,Vo=new WeakMap,Wo=new WeakMap,z2),xn,$e,Bu,sn,ia,Ho,Js,Zs,Uu,Ko,Go,aa,oa,ei,Yo,qe,xc,iy,ay,oy,ly,cy,uy,dy,UC,B2,S8=(B2=class extends kl{constructor(t,n){super();ke(this,qe);ke(this,xn);ke(this,$e);ke(this,Bu);ke(this,sn);ke(this,ia);ke(this,Ho);ke(this,Js);ke(this,Zs);ke(this,Uu);ke(this,Ko);ke(this,Go);ke(this,aa);ke(this,oa);ke(this,ei);ke(this,Yo,new Set);this.options=n,fe(this,xn,t),fe(this,Zs,null),fe(this,Js,sy()),this.options.experimental_prefetchInRender||K(this,Js).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,$e).addObserver(this),ej(K(this,$e),this.options)?De(this,qe,xc).call(this):this.updateResult(),De(this,qe,ly).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hy(K(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hy(K(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,qe,cy).call(this),De(this,qe,uy).call(this),K(this,$e).removeObserver(this)}setOptions(t){const n=this.options,r=K(this,$e);if(this.options=K(this,xn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qn(this.options.enabled,K(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,qe,dy).call(this),K(this,$e).setOptions(this.options),n._defaulted&&!Ef(this.options,n)&&K(this,xn).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,$e),observer:this});const s=this.hasListeners();s&&tj(K(this,$e),r,this.options,n)&&De(this,qe,xc).call(this),this.updateResult(),s&&(K(this,$e)!==r||qn(this.options.enabled,K(this,$e))!==qn(n.enabled,K(this,$e))||mi(this.options.staleTime,K(this,$e))!==mi(n.staleTime,K(this,$e)))&&De(this,qe,iy).call(this);const a=De(this,qe,ay).call(this);s&&(K(this,$e)!==r||qn(this.options.enabled,K(this,$e))!==qn(n.enabled,K(this,$e))||a!==K(this,ei))&&De(this,qe,oy).call(this,a)}getOptimisticResult(t){const n=K(this,xn).getQueryCache().build(K(this,xn),t),r=this.createResult(n,t);return E8(this,r)&&(fe(this,sn,r),fe(this,Ho,this.options),fe(this,ia,K(this,$e).state)),r}getCurrentResult(){return K(this,sn)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){K(this,Yo).add(t)}getCurrentQuery(){return K(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,xn).defaultQueryOptions(t),r=K(this,xn).getQueryCache().build(K(this,xn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return De(this,qe,xc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,sn)))}createResult(t,n){var A;const r=K(this,$e),s=this.options,a=K(this,sn),o=K(this,ia),l=K(this,Ho),u=t!==r?t.state:K(this,Bu),{state:d}=t;let h={...d},f=!1,p;if(n._optimisticResults){const C=this.hasListeners(),T=!C&&ej(t,n),_=C&&tj(t,r,n,s);(T||_)&&(h={...h,...zC(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:x,errorUpdatedAt:m,status:y}=h;p=h.data;let g=!1;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let C;a!=null&&a.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(C=a.data,g=!0):C=typeof n.placeholderData=="function"?n.placeholderData((A=K(this,Go))==null?void 0:A.state.data,K(this,Go)):n.placeholderData,C!==void 0&&(y="success",p=ry(a==null?void 0:a.data,C,n),f=!0)}if(n.select&&p!==void 0&&!g)if(a&&p===(o==null?void 0:o.data)&&n.select===K(this,Uu))p=K(this,Ko);else try{fe(this,Uu,n.select),p=n.select(p),p=ry(a==null?void 0:a.data,p,n),fe(this,Ko,p),fe(this,Zs,null)}catch(C){fe(this,Zs,C)}K(this,Zs)&&(x=K(this,Zs),p=K(this,Ko),m=Date.now(),y="error");const v=h.fetchStatus==="fetching",b=y==="pending",w=y==="error",j=b&&v,E=p!==void 0,S={status:y,fetchStatus:h.fetchStatus,isPending:b,isSuccess:y==="success",isError:w,isInitialLoading:j,isLoading:j,data:p,dataUpdatedAt:h.dataUpdatedAt,error:x,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:w&&!E,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&E,isStale:Vb(t,n),refetch:this.refetch,promise:K(this,Js),isEnabled:qn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=P=>{S.status==="error"?P.reject(S.error):S.data!==void 0&&P.resolve(S.data)},T=()=>{const P=fe(this,Js,S.promise=sy());C(P)},_=K(this,Js);switch(_.status){case"pending":t.queryHash===r.queryHash&&C(_);break;case"fulfilled":(S.status==="error"||S.data!==_.value)&&T();break;case"rejected":(S.status!=="error"||S.error!==_.reason)&&T();break}}return S}updateResult(){const t=K(this,sn),n=this.createResult(K(this,$e),this.options);if(fe(this,ia,K(this,$e).state),fe(this,Ho,this.options),K(this,ia).data!==void 0&&fe(this,Go,K(this,$e)),Ef(n,t))return;fe(this,sn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!K(this,Yo).size)return!0;const o=new Set(a??K(this,Yo));return this.options.throwOnError&&o.add("error"),Object.keys(K(this,sn)).some(l=>{const c=l;return K(this,sn)[c]!==t[c]&&o.has(c)})};De(this,qe,UC).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,qe,ly).call(this)}},xn=new WeakMap,$e=new WeakMap,Bu=new WeakMap,sn=new WeakMap,ia=new WeakMap,Ho=new WeakMap,Js=new WeakMap,Zs=new WeakMap,Uu=new WeakMap,Ko=new WeakMap,Go=new WeakMap,aa=new WeakMap,oa=new WeakMap,ei=new WeakMap,Yo=new WeakMap,qe=new WeakSet,xc=function(t){De(this,qe,dy).call(this);let n=K(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(on)),n},iy=function(){De(this,qe,cy).call(this);const t=mi(this.options.staleTime,K(this,$e));if(va||K(this,sn).isStale||!ty(t))return;const r=OC(K(this,sn).dataUpdatedAt,t)+1;fe(this,aa,setTimeout(()=>{K(this,sn).isStale||this.updateResult()},r))},ay=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(K(this,$e)):this.options.refetchInterval)??!1},oy=function(t){De(this,qe,uy).call(this),fe(this,ei,t),!(va||qn(this.options.enabled,K(this,$e))===!1||!ty(K(this,ei))||K(this,ei)===0)&&fe(this,oa,setInterval(()=>{(this.options.refetchIntervalInBackground||qb.isFocused())&&De(this,qe,xc).call(this)},K(this,ei)))},ly=function(){De(this,qe,iy).call(this),De(this,qe,oy).call(this,De(this,qe,ay).call(this))},cy=function(){K(this,aa)&&(clearTimeout(K(this,aa)),fe(this,aa,void 0))},uy=function(){K(this,oa)&&(clearInterval(K(this,oa)),fe(this,oa,void 0))},dy=function(){const t=K(this,xn).getQueryCache().build(K(this,xn),this.options);if(t===K(this,$e))return;const n=K(this,$e);fe(this,$e,t),fe(this,Bu,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},UC=function(t){Ct.batch(()=>
536{t.listeners&&this.listeners.forEach(n=>{n(K(this,sn))}),K(this,xn).getQueryCache().notify({query:K(this,$e),type:"observerResultsUpdated"})})},B2);function _8(e,t){return qn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ej(e,t){return _8(e,t)||e.state.data!==void 0&&hy(e,t,t.refetchOnMount)}function hy(e,t,n){if(qn(t.enabled,e)!==!1&&mi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Vb(e,t)}return!1}function tj(e,t,n,r){return(e!==t||qn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Vb(e,n)}function Vb(e,t){return qn(t.enabled,e)!==!1&&e.isStaleByTime(mi(t.staleTime,e))}function E8(e,t){return!Ef(e.getCurrentResult(),t)}var ti,ni,yn,as,hs,Rh,fy,U2,C8=(U2=class extends kl{constructor(n,r){super();ke(this,hs);ke(this,ti);ke(this,ni);ke(this,yn);ke(this,as);fe(this,ti,n),this.setOptions(r),this.bindMethods(),De(this,hs,Rh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=K(this,ti).defaultMutationOptions(n),Ef(this.options,r)||K(this,ti).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,yn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ba(r.mutationKey)!==ba(this.options.mutationKey)?this.reset():((s=K(this,yn))==null?void 0:s.state.status)==="pending"&&K(this,yn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,yn))==null||n.removeObserver(this)}onMutationUpdate(n){De(this,hs,Rh).call(this),De(this,hs,fy).call(this,n)}getCurrentResult(){return K(this,ni)}reset(){var n;(n=K(this,yn))==null||n.removeObserver(this),fe(this,yn,void 0),De(this,hs,Rh).call(this),De(this,hs,fy).call(this)}mutate(n,r){var s;return fe(this,as,r),(s=K(this,yn))==null||s.removeObserver(this),fe(this,yn,K(this,ti).getMutationCache().build(K(this,ti),this.options)),K(this,yn).addObserver(this),K(this,yn).execute(n)}},ti=new WeakMap,ni=new WeakMap,yn=new WeakMap,as=new WeakMap,hs=new WeakSet,Rh=function(){var r;const n=((r=K(this,yn))==null?void 0:r.state)??BC();fe(this,ni,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},fy=function(n){Ct.batch(()=>{var r,s,a,o,l,c,u,d;if(K(this,as)&&this.hasListeners()){const h=K(this,ni).variables,f=K(this,ni).context;(n==null?void 0:n.type)==="success"?((s=(r=K(this,as)).onSuccess)==null||s.call(r,n.data,h,f),(o=(a=K(this,as)).onSettled)==null||o.call(a,n.data,null,h,f)):(n==null?void 0:n.type)==="error"&&((c=(l=K(this,as)).onError)==null||c.call(l,n.error,h,f),(d=(u=K(this,as)).onSettled)==null||d.call(u,void 0,n.error,h,f))}this.listeners.forEach(h=>{h(K(this,ni))})})},U2),qC=N.createContext(void 0),nd=e=>{const t=N.useContext(qC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},T8=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(qC.Provider,{value:e,children:t})),VC=N.createContext(!1),A8=()=>N.useContext(VC);VC.Provider;function P8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var O8=N.createContext(P8()),R8=()=>N.useContext(O8),M8=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},D8=e=>{N.useEffect(()=>{e.clearReset()},[e])},I8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||DC(n,[e.error,r])),L8=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},F8=(e,t)=>e.isLoading&&e.isFetching&&!t,$8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,nj=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function z8(e,t,n){var h,f,p,x,m;const r=A8(),s=R8(),a=nd(),o=a.defaultQueryOptions(e);(f=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||f.call(h,o),o._optimisticResults=r?"isRestoring":"optimistic",L8(o),M8(o,s),D8(s);const l=!a.getQueryCache().get(o.queryHash),[c]=N.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(y=>{const g=d?c.subscribe(Ct.batchCalls(y)):on;return c.updateResult(),g},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),N.useEffect(()=>{c.setOptions(o)},[o,c]),$8(o,u))throw nj(o,c,s);if(I8({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((x=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||x.call(p,o,u),o.experimental_prefetchInRender&&!va&&F8(u,r)){const y=l?nj(o,c,s):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;y==null||y.catch(on).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function Lt(e,t){return z8(e,S8)}function B8(e,t){const n=nd(),[r]=N.useState(()=>new C8(n,e));N.useEffect(()=>{r.setOptions(e)},[r,e]);const s=N.useSyncExternalStore(N.useCallback(o=>r.subscribe(Ct.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=N.useCallback((o,l)=>{r.mutate(o,l).catch(on)},[r]);if(s.error&&DC(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}/** 537 * @remix-run/router v1.23.0 538 * 539 * Copyright (c) Remix Software Inc. 540 * 541 * This source code is licensed under the MIT license found in the 542 * LICENSE.md file in the root directory of this source tree. 543 * 544 * @license MIT 545 */function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mu.apply(this,arguments)}var ii;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ii||(ii={}));const rj="popstate";function U8(e){e===void 0&&(e={});function t(r,s){let{pathname:a,search:o,hash:l}=r.location;return py("",{pathname:a,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Tf(s)}return V8(t,n,null,e)}function kt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function WC(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function q8(){return Math.random().toString(36).substr(2,8)}function sj(e,t){return{usr:e.state,key:e.key,idx:t}}function py(e,t,n,r){return n===void 0&&(n=null),mu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Sl(t):t,{state:n,key:t&&t.key||r||q8()})}function Tf(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 Sl(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 V8(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:a=!1}=r,o=s.history,l=ii.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(mu({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){l=ii.Pop;let y=d(),g=y==null?null:y-u;u=y,c&&c({action:l,location:m.location,delta:g})}function f(y,g){l=ii.Push;let v=py(m.location,y,g);u=d()+1;let b=sj(v,u),w=m.createHref(v);try{o.pushState(b,"",w)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(w)}a&&c&&c({action:l,location:m.location,delta:1})}function p(y,g){l=ii.Replace;let v=py(m.location,y,g);u=d();let b=sj(v,u),w=m.createHref(v);o.replaceState(b,"",w),a&&c&&c({action:l,location:m.location,delta:0})}function x(y){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof y=="string"?y:Tf(y);return v=v.replace(/ $/,"%20"),kt(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let m={get action(){return l},get location(){return e(s,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(rj,h),c=y,()=>{s.removeEventListener(rj,h),c=null}},createHref(y){return t(s,y)},createURL:x,encodeLocation(y){let g=x(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:p,go(y){return o.go(y)}};return m}var ij;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ij||(ij={}));function W8(e,t,n){return n===void 0&&(n="/"),H8(e,t,n,!1)}function H8(e,t,n,r){let s=typeof t=="string"?Sl(t):t,a=Wb(s.pathname||"/",n);if(a==null)return null;let o=HC(e);K8(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=sF(a);l=nF(o[c],u,r)}return l}function HC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(kt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
545id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=gi([r,c.relativePath]),d=n.concat(c);a.children&&a.children.length>0&&(kt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),HC(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:eF(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))s(a,o);else for(let c of KC(a.path))s(a,o,c)}),t}function KC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return s?[a,""]:[a];let o=KC(r.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function K8(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:tF(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const G8=/^:[\w-]+$/,Y8=3,X8=2,Q8=1,J8=10,Z8=-2,aj=e=>e==="*";function eF(e,t){let n=e.split("/"),r=n.length;return n.some(aj)&&(r+=Z8),t&&(r+=X8),n.filter(s=>!aj(s)).reduce((s,a)=>s+(G8.test(a)?Y8:a===""?Q8:J8),r)}function tF(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function nF(e,t,n){let{routesMeta:r}=e,s={},a="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=a==="/"?t:t.slice(a.length)||"/",h=oj({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=oj({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 9,390 bytes, lines 545-554
545Object.assign(s,h.params),o.push({params:s,pathname:gi([a,h.pathname]),pathnameBase:lF(gi([a,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(a=gi([a,h.pathnameBase]))}return o}function oj(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=rF(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let a=s[0],o=a.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let m=l[h]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const x=l[h];return p&&!x?u[f]=void 0:u[f]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function rF(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),WC(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function sF(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return WC(!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 Wb(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 iF(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Sl(e):e;return{pathname:n?n.startsWith("/")?n:aF(n,t):t,search:cF(r),hash:uF(s)}}function aF(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function lg(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 <Link to="..."> and the router will parse it for you.'}function oF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function GC(e,t){let n=oF(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function YC(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Sl(e):(s=mu({},e),kt(!s.pathname||!s.pathname.includes("?"),lg("?","pathname","search",s)),kt(!s.pathname||!s.pathname.includes("#"),lg("#","pathname","hash",s)),kt(!s.search||!s.search.includes("#"),lg("#","search","hash",s)));let a=e===""||s.pathname==="",o=a?"/":s.pathname,l;if(o==null)l=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}l=h>=0?t[h]:"/"}let c=iF(s,l),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const gi=e=>e.join("/").replace(/\/\/+/g,"/"),lF=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cF=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,uF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function dF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const XC=["post","put","patch","delete"];new Set(XC);const hF=["get",...XC];new Set(hF);/** 546 * React Router v6.30.1 547 * 548 * Copyright (c) Remix Software Inc. 549 * 550 * This source code is licensed under the MIT license found in the 551 * LICENSE.md file in the root directory of this source tree. 552 * 553 * @license MIT 554 */function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gu.apply(this,arguments)}const Hb=N.createContext(null),fF=N.createContext(null),Pa=N.createContext(null),zp=N.createContext(null),Ss=N.createContext({outlet:null,matches:[],isDataRoute:!1}),QC=N.createContext(null);function pF(e,t){let{relative:n}=t===void 0?{}:t;rd()||kt(!1);let{basename:r,navigator:s}=N.useContext(Pa),{hash:a,pathname:o,search:l}=ZC(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:gi([r,o])),s.createHref({pathname:c,search:l,hash:a})}function rd(){return N.useContext(zp)!=null}function _s(){return rd()||kt(!1),N.useContext(zp).location}function JC(e){N.useContext(Pa).static||N.useLayoutEffect(e)}function Bp(){let{isDataRoute:e}=N.useContext(Ss);return e?TF():mF()}function mF(){rd()||kt(!1);let e=N.useContext(Hb),{basename:t,future:n,navigator:r}=N.useContext(Pa),{matches:s}=N.useContext(Ss),{pathname:a}=_s(),o=JSON.stringify(GC(s,n.v7_relativeSplatPath)),l=N.useRef(!1);return JC(()=>{l.current=!0}),N.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=YC(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:gi([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,a,e])}const gF=N.createContext(null);function xF(e){let t=N.useContext(Ss).outlet;return t&&N.createElement(gF.Provider,{value:e},t)}function _l(){let{matches:e}=N.useContext(Ss),t=e[e.length-1];return t?t.params:{}}function ZC(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=N.useContext(Pa),{matches:s}=N.useContext(Ss),{pathname:a}=_s(),o=JSON.stringify(GC(s,r.v7_relativeSplatPath));return N.useMemo(()=>YC(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function yF(e,t){return vF(e,t)}function vF(e,t,n,r){rd()||kt(!1);let{navigator:s}=N.useContext(Pa),{matches:a}=N.useContext(Ss),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=_s(),d;if(t){var h;let y=typeof t=="string"?Sl(t):t;c==="/"||(h=y.pathname)!=null&&h.startsWith(c)||kt(!1),d=y}else d=u;let f=d.pathname||"/",p=f;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let x=W8(e,{pathname:p}),m=kF(x&&x.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:gi([c,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:gi([c,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return t&&m?N.createElement(zp.Provider,{value:{location:gu({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ii.Pop}},m):m}function bF(){let e=CF(),t=dF(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:s},n):null,null)}const wF=N.createElement(bF,null);class jF extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?N.createElement(Ss.Provider,{value:this.props.routeContext},N.createElement(QC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function NF(e){let{routeContext:t,match:n,children:r}=e,s=N.useContext(Hb);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(Ss.Provider,{value:t},r)}function kF(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||kt(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:p}=n,x=h.route.loader&&f[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||x){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let p,x=!1,m=null,y=null;n&&(p=l&&h.route.id?l[h.route.id]:void 0,m=h.route.errorElement||wF,c&&(u<0&&f===0?(x=!0,y=null):u===f&&(x=!0,y=h.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,f+1)),v=()=>{let b;return p?b=m:x?b=y:h.route.Component?b=N.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=d,N.createElement(NF,{match:h,routeC
554ontext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?N.createElement(jF,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var eT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(eT||{}),Af=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Af||{});function SF(e){let t=N.useContext(Hb);return t||kt(!1),t}function _F(e){let t=N.useContext(fF);return t||kt(!1),t}function EF(e){let t=N.useContext(Ss);return t||kt(!1),t}function tT(e){let t=EF(),n=t.matches[t.matches.length-1];return n.route.id||kt(!1),n.route.id}function CF(){var e;let t=N.useContext(QC),n=_F(Af.UseRouteError),r=tT(Af.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function TF(){let{router:e}=SF(eT.UseNavigateStable),t=tT(Af.UseNavigateStable),n=N.useRef(!1);return JC(()=>{n.current=!0}),N.useCallback(function(s,a){a===void 0&&(a={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,gu({fromRouteId:t},a)))},[e,t])}function AF(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function nT(e){return xF(e.context)}function be(e){kt(!1)}function PF(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ii.Pop,navigator:a,static:o=!1,future:l}=e;rd()&&kt(!1);let c=t.replace(/^\/*/,"/"),u=N.useMemo(()=>({basename:c,navigator:a,static:o,future:gu({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof r=="string"&&(r=Sl(r));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:x="default"}=r,m=N.useMemo(()=>{let y=Wb(d,c);return y==null?null:{location:{pathname:y,search:h,hash:f,state:p,key:x},navigationType:s}},[c,d,h,f,p,x,s]);return m==null?null:N.createElement(Pa.Provider,{value:u},N.createElement(zp.Provider,{children:n,value:m}))}function OF(e){let{children:t,location:n}=e;return yF(my(t),n)}new Promise(()=>{});function my(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,s)=>{if(!N.isValidElement(r))return;let a=[...t,s];if(r.type===N.Fragment){n.push.apply(n,my(r.props.children,a));return}r.type!==be&&kt(!1),!r.props.index||!r.props.children||kt(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=my(r.props.children,a)),n.push(o)}),n}/** 555 * React Router DOM v6.30.1 556 * 557 * Copyright (c) Remix Software Inc. 558 * 559 * This source code is licensed under the MIT license found in the 560 * LICENSE.md file in the root directory of this source tree. 561 * 562 * @license MIT 563 */function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gy.apply(this,arguments)}function RF(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,a;for(a=0;a<r.length;a++)s=r[a],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function MF(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function DF(e,t){return e.button===0&&(!t||t==="_self")&&!MF(e)}const IF=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],LF="6";try{window.__reactRouterVersion=LF}catch{}const FF="startTransition",lj=Ov[FF];function $F(e){let{basename:t,children:n,future:r,window:s}=e,a=N.useRef();a.current==null&&(a.current=U8({window:s,v5Compat:!0}));let o=a.current,[l,c]=N.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=N.useCallback(h=>{u&&lj?lj(()=>c(h)):c(h)},[c,u]);return N.useLayoutEffect(()=>o.listen(d),[o,d]),N.useEffect(()=>AF(r),[r]),N.createElement(PF,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const zF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,he=N.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:a,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=RF(t,IF),{basename:p}=N.useContext(Pa),x,m=!1;if(typeof u=="string"&&BF.test(u)&&(x=u,zF))try{let b=new URL(window.location.href),w=u.startsWith("//")?new URL(b.protocol+u):new URL(u),j=Wb(w.pathname,p);w.origin===b.origin&&j!=null?u=j+w.search+w.hash:m=!0}catch{}let y=pF(u,{relative:s}),g=UF(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function v(b){r&&r(b),b.defaultPrevented||g(b)}return N.createElement("a",gy({},f,{href:x||y,onClick:m||a?r:v,ref:n,target:c}))});var cj;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(cj||(cj={}));var uj;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(uj||(uj={}));function UF(e,t){let{target:n,replace:r,state:s,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=Bp(),u=_s(),d=ZC(e,{relative:o});return N.useCallback(h=>{if(DF(h,n)){h.preventDefault();let f=r!==void 0?r:Tf(u)===Tf(d);c(e,{replace:f,state:s,preventScrollReset:a,relative:o,viewTransition:l})}},[u,c,d,r,s,n,e,a,o,l])}const Kb=N.createContext({});function Oa(e){const t=N.useRef(null);return t.current===null&&(t.current=e()),t.current}const rT=typeof window<"u",Gb=rT?N.useLayoutEffect:N.useEffect,Up=N.createContext(null);function Yb(e,t){e.indexOf(t)===-1&&e.push(t)}function Pf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function qF([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const s=n<0?e.length+n:n,[a]=e.splice(t,1);e.splice(s,0,a)}return e}const Wr=(e,t,n)=>n>t?t:n<e?e:n;let qp=()=>{},ki=()=>{};const js={},sT=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function iT(e){return typeof e=="object"&&e!==null}const aT=e=>/^0[^.\s]+$/u.test(e);function oT(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qn=e=>e,VF=(e,t)=>n=>t(e(n)),sd=(...e)=>e.reduce(VF),xu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Xb{constructor(){this.subscriptions=[]}add(t){return Yb(this.subscriptions,t),()=>Pf(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let a=0;a<s;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Jn=e=>e*1e3,Gn=e=>e/1e3;function lT(e,t){return t?e*(1e3/t):0}const cT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,WF=1e-7,HF=12;
vendor: 8,346 bytes, line 563
563function KF(e,t,n,r,s){let a,o,l=0;do o=t+(n-t)/2,a=cT(o,r,s)-e,a>0?n=o:t=o;while(Math.abs(a)>WF&&++l<HF);return o}function id(e,t,n,r){if(e===t&&n===r)return Qn;const s=a=>KF(a,0,1,e,n);return a=>a===0||a===1?a:cT(s(a),t,r)}const uT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dT=e=>t=>1-e(1-t),hT=id(.33,1.53,.69,.99),Qb=dT(hT),fT=uT(Qb),pT=e=>(e*=2)<1?.5*Qb(e):.5*(2-Math.pow(2,-10*(e-1))),Jb=e=>1-Math.sin(Math.acos(e)),mT=dT(Jb),gT=uT(Jb),GF=id(.42,0,1,1),YF=id(0,0,.58,1),xT=id(.42,0,.58,1),XF=e=>Array.isArray(e)&&typeof e[0]!="number",yT=e=>Array.isArray(e)&&typeof e[0]=="number",dj={linear:Qn,easeIn:GF,easeInOut:xT,easeOut:YF,circIn:Jb,circInOut:gT,circOut:mT,backIn:Qb,backInOut:fT,backOut:hT,anticipate:pT},QF=e=>typeof e=="string",hj=e=>{if(yT(e)){ki(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return id(t,n,r,s)}else if(QF(e))return ki(dj[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),dj[e];return e},Wd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],fj={value:null,addProjectionMetrics:null};function JF(e,t){let n=new Set,r=new Set,s=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){o.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,f=!1,p=!1)=>{const m=p&&s?n:r;return f&&o.add(h),m.has(h)||m.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(l=h,s){a=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),t&&fj.value&&fj.value.frameloop[t].push(c),c=0,n.clear(),s=!1,a&&(a=!1,d.process(h))}};return d}const ZF=40;function vT(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Wd.reduce((b,w)=>(b[w]=JF(a,t?w:void 0),b),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:p,postRender:x}=o,m=()=>{const b=js.useManualTiming?s.timestamp:performance.now();n=!1,js.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,ZF),1)),s.timestamp=b,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),p.process(s),x.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,s.isProcessing||e(m)};return{schedule:Wd.reduce((b,w)=>{const j=o[w];return b[w]=(E,k=!1,S=!1)=>(n||y(),j.schedule(E,k,S)),b},{}),cancel:b=>{for(let w=0;w<Wd.length;w++)o[Wd[w]].cancel(b)},state:s,steps:o}}const{schedule:Ye,cancel:Ns,state:qt,steps:cg}=vT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qn,!0);let Mh;function e$(){Mh=void 0}const ln={now:()=>(Mh===void 0&&ln.set(qt.isProcessing||js.useManualTiming?qt.timestamp:performance.now()),Mh),set:e=>{Mh=e,queueMicrotask(e$)}},bT=e=>t=>typeof t=="string"&&t.startsWith(e),wT=bT("--"),t$=bT("var(--"),Zb=e=>t$(e)?n$.test(e.split("/*")[0].trim()):!1,n$=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function pj(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const El={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},yu={...El,transform:e=>Wr(0,1,e)},Hd={...El,default:1},Dc=e=>Math.round(e*1e5)/1e5,e0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function r$(e){return e==null}const s$=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,t0=(e,t)=>n=>!!(typeof n=="string"&&s$.test(n)&&n.startsWith(e)||t&&!r$(n)&&Object.prototype.hasOwnProperty.call(n,t)),jT=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,a,o,l]=r.match(e0);return{[e]:parseFloat(s),[t]:parseFloat(a),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},i$=e=>Wr(0,255,e),ug={...El,transform:e=>Math.round(i$(e))},Xi={test:t0("rgb","red"),parse:jT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ug.transform(e)+", "+ug.transform(t)+", "+ug.transform(n)+", "+Dc(yu.transform(r))+")"};function a$(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const xy={test:t0("#"),parse:a$,transform:Xi.transform},ad=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Is=ad("deg"),qr=ad("%"),me=ad("px"),o$=ad("vh"),l$=ad("vw"),mj={...qr,parse:e=>qr.parse(e)/100,transform:e=>qr.transform(e*100)},yo={test:t0("hsl","hue"),parse:jT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qr.transform(Dc(t))+", "+qr.transform(Dc(n))+", "+Dc(yu.transform(r))+")"},jt={test:e=>Xi.test(e)||xy.test(e)||yo.test(e),parse:e=>Xi.test(e)?Xi.parse(e):yo.test(e)?yo.parse(e):xy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xi.transform(e):yo.transform(e),getAnimatableNone:e=>{const t=jt.parse(e);return t.alpha=0,jt.transform(t)}},c$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function u$(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(e0))==null?void 0:t.length)||0)+(((n=e.match(c$))==null?void 0:n.length)||0)>0}const NT="number",kT="color",d$="var",h$="var(",gj="${}",f$=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function vu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let a=0;const l=t.replace(f$,c=>(jt.test(c)?(r.color.push(a),s.push(kT),n.push(jt.parse(c))):c.startsWith(h$)?(r.var.push(a),s.push(d$),n.push(c)):(r.number.push(a),s.push(NT),n.push(parseFloat(c))),++a,gj)).split(gj);return{values:n,split:l,indexes:r,types:s}}function ST(e){return vu(e).values}function _T(e){const{split:t,types:n}=vu(e),r=t.length;return s=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],s[o]!==void 0){const l=n[o];l===NT?a+=Dc(s[o]):l===kT?a+=jt.transform(s[o]):a+=s[o]}return a}}const p$=e=>typeof e=="number"?0:jt.test(e)?jt.getAnimatableNone(e):e;function m$(e){const t=ST(e);return _T(e)(t.map(p$))}const yr={test:u$,parse:ST,createTransformer:_T,getAnimatableNone:m$};function dg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function g$({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,a=0,o=0;if(!t)s=a=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=dg(c,l,e+1/3),a=dg(c,l,e),o=dg(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Of(e,t){return n=>n>0?t:e}const at=(e,t,n)=>e+(t-e)*n,hg=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},x$=[xy,Xi,yo],y$=e=>x$.find(t=>t.test(e));function xj(e){const t=y$(e);if(qp(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===yo&&(n=g$(n)),n}const yj=(e,t)=>{const n=xj(e),r=xj(t);if(!n||!r)return Of(e,t);const s={...n};return a=>(s.red=hg(n.red,r.red,a),s.green=hg(n.green,r.green,a),s.blue=hg(n.blue,r.blue,a),s.alpha=at(n.alpha,r.alpha,a),Xi.transform(s))},yy=new Set(["none","hidden"]);function v$(e,t){return yy.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function b$(e,t){return n=>at(e,t,n)}function n0(e){return typeof e=="number"?b$:typeof e=="string"?Zb(e)?Of:jt.test(e)?yj:N$:Array.isArray(e)?ET:typeof e=="object"?jt.test(e)?yj:w$:Of}function ET(e,t){const n=[...e],r=n.length,s=e.map((a,o)=>n0(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=s[o](a);return n}}function w$(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=n0(e[s])(e[s],t[s]));return s=>{for(const a in r)n[a]=r[a](s);return n}}function j$(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],o=e.indexes[a][r[a]],l=e.values[o]??0;n[s]=l,r[a]++}return n}const N$=(e,t)=>{const n=yr.createTransformer(t),r=vu(e),s=vu(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?yy.has(e)&&!s.values.length||yy.has(t)&&!r.values.length?v$(e,t):sd(ET(j$(r,s),s.values),n):(qp(!0,`Complex values '${e}' and '${t}
563' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Of(e,t))};function CT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?at(e,t,n):n0(e)(e,t)}const k$=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ye.update(t,n),stop:()=>Ns(t),now:()=>qt.isProcessing?qt.timestamp:ln.now()}},TT=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let a=0;a<s;a++)r+=Math.round(e(a/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Rf=2e4;function r0(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Rf;)t+=n,r=e.next(t);return t>=Rf?1/0:t}function S$(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(r0(r),Rf);return{type:"keyframes",ease:a=>r.next(s*a).value/t,duration:Gn(s)}}const _$=5;function AT(e,t,n){const r=Math.max(t-_$,0);return lT(n-e(r),t-r)}const ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},fg=.001;function E$({duration:e=ct.duration,bounce:t=ct.bounce,velocity:n=ct.velocity,mass:r=ct.mass}){let s,a;qp(e<=Jn(ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Wr(ct.minDamping,ct.maxDamping,o),e=Wr(ct.minDuration,ct.maxDuration,Gn(e)),o<1?(s=u=>{const d=u*o,h=d*e,f=d-n,p=vy(u,o),x=Math.exp(-h);return fg-f/p*x},a=u=>{const h=u*o*e,f=h*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,x=Math.exp(-h),m=vy(Math.pow(u,2),o);return(-s(u)+fg>0?-1:1)*((f-p)*x)/m}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-fg+d*h},a=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=T$(s,a,l);if(e=Jn(e),isNaN(c))return{stiffness:ct.stiffness,damping:ct.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const C$=12;function T$(e,t,n){let r=n;for(let s=1;s<C$;s++)r=r-e(r)/t(r);return r}function vy(e,t){return e*Math.sqrt(1-t*t)}const A$=["duration","bounce"],P$=["stiffness","damping","mass"];function vj(e,t){return t.some(n=>e[n]!==void 0)}function O$(e){let t={velocity:ct.velocity,stiffness:ct.stiffness,damping:ct.damping,mass:ct.mass,isResolvedFromDuration:!1,...e};if(!vj(e,P$)&&vj(e,A$))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,a=2*Wr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ct.mass,stiffness:s,damping:a}}else{const n=E$(e);t={...t,...n,mass:ct.mass},t.isResolvedFromDuration=!0}return t}function Mf(e=ct.visualDuration,t=ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=O$({...n,velocity:-Gn(n.velocity||0)}),x=f||0,m=u/(2*Math.sqrt(c*d)),y=o-a,g=Gn(Math.sqrt(c/d)),v=Math.abs(y)<5;r||(r=v?ct.restSpeed.granular:ct.restSpeed.default),s||(s=v?ct.restDelta.granular:ct.restDelta.default);let b;if(m<1){const j=vy(g,m);b=E=>{const k=Math.exp(-m*g*E);return o-k*((x+m*g*y)/j*Math.sin(j*E)+y*Math.cos(j*E))}}else if(m===1)b=j=>o-Math.exp(-g*j)*(y+(x+g*y)*j);else{const j=g*Math.sqrt(m*m-1);b=E=>{const k=Math.exp(-m*g*E),S=Math.min(j*E,300);return o-k*((x+m*g*y)*Math.sinh(S)+j*y*Math.cosh(S))/j}}const w={calculatedDuration:p&&h||null,next:j=>{const E=b(j);if(p)l.done=j>=h;else{let k=j===0?x:0;m<1&&(k=j===0?Jn(x):AT(b,j,E));const S=Math.abs(k)<=r,A=Math.abs(o-E)<=s;l.done=S&&A}return l.value=l.done?o:E,l},toString:()=>{const j=Math.min(r0(w),Rf),E=TT(k=>w.next(j*k).value,j,30);return j+"ms "+E},toTransition:()=>{}};return w}Mf.applyToOptions=e=>{const t=S$(e,100,Mf);return e.ease=t.ease,e.duration=Jn(t.duration),e.type="keyframes",e};function by({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},p=S=>l!==void 0&&S<l||c!==void 0&&S>c,x=S=>l===void 0?c:c===void 0||Math.abs(l-S)<Math.abs(c-S)?l:c;let m=n*t;const y=h+m,g=o===void 0?y:o(y);g!==y&&(m=g-h);const v=S=>-m*Math.exp(-S/r),b=S=>g+v(S),w=S=>{const A=v(S),C=b(S);f.done=Math.abs(A)<=u,f.value=f.done?g:C};let j,E;const k=S=>{p(f.value)&&(j=S,E=Mf({keyframes:[f.value,x(f.value)],velocity:AT(b,S,f.value),damping:s,stiffness:a,restDelta:u,restSpeed:d}))};return k(0),{calculatedDuration:null,next:S=>{let A=!1;return!E&&j===void 0&&(A=!0,w(S),k(S)),j!==void 0&&S>=j?E.next(S-j):(!A&&w(S),f)}}}function R$(e,t,n){const r=[],s=n||js.mix||CT,a=e.length-1;for(let o=0;o<a;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Qn:t;l=sd(c,l)}r.push(l)}return r}function PT(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const a=e.length;if(ki(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=R$(t,r,s),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=xu(e[h],e[h+1],d);return l[h](f)};return n?d=>u(Wr(e[0],e[a-1],d)):u}function M$(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=xu(0,t,r);e.push(at(n,1,s))}}function D$(e){const t=[0];return M$(t,e.length-1),t}function I$(e,t){return e.map(n=>n*t)}function L$(e,t){return e.map(()=>t||xT).splice(0,e.length-1)}function Ic({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=XF(r)?r.map(hj):hj(r),a={done:!1,value:t[0]},o=I$(n&&n.length===t.length?n:D$(t),e),l=PT(o,t,{ease:Array.isArray(s)?s:L$(t,s)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const F$=e=>e!==null;function s0(e,{repeat:t,repeatType:n="loop"},r,s=1){const a=e.filter(F$),l=s<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||r===void 0?a[l]:r}const $$={decay:by,inertia:by,tween:Ic,keyframes:Ic,spring:Mf};function OT(e){typeof e.type=="string"&&(e.type=$$[e.type])}class i0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const z$=e=>e/100;class a0 extends i0{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ln.now()&&this.tick(ln.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;OT(t);const{type:n=Ic,repeat:r=0,repeatDelay:s=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const c=n||Ic;c!==Ic&&typeof l[0]!="number"&&(this.mixKeyframes=sd(z$,CT(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=r0(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:x,onUp
vendor: 5,268 bytes, line 563
563date:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let b=this.currentTime,w=r;if(h){const S=Math.min(this.currentTime,s)/l;let A=Math.floor(S),C=S%1;!C&&S>=1&&(C=1),C===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(f==="reverse"?(C=1-C,p&&(C-=p/l)):f==="mirror"&&(w=o)),b=Wr(0,1,C)*l}const j=v?{done:!1,value:d[0]}:w.next(b);a&&(j.value=a(j.value));let{done:E}=j;!v&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&x!==by&&(j.value=s0(d,this.options,y,this.speed)),m&&m(j.value),k&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return Gn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Gn(t)}get time(){return Gn(this.currentTime)}set time(t){var n;t=Jn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ln.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Gn(this.currentTime))}play(){var s,a;if(this.isStopped)return;const{driver:t=k$,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(s=this.options).onPlay)==null||a.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ln.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function B$(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Qi=e=>e*180/Math.PI,wy=e=>{const t=Qi(Math.atan2(e[1],e[0]));return jy(t)},U$={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:wy,rotateZ:wy,skewX:e=>Qi(Math.atan(e[1])),skewY:e=>Qi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},jy=e=>(e=e%360,e<0&&(e+=360),e),bj=wy,wj=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jj=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),q$={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wj,scaleY:jj,scale:e=>(wj(e)+jj(e))/2,rotateX:e=>jy(Qi(Math.atan2(e[6],e[5]))),rotateY:e=>jy(Qi(Math.atan2(-e[2],e[0]))),rotateZ:bj,rotate:bj,skewX:e=>Qi(Math.atan(e[4])),skewY:e=>Qi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ny(e){return e.includes("scale")?1:0}function ky(e,t){if(!e||e==="none")return Ny(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=q$,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=U$,s=l}if(!s)return Ny(t);const a=r[t],o=s[1].split(",").map(W$);return typeof a=="function"?a(o):o[a]}const V$=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ky(n,t)};function W$(e){return parseFloat(e.trim())}const Cl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tl=new Set(Cl),Nj=e=>e===El||e===me,H$=new Set(["x","y","z"]),K$=Cl.filter(e=>!H$.has(e));function G$(e){const t=[];return K$.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ai={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ky(t,"x"),y:(e,{transform:t})=>ky(t,"y")};ai.translateX=ai.x;ai.translateY=ai.y;const ha=new Set;let Sy=!1,_y=!1,Ey=!1;function RT(){if(_y){const e=Array.from(ha).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=G$(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);
vendor: 1,610 bytes, line 563
563s&&s.forEach(([a,o])=>{var l;(l=r.getValue(a))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_y=!1,Sy=!1,ha.forEach(e=>e.complete(Ey)),ha.clear()}function MT(){ha.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_y=!0)})}function Y$(){Ey=!0,MT(),RT(),Ey=!1}class o0{constructor(t,n,r,s,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ha.add(this),Sy||(Sy=!0,Ye.read(MT),Ye.resolveKeyframes(RT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const a=s==null?void 0:s.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),s&&a===void 0&&s.set(t[0])}B$(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ha.delete(this)}cancel(){this.state==="scheduled"&&(ha.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const X$=e=>e.startsWith("--");function Q$(e,t,n){X$(t)?e.style.setProperty(t,n):e.style[t]=n}const J$={};function DT(e,t){const n=oT(e);return()=>J$[t]??n()}const Z$=DT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),IT=DT(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 5,100 bytes, line 563
563,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,kj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yc([0,.65,.55,1]),circOut:yc([.55,0,1,.45]),backIn:yc([.31,.01,.66,-.59]),backOut:yc([.33,1.53,.69,.99])};function LT(e,t){if(e)return typeof e=="function"?IT()?TT(e,t):"ease-out":yT(e)?yc(e):Array.isArray(e)?e.map(n=>LT(n,t)||kj.easeOut):kj[e]}function ez(e,t,n,{delay:r=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=LT(l,s);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function FT(e){return typeof e=="function"&&"applyToOptions"in e}function tz({type:e,...t}){return FT(e)&&IT()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class $T extends i0{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,ki(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=tz(t);this.animation=ez(n,r,s,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=s0(s,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):Q$(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Gn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Gn(t)}get time(){return Gn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Jn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Z$()?(this.animation.timeline=t,Qn):n(this)}}const zT={anticipate:pT,backInOut:fT,circInOut:gT};function nz(e){return e in zT}function rz(e){typeof e.ease=="string"&&nz(e.ease)&&(e.ease=zT[e.ease])}const pg=10;class sz extends $T{constructor(t){rz(t),OT(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:a,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new a0({...o,autoplay:!1}),c=Math.max(pg,ln.now()-this.startTime),u=Wr(0,pg,c-pg);n.setWithVelocity(l.sample(Math.max(0,c-u)).value,l.sample(c).value,u),l.stop()}}const Sj=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(yr.test(e)||e==="0")&&!e.startsWith("url("));function iz(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function az(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=Sj(s,t),l=Sj(a,t);return qp(o===l,`You are trying to animate ${t} from "${s}" to "${a}". "${o?a:s}" is not an animatable value.`,"value-not-animatable"),!o||!l?!1:iz(e)||(n==="spring"||FT(n))&&r}function Cy(e){e.duration=0,e.type="keyframes"}const oz=new Set(["opacity","clipPath","filter","transform"]),lz=oT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function cz(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:a,type:o}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return lz()&&n&&oz.has(n)&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&a!==0&&o!=="inertia"}const uz=40;class dz extends i0{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:
563o="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var x;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=ln.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:a,repeatType:o,name:c,motionValue:u,element:d,...h},p=(d==null?void 0:d.KeyframeResolver)||o0;this.keyframeResolver=new p(l,(m,y,g)=>this.onKeyframesResolved(m,y,f,!g),c,u,d),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,r,s){var y,g;this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=ln.now(),az(t,a,o,l)||((js.instantAnimations||!c)&&(d==null||d(s0(t,r,n))),t[0]=t[t.length-1],Cy(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>uz?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&cz(f),x=(g=(y=f.motionValue)==null?void 0:y.owner)==null?void 0:g.current,m=p?new sz({...f,element:x}):new a0(f);m.finished.then(()=>{this.notifyFinished()}).catch(Qn),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Y$()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function BT(e,t,n,r=0,s=1){const a=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(a,o):s===1?a*r:l-a*r}const hz=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fz(e){const t=hz.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const pz=4;function UT(e,t,n=1){ki(n<=pz,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=fz(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return sT(o)?parseFloat(o):o}return Zb(s)?UT(s,t,n+1):s}const mz={type:"spring",stiffness:500,damping:25,restSpeed:10},gz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xz={type:"keyframes",duration:.8},yz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vz=(e,{keyframes:t})=>t.length>2?xz:Tl.has(e)?e.startsWith("scale")?gz(t[1]):mz:yz,bz=e=>e!==null;function wz(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(bz),a=t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}function qT(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function l0(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?qT(n,e):n}function jz({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const c0=(e,t,n,r={},s,a)=>o=>{const l=l0(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Jn(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:s};jz(l)||Object.assign(d,vz(e,d)),d.duration&&(d.duration=Jn(d.duration)),d.repeatDelay&&(d.repeatDelay=Jn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Cy(d),d.delay===0&&(h=!0)),(js.instantAnimations||js.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,Cy(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const f=wz(d.keyframes,l);if(f!==void 0){Ye.update(()=>{d.onUpdate(f),d.onComplete()});return}}return l.isSync?new a0(d):new dz(d)};function _j(e){const t=[{},{}];
vendor: 20,787 bytes, line 563
563return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function u0(e,t,n,r){if(typeof t=="function"){const[s,a]=_j(r);t=t(n!==void 0?n:e.custom,s,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,a]=_j(r);t=t(n!==void 0?n:e.custom,s,a)}return t}function Mo(e,t,n){const r=e.getProps();return u0(r,t,n!==void 0?n:r.custom,e)}const VT=new Set(["width","height","top","left","right","bottom",...Cl]),Ej=30,Nz=e=>!isNaN(parseFloat(e)),Lc={current:void 0};class kz{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const s=ln.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ln.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Nz(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Xb);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ye.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Lc.current&&Lc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=ln.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ej)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ej);return lT(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wa(e,t){return new kz(e,t)}const Ty=e=>Array.isArray(e);function Sz(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wa(n))}function _z(e){return Ty(e)?e[e.length-1]||0:e}function Ez(e,t){const n=Mo(e,t);let{transitionEnd:r={},transition:s={},...a}=n||{};a={...a,...r};for(const o in a){const l=_z(a[o]);Sz(e,o,l)}}const Vt=e=>!!(e&&e.getVelocity);function Cz(e){return!!(Vt(e)&&e.add)}function Ay(e,t){const n=e.getValue("willChange");if(Cz(n))return n.add(t);if(!n&&js.WillChange){const r=new js.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function d0(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Tz="framerAppearId",WT="data-"+d0(Tz);function HT(e){return e.props[WT]}function Az({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function KT(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:a,transitionEnd:o,...l}=t;const c=e.getDefaultTransition();a=a?qT(a,c):c;const u=a==null?void 0:a.reduceMotion;r&&(a=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const p=e.getValue(f,e.latestValues[f]??null),x=l[f];if(x===void 0||h&&Az(h,f))continue;const m={delay:n,...l0(a||{},f)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(x)&&x===y&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=HT(e);if(w){const j=window.MotionHandoffAnimation(w,f,Ye);j!==null&&(m.startTime=j,g=!0)}}Ay(e,f);const v=u??e.shouldReduceMotion;p.start(c0(f,p,x,v&&VT.has(f)?{type:!1}:m,e,g));const b=p.animation;b&&d.push(b)}if(o){const f=()=>Ye.update(()=>{o&&Ez(e,o)});d.length?Promise.all(d).then(f):f()}return d}function Py(e,t,n={}){var c;const r=Mo(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(KT(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return Pz(e,t,u,d,h,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[a,o]:[o,a];return u().then(()=>d())}else return Promise.all([a(),o(n.delay)])}function Pz(e,t,n=0,r=0,s=0,a=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Py(c,t,{...o,delay:n+(typeof r=="function"?0:r)+BT(e.variantChildren,c,r,s,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function Oz(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(a=>Py(e,a,n));r=Promise.all(s)}else if(typeof t=="string")r=Py(e,t,n);else{const s=typeof t=="function"?Mo(e,t,n.custom):t;r=Promise.all(KT(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Rz={test:e=>e==="auto",parse:e=>e},GT=e=>t=>t.test(e),YT=[El,me,qr,Is,l$,o$,Rz],Cj=e=>YT.find(GT(e));function Mz(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||aT(e):!0}const Dz=new Set(["brightness","contrast","saturate","opacity"]);function Iz(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(e0)||[];if(!r)return e;const s=n.replace(r,"");let a=Dz.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+s+")"}const Lz=/\b([a-z-]*)\(.*?\)/gu,Oy={...yr,getAnimatableNone:e=>{const t=e.match(Lz);return t?t.map(Iz).join(" "):e}},Ry={...yr,getAnimatableNone:e=>{const t=yr.parse(e);return yr.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Tj={...El,transform:Math.round},Fz={rotate:Is,rotateX:Is,rotateY:Is,rotateZ:Is,scale:Hd,scaleX:Hd,scaleY:Hd,scaleZ:Hd,skew:Is,skewX:Is,skewY:Is,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:yu,originX:mj,originY:mj,originZ:me},h0={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,inset:me,insetBlock:me,insetBlockStart:me,insetBlockEnd:me,insetInline:me,insetInlineStart:me,insetInlineEnd:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,paddingBlock:me,paddingBlockStart:me,paddingBlockEnd:me,paddingInline:me,paddingInlineStart:me,paddingInlineEnd:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,marginBlock:me,marginBlockStart:me,marginBlockEnd:me,marginInline:me,marginInlineStart:me,marginInlineEnd:me,fontSize:me,backgroundPositionX:me,backgroundPositionY:me,...Fz,zIndex:Tj,fillOpacity:yu,strokeOpacity:yu,numOctaves:Tj},$z={...h0,color:jt,backgroundColor:jt,outlineColor:jt,fill:jt,stroke:jt,borderColor:jt,borderTopColor:jt,borderRightColor:jt,borderBottomColor:jt,borderLeftColor:jt,filter:Oy,WebkitFilter:Oy,mask:Ry,WebkitMask:Ry},XT=e=>$z[e],zz=new Set([Oy,Ry]);function QT(e,t){let n=XT(e);return zz.has(n)||(n=yr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Bz=new Set(["auto","none","0"]);function Uz(e,t,n){let r=0,s;for(;r<e.length&&!s;){const a=e[r];typeof a=="string"&&!Bz.has(a)&&vu(a).values.length&&(s=e[r]),r++}if(s&&n)for(const a of t)e[a]=QT(n,s)}class qz extends o0{constructor(t,n,r,s,a){super(t,n,r,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),Zb(h))){const f=UT(h,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!VT.has(r)||t.length!==2)return;const[s,a]=t,o=Cj(s),l=Cj(a),c=pj(s),u=pj(a);if(c!==u&&ai[r]){this.needsMeasurement=!0;return}if(o!==l)if(Nj(o)&&Nj(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else ai[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Mz(t[s]))&&r.push(s);r.length&&Uz(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ai[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,o=r[a];r[a]=ai[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Vz=new Set(["opacity","clipPath","filter","transform"]);function JT(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const ZT=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function My(e){return iT(e)&&"offsetHeight"in e}const{schedule:f0,cancel:Qoe}=vT(queueMicrotask,!1),lr={x:!1,y:!1};function eA(){return lr.x||lr.y}function Wz(e){return e==="x"||e==="y"?lr[e]?null:(lr[e]=!0,()=>{lr[e]=!1}):lr.x||lr.y?null:(lr.x=lr.y=!0,()=>{lr.x=lr.y=!1})}function tA(e,t){const n=JT(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Hz(e){return!(e.pointerType==="touch"||eA())}function Kz(e,t,n={}){const[r,s,a]=tA(e,n);return r.forEach(o=>{let l=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",x)},h=y=>{u&&(u(y),u=void 0),d()},f=y=>{l=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(y))},p=()=>{l=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},x=y=>{if(y.pointerType!=="touch"){if(l){c=!0;return}h(y)}},m=y=>{if(!Hz(y))return;c=!1;const g=t(o,y);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",x,s))};o.addEventListener("pointerenter",m,s),o.addEventListener("pointerdown",p,s)}),a}const nA=(e,t)=>t?e===t?!0:nA(e,t.parentElement):!1,p0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Gz=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yz(e){return Gz.has(e.tagName)||e.isContentEditable===!0}const Xz=new Set(["INPUT","SELECT","TEXTAREA"]);function Qz(e){return Xz.has(e.tagName)||e.isContentEditable===!0}const Dh=new WeakSet;function Aj(e){return t=>{t.key==="Enter"&&e(t)}}function mg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Jz=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Aj(()=>{if(Dh.has(n))return;mg(n,"down");const s=Aj(()=>{mg(n,"up")}),a=()=>mg(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Pj(e){return p0(e)&&!eA()}const Oj=new WeakSet;function Zz(e,t,n={}){const[r,s,a]=tA(e,n),o=l=>{const c=l.currentTarget;if(!Pj(l)||Oj.has(l))return;Dh.add(c),n.stopPropagation&&Oj.add(l);const u=t(c,l),d=(p,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Dh.has(c)&&Dh.delete(c),Pj(p)&&typeof u=="function"&&u(p,{success:x})},h=p=>{d(p,c===window||c===document||n.useGlobalTarget||nA(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),My(l)&&(l.addEventListener("focus",u=>Jz(u,s)),!Yz(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function m0(e){return iT(e)&&"ownerSVGElement"in e}const Ih=new WeakMap;let Ls;const rA=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:m0(r)&&"getBBox"in r?r.getBBox()[t]:r[n],eB=rA("inline","width","offsetWidth"),tB=rA("block","height","offsetHeight");function nB({target:e,borderBoxSize:t}){var n;(n=Ih.get(e))==null||n.forEach(r=>{r(e,{get width(){return eB(e,t)},get height(){return tB(e,t)}})})}function rB(e){e.forEach(nB)}function sB(){typeof ResizeObserver>"u"||(Ls=new ResizeObserver(rB))}function iB(e,t){Ls||sB();const n=JT(e);return n.forEach(r=>{let s=Ih.get(r);s||(s=new Set,Ih.set(r,s)),s.add(t),Ls==null||Ls.observe(r)}),()=>{n.forEach(r=>{const s=Ih.get(r);s==null||s.delete(t),s!=null&&s.size||Ls==null||Ls.unobserve(r)})}}const Lh=new Set;let vo;function aB(){vo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Lh.forEach(t=>t(e))},window.addEventListener("resize",vo)}function oB(e){return Lh.add(e),vo||aB(),()=>{Lh.delete(e),!Lh.size&&typeof vo=="function"&&(window.removeEventListener("resize",vo),vo=void 0)}}function Rj(e,t){return typeof e=="function"?oB(e):iB(e,t)}function lB(e){return m0(e)&&e.tagName==="svg"}function cB(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],s=e[1+n],a=e[2+n],o=e[3+n],l=PT(s,a,o);return t?l(r):l}const uB=[...YT,jt,yr],dB=e=>uB.find(GT(e)),Mj=()=>({translate:0,scale:1,origin:0,originPoint:0}),bo=()=>({x:Mj(),y:Mj()}),Dj=()=>({min:0,max:0}),St=()=>({x:Dj(),y:Dj()}),hB=new WeakMap;function Vp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bu(e){return typeof e=="string"||Array.isArray(e)}const g0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],x0=["initial",...g0];function Wp(e){return Vp(e.animate)||x0.some(t=>bu(e[t]))}function sA(e){return!!(Wp(e)||e.variants)}function fB(e,t,n){for(const r in t){const s=t[r],a=n[r];if(Vt(s))e.addValue(r,s);else if(Vt(a))e.addValue(r,wa(s,{owner:e}));else if(a!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,wa(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Dy={current:null},iA={current:!1},pB=typeof window<"u";function mB(){if(iA.current=!0,!!pB)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dy.current=e.matches;e.addEventListener("change",t),t()}else Dy.current=!1}const Ij=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Df={};function aA(e){Df=e}function gB(){return Df}class xB{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:a,blockInitialAnimation:o,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=o0,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ln.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Ye.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Wp(n),this.isVariantNode=sA(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const x=f[p];u[p]!==void 0&&Vt(x)&&x.set(u[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,hB.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,a)=>this.bindToMotionValue(a,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(iA.current||mB(),this.shouldReduceMotion=Dy.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ns(this.notifyUpdate),Ns(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Vz.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,h=new $T({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:Jn(d)}),f=o(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=Tl.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Ye.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Df){const n=Df[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):St()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ij.length;r++){const s=Ij[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,o=t[a];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=fB(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
vendor: 10,877 bytes, line 563
563addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=wa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(sT(r)||aT(r))?r=parseFloat(r):!dB(r)&&yr.test(n)&&(r=QT(t,n)),this.setBaseTarget(t,Vt(r)?r.get():r)),Vt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=u0(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Vt(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xb),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){f0.render(this.render)}}class oA extends xB{constructor(){super(...arguments),this.KeyframeResolver=qz}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Oi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function lA({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function yB({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vB(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gg(e){return e===void 0||e===1}function Iy({scale:e,scaleX:t,scaleY:n}){return!gg(e)||!gg(t)||!gg(n)}function $i(e){return Iy(e)||cA(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cA(e){return Lj(e.x)||Lj(e.y)}function Lj(e){return e&&e!=="0%"}function If(e,t,n){const r=e-n,s=t*r;return n+s}function Fj(e,t,n,r,s){return s!==void 0&&(e=If(e,s,r)),If(e,n,r)+t}function Ly(e,t=0,n=1,r,s){e.min=Fj(e.min,t,n,r,s),e.max=Fj(e.max,t,n,r,s)}function uA(e,{x:t,y:n}){Ly(e.x,t.translate,t.scale,t.originPoint),Ly(e.y,n.translate,n.scale,n.originPoint)}const $j=.999999999999,zj=1.0000000000001;function bB(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let a,o;for(let l=0;l<s;l++){a=n[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&jo(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,uA(e,o)),r&&$i(a.latestValues)&&jo(e,a.latestValues))}t.x<zj&&t.x>$j&&(t.x=1),t.y<zj&&t.y>$j&&(t.y=1)}function wo(e,t){e.min=e.min+t,e.max=e.max+t}function Bj(e,t,n,r,s=.5){const a=at(e.min,e.max,s);Ly(e,t,n,a,r)}function jo(e,t){Bj(e.x,t.x,t.scaleX,t.scale,t.originX),Bj(e.y,t.y,t.scaleY,t.scale,t.originY)}function dA(e,t){return lA(vB(e.getBoundingClientRect(),t))}function wB(e,t,n){const r=dA(e,n),{scroll:s}=t;return s&&(wo(r.x,s.offset.x),wo(r.y,s.offset.y)),r}const jB={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},NB=Cl.length;function kB(e,t,n){let r="",s=!0;for(let a=0;a<NB;a++){const o=Cl[a],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(o.startsWith("scale")?1:0);else{const u=parseFloat(l);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=ZT(l,h0[o]);if(!c){s=!1;const d=jB[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function y0(e,t,n){const{style:r,vars:s,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(Tl.has(c)){o=!0;continue}else if(wT(c)){s[c]=u;continue}else{const d=ZT(u,h0[c]);c.startsWith("origin")?(l=!0,a[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=kB(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=a;r.transformOrigin=`${c} ${u} ${d}`}}function hA(e,{style:t,vars:n},r,s){const a=e.style;let o;for(o in t)a[o]=t[o];s==null||s.applyProjectionStyles(a,r);for(o in n)a.setProperty(o,n[o])}function Uj(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const sc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=Uj(e,t.target.x),r=Uj(e,t.target.y);return`${n}% ${r}%`}},SB={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=yr.parse(e);if(s.length>5)return r;const a=yr.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const u=at(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),a(s)}},Fy={borderRadius:{...sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sc,borderTopRightRadius:sc,borderBottomLeftRadius:sc,borderBottomRightRadius:sc,boxShadow:SB};function fA(e,{layout:t,layoutId:n}){return Tl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fy[e]||e==="opacity")}function v0(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,a={};if(!r)return a;for(const l in r)(Vt(r[l])||s&&Vt(s[l])||fA(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(a[l]=r[l]);return a}function _B(e){return window.getComputedStyle(e)}class EB extends oA{constructor(){super(...arguments),this.type="html",this.renderInstance=hA}readValueFromInstance(t,n){var r;if(Tl.has(n))return(r=this.projection)!=null&&r.isProjecting?Ny(n):V$(t,n);{const s=_B(t),a=(wT(n)?s.getPropertyValue(n):s[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return dA(t,n)}build(t,n,r){y0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return v0(t,n,r)}}const CB={offset:"stroke-dashoffset",array:"stroke-dasharray"},TB={offset:"strokeDashoffset",array:"strokeDasharray"};function AB(e,t,n=1,r=0,s=!0){e.pathLength=1;const a=s?CB:TB;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const PB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function pA(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:a=1,pathOffset:o=0,...l},c,u,d){if(y0(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const p of PB)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&AB(h,s,a,o,!1)}const mA=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),gA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function OB(e,t,n,r){hA(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(mA.has(s)?s:d0(s),t.attrs[s])}function xA(e,t,n){const r=v0(e,t,n);for(const s in e)if(Vt(e[s])||Vt(t[s])){const a=Cl.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[a]=e[s]}return r}class RB extends oA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=St}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Tl.has(n)){const r=XT(n);return r&&r.default||0}return n=mA.has(n)?n:d0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return xA(t,n,r)}build(t,n,r){pA(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){OB(t,n,r,s)}mount(t){this.isSVGTag=gA(t.tagName),super.mount(t)}}const MB=x0.length;function yA(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?yA(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<MB;n++){const r=x0[n],s=e.props[r];(bu(s)||s===!1)&&(t[r]=s)}return t}function vA(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const DB=[...g0].reverse(),IB=g0.length;function LB(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Oz(e,n,r)))}function FB(e){let t=LB(e),n=qj(),r=!0;const s=c=>(u,d)=>{var f;const h=Mo(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:x,...m}=h;u={...u,...m,...x}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,d=yA(e.parent)||{},h=[],f=new Set;let p={},x=1/0;for(let y=0;y<IB;y++){const g=DB[y],v=n[g],b=u[g]!==void 0?u[g]:d[g],w=bu(b),j=g===c?v.isActive:null;j===!1&&(x=y);let E=b===d[g]&&b!==u[g]&&w;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...p},!v.isActive&&j===null||!b&&!v.prevProp||Vp(b)||typeof b=="boolean")continue;if(g==="exit"&&v.isActive&&j!==!0){v.prevResolvedValues&&(p={...p,...v.prevResolvedValues});continue}const k=$B(v.prevProp,b);let S=k||g===c&&v.isActive&&!E&&w||y>x&&w,A=!1;const C=Array.isArray(b)?b:[b];let T=C.reduce(s(g),{});j===!1&&(T={});const{prevResolvedValues:_={}}=v,P={..._,...T},O=$=>{S=!0,f.has($)&&(A=!0,f.delete($)),v.needsAnimating[$]=!0;const q=e.getValue($);q&&(q.liveStyle=!1)};for(const $ in P){const q=T[$],L=_[$];if(p.hasOwnProperty($))continue;let D=!1;Ty(q)&&Ty(L)?D=!vA(q,L):D=q!==L,D?q!=null?O($):f.add($):q!==void 0&&f.has($)?O($):v.protectedKeys[$]=!0}v.prevProp=b,v.prevResolvedValues=T,v.isActive&&(p={...p,...T}),r&&e.blockInitialAnimation&&(S=!1);const I=E&&k;S&&(!I||A)&&h.push(...C.map($=>{const q={type:g};if(typeof $=="string"&&r&&!I&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,D=Mo(L,$);if(L.enteringChildren&&D){const{delayChildren:R}=D.transition||{};q.delay=BT(L.enteringChildren,e,R)}}return{animation:$,options:q}}))}
vendor: 4,721 bytes, line 563
563if(f.size){const y={};if(typeof u.initial!="boolean"){const g=Mo(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(y.transition=g.transition)}f.forEach(g=>{const v=e.getBaseTarget(g),b=e.getValue(g);b&&(b.liveStyle=!0),y[g]=v??null}),h.push({animation:y})}let m=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>n,reset:()=>{n=qj()}}}function $B(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vA(t,e):!1}function Mi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qj(){return{animate:Mi(!0),whileInView:Mi(),whileHover:Mi(),whileTap:Mi(),whileDrag:Mi(),whileFocus:Mi(),exit:Mi()}}function Vj(e,t){e.min=t.min,e.max=t.max}function ir(e,t){Vj(e.x,t.x),Vj(e.y,t.y)}function Wj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const bA=1e-4,zB=1-bA,BB=1+bA,wA=.01,UB=0-wA,qB=0+wA;function cn(e){return e.max-e.min}function VB(e,t,n){return Math.abs(e-t)<=n}function Hj(e,t,n,r=.5){e.origin=r,e.originPoint=at(t.min,t.max,e.origin),e.scale=cn(n)/cn(t),e.translate=at(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zB&&e.scale<=BB||isNaN(e.scale))&&(e.scale=1),(e.translate>=UB&&e.translate<=qB||isNaN(e.translate))&&(e.translate=0)}function Fc(e,t,n,r){Hj(e.x,t.x,n.x,r?r.originX:void 0),Hj(e.y,t.y,n.y,r?r.originY:void 0)}function Kj(e,t,n){e.min=n.min+t.min,e.max=e.min+cn(t)}function WB(e,t,n){Kj(e.x,t.x,n.x),Kj(e.y,t.y,n.y)}function Gj(e,t,n){e.min=t.min-n.min,e.max=e.min+cn(t)}function Lf(e,t,n){Gj(e.x,t.x,n.x),Gj(e.y,t.y,n.y)}function Yj(e,t,n,r,s){return e-=t,e=If(e,1/n,r),s!==void 0&&(e=If(e,1/s,r)),e}function HB(e,t=0,n=1,r=.5,s,a=e,o=e){if(qr.test(t)&&(t=parseFloat(t),t=at(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=at(a.min,a.max,r);e===a&&(l-=t),e.min=Yj(e.min,t,n,l,s),e.max=Yj(e.max,t,n,l,s)}function Xj(e,t,[n,r,s],a,o){HB(e,t[n],t[r],t[s],t.scale,a,o)}const KB=["x","scaleX","originX"],GB=["y","scaleY","originY"];function Qj(e,t,n,r){Xj(e.x,t,KB,n?n.x:void 0,r?r.x:void 0),Xj(e.y,t,GB,n?n.y:void 0,r?r.y:void 0)}function Jj(e){return e.translate===0&&e.scale===1}function jA(e){return Jj(e.x)&&Jj(e.y)}function Zj(e,t){return e.min===t.min&&e.max===t.max}function YB(e,t){return Zj(e.x,t.x)&&Zj(e.y,t.y)}function eN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function NA(e,t){return eN(e.x,t.x)&&eN(e.y,t.y)}function tN(e){return cn(e.x)/cn(e.y)}function nN(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Pr(e){return[e("x"),e("y")]}function XB(e,t,n){let r="";const s=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||a||o)&&(r=`translate3d(${s}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:p,skewY:x}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),x&&(r+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const kA=["TopLeft","TopRight","BottomLeft","BottomRight"],QB=kA.length,rN=e=>typeof e=="string"?parseFloat(e):e,sN=e=>typeof e=="number"||me.test(e);function JB(e,t,n,r,s,a){s?(e.opacity=at(0,n.opacity??1,ZB(r)),e.opacityExit=at(t.opacity??1,0,eU(r))):a&&(e.opacity=at(t.opacity??1,n.opacity??1,r));for(let o=0;o<QB;o++){const l=`border${kA[o]}Radius`;let c=iN(t,l),u=iN(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||sN(c)===sN(u)?(e[l]=Math.max(at(rN(c),rN(u),r),0),(qr.test(u)||qr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=at(t.rotate||0,n.rotate||0,r))}function iN(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ZB=SA(0,.5,mT),eU=SA(.5,.95,Qn);function SA(e,t,n){return r=>r<e?0:r>t?1:n(xu(e,t,r))}function tU(e,t,n){const r=Vt(e)?e:wa(e);return r.start(c0("",r,t,n)),r.animation}function wu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const nU=(e,t)=>e.depth-t.depth;class rU{constructor(){this.children=[],this.isDirty=!1}add(t){Yb(this.children,t),this.isDirty=!0}remove(t){Pf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nU),this.isDirty=!1,this.children.forEac
563h(t)}}function sU(e,t){const n=ln.now(),r=({timestamp:s})=>{const a=s-n;a>=t&&(Ns(r),e(a-t))};return Ye.setup(r,!0),()=>Ns(r)}function Fh(e){return Vt(e)?e.get():e}class iU{constructor(){this.members=[]}add(t){Yb(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;s&&s.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&Pf(this.members,r)}t.scheduleRender()}remove(t){if(Pf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const a=this.members[s],o=a.instance;if(a.isPresent!==!1&&(!o||o.isConnected!==!1)){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const s=r.options.layoutDependency,a=t.options.layoutDependency;if(!(s!==void 0&&a!==void 0&&s===a)){const c=r.instance;c&&c.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:l}=t.options;l===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const $h={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xg=["","X","Y","Z"],aU=1e3;let oU=0;function yg(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function _A(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=HT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ye,!(s||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&_A(r)}function EA({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=oU++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(uU),this.nodes.forEach(pU),this.nodes.forEach(mU),this.nodes.forEach(dU)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new rU)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Xb),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=m0(o)&&!lB(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;Ye.read(()=>{h=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,d&&d(),d=sU(f,250),$h.hasAnimatedSinceResize&&($h.hasAnimatedSinceResize=!1,this.nodes.forEac
vendor: 9,256 bytes, line 563
563h(lN)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||u.getDefaultTransition()||bU,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=u.getProps(),g=!this.targetLayout||!NA(this.targetLayout,p),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...l0(x,"layout"),onPlay:m,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(d,v)}else h||lN(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ns(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gU),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_A(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(aN);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(oN);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(fU),this.nodes.forEach(lU),this.nodes.forEach(cU)):this.nodes.forEach(oN),this.clearAllSnapshots();const l=ln.now();qt.delta=Wr(0,1e3/60,l-qt.timestamp),qt.timestamp=l,qt.isProcessing=!0,cg.update.process(qt),cg.preRender.process(qt),cg.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,f0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hU),this.sharedNodes.forEach(xU)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!cn(this.snapshot.measuredBox.x)&&!cn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=St(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!jA(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||$i(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),wU(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return St();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(jU))){const{scroll:d}=this.root;d&&(wo(l.x,d.offset.x),wo(l.y,d.offset.y))}return l}removeElementScroll(o){var c;const l=St();if(ir(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&ir(l,o),wo(l.x,h.offset.x),wo(l.y,h.offset.y))}return l}applyTransform(o,l=!1){const c=St();ir(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&jo(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),$i(d.latestValues)&&jo(c,d.latestValues)}return $i(this.latestValues)&&jo(c,this.latestValues),c}removeTransform(o){const l=St();ir(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!$i(u.latestValues))continue;Iy(u.latestValues)&&u.updateSnapshot();const d=St(),h=u.measurePageBox();ir(d,h),Qj(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return $i(this.latestValues)&&Qj(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=qt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=St(),this.targetWithTransforms=St()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),WB(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ir(this.target,this.layout.layoutBox),uA(this.target,this.targetDelta)):ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Iy(this.parent.latestValues)||cA(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=St(),this.relativeTargetOrigin=St(),Lf(this.relativeTargetOrigin,l,c),ir(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&
vendor: 4,186 bytes, line 563
563(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;ir(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;bB(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=St());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Wj(this.prevProjectionDelta.x,this.projectionDelta.x),Wj(this.prevProjectionDelta.y,this.projectionDelta.y)),Fc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!nN(this.projectionDelta.x,this.prevProjectionDelta.x)||!nN(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bo(),this.projectionDelta=bo(),this.projectionDeltaWithTransform=bo()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=bo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=St(),p=c?c.source:void 0,x=this.layout?this.layout.source:void 0,m=p!==x,y=this.getStack(),g=!y||y.members.length<=1,v=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(vU));this.animationProgress=0;let b;this.mixTargetDelta=w=>{const j=w/1e3;cN(h.x,o.x,j),cN(h.y,o.y,j),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lf(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yU(this.relativeTarget,this.relativeTargetOrigin,f,j),b&&YB(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=St()),ir(b,this.relativeTarget)),m&&(this.animationValues=d,JB(d,u,this.latestValues,j,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ns(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ye.update(()=>{$h.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wa(0)),this.motionValue.jump(0,!1),this.currentAnimation=tU(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(aU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&CA(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||St();const h=cn(this.layout.layoutBox.x);
vendor: 5,324 bytes, line 563
563c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=cn(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}ir(l,c),jo(l,d),Fc(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new iU),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&yg("z",o,u,this.animationValues);for(let d=0;d<xg.length;d++)yg(`rotate${xg[d]}`,o,u,this.animationValues),yg(`skew${xg[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Fh(l==null?void 0:l.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Fh(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!$i(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=XB(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in Fy){if(d[x]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:g}=Fy[x],v=h==="none"?d[x]:m(d[x],u);if(y){const b=y.length;for(let w=0;w<b;w++)o[y[w]]=v}else g?this.options.visualElement.renderState.vars[x]=v:o[x]=v}this.options.layoutId&&(o.pointerEvents=u===this?Fh(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(aN),this.root.sharedNodes.clear()}}}function lU(e){e.updateLayout()}function cU(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;a==="size"?Pr(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=cn(f);f.min=r[h].min,f.max=f.min+p}):CA(a,t.layoutBox,r)&&Pr(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=cn(r[h]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const l=bo();Fc(l,r,t.layoutBox);const c=bo();o?Fc(c,e.applyTransform(s,!0),t.measuredBox):Fc(c,r,t.layoutBox);const u=!jA(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const x=St();Lf(x,t.layoutBox,f.layoutBox);const m=St();Lf(m,r,p.layoutBox),NA(x,m)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=x,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function uU(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function dU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hU(e){e.clearSnapshot()}function aN(e){e.clearMeasurements()}function oN(e){e.isLayoutDirty=!1}function fU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function lN(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pU(e){e.resolveTargetDelta()}function mU(e){e.calcProjection()}
vendor: 9,180 bytes, lines 563-571
563function gU(e){e.resetSkewAndRotation()}function xU(e){e.removeLeadSnapshot()}function cN(e,t,n){e.translate=at(t.translate,0,n),e.scale=at(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uN(e,t,n,r){e.min=at(t.min,n.min,r),e.max=at(t.max,n.max,r)}function yU(e,t,n,r){uN(e.x,t.x,n.x,r),uN(e.y,t.y,n.y,r)}function vU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bU={duration:.45,ease:[.4,0,.1,1]},dN=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),hN=dN("applewebkit/")&&!dN("chrome/")?Math.round:Qn;function fN(e){e.min=hN(e.min),e.max=hN(e.max)}function wU(e){fN(e.x),fN(e.y)}function CA(e,t,n){return e==="position"||e==="preserve-aspect"&&!VB(tN(t),tN(n),.2)}function jU(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const NU=EA({attachResizeListener:(e,t)=>wu(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),vg={current:void 0},TA=EA({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vg.current){const e=new NU({});e.mount(window),e.setOptions({layoutScroll:!0}),vg.current=e}return vg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Hp=N.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function pN(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kU(...e){return t=>{let n=!1;const r=e.map(s=>{const a=pN(s,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():pN(e[s],null)}}}}function SU(...e){return N.useCallback(kU(...e),e)}class _U extends N.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=My(r)&&r.offsetWidth||0,a=My(r)&&r.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left,o.bottom=a-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function EU({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:a}){var f;const o=N.useId(),l=N.useRef(null),c=N.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=N.useContext(Hp),d=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),h=SU(l,d);return N.useInsertionEffect(()=>{const{width:p,height:x,top:m,left:y,right:g,bottom:v}=c.current;if(t||a===!1||!l.current||!p||!x)return;const b=n==="left"?`left: ${y}`:`right: ${g}`,w=r==="bottom"?`bottom: ${v}`:`top: ${m}`;l.current.dataset.motionPopId=o;const j=document.createElement("style");u&&(j.nonce=u);const E=s??document.head;return E.appendChild(j),j.sheet&&j.sheet.insertRule(` 564 [data-motion-pop-id="${o}"] { 565 position: absolute !important; 566 width: ${p}px !important; 567 height: ${x}px !important; 568 ${b}px !important; 569 ${w}px !important; 570 } 571 `),()=>{E.contains(j)&&E.removeChild(j)}},[t]),i.jsx(_U,{isPresent:t,childRef:l,sizeRef:c,pop:a,children:a===!1?e:N.cloneElement(e,{ref:h})})}const CU=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:c,root:u})=>{const d=Oa(TU),h=N.useId();let f=!0,p=N.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:x=>{d.set(x,!0);for(const m of d.values())if(!m)return;r&&r()},register:x=>(d.set(x,!1),()=>d.delete(x))}),[n,d,r]);return a&&f&&(p={...p}),N.useMemo(()=>{d.forEach((x,m)=>d.set(m,!1))},[n]),N.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=i.jsx(EU,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),i.jsx(Up.Provider,{value:p,children:e})};function TU(){return new Map}function AA(e=!0){const t=N.useContext(Up);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,a=N.useId();N.useEffect(()=>{if(e)return s(a)},[e]);const o=N.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const Kd=e=>e.key||"";function mN(e){const t=[];return N.Children.forEach(e,n=>{N.isValidElement(n)&&t.push(n)}),t}const ds=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,h]=AA(o),f=N.useMemo(()=>mN(e),[e]),p=o&&!d?[]:f.map(Kd),x=N.useRef(!0),m=N.useRef(f),y=Oa(()=>new Map),g=N.useRef(new Set),[v,b]=N.useState(f),[w,j]=N.useState(f);Gb(()=>{x.current=!1,m.current=f;for(let S=0;S<w.length;S++){const A=Kd(w[S]);p.includes(A)?(y.delete(A),g.current.delete(A)):y.get(A)!==!0&&y.set(A,!1)}},[w,p.length,p.join("-")]);const E=[];if(f!==v){let S=[...f];for(let A=0;A<w.length;A++){const C=w[A],T=Kd(C);p.includes(T)||(S.splice(A,0,C),E.push(C))}return a==="wait"&&E.length&&(S=E),j(mN(S)),b(f),null}const{forceRender:k}=N.useContext(Kb);return i.jsx(i.Fragment,{children:w.map(S=>{const A=Kd(S),C=o&&!d?!1:f===w||p.includes(A),T=()=>{if(g.current.has(A))return;if(g.current.add(A),y.has(A))y.set(A,!0);else return;let _=!0;y.forEach(P=>{P||(_=!1)}),_&&(k==null||k(),j(m.current),o&&(h==null||h()),r&&r())};return i.jsx(CU,{isPresent:C,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:a,root:u,onExitComplete:C?void 0:T,anchorX:l,anchorY:c,children:S},A)})})},PA=N.createContext({strict:!1}),gN={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let xN=!1;function AU(){if(xN)return;const e={};for(const t in gN)e[t]={isEnabled:n=>gN[t].some(r=>!!n[r])};aA(e),xN=!0}function OA(){return AU(),gB()}function PU(e){const t=OA();for(const n in e)t[n]={...t[n],...e[n]};aA(t)}const OU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Ff(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||OU.has(e)}let RA=e=>!Ff(e);function RU(e){typeof e=="function"&&(RA=t=>t.startsWith("on")?!Ff(t):e(t))}try{RU(require("@emotion/is-prop-valid").default)}catch{}function MU(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(RA(s)||n===!0&&Ff(s)||!t&&!Ff(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Kp=N.createContext({});function DU(e,t){if(Wp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||bu(n)?n:void 0,animate:bu(r)?r:void 0}}return e.inherit!==!1?t:{}}function IU(e){const{initial:t,animate:n}=DU(e,N.useContext(Kp));return N.useMemo(()=>({initial:t,animate:n}),[yN(t),yN(n)])}function yN(e){return Array.isArray(e)?e.join(" "):e}const b0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function MA(e,t,n){for(const r in t)!Vt(t[r])&&!fA(r,n)&&(e[r]=t[r])}function LU({transformTemplate:e},t){return N.useMemo(()=>{const n=b0();return y0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function FU(e,t){const n=e.style||{},r={};return MA(r,n,e),Object.assign(r,LU(e,t)),r}function $U(e,t){const n={},r=FU(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const DA=()=>({...b0(),attrs:{}});function zU(e,t,n,r){const s=N.useMemo(()=>{const a=DA();return pA(a,t,gA(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};MA(a,e.style,e),s.style={...a,...s.style}}return s}const BU=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function w0(e){return typeof e!="string"||e.includes("-")?!1:!!(BU.indexOf(e)>-1||/[A-Z]/u.test(e))}function UU(e,t,n,{latestValues:r},s,a=!1,o){const c=(o??w0(e)?zU:$U)(t,r,s,e),u=MU(t,typeof e=="string",a),d=e!==N.Fragment?{...u,...c,ref:n}:{},{children:h}=t,f=N.useMemo(()=>Vt(h)?h.get():h,[h]);return N.createElement(e,{...d,children:f})}function qU({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:VU(n,r,s,e),renderState:t()}}function VU(e,t,n,r){const s={}
vendor: 4,196 bytes, line 571
571,a=r(e,{});for(const f in a)s[f]=Fh(a[f]);let{initial:o,animate:l}=e;const c=Wp(e),u=sA(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?l:o;if(h&&typeof h!="boolean"&&!Vp(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const x=u0(e,f[p]);if(x){const{transitionEnd:m,transition:y,...g}=x;for(const v in g){let b=g[v];if(Array.isArray(b)){const w=d?b.length-1:0;b=b[w]}b!==null&&(s[v]=b)}for(const v in m)s[v]=m[v]}}}return s}const IA=e=>(t,n)=>{const r=N.useContext(Kp),s=N.useContext(Up),a=()=>qU(e,t,r,s);return n?a():Oa(a)},WU=IA({scrapeMotionValuesFromProps:v0,createRenderState:b0}),HU=IA({scrapeMotionValuesFromProps:xA,createRenderState:DA}),KU=Symbol.for("motionComponentSymbol");function GU(e,t,n){const r=N.useRef(n);N.useInsertionEffect(()=>{r.current=n});const s=N.useRef(null);return N.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a)),t&&(a?t.mount(a):t.unmount());const o=r.current;if(typeof o=="function")if(a){const c=o(a);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(a);else o&&(o.current=a)},[t])}const LA=N.createContext({});function eo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function YU(e,t,n,r,s,a){var b,w;const{visualElement:o}=N.useContext(Kp),l=N.useContext(PA),c=N.useContext(Up),u=N.useContext(Hp),d=u.reducedMotion,h=u.skipAnimations,f=N.useRef(null),p=N.useRef(!1);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const x=f.current,m=N.useContext(LA);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&XU(f.current,n,s,m);const y=N.useRef(!1);N.useInsertionEffect(()=>{x&&y.current&&x.update(n,c)});const g=n[WT],v=N.useRef(!!g&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,g))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,g)));return Gb(()=>{p.current=!0,x&&(y.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),v.current&&x.animationState&&x.animationState.animateChanges())}),N.useEffect(()=>{x&&(!v.current&&x.animationState&&x.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)==null||j.call(window,g)}),v.current=!1),x.enteringChildren=void 0)}),x}function XU(e,t,n,r){const{layoutId:s,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:FA(e.parent)),e.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||l&&eo(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function FA(e){if(e)return e.options.allowProjection!==!1?e.projection:FA(e.parent)}function bg(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&PU(r);const a=n?n==="svg":w0(e),o=a?HU:WU;function l(u,d){let h;const f={...N.useContext(Hp),...u,layoutId:QU(u)},{isStatic:p}=f,x=IU(u),m=o(u,p);if(!p&&rT){JU();const y=ZU(f);h=y.MeasureLayout,x.visualElement=YU(e,m,f,s,y.ProjectionNode,a)}return i.jsxs(Kp.Provider,{value:x,children:[h&&x.visualElement?i.jsx(h,{visualElement:x.visualElement,...f}):null,UU(e,u,GU(m,x.visualElement,d),m,p,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=N.forwardRef(l);return c[KU]=e,c}function QU({layoutId:e}){const t=N.useContext(Kb).id;return t&&e!==void 0?t+"-"+e:e}function JU(e,t){N.useContext(PA).strict}function ZU(e){const t=OA(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function e7(e,t){if(typeof Proxy>"u")return bg;const n=new Map,r=(a,o)=>bg(a,o,e,t),s=(a,o)=>r(a,o);return new Proxy(s,{get:(a,o)=>o==="create"?r:(n.has(o)||n.set(o,bg(o,void 0,e,t)),n.get(o))})}const t7=(e,t)=>t.isSVG??w0(e)?new RB(t):new EB(t,{allowProjection:e!==N.Fragment});
vendor: 5,864 bytes, line 571
571class n7 extends Oi{constructor(t){super(t),t.animationState||(t.animationState=FB(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vp(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let r7=0;class s7 extends Oi{constructor(){super(...arguments),this.id=r7++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const i7={animation:{Feature:n7},exit:{Feature:s7}};function od(e){return{point:{x:e.pageX,y:e.pageY}}}const a7=e=>t=>p0(t)&&e(t,od(t));function $c(e,t,n,r){return wu(e,t,a7(n),r)}const $A=({current:e})=>e?e.ownerDocument.defaultView:null,vN=(e,t)=>Math.abs(e-t);function o7(e,t){const n=vN(e.x,t.x),r=vN(e.y,t.y);return Math.sqrt(n**2+r**2)}const bN=new Set(["auto","scroll"]);class zA{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=jg(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,m=o7(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!m)return;const{point:y}=p,{timestamp:g}=qt;this.history.push({...y,timestamp:g});const{onStart:v,onMove:b}=this.handlers;x||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,x)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=wg(x,this.transformPagePoint),Ye.update(this.updatePoint,!0)},this.handlePointerUp=(p,x)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=jg(p.type==="pointercancel"?this.lastMoveEventInfo:wg(x,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,v),y&&y(p,v)},!p0(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const c=od(t),u=wg(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=qt;this.history=[{...d,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,jg(u,this.history)),this.removeListeners=sd($c(this.contextWindow,"pointermove",this.handlePointerMove),$c(this.contextWindow,"pointerup",this.handlePointerUp),$c(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(bN.has(r.overflowX)||bN.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:s.x-n.x,y:s.y-n.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,s),Ye.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ns(this.updatePoint)}}function wg(e,t){return t?{point:t(e.point)}:e}function wN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jg({point:e},t){return{point:e,delta:wN(e,BA(t)),offset:wN(e,l7(t)),velocity:c7(t,.1)}}function l7(e){return e[0]}function BA(e){return e[e.length-1]}function c7(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=BA(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Jn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Jn(t)*2&&(r=e[1]);const a=Gn(s.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(s.x-r.x)/a,y:(s.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function u7(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?at(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?at(n,e,r.max):Math.min(e,n)),e}function jN(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function d7(e,{top:t,left:n,bottom:r,right:s}){return{x:jN(e.x,n,s),y:jN(e.y,t,r)}}function NN(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function h7(e,t){return{x:NN(e.x,t.x),y:NN(e.y,t.y)}}function f7(e,t){let n=.5;const r=cn(e),s=cn(t);return s>r?n=xu(t.min,t.max-r,e.min):r>s&&(n=xu(e.min,e.max-s,t.min)),Wr(0,1,n)}function p7(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const $y=.35;function m7(e=$y){return e===!1?e=0:e===!0&&(e=$y),{x:kN(e,"left","right"),y:kN(e,"to
571p","bottom")}}function kN(e,t,n){return{min:SN(e,t),max:SN(e,n)}}function SN(e,t){return typeof e=="number"?e:e[t]||0}const g7=new WeakMap;class x7{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=St(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(od(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:x,onDragStart:m}=this.getProps();if(p&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Wz(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pr(g=>{let v=this.getAxisMotionValue(g).get()||0;if(qr.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[g];w&&(v=cn(w)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&Ye.update(()=>m(h,f),!1,!0),Ay(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:x,onDirectionLock:m,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:g}=f;if(x&&this.currentDirection===null){this.currentDirection=v7(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&Ye.update(()=>y(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new zA(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:$A(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Ye.postRender(()=>l(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Gd(t,s,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=u7(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,s=this.constraints;t&&eo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=d7(r.layoutBox,t):this.constraints=!1,this.elastic=m7(n),s!==this.constraints&&!eo(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Pr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=p7(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!eo(t))return!1;const r=t.current;ki(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=wB(r,s.root,this.visualElement.getTransformPagePoint());let o=h7(s.layout.layoutBox,a);if(n){const l=n(yB(o));this.hasMutatedConstraints=!!l,l&&(o=lA(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Pr(d=>{if(!Gd(d,n,this.currentDirection))return;
vendor: 7,169 bytes, line 571
571let h=c&&c[d]||{};o&&(h={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ay(this.visualElement,t),r.start(c0(t,r,0,n,this.visualElement,!1))}stopAnimation(){Pr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Pr(n=>{const{drag:r}=this.getProps();if(!Gd(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n],c=a.get()||0;a.set(t[n]-at(o,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!eo(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Pr(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=f7({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Pr(o=>{if(!Gd(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(at(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;g7.set(this.visualElement,this);const t=this.visualElement.current,n=$c(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),f=u.target,p=f!==t&&Qz(f);d&&h&&!p&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();eo(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=y7(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",s);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Ye.read(s);const l=wu(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Pr(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:o=$y,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function _N(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function y7(e,t,n){const r=Rj(e,_N(n)),s=Rj(t,_N(n));return()=>{r(),s()}}function Gd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function v7(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class b7 extends Oi{constructor(t){super(t),this.removeGroupControls=Qn,this.removeListeners=Qn,this.controls=new x7(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ng=e=>(t,n)=>{e&&Ye.update(()=>e(t,n),!1,!0)};class w7 extends Oi{constructor(){super(...arguments),this.removePointerDownListener=Qn}onPointerDown(t){this.session=new zA(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$A(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ng(t),onStart:Ng(n),onMove:Ng(r),onEnd:(a,o)=>{delete this.session,s&&Ye.postRender(()=>s(a,o))}}}mount(){this.removePointerDownListener=$c(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let kg=!1;class j7 extends N.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),r&&r.register&&s&&r.register(a),kg&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),$h.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),kg=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Ye.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),f0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;kg=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function UA(e){const[t,n]=AA(),r=N.useContext(Kb);return i.jsx(j7,{...e,layoutGroup:r,switchLayoutGroup:N.useContext(LA),isPresent:t,safeToRemove:n})}const N7={pan:{Feature:w7},drag:{Feature:b7,ProjectionNode:TA,MeasureLayout:UA}};function EN(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,a=r[s];a&&Ye.postRender(()=>a(t,od(t)))}class k7 extends Oi{mount(){const{current:t}=this.node;t&&(this.unmount=Kz(t,(n,r)=>(EN(this.node,r,"Start"),s=>EN(this.node,s,"End"))))}unmount(){}}class S7 extends Oi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=sd(wu(this.node.current,"focus",()=>this.onFocus()),wu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function CN(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),a=r[s];a&&Ye.postRender(()=>a(t,od(t)))}class _7 extends Oi{mount(){const{current:t}=this.node;if(!t)return;
571const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Zz(t,(s,a)=>(CN(this.node,a,"Start"),(o,{success:l})=>CN(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const zy=new WeakMap,Sg=new WeakMap,E7=e=>{const t=zy.get(e.target);t&&t(e)},C7=e=>{e.forEach(E7)};function T7({root:e,...t}){const n=e||document;Sg.has(n)||Sg.set(n,{});const r=Sg.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(C7,{root:e,...t})),r[s]}function A7(e,t,n){const r=T7(t);return zy.set(e,n),r.observe(e),()=>{zy.delete(e),r.unobserve(e)}}const P7={some:0,all:1};class O7 extends Oi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:P7[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return A7(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(R7(t,n))&&this.startObserver()}unmount(){}}function R7({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const M7={inView:{Feature:O7},tap:{Feature:_7},focus:{Feature:S7},hover:{Feature:k7}},D7={layout:{ProjectionNode:TA,MeasureLayout:UA}},I7={...i7,...M7,...N7,...D7},re=e7(I7,t7);function qA(e){const t=Oa(()=>wa(e)),{isStatic:n}=N.useContext(Hp);if(n){const[,r]=N.useState(e);N.useEffect(()=>t.on("change",r),[])}return t}function VA(e,t){const n=qA(t()),r=()=>n.set(t());return r(),Gb(()=>{const s=()=>Ye.preRender(r,!1,!0),a=e.map(o=>o.on("change",s));return()=>{a.forEach(o=>o()),Ns(r)}}),n}function L7(e){Lc.current=[],e();const t=VA(Lc.current,e);return Lc.current=void 0,t}function F7(e,t,n,r){if(typeof e=="function")return L7(e);const a=typeof t=="function"?t:cB(t,n,r),o=Array.isArray(e)?TN(e,a):TN([e],([c])=>a(c)),l=Array.isArray(e)?void 0:e.accelerate;return l&&!l.isTransformed&&typeof t!="function"&&Array.isArray(n)&&(r==null?void 0:r.clamp)!==!1&&(o.accelerate={...l,times:t,keyframes:n,isTransformed:!0}),o}function TN(e,t){const n=Oa(()=>[]);return VA(e,()=>{n.length=0;const r=e.length;for(let s=0;s<r;s++)n[s]=e[s].get();return t(n)})}const WA=N.createContext(null);function $7(e,t,n,r){if(!r)return e;const s=e.findIndex(d=>d.value===t);if(s===-1)return e;const a=r>0?1:-1,o=e[s+a];if(!o)return e;const l=e[s],c=o.layout,u=at(c.min,c.max,.5);return a===1&&l.layout.max+n>u||a===-1&&l.layout.min+n<u?qF(e,s,s+a):e}function z7({children:e,as:t="ul",axis:n="y",onReorder:r,values:s,...a},o){const l=Oa(()=>re[t]),c=[],u=N.useRef(!1),d=N.useRef(null);ki(!!s,"Reorder.Group must be provided a values prop","reorder-values");const h={axis:n,groupRef:d,registerItem:(x,m)=>{const y=c.findIndex(g=>x===g.value);y!==-1?c[y].layout=m[n]:c.push({value:x,layout:m[n]}),c.sort(q7)},updateOrder:(x,m,y)=>{if(u.current)return;const g=$7(c,x,m,y);c!==g&&(u.current=!0,r(g.map(U7).filter(v=>s.indexOf(v)!==-1)))}};N.useEffect(()=>{u.current=!1});const f=x=>{d.current=x,typeof o=="function"?o(x):o&&(o.current=x)},p={overflowAnchor:"none",...a.style};return i.jsx(l,{...a,style:p,ref:f,ignoreStrict:!0,children:i.jsx(WA.Provider,{value:h,children:e})})}const B7=N.forwardRef(z7);function U7(e){return e.value}function q7(e,t){return e.layout.min-t.layout.min}const Yd=50,AN=25,V7=new Set(["auto","scroll"]),zc=new WeakMap,Bc=new WeakMap;let vc=null;function W7(){if(vc){const e=By(vc,"y");e&&(Bc.delete(e),zc.delete(e));const t=By(vc,"x");t&&t!==e&&(Bc.delete(t),zc.delete(t)),vc=null}}function H7(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY,s=e===document.body||e===document.documentElement;return V7.has(r)||s}function By(e,t){let n=e==null?void 0:e.parentElement;for(;n;){if(H7(n,t))return n;n=n.parentElement}return null}
571function K7(e,t,n){const r=t.getBoundingClientRect(),s=n==="x"?Math.max(0,r.left):Math.max(0,r.top),a=n==="x"?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),o=e-s,l=a-e;if(o<Yd){const c=1-o/Yd;return{amount:-AN*c*c,edge:"start"}}else if(l<Yd){const c=1-l/Yd;return{amount:AN*c*c,edge:"end"}}return{amount:0,edge:null}}function G7(e,t,n,r){if(!e)return;vc=e;const s=By(e,n);if(!s)return;const a=t-(n==="x"?window.scrollX:window.scrollY),{amount:o,edge:l}=K7(a,s,n);if(l===null){Bc.delete(s),zc.delete(s);return}const c=Bc.get(s),u=s===document.body||s===document.documentElement;if(c!==l){if(!(l==="start"&&r<0||l==="end"&&r>0))return;Bc.set(s,l);const h=n==="x"?s.scrollWidth-(u?window.innerWidth:s.clientWidth):s.scrollHeight-(u?window.innerHeight:s.clientHeight);zc.set(s,h)}if(o>0){const d=zc.get(s);if((n==="x"?u?window.scrollX:s.scrollLeft:u?window.scrollY:s.scrollTop)>=d)return}n==="x"?u?window.scrollBy({left:o}):s.scrollLeft+=o:u?window.scrollBy({top:o}):s.scrollTop+=o}function PN(e,t=0){return Vt(e)?e:qA(t)}function Y7({children:e,style:t={},value:n,as:r="li",onDrag:s,onDragEnd:a,layout:o=!0,...l},c){const u=Oa(()=>re[r]),d=N.useContext(WA),h={x:PN(t.x),y:PN(t.y)},f=F7([h.x,h.y],([g,v])=>g||v?1:"unset");ki(!!d,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:x,updateOrder:m,groupRef:y}=d;return i.jsx(u,{drag:p,...l,dragSnapToOrigin:!0,style:{...t,x:h.x,y:h.y,zIndex:f},layout:o,onDrag:(g,v)=>{const{velocity:b,point:w}=v,j=h[p].get();m(n,j,b[p]),G7(y.current,w[p],p,b[p]),s&&s(g,v)},onDragEnd:(g,v)=>{W7(),a&&a(g,v)},onLayoutMeasure:g=>{x(n,g)},ref:c,ignoreStrict:!0,children:e})}const X7=N.forwardRef(Y7);function Q7(e){return Object.prototype.toString.call(e)==="[object Object]"}function ON(e){return Q7(e)||Array.isArray(e)}function J7(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function j0(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const s=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return s!==a?!1:n.every(o=>{const l=e[o],c=t[o];return typeof l=="function"?`${l}`==`${c}`:!ON(l)||!ON(c)?l===c:j0(l,c)})}function RN(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Z7(e,t){if(e.length!==t.length)return!1;const n=RN(e),r=RN(t);return n.every((s,a)=>{const o=r[a];return j0(s,o)})}function N0(e){return typeof e=="number"}function Uy(e){return typeof e=="string"}function Gp(e){return typeof e=="boolean"}function MN(e){return Object.prototype.toString.call(e)==="[object Object]"}function ht(e){return Math.abs(e)}function k0(e){return Math.sign(e)}function Uc(e,t){return ht(e-t)}function e9(e,t){if(e===0||t===0||ht(e)<=ht(t))return 0;const n=Uc(ht(e),ht(t));return ht(n/e)}function t9(e){return Math.round(e*100)/100}function ju(e){return Nu(e).map(Number)}function vr(e){return e[ld(e)]}function ld(e){return Math.max(0,e.length-1)}function S0(e,t){return t===ld(e)}function DN(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function Nu(e){return Object.keys(e)}function HA(e,t){return[e,t].reduce((n,r)=>(Nu(r).forEach(s=>{const a=n[s],o=r[s],l=MN(a)&&MN(o);n[s]=l?HA(a,o):o}),n),{})}function qy(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function n9(e,t){const n={start:r,center:s,end:a};function r(){return 0}function s(c){return a(c)/2}function a(c){return t-c}function o(c,u){return Uy(e)?n[e](c):e(t,c,u)}return{measure:o}}function ku(){let e=[];function t(s,a,o,l={passive:!0}){let c;if("addEventListener"in s)s.addEventListener(a,o,l),c=()=>s.removeEventListener(a,o,l);else{const u=s;u.addListener(o),c=()=>u.removeListener(o)}return e.push(c),r}function n(){e=e.filter(s=>s())}const r={add:t,clear:n};return r}function r9(e,t,n,r){const s=ku(),a=1e3/60;let o=null,l=0,c=0;function u(){s.add(e,"visibilitychange",()=>{e.hidden&&x()})}function d(){p(),s.clear()}function h(y){if(!c)return;o||(o=y,n(),n());const g=y-o;for(o=y,l+=g;l>=a;)n(),l-=a;const v=l/a;r(v),c&&(c=t.requestAnimationFrame(h))}function f(){c||(c=t.requestAnimationFrame(h))}function p(){t.cancelAnimationFrame(c),o=null,l=0,c=0}function x(){o=null,l=0}return{init:u,destroy:d,start:f,stop:p,update:n,render:r}}function s9(e,t){const n=t==="rtl",r=e==="y",s=r?"y":"x",a=r?"x":"y",o=!r&&n?-1:1,l=d(),c=h();function u(x){const{height:m,width:y}=x;return r?m:y}function d(){return r?"top":n?"right":"left"}function h(){return r?"bottom":n?"left":"right"}function f(x){return x*o}return{scroll:s,cross:a,startEdge:l,endEdge:c,measureSize:u,direction:f}}function ja(e=0,t=0){const n=ht(e-t);function r(u){return u<e}function s(u){return u>t}function a(u){return r(u)||s(u)}function o(u){return a(u)?r(u)?e:t:u}function l(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:s,reachedMin:r,removeOffset:l}}function KA(e,t,n){const{constrain:r}=ja(0,e),s=e+1;let a=o(t);function o(f){return n?ht((s+f)%s):r(f)}function l(){return a}function c(f){return a=o(f),h}function u(f){return d().set(l()+f)}function d(){return KA(e,l(),n)}const h={get:l,set:c,add:u,clone:d};return h}function i9(e,t,n,r,s,a,o,l,c,u,d,h,f,p,x,m,y,g,v){const{cross:b,direction:w}=e,j=["INPUT","SELECT","TEXTAREA"],E={passive:!1},k=ku(),S=ku(),A=ja(50,225).constrain(p.measure(20)),C={mouse:300,touch:400},T={mouse:500,touch:600},_=x?43:25;let P=!1,O=0,I=0,B=!1,$=!1,q=!1,L=!1;function D(J){if(!v)return;function oe(ye){(Gp(v)||v(J,ye))&&M(ye)}const de=t;k.add(de,"dragstart",ye=>ye.preventDefault(),E).add(de,"touchmove",()=>{},E).add(de,"touchend",()=>{}).add(de,"touchstart",oe).add(de,"mousedown",oe).add(de,"touchcancel",H).add(de,"contextmenu",H).add(de,"click",G,!0)}function R(){k.clear(),S.clear()}function F(){const J=L?n:t;S.add(J,"touchmove",z,E).add(J,"touchend",H).add(J,"mousemove",z,E).add(J,"mouseup",H)}function U(J){const oe=J.nodeName||"";return j.includes(oe)}function V(){return(x?T:C)[L?"mouse":"touch"]}function W(J,oe){const de=h.add(k0(J)*-1),ye=d.byDistance(J,!x).distance;return x||ht(J)<A?ye:y&&oe?ye*.5:d.byIndex(de.get(),0).distance}function M(J){const oe=qy(J,r);L=oe,q=x&&oe&&!J.buttons&&P,P=Uc(s.get(),o.get())>=2,!(oe&&J.button!==0)&&(U(J.target)||(B=!0,a.pointerDown(J),u.useFriction(0).useDuration(0),s.set(o),F(),O=a.readPoint(J),I=a.readPoint(J,b),f.emit("pointerDown")))}function z(J){if(!qy(J,r)&&J.touches.length>=2)return H(J);const de=a.readPoint(J),ye=a.readPoint(J,b),ve=Uc(de,O),Ee=Uc(ye,I);if(!$&&!L&&(!J.cancelable||($=ve>Ee,!$)))return H(J);const X=a.pointerMove(J);ve>m&&(q=!0),u.useFriction(.3).useDuration(.75),l.start(),s.add(w(X)),J.preventDefault()}function H(J){const de=d.byDistance(0,!1).index!==h.get(),ye=a.pointerUp(J)*V(),ve=W(w(ye),de),Ee=e9(ye,ve),X=_-10*Ee,Q=g+Ee/50;$=!1,B=!1,S.clear(),u.useDuration(X).useFriction(Q),c.distance(ve,!x),L=!1,f.emit("pointerUp")}function G(J){q&&(J.stopPropagation(),J.preventDefault(),q=!1)}function Y(){return B}return{init:D,destroy:R,pointerDown:Y}}function a9(e,t){let r,s;function a(h){return h.timeStamp}function o(h,f){const x=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(qy(h,t)?h:h.touches[0])[x]}function l(h){return r=h,s=h,o(h)}function c(h){const f=o(h)-o(s),p=a(h)-a(r)>170;return s=h,p&&(r=h),f}function u(h){if(!r||!s)return 0;const f=o(s)-o(r),p=a(h)-a(r),x=a(h)-a(s)>170,m=f/p;return p&&!x&&ht(m)>.1?m:0}return{pointerDown:l,pointerMove:c,pointerUp:u,readPoint:o}}function o9(){function e(n){const{offsetTop:r,offsetLeft:s,offsetWidth:a,offsetHeight:o}=n;
vendor: 10,091 bytes, line 571
571return{top:r,right:s+a,bottom:r+o,left:s,width:a,height:o}}return{measure:e}}function l9(e){function t(r){return e*(r/100)}return{measure:t}}function c9(e,t,n,r,s,a,o){const l=[e].concat(r);let c,u,d=[],h=!1;function f(y){return s.measureSize(o.measure(y))}function p(y){if(!a)return;u=f(e),d=r.map(f);function g(v){for(const b of v){if(h)return;const w=b.target===e,j=r.indexOf(b.target),E=w?u:d[j],k=f(w?e:r[j]);if(ht(k-E)>=.5){y.reInit(),t.emit("resize");break}}}c=new ResizeObserver(v=>{(Gp(a)||a(y,v))&&g(v)}),n.requestAnimationFrame(()=>{l.forEach(v=>c.observe(v))})}function x(){h=!0,c&&c.disconnect()}return{init:p,destroy:x}}function u9(e,t,n,r,s,a){let o=0,l=0,c=s,u=a,d=e.get(),h=0;function f(){const E=r.get()-e.get(),k=!c;let S=0;return k?(o=0,n.set(r),e.set(r),S=E):(n.set(e),o+=E/c,o*=u,d+=o,e.add(o),S=d-h),l=k0(S),h=d,j}function p(){const E=r.get()-t.get();return ht(E)<.001}function x(){return c}function m(){return l}function y(){return o}function g(){return b(s)}function v(){return w(a)}function b(E){return c=E,j}function w(E){return u=E,j}const j={direction:m,duration:x,velocity:y,seek:f,settled:p,useBaseFriction:v,useBaseDuration:g,useFriction:w,useDuration:b};return j}function d9(e,t,n,r,s){const a=s.measure(10),o=s.measure(50),l=ja(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(p){if(!u())return;const x=e.reachedMin(t.get())?"min":"max",m=ht(e[x]-t.get()),y=n.get()-t.get(),g=l.constrain(m/o);n.subtract(y*g),!p&&ht(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function h(p){c=!p}return{shouldConstrain:u,constrain:d,toggleActive:h}}function h9(e,t,n,r,s){const a=ja(-t+e,0),o=h(),l=d(),c=f();function u(x,m){return Uc(x,m)<=1}function d(){const x=o[0],m=vr(o),y=o.lastIndexOf(x),g=o.indexOf(m)+1;return ja(y,g)}function h(){return n.map((x,m)=>{const{min:y,max:g}=a,v=a.constrain(x),b=!m,w=S0(n,m);return b?g:w||u(y,v)?y:u(g,v)?g:v}).map(x=>parseFloat(x.toFixed(3)))}function f(){if(t<=e+s)return[a.max];if(r==="keepSnaps")return o;const{min:x,max:m}=l;return o.slice(x,m)}return{snapsContained:c,scrollContainLimit:l}}function f9(e,t,n){const r=t[0],s=n?r-e:vr(t);return{limit:ja(s,r)}}function p9(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:l,reachedMax:c}=ja(a,o);function u(f){return f===1?c(n.get()):f===-1?l(n.get()):!1}function d(f){if(!u(f))return;const p=e*(f*-1);r.forEach(x=>x.add(p))}return{loop:d}}function m9(e){const{max:t,length:n}=e;function r(a){const o=a-t;return n?o/-n:0}return{get:r}}function g9(e,t,n,r,s){const{startEdge:a,endEdge:o}=e,{groupSlides:l}=s,c=h().map(t.measure),u=f(),d=p();function h(){return l(r).map(m=>vr(m)[o]-m[0][a]).map(ht)}function f(){return r.map(m=>n[a]-m[a]).map(m=>-ht(m))}function p(){return l(u).map(m=>m[0]).map((m,y)=>m+c[y])}return{snaps:u,snapsAligned:d}}function x9(e,t,n,r,s,a){const{groupSlides:o}=s,{min:l,max:c}=r,u=d();function d(){const f=o(a),p=!e||t==="keepSnaps";return n.length===1?[a]:p?f:f.slice(l,c).map((x,m,y)=>{const g=!m,v=S0(y,m);if(g){const b=vr(y[0])+1;return DN(b)}if(v){const b=ld(a)-vr(y)[0]+1;return DN(b,vr(y)[0])}return x})}return{slideRegistry:u}}function y9(e,t,n,r,s){const{reachedAny:a,removeOffset:o,constrain:l}=r;function c(x){return x.concat().sort((m,y)=>ht(m)-ht(y))[0]}function u(x){const m=e?o(x):l(x),y=t.map((v,b)=>({diff:d(v-m,0),index:b})).sort((v,b)=>ht(v.diff)-ht(b.diff)),{index:g}=y[0];return{index:g,distance:m}}function d(x,m){const y=[x,x+n,x-n];if(!e)return x;if(!m)return c(y);const g=y.filter(v=>k0(v)===m);return g.length?c(g):vr(y)-n}function h(x,m){const y=t[x]-s.get(),g=d(y,m);return{index:x,distance:g}}function f(x,m){const y=s.get()+x,{index:g,distance:v}=u(y),b=!e&&a(y);if(!m||b)return{index:g,distance:x};const w=t[g]-v,j=x+d(w,0);return{index:g,distance:j}}return{byDistance:f,byIndex:h,shortcut:d}}function v9(e,t,n,r,s,a,o){function l(h){const f=h.distance,p=h.index!==t.get();a.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(h.index),o.emit("select"))}function c(h,f){const p=s.byDistance(h,f);l(p)}function u(h,f){const p=t.clone().set(h),x=s.byIndex(p.get(),f);l(x)}return{distance:c,index:u}}function b9(e,t,n,r,s,a,o,l){const c={passive:!0,capture:!0};let u=0;function d(p){if(!l)return;function x(m){if(new Date().getTime()-u>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const v=n.findIndex(b=>b.includes(m));N0(v)&&(s.useDuration(0),r.index(v,0),o.emit("slideFocus"))}a.add(document,"keydown",h,!1),t.forEach((m,y)=>{a.add(m,"focus",g=>{(Gp(l)||l(p,g))&&x(y)},c)})}function h(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:d}}function bc(e){let t=e;function n(){return t}function r(c){t=o(c)}function s(c){t+=o(c)}function a(c){t-=o(c)}function o(c){return N0(c)?c:c.get()}return{get:n,set:r,add:s,subtract:a}}function GA(e,t){const n=e.scroll==="x"?o:l,r=t.style;let s=null,a=!1;function o(f){return`translate3d(${f}px,0px,0px)`}function l(f){return`translate3d(0px,${f}px,0px)`}function c(f){if(a)return;const p=t9(e.direction(f));p!==s&&(r.transform=n(p),s=p)}function u(f){a=!f}function d(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:c,toggleActive:u}}function w9(e,t,n,r,s,a,o,l,c){const d=ju(s),h=ju(s).reverse(),f=g().concat(v());function p(k,S){return k.reduce((A,C)=>A-s[C],S)}function x(k,S){return k.reduce((A,C)=>p(A,S)>0?A.concat([C]):A,[])}function m(k){return a.map((S,A)=>({start:S-r[A]+.5+k,end:S+t-.5+k}))}function y(k,S,A){const C=m(S);return k.map(T=>{const _=A?0:-n,P=A?n:0,O=A?"end":"start",I=C[T][O];return{index:T,loopPoint:I,slideLocation:bc(-1),translate:GA(e,c[T]),target:()=>l.get()>I?_:P}})}function g(){const k=o[0],S=x(h,k);return y(S,n,!1)}function v(){const k=t-o[0]-1,S=x(d,k);return y(S,-n,!0)}function b(){return f.every(({index:k})=>{const S=d.filter(A=>A!==k);return p(S,t)<=.1})}function w(){f.forEach(k=>{const{target:S,translate:A,slideLocation:C}=k,T=S();T!==C.get()&&(A.to(T),C.set(T))})}function j(){f.forEach(k=>k.translate.clear())}return{canLoop:b,clear:j,loop:w,loopPoints:f}}function j9(e,t,n){let r,s=!1;function a(c){if(!n)return;function u(d){for(const h of d)if(h.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(d=>{s||(Gp(n)||n(c,d))&&u(d)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),s=!0}return{init:a,destroy:o}}function N9(e,t,n,r){const s={};let a=null,o=null,l,c=!1;function u(){l=new IntersectionObserver(x=>{c||(x.forEach(m=>{const y=t.indexOf(m.target);s[y]=m}),a=null,o=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(x=>l.observe(x))}function d(){l&&l.disconnect(),c=!0}function h(x){return Nu(s).reduce((m,y)=>{const g=parseInt(y),{isIntersecting:v}=s[g];return(x&&v||!x&&!v)&&m.push(g),m},[])}function f(x=!0){if(x&&a)return a;if(!x&&o)return o;const m=h(x);return x&&(a=m),x||(o=m),m}return{init:u,destroy:d,get:f}}function k9(e,t,n,r,s,a){const{measureSize:o,startEdge:l,endEdge:c}=e,u=n[0]&&s,d=x(),h=m(),f=n.map(o),p=y();function x(){if(!u)return 0;const v=n[0];return ht(t[l]-v[l])}function m(){if(!u)return 0;const v=a.getComputedStyle(vr(r));return parseFloat(v.getPropertyValue(`margin-${c}`))}function y(){return n.map((v,b,w)=>{const j=!b,E=S0(w,b);return j?f[b]+d:E?f[b]+h:w[b+1][l]-v[l]}).map(ht)}return{slideSizes:f,slideSizesWithGaps:p,startGap:d,endGap:h}}function S9(e,t,n,r,s,a,o,l,c){const{startEdge:u,endEdge:d,direction:h}=e,f=N0(n);function p(g,v){return ju(g).filter(b=>b%v===0).map(b=>g.slice(b,b+v))}function x(g){return g.length?ju(g).reduce((v,b,w)=>{const j=vr(v)||0,E=j===0,k=b===ld(g),S=s[u]-a[j][u],A=s[u]-a[b][d],C=!r&&E?h(o):0,T=!r&&k?h(l):0,_=ht(A-T-(S+C));return w&&_>t+c&&v.push(b),k&&v.push(g.length),v},[]).map((v,b,w)=>{const j=Math.max(w[b-1]||0);return g.slice(j,v)}):[]}function m(g){return f?p(g,n):x(g)}return{groupSlides:m}}function _9(e,t,n,r,s,a,o){const{align:l,axis:c,direction:u,startIndex:d,loop:h,duration:f,dragFree:p,dragThreshold:x,inViewThreshold:m,slidesToScroll:y,skipSnaps:g,containScroll:v,watchResize:b,watchSlides:w,watchDrag:j,watchFocus:E}=a,k=2,S=o9(),A=S.measure(t),C=n.map(S.measure),T=s9(c,u),_=T.measureSize(A),P=l9(_),O=n9(l,_),I=!h&&!!v,B=h||!!v,{slideSizes:$,slideSizesWithGaps:q,startGap:L,endGap:D}=k9(T,A,C,n,B,s),R=S9(T,_,y,h,A,C,L,D,k),{snaps:F,snapsAligned:U}=g9(T,O,A,C,R),V=-vr(F)+vr(q),{snapsContained:W,scrollContainLimit:M}=h9(_,V,U,v,k),z=I?W:U,{limit:H}=f9(V,z,h),G=KA(ld(z),d,h),Y=G.clone(),Z=ju(n),J=({dragHandler:Fe,scrollBody:ot,scrollBounds:Gr,options:{loop:Sr}})=>{Sr||Gr.constrain(Fe.pointerDown()),ot.seek()},oe=({scrollBody:Fe,translate:ot,location:Gr,offsetLocation:Sr,previousLocation:_r,scrollLooper:Ts,slideLooper:nr,dragHandler:Vl,animation:$a,eventHandler:Ri,scrollBounds:za,options:{loop:Ba}},lt)=>{const et=Fe.settled(),$t=!za.shouldConstrain(),we=Ba?et:et&&$t,Ae=we&&!Vl.pointerDown();Ae&&$a.stop();const Me=Gr.get()*lt+_r.get()*(1-lt);Sr.set(Me),Ba&&(Ts.loop(Fe.direction()),nr.loop()),ot.to(Sr.get()),Ae&&Ri.emit("settle"),we||Ri.emit("scroll")},de=r9(r,s,()=>J(_n),Fe=>oe(_n,Fe)),ye=.68,ve=z[G.get()],Ee=bc(ve),X=bc(ve),Q=bc(ve),ee=bc(ve),ce=u9(Ee,Q,X,ee,f,ye),te=y9(h,z,V,H,ee),Ne=v9(de,G,Y,ce,te,ee,o),Ce=m9(H),Te=ku(),Ve=N9(t,n,o,m),{slideRegistry:Xe}=x9(I,v,z,M,R,Z),Be=b9(e,n,Xe,Ne,ce,Te,o,E),_n={ownerDocument:r,ownerWindow:s,eventHandler:o,containerRect:A,slideRects:C,animation:de,axis:T,dragHandler:i9(T,e,r,s,ee,a9(T,s),Ee,de,Ne,ce,te,G,o,P,p,x,g,ye,j),eventStore:Te,percentOfView:P,index:G,indexPrevious:Y,limit:H,location:Ee,offsetLocation:Q,previousLocation:X,options:a,resizeHandler:c9(t,o,s,n,T,b,S),scrollBody:ce,scrollBounds:d9(H,Q,ee,ce,P),scrollLooper:p9(V,H,Q,[Ee,Q,X,ee]),scrollProgress:Ce,scrollSnapList:z.map(Ce.get),scrollSnaps:z,scrollTarget:te,scrollTo:Ne,slideLooper:w9(T,_,V,$,q,F,z,Q,n),slideFocus:Be,slidesHandler:j9(t,o,w),slidesInView:Ve,slideIndexes:Z,slideRegistry:Xe,slidesToScroll:R,target:ee,translate:GA(T,t)};return _n}function E9(){let e={},t;function n(u){t=u}function r(u){return e[u]||[]}function s(u){return r(u).forEach(d=>d(t,u)),c}
vendor: 4,590 bytes, line 571
571function a(u,d){return e[u]=r(u).concat([d]),c}function o(u,d){return e[u]=r(u).filter(h=>h!==d),c}function l(){e={}}const c={init:n,emit:s,off:o,on:a,clear:l};return c}const C9={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function T9(e){function t(a,o){return HA(a,o||{})}function n(a){const o=a.breakpoints||{},l=Nu(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,u)=>t(c,u),{});return t(a,l)}function r(a){return a.map(o=>Nu(o.breakpoints||{})).reduce((o,l)=>o.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function A9(e){let t=[];function n(a,o){return t=o.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(a,e)),o.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function $f(e,t,n){const r=e.ownerDocument,s=r.defaultView,a=T9(s),o=A9(a),l=ku(),c=E9(),{mergeOptions:u,optionsAtMedia:d,optionsMediaQueries:h}=a,{on:f,off:p,emit:x}=c,m=T;let y=!1,g,v=u(C9,$f.globalOptions),b=u(v),w=[],j,E,k;function S(){const{container:Z,slides:J}=b;E=(Uy(Z)?e.querySelector(Z):Z)||e.children[0];const de=Uy(J)?E.querySelectorAll(J):J;k=[].slice.call(de||E.children)}function A(Z){const J=_9(e,E,k,r,s,Z,c);if(Z.loop&&!J.slideLooper.canLoop()){const oe=Object.assign({},Z,{loop:!1});return A(oe)}return J}function C(Z,J){y||(v=u(v,Z),b=d(v),w=J||w,S(),g=A(b),h([v,...w.map(({options:oe})=>oe)]).forEach(oe=>l.add(oe,"change",T)),b.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(Y),g.eventHandler.init(Y),g.resizeHandler.init(Y),g.slidesHandler.init(Y),g.options.loop&&g.slideLooper.loop(),E.offsetParent&&k.length&&g.dragHandler.init(Y),j=o.init(Y,w)))}function T(Z,J){const oe=R();_(),C(u({startIndex:oe},Z),J),c.emit("reInit")}function _(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),o.destroy(),l.clear()}function P(){y||(y=!0,l.clear(),_(),c.emit("destroy"),c.clear())}function O(Z,J,oe){!b.active||y||(g.scrollBody.useBaseFriction().useDuration(J===!0?0:b.duration),g.scrollTo.index(Z,oe||0))}function I(Z){const J=g.index.add(1).get();O(J,Z,-1)}function B(Z){const J=g.index.add(-1).get();O(J,Z,1)}function $(){return g.index.add(1).get()!==R()}function q(){return g.index.add(-1).get()!==R()}function L(){return g.scrollSnapList}function D(){return g.scrollProgress.get(g.offsetLocation.get())}function R(){return g.index.get()}function F(){return g.indexPrevious.get()}function U(){return g.slidesInView.get()}function V(){return g.slidesInView.get(!1)}function W(){return j}function M(){return g}function z(){return e}function H(){return E}function G(){return k}const Y={canScrollNext:$,canScrollPrev:q,containerNode:H,internalEngine:M,destroy:P,off:p,on:f,emit:x,plugins:W,previousScrollSnap:F,reInit:m,rootNode:z,scrollNext:I,scrollPrev:B,scrollProgress:D,scrollSnapList:L,scrollTo:O,selectedScrollSnap:R,slideNodes:G,slidesInView:U,slidesNotInView:V};return C(t,n),setTimeout(()=>c.emit("init"),0),Y}$f.globalOptions=void 0;function _0(e={},t=[]){const n=N.useRef(e),r=N.useRef(t),[s,a]=N.useState(),[o,l]=N.useState(),c=N.useCallback(()=>{s&&s.reInit(n.current,r.current)},[s]);return N.useEffect(()=>{j0(n.current,e)||(n.current=e,c())},[e,c]),N.useEffect(()=>{Z7(r.current,t)||(r.current=t,c())},[t,c]),N.useEffect(()=>{if(J7()&&o){$f.globalOptions=_0.globalOptions;const u=$f(o,n.current,r.current);return a(u),()=>u.destroy()}else a(void 0)},[o,a]),[l,s]}_0.globalOptions=void 0;const P9={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function O9(e,t){const n=e.scrollSnapList();return typeof t=="number"?n.map(()=>t):t(n,e)}function R9(e,t){const n=e.rootNode();return t&&t(n)||n}function E0(e={}){let t,n,r,s,a=null,o=0,l=!1,c=!1,u=!1,d=!1;function h(O,I){n=O;const{mergeOptions:B,optionsAtMedia:$}=I,q=B(P9,E0.globalOptions),L=B(q,e);if(t=$(L),n.scrollSnapList().length<=1)return;d=t.jump,r=!1,s=O9(n,t.delay);const{eventStore:D,ownerDocument:R}=n.internalEngine(),F=!!n.internalEngine().options.watchDrag,U=R9(n,t.rootNode);D.add(R,"visibilitychange",g),F&&n.on("pointerDown",b),F&&!t.stopOn
571Interaction&&n.on("pointerUp",w),t.stopOnMouseEnter&&D.add(U,"mouseenter",j),t.stopOnMouseEnter&&!t.stopOnInteraction&&D.add(U,"mouseleave",E),t.stopOnFocusIn&&n.on("slideFocusStart",y),t.stopOnFocusIn&&!t.stopOnInteraction&&D.add(n.containerNode(),"focusout",m),t.playOnInit&&m()}function f(){n.off("pointerDown",b).off("pointerUp",w).off("slideFocusStart",y),y(),r=!0,l=!1}function p(){const{ownerWindow:O}=n.internalEngine();O.clearTimeout(o),o=O.setTimeout(T,s[n.selectedScrollSnap()]),a=new Date().getTime(),n.emit("autoplay:timerset")}function x(){const{ownerWindow:O}=n.internalEngine();O.clearTimeout(o),o=0,a=null,n.emit("autoplay:timerstopped")}function m(){if(!r){if(v()){u=!0;return}l||n.emit("autoplay:play"),p(),l=!0}}function y(){r||(l&&n.emit("autoplay:stop"),x(),l=!1)}function g(){if(v())return u=l,y();u&&m()}function v(){const{ownerDocument:O}=n.internalEngine();return O.visibilityState==="hidden"}function b(){c||y()}function w(){c||m()}function j(){c=!0,y()}function E(){c=!1,m()}function k(O){typeof O<"u"&&(d=O),m()}function S(){l&&y()}function A(){l&&m()}function C(){return l}function T(){const{index:O}=n.internalEngine(),I=O.clone().add(1).get(),B=n.scrollSnapList().length-1,$=t.stopOnLastSnap&&I===B;if(n.canScrollNext()?n.scrollNext(d):n.scrollTo(0,d),n.emit("autoplay:select"),$)return y();m()}function _(){if(!a)return null;const O=s[n.selectedScrollSnap()],I=new Date().getTime()-a;return O-I}return{name:"autoplay",options:e,init:h,destroy:f,play:k,stop:S,reset:A,isPlaying:C,timeUntilNext:_}}E0.globalOptions=void 0;const M9="/assets/hero-atmosphere-crTTDCiE.jpg",YA="/assets/club-badge-CiN-FkDP.png",D9="385d2d0e-7118-4ad5-ad4d-baf8530b359d",Yp="468",I9="/api-proxy.php?endpoint=",Al=async e=>{const t=`${I9}${encodeURIComponent(e)}`,n=await fetch(t,{headers:{"FWP-API-Key":D9,Accept:"application/json"}});if(!n.ok)throw new Error(`FWP API error: ${n.status} ${n.statusText}`);return n.json()},XA=async()=>{var t;return((t=(await Al(`fixtures-results.json?team=${Yp}`))["fixtures-results"])==null?void 0:t.matches)||[]},L9=async e=>{const t=await Al(`match.json?match=${e}`);if(!t.match)throw new Error("Match details not found in response");return t.match},F9=async()=>{var t,n;const e=await Al(`league-table.json?team=${Yp}`);return{competition:((t=e["league-table"])==null?void 0:t.competition)||{id:0,name:"Unknown"},teams:((n=e["league-table"])==null?void 0:n.teams)||[]}},$9=async e=>{var n;return((n=(await Al(`fixtures-results.json?comp=${e}`))["fixtures-results"])==null?void 0:n.matches)||[]},z9=async()=>{var t;return((t=(await Al(`appearances.json?team=${Yp}`)).appearances)==null?void 0:t.players)||[]},B9=async()=>{var t;return((t=(await Al(`goalscorers.json?team=${Yp}`)).goalscorers)==null?void 0:t.players)||[]},Na=e=>{var o;if(!e||!e.status||e.abandoned)return!1;const t=e.status.short||"",n=["1st","2nd","HT","ET","Live","Late","Pen","Pens","Half"],r=/^(\d+)'?(\+\d+'?)?$/.test(t.trim()),s=n.some(l=>t.includes(l)),a=t==="FT"||t==="AET"||t==="P-P"||((o=e.status.full)==null?void 0:o.includes("Full Time"));return(s||r)&&!a};function tn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ka(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const QA=6048e5,U9=864e5,JA=6e4,ZA=36e5;let q9={};function Xp(){return q9}function Su(e,t){var l,c,u,d;const n=Xp(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=tn(e),a=s.getDay(),o=(a<r?7:0)+a-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function zf(e){return Su(e,{weekStartsOn:1})}function eP(e){const t=tn(e),n=t.getFullYear(),r=ka(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=zf(r),a=ka(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const o=zf(a);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Vy(e){const t=tn(e);return t.setHours(0,0,0,0),t}function IN(e){const t=tn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function V9(e,t){const n=Vy(e),r=Vy(t),s=+n-IN(n),a=+r-IN(r);return Math.round((s-a)/U9)}function W9(e){const t=eP(e),n=ka(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),zf(n)}function H9(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function K9(e){if(!H9(e)&&typeof e!="number")return!1;const t=tn(e);return!isNaN(Number(t))}function G9(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function Y9(e,t){return+tn(e)-+tn(t)}function C0(e,t,n){const r=Y9(e,t)/1e3;return G9(n==null?void 0:n.roundingMethod)(r)}function X9(e){const t=tn(e),n=ka(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Q9={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}}
vendor: 4,897 bytes, line 571
571,J9=(e,t,n)=>{let r;const s=Q9[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function _g(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Z9={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},eq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},tq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nq={date:_g({formats:Z9,defaultWidth:"full"}),time:_g({formats:eq,defaultWidth:"full"}),dateTime:_g({formats:tq,defaultWidth:"full"})},rq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sq=(e,t,n,r)=>rq[e];function ic(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;s=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return s[a]}}const iq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},lq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},cq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},uq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},dq=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},hq={ordinalNumber:dq,era:ic({values:iq,defaultWidth:"wide"}),quarter:ic({values:aq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ic({values:oq,defaultWidth:"wide"}),day:ic({values:lq,defaultWidth:"wide"}),dayPeriod:ic({values:cq,defaultWidth:"wide",formattingValues:uq,defaultFormattingWidth:"wide"})};function ac(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(s);if(!a)return null;const o=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?pq(l,h=>h.test(o)):fq(l,h=>h.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function fq(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function pq(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function mq(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(s.length);return{value:o,rest:l}}}const gq=/^(\d+)(th|st|nd|rd)?/i,xq=/\d+/i,yq={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},vq={any:[/^b/i,/^(a|c)/i]},bq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wq={any:[/1/i,/2/i,/3/i,/4/i]},jq={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Nq={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]}
vendor: 12,179 bytes, line 571
571,kq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Sq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_q={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Eq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Cq={ordinalNumber:mq({matchPattern:gq,parsePattern:xq,valueCallback:e=>parseInt(e,10)}),era:ac({matchPatterns:yq,defaultMatchWidth:"wide",parsePatterns:vq,defaultParseWidth:"any"}),quarter:ac({matchPatterns:bq,defaultMatchWidth:"wide",parsePatterns:wq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ac({matchPatterns:jq,defaultMatchWidth:"wide",parsePatterns:Nq,defaultParseWidth:"any"}),day:ac({matchPatterns:kq,defaultMatchWidth:"wide",parsePatterns:Sq,defaultParseWidth:"any"}),dayPeriod:ac({matchPatterns:_q,defaultMatchWidth:"any",parsePatterns:Eq,defaultParseWidth:"any"})},Tq={code:"en-US",formatDistance:J9,formatLong:nq,formatRelative:sq,localize:hq,match:Cq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Aq(e){const t=tn(e);return V9(t,X9(t))+1}function Pq(e){const t=tn(e),n=+zf(t)-+W9(t);return Math.round(n/QA)+1}function tP(e,t){var d,h,f,p;const n=tn(e),r=n.getFullYear(),s=Xp(),a=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(f=s.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=ka(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const l=Su(o,t),c=ka(e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Su(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Oq(e,t){var l,c,u,d;const n=Xp(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=tP(e,t),a=ka(e,0);return a.setFullYear(s,0,r),a.setHours(0,0,0,0),Su(a,t)}function Rq(e,t){const n=tn(e),r=+Su(n,t)-+Oq(n,t);return Math.round(r/QA)+1}function We(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ms={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return We(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):We(n+1,2)},d(e,t){return We(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return We(e.getHours()%12||12,t.length)},H(e,t){return We(e.getHours(),t.length)},m(e,t){return We(e.getMinutes(),t.length)},s(e,t){return We(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return We(s,t.length)}},qa={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},LN={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Ms.y(e,t)},Y:function(e,t,n,r){const s=tP(e,r),a=s>0?s:1-s;if(t==="YY"){const o=a%100;return We(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):We(a,t.length)},R:function(e,t){const n=eP(e);return We(n,t.length)},u:function(e,t){const n=e.getFullYear();return We(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return We(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return We(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ms.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return We(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=Rq(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):We(s,t.length)},I:function(e,t,n){const r=Pq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):We(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ms.d(e,t)},D:function(e,t,n){const r=Aq(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):We(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),a=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return We(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),a=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return We(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return We(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=qa.noon:r===0?s=qa.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=qa.evening:r>=12?s=qa.afternoon:r>=4?s=qa.morning:s=qa.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ms.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ms.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ms.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ms.s(e,t)},S:function(e,t){return Ms.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $N(r);case"XXXX":case"XX":return zi(r);case"XXXXX":case"XXX":default:return zi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $N(r);case"xxxx":case"xx":return zi(r);case"xxxxx":case"xxx":default:return zi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+FN(r,":");case"OOOO":default:return"GMT"+zi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+FN(r,":");case"zzzz":default:return"GMT"+zi(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return We(r,t.length)},T:function(e,t,n){const r=e.getTime();return We(r,t.length)}};function FN(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),a=r%60;return a===0?n+String(s):n+String(s)+t+We(a,2)}function $N(e,t){return e%60===0?(e>0?"-":"+")+We(Math.abs(e)/60,2):zi(e,t)}function zi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=We(Math.trunc(r/60),2),a=We(r%60,2);return n+s+t+a}const zN=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},nP=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Mq=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return zN(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",zN(r,t)).replace("{{time}}",nP(s,t))},Dq={p:nP,P:Mq},Iq=/^D+$/,Lq=/^Y+$/,Fq=["D","DD","YY","YYYY"];function $q(e){return Iq.test(e)}function zq(e){return Lq.test(e)}function Bq(e,t,n){const r=Uq(e,t,n);if(console.warn(r),Fq.includes(e))throw new RangeError(r)}function Uq(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wq=/^'([^]*?)'?$/,Hq=/''/g,Kq=/[a-zA-Z]/;function Ft(e,t,n){var d,h,f,p;const r=Xp(),s=r.locale??Tq,a=r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,o=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,l=tn(e);if(!K9(l))throw new RangeError("Invalid time value");let c=t.match(Vq).map(x=>{const m=x[0];if(m==="p"||m==="P"){const y=Dq[m];return y(x,s.formatLong)}return x}).join("").match(qq).map(x=>
vendor: 4,304 bytes, line 571
571{if(x==="''")return{isToken:!1,value:"'"};const m=x[0];if(m==="'")return{isToken:!1,value:Gq(x)};if(LN[m])return{isToken:!0,value:x};if(m.match(Kq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:x}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:s};return c.map(x=>{if(!x.isToken)return x.value;const m=x.value;(zq(m)||$q(m))&&Bq(m,t,String(e));const y=LN[m[0]];return y(l,m,s.localize,u)}).join("")}function Gq(e){const t=e.match(Wq);return t?t[1].replace(Hq,"'"):e}function Yq(e){return tn(e).getMonth()}function BN(e,t){const n=tn(e),r=tn(t);return n.getTime()>r.getTime()}function nn(e,t){const r=Zq(e);let s;if(r.date){const c=eV(r.date,2);s=tV(c.restDateString,c.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const a=s.getTime();let o=0,l;if(r.time&&(o=nV(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(l=rV(r.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(a+o),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(a+o+l)}const Xd={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Xq=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Qq=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Jq=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Zq(e){const t={},n=e.split(Xd.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Xd.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Xd.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const s=Xd.timezone.exec(r);s?(t.time=r.replace(s[1],""),t.timezone=s[1]):t.time=r}return t}function eV(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const s=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?s:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function tV(e,t){if(t===null)return new Date(NaN);const n=e.match(Xq);if(!n)return new Date(NaN);const r=!!n[4],s=oc(n[1]),a=oc(n[2])-1,o=oc(n[3]),l=oc(n[4]),c=oc(n[5])-1;if(r)return lV(t,l,c)?sV(t,l,c):new Date(NaN);{const u=new Date(0);return!aV(t,a,o)||!oV(t,s)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(s,o)),u)}}function oc(e){return e?parseInt(e):1}function nV(e){const t=e.match(Qq);if(!t)return NaN;const n=Eg(t[1]),r=Eg(t[2]),s=Eg(t[3]);return cV(n,r,s)?n*ZA+r*JA+s*1e3:NaN}function Eg(e){return e&&parseFloat(e.replace(",","."))||0}function rV(e){if(e==="Z")return 0;const t=e.match(Jq);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return uV(r,s)?n*(r*ZA+s*JA):NaN}function sV(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const s=r.getUTCDay()||7,a=(t-1)*7+n+1-s;return r.setUTCDate(r.getUTCDate()+a),r}const iV=[31,null,31,30,31,30,31,31,30,31,30,31];function rP(e){return e%400===0||e%4===0&&e%100!==0}function aV(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(iV[t]||(rP(e)?29:28))}function oV(e,t){return t>=1&&t<=(rP(e)?366:365)}function lV(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function cV(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function uV(e,t){return t>=0&&t<=59}var Fr=function(){return Fr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Fr.apply(this,arguments)};function Pl(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 s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function dV(e,t,n,r){function s(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?a(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})}function hV(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,a;r<s;
571r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}const fV=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class T0 extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class pV extends T0{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class UN extends T0{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class qN extends T0{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Wy;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Wy||(Wy={}));class mV{constructor(t,{headers:n={},customFetch:r,region:s=Wy.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=fV(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return dV(this,arguments,void 0,function*(n,r={}){var s;let a,o;try{const{headers:l,method:c,body:u,signal:d,timeout:h}=r;let f={},{region:p}=r;p||(p=this.region);const x=new URL(`${this.url}/${n}`);p&&p!=="any"&&(f["x-region"]=p,x.searchParams.set("forceFunctionRegion",p));let m;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(f["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(f["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let y=d;h&&(o=new AbortController,a=setTimeout(()=>o.abort(),h),d?(y=o.signal,d.addEventListener("abort",()=>o.abort())):y=o.signal);const g=yield this.fetch(x.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),l),body:m,signal:y}).catch(j=>{throw new pV(j)}),v=g.headers.get("x-relay-error");if(v&&v==="true")throw new UN(g);if(!g.ok)throw new qN(g);let b=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),w;return b==="application/json"?w=yield g.json():b==="application/octet-stream"||b==="application/pdf"?w=yield g.blob():b==="text/event-stream"?w=g:b==="multipart/form-data"?w=yield g.formData():w=yield g.text(),{data:w,error:null,response:g}}catch(l){return{data:null,error:l,response:l instanceof qN||l instanceof UN?l.context:void 0}}finally{a&&clearTimeout(a)}})}}var gV=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
571de=e.code}},xV=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{let o=null,l=null,c=null,u=a.status,d=a.statusText;if(a.ok){var h,f;if(n.method!=="HEAD"){var p;const y=await a.text();y===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((p=n.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?l=y:l=JSON.parse(y))}const x=(h=n.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),m=(f=a.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");x&&m&&m.length>1&&(c=parseInt(m[1])),n.isMaybeSingle&&Array.isArray(l)&&(l.length>1?(o={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{const x=await a.text();try{o=JSON.parse(x),Array.isArray(o)&&a.status===404&&(l=[],o=null,u=200,d="OK")}catch{a.status===404&&x===""?(u=204,d="No Content"):o={message:x}}if(o&&n.shouldThrowOnError)throw new gV(o)}return{error:o,data:l,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(a=>{var o;let l="",c="",u="";const d=a==null?void 0:a.cause;if(d){var h,f,p,x;const g=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",v=(f=d==null?void 0:d.code)!==null&&f!==void 0?f:"";l=`${(p=a==null?void 0:a.name)!==null&&p!==void 0?p:"FetchError"}: ${a==null?void 0:a.message}`,l+=` 572 573Caused by: ${(x=d==null?void 0:d.name)!==null&&x!==void 0?x:"Error"}: ${g}`,v&&(l+=` (${v})`),d!=null&&d.stack&&(l+=` 574${d.stack}`)}else{var m;l=(m=a==null?void 0:a.stack)!==null&&m!==void 0?m:""}const y=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(c+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},yV=class extends xV{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const a=s?`${s}.order`:"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
574explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:a="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${l};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const VN=new RegExp("[,()]");var to=class extends yV{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&VN.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&VN.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const a=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},vV=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let a=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!a?"":(u==='"'&&(a=!a),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",o),r&&c.append("Prefer",`count=${r}`),new to({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:a,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);a.searchParams.set("columns",c.join(","))}}return new to({method:s,url:a,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var a;const o="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);l.searchParams.set("columns",d.join(","))}}return new to({method:o,url:l,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new to({method:r,url:s,headers:a,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new to({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function _u(e){"@babel/helpers - typeof";return _u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_u(e)}function bV(e,t){if(_u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wV(e){var t=bV(e,"string");return _u(t)=="symbol"?t:t+""}function jV(e,t,n){return(t=wV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Qd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
574t%2?WN(Object(n),!0).forEach(function(r){jV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var NV=class sP{constructor(t,{headers:n={},schema:r,fetch:s,timeout:a,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;a!==void 0&&a>0?this.fetch=(c,u)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),a),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(h),l(c,u);const p=()=>{clearTimeout(h),d.abort()};return f.addEventListener("abort",p,{once:!0}),l(c,Qd(Qd({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",p)})}return l(c,Qd(Qd({},u),{},{signal:d.signal})).finally(()=>clearTimeout(h))}:this.fetch=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new vV(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new sP(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:s=!1,count:a}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),h=r&&Object.values(n).some(d);h?(l="POST",u=n):r||s?(l=r?"HEAD":"GET",Object.entries(n).filter(([p,x])=>x!==void 0).map(([p,x])=>[p,Array.isArray(x)?`{${x.join(",")}}`:`${x}`]).forEach(([p,x])=>{c.searchParams.append(p,x)})):(l="POST",u=n);const f=new Headers(this.headers);return h?f.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&f.set("Prefer",`count=${a}
574`),new to({method:l,url:c,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class kV{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,a=parseInt(s.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 575import ws from "ws" 576new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 577 578Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const SV="2.101.0",_V=`realtime-js/${SV}`,EV="1.0.0",iP="2.0.0",CV=iP,TV=1e4,AV=100,Vs={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},aP={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Hy={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class PV{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,a;const o=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(a=t.join_ref)!==null&&a!==void 0?a:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+o.length+u.length+h.length,p=new ArrayBuffer(this.HEADER_LENGTH+f);let x=new DataView(p),m=0;x.setUint8(m++,this.KINDS.userBroadcastPush),x.setUint8(m++,c.length),x.setUint8(m++,l.length),x.setUint8(m++,o.length),x.setUint8(m++,u.length),x.setUint8(m++,h.length),x.setUint8(m++,n),Array.from(c,g=>x.setUint8(m++,g.charCodeAt(0))),Array.from(l,g=>x.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>x.setUint8(m++,g.charCodeAt(0))),Array.from(u,g=>x.setUint8(m++,g.charCodeAt(0))),Array.from(h,g=>x.setUint8(m++,g.charCodeAt(0)));var y=new Uint8Array(p.byteLength+r.byteLength);return y.set(new Uint8Array(p),0),y.set(new Uint8Array(r),p.byteLength),y.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,a,o,l,c]=r;
578return n({join_ref:s,ref:a,topic:o,event:l,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),a=n.getUint8(2),o=n.getUint8(3),l=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+s));c=c+s;const d=r.decode(t.slice(c,c+a));c=c+a;const h=r.decode(t.slice(c,c+o));c=c+o;const f=t.slice(c,t.byteLength),p=l===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,x={type:this.BROADCAST_EVENT,event:d,payload:p};return o>0&&(x.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var Je;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Je||(Je={}));const HN=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((a,o)=>(a[o]=OV(o,e,t,s),a),{}):{}},OV=(e,t,n,r)=>{const s=t.find(l=>
vendor: 5,523 bytes, line 578
578l.name===e),a=s==null?void 0:s.type,o=n[e];return a&&!r.includes(a)?oP(a,o):Ky(o)},oP=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return IV(t,n)}switch(e){case Je.bool:return RV(t);case Je.float4:case Je.float8:case Je.int2:case Je.int4:case Je.int8:case Je.numeric:case Je.oid:return MV(t);case Je.json:case Je.jsonb:return DV(t);case Je.timestamp:return LV(t);case Je.abstime:case Je.date:case Je.daterange:case Je.int4range:case Je.int8range:case Je.money:case Je.reltime:case Je.text:case Je.time:case Je.timestamptz:case Je.timetz:case Je.tsrange:case Je.tstzrange:return Ky(t);default:return Ky(t)}},Ky=e=>e,RV=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},MV=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},DV=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},IV=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let a;const o=e.slice(1,n);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(l=>oP(t,l))}return e},LV=e=>typeof e=="string"?e.replace(" ","T"):e,lP=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var qc=e=>typeof e=="function"?e:function(){return e},FV=typeof self<"u"?self:null,no=typeof window<"u"?window:null,Or=FV||no||globalThis,$V="2.0.0",zV=1e4,BV=1e3,Ir={connecting:0,open:1,closing:2,closed:3},pn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Jr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Gy={longpoll:"longpoll",websocket:"websocket"},UV={complete:4},Yy="base64url.bearer.phx.",Jd=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},cP=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},qV=class{constructor(e,t,n){this.state=pn.closed,this.topic=e,this.params=qc(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Jd(this,Jr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new cP(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=pn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=pn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=pn.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=pn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Jd(this,Jr.leave,qc({}),this.timeout).send(),this.state=pn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Jr.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 5,263 bytes, line 578
578teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=pn.closed,this.bindings=[]}onClose(e){this.on(Jr.close,e)}onError(e){return this.on(Jr.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Jd(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=pn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Jr.close,"leave")},n=new Jd(this,Jr.leave,qc({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=pn.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<a.length;o++)a[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===pn.closed}isErrored(){return this.state===pn.errored}isJoined(){return this.state===pn.joined}isJoining(){return this.state===pn.joining}isLeaving(){return this.state===pn.leaving}},Bf=class{static request(e,t,n,r,s,a,o){if(Or.XDomainRequest){let l=new Or.XDomainRequest;return this.xdomainRequest(l,e,t,r,s,a,o)}else if(Or.XMLHttpRequest){let l=new Or.XMLHttpRequest;return this.xhrRequest(l,e,t,n,r,s,a,o)}else{if(Or.fetch&&Or.AbortController)return this.fetchRequest(e,t,n,r,s,a,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,a,o){let l={method:e,headers:n,body:r},c=null;return s&&(c=new AbortController,setTimeout(()=>c.abort(),s),l.signal=c.signal),Or.fetch(t,l).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,s,a,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let l=this.parseJSON(e.responseText);o&&o(l)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,a,o,l){e.open(t,n,!0),e.timeout=a;for(let[c,u]of Object.entries(r))e.setRequestHeader(c,u);return e.onerror=()=>l&&l(null),e.onreadystatechange=()=>{if(e.readyState===UV.complete&&l){let c=this.parseJSON(e.responseText);l(c)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,a=e[r];typeof a=="object"?n.push(this.serialize(a,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(a))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},VV=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},Va=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Yy)&&(this.authToken=atob(t[1].slice(Yy.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Ir.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Gy.websocket),"$1/"+Gy.longpoll)}endpointURL(){return Bf.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Ir.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Ir.open||this.readyState===Ir.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Ir.open,this.onopen({}),this.poll();break;
578case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=VV(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 579`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=Ir.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let a,o=()=>{this.reqs.delete(a),r()};a=Bf.request(e,this.endpointURL(),t,n,this.timeout,o,l=>{this.reqs.delete(a),this.isActive()&&s(l)}),this.reqs.add(a)}},WV=class wc{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:a,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel.joinRef(),this.state=wc.syncState(this.state,s,a,o),this.pendingDiffs.forEach(c=>{this.state=wc.syncDiff(this.state,c,a,o)}),this.pendingDiffs=[],l()}),this.channel.on(r.diff,s=>{let{onJoin:a,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=wc.syncDiff(this.state,s,a,o),l())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return wc.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let a=this.clone(t),o={},l={};return this.map(a,(c,u)=>{n[c]||(l[c]=u)}),this.map(n,(c,u)=>{let d=a[c];if(d){let h=u.metas.map(m=>m.phx_ref),f=d.metas.map(m=>m.phx_ref),p=u.metas.filter(m=>f.indexOf(m.phx_ref)<0),x=d.metas.filter(m=>h.indexOf(m.phx_ref)<0);p.length>0&&(o[c]=u,o[c].metas=p),x.length>0&&(l[c]=this.clone(d),l[c].metas=x)}else o[c]=u}),this.syncDiff(a,{joins:o,leaves:l},r,s)}static syncDiff(t,n,r,s){let{joins:a,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(a,(l,c)=>{let u=t[l];if(t[l]=this.clone(c),u){let d=t[l].metas.map(f=>f.phx_ref),h=u.metas.filter(f=>d.indexOf(f.phx_ref)<0);t[l].metas.unshift(...h)}r(l,u,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;let d=c.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(l,u,c),u.metas.length===0&&delete t[l]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Zd={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:a}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,l=new ArrayBuffer(this.HEADER_LENGTH+o),c=new DataView(l),u=0;c.setUint8(u++,this.KINDS.push),c.setUint8(u++,t.length),c.setUint8(u++,n.length),c.setUint8(u++,s.length),c.setUint8(u++,r.length),Array.from(t,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(l.byteLength+a.byteLength);return d.set(new Uint8Array(l),0),d.set(new Uint8Array(a),l.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 8,419 bytes, line 579
579,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,l=n.decode(e.slice(o,o+r));o=o+r;let c=n.decode(e.slice(o,o+s));o=o+s;let u=n.decode(e.slice(o,o+a));o=o+a;let d=e.slice(o,e.byteLength);return{join_ref:l,ref:null,topic:c,event:u,payload:d}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),l=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(l,l+r));l=l+r;let u=n.decode(e.slice(l,l+s));l=l+s;let d=n.decode(e.slice(l,l+a));l=l+a;let h=n.decode(e.slice(l,l+o));l=l+o;let f=e.slice(l,e.byteLength),p={status:h,response:f};return{join_ref:c,ref:u,topic:d,event:Jr.reply,payload:p}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a=a+r;let l=n.decode(e.slice(a,a+s));a=a+s;let c=e.slice(a,e.byteLength);return{join_ref:null,ref:null,topic:o,event:l,payload:c}}},HV=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||zV,this.transport=t.transport||Or.WebSocket||Va,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Or&&Or.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Zd.encode.bind(Zd),this.defaultDecoder=Zd.decode.bind(Zd),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Va?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;no&&no.addEventListener&&(no.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),no.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),no.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,s,a)=>{console.log(`${r}: ${s}`,a)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=qc(t.params||{}),this.endPoint=`${e}/${Gy.websocket}`,this.vsn=t.vsn||$V,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new cP(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Va}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Bf.appendParams(Bf.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=qc(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Va?this.connectWithFallback(Va,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Va:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Yy}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,a,o=this.transportName(e),l=c=>{this.log("transport",`falling back to ${o}...`,c),this.off([s,a]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return l("memorized");this.fallbackTimer=setTimeout(l,t),a=this.onError(c=>{this.log("transport","error",c),r&&!n&&(clearTimeout(this.fallbackTimer),l(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(l,t),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),BV,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Ir.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
vendor: 5,301 bytes, line 579
579triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Jr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Ir.connecting:return"connecting";case Ir.open:return"open";case Ir.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new qV(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:a}=e;this.log("push",`${t} ${n} (${a}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:a,join_ref:o}=t;if(a&&a===this.pendingHeartbeatRef){const l=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",l)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${a&&"("+a+")"||""}`.trim(),s);for(let l=0;l<this.channels.length;l++){const c=this.channels[l];c.isMember(n,r,s,o)&&c.trigger(r,s,a,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Vc{constructor(t,n){const r=GV(n);this.presence=new WV(t.getChannel(),r),this.presence.onJoin((s,a,o)=>{const l=Vc.onJoinPayload(s,a,o);t.getChannel().trigger("presence",l)}),this.presence.onLeave((s,a,o)=>{const l=Vc.onLeavePayload(s,a,o);t.getChannel().trigger("presence",l)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Vc.transformState(this.presence.state)}static transformState(t){return t=KV(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=zh(s),n},{})}static onJoinPayload(t,n,r){const s=KN(n),a=zh(r);return{event:"join",key:t,currentPresences:s,newPresences:a}}static onLeavePayload(t,n,r){const s=KN(n),a=zh(r);return{event:"leave",key:t,currentPresences:s,leftPresences:a}}}function zh(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function KV(e){return JSON.parse(JSON.stringify(e))}function GV(e){return(e==null?void 0:e.events)&&{events:e.events}}function KN(e){return e!=null&&e.metas?zh(e):[]}var GN;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(GN||(GN={}));class YV{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Vc(this.channel.channelAdapter,n)}}class XV{constructor(t,n,r){const s=QV(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>AV){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Vs.joined}isJoined(){return this.state===Vs.joined}isJoining(){return this.state===Vs.joining}isClosed(){return this.state===Vs.closed}
579isLeaving(){return this.state===Vs.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function QV(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var YN;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(YN||(YN={}));var No;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(No||(No={}));var Zr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Zr||(Zr={}));class Wc{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,a;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new XV(this.socket.socketAdapter,t,this.params),this.presence=new YV(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=lP(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||a===void 0)&&a.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[No.PRESENCE]&&this.bindings[No.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(Zr.CHANNEL_ERROR,p)}),this._onClose(()=>t==null?void 0:t(Zr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(Zr.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}).receive("error",p=>{this.state=Vs.errored,t==null||t(Zr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Zr.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,a=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let l=0;l<a;l++){const c=s[l],{filter:{event:u,schema:d,table:h,filter:f}}=c,p=t&&t[l];if(p&&p.event===u&&Wc.isFilterValueEqual(p.schema,d)&&Wc.isFilterValueEqual(p.table,h)&&Wc.isFilterValueEqual(p.filter,f))o.push(Object.assign(Object.assign({},c),{id:p.id}));else{this.unsubscribe(),this.state=Vs.errored,n==null||n(Zr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Vs.errored&&n&&n(Zr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=t===No.PRESENCE||t===No.POSTGRES_CHANGES;if(s&&a)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;
579try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:o}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,l,c;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,a=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(a),o}_on(t,n,r){const s=t.toLocaleLowerCase(),a=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:a};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,a,o,l,c,u,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,r))return!1;const f=(s=this.bindings[h])===null||s===void 0?void 0:s.find(p=>p.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in f){const p=f.id,x=(a=f.filter)===null||a===void 0?void 0:a.event;return p&&((o=n.ids)===null||o===void 0?void 0:o.includes(p))&&(x==="*"||(x==null?void 0:x.toLocaleLowerCase())===((l=n.data)===null||l===void 0?void 0:l.type.toLocaleLowerCase()))}else{const p=(u=(c=f==null?void 0:f.filter)===null||c===void 0?void 0:c.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((d=n==null?void 0:n.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:a,join:o}=aP;return n&&[r,s,a,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:a,table:o,commit_timestamp:l,type:c,errors:u}=s;return Object.assign(Object.assign({},{schema:a,table:o,commit_timestamp:l,eventType:c,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=HN(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=HN(t.columns,t.old_record)),n}}class JV{constructor(t,n){this.socket=new HV(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),s),this.socket.disconnect(()=>{t(),a("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Hy.connecting}isDisconnecting(){return this.socket.connectionState()==Hy.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const ZV={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},eW=[1e3,2e3,5e3,1e4],tW=1e4,nW=` 580 addEventListener("message", (e) => { 581 if (e.data.event === "start") { 582 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 583 } 584 });`;class rW{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
584,this.ref=0,this.serializer=new PV,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=a=>a?(...o)=>a(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new JV(t,s),this.httpEndpoint=lP(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n} 585 586To use Realtime in Node.js, you need to provide a WebSocket implementation: 587 588Option 1: Use Node.js 22+ which has native WebSocket support 589Option 2: Install and provide the "ws" package: 590 591 npm install ws 592 593 import ws from "ws" 594 const client = new RealtimeClient(url, { 595 ...options, 596 transport: ws 597 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Hy.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(a=>a.topic===r);if(s)return s;{const a=new Wc(`realtime:${t}`,n,this);return this.channels.push(a),a}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const a={access_token:n,version:_V};n&&s.updateJoinPayload(a),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(aP.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([nW],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,a,o,l,c,u,d;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const h={};
597h.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:TV,h.heartbeatIntervalMs=(a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:ZV.HEARTBEAT_INTERVAL,h.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:kV.getWebSocketConstructor(),h.params=t==null?void 0:t.params,h.logger=t==null?void 0:t.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),h.reconnectAfterMs=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:m=>eW[m-1]||tW;let f,p;const x=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:CV;switch(x){case EV:f=(m,y)=>y(JSON.stringify(m)),p=(m,y)=>y(JSON.parse(m));break;case iP:f=this.serializer.encode.bind(this.serializer),p=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=x,h.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:f,h.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:p,h.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,h.params=Object.assign(Object.assign({},h.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Eu=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function sW(e,t,n){const r=new URL(t,e);if(n)for(const[s,a]of Object.entries(n))a!==void 0&&r.searchParams.set(s,a);return r.toString()}async function iW(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function aW(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:a,headers:o}){const l=sW(e.baseUrl,r,s),c=await iW(e.auth),u=await t(l,{method:n,headers:{...a?{"Content-Type":"application/json"}:{},...c,...o},body:a?JSON.stringify(a):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const p=h?f:void 0,x=p==null?void 0:p.error;throw new Eu((x==null?void 0:x.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:x==null?void 0:x.type,icebergCode:x==null?void 0:x.code,details:p})}return{status:u.status,headers:u.headers,data:f}}}}function eh(e){return e.join("�")}var oW=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:eh(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${eh(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${eh(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${eh(e.namespace)}`}),!0}catch(t){if(t instanceof Eu&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Eu&&n.status===409)return;throw n}}};function Wa(e){return e.join("�")}var lW=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wa(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Wa(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Wa(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Wa(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Wa(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Wa(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Eu&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Eu&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},cW=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=aW({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new oW(this.client,t),this.tableOps=new lW(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
597async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Qp=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function Jp(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Xy=class extends Qp{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},uP=class extends Qp{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const uW=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),dW=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Qy=e=>{if(Array.isArray(e))return e.map(n=>Qy(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[s]=Qy(r)}),t},hW=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Cu(e){"@babel/helpers - typeof";return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cu(e)}function fW(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pW(e){var t=fW(e,"string");return Cu(t)=="symbol"?t:t+""}function mW(e,t,n){return(t=pW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XN(Object(n),!0).forEach(function(r){mW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const QN=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},gW=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let a=parseInt(s.status,10);Number.isFinite(a)||(a=500),s.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";t(new Xy(QN(o),a,l,r))}).catch(()=>{const o=a+"";t(new Xy(s.statusText||`HTTP ${a} error`,a,o,r))})}else t(new uP(QN(e),e,r))},xW=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?Se(Se({},s),n):(dW(r)?(s.headers=Se({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),Se(Se({},s),n))};async function lc(e,t,n,r,s,a,o){return new Promise((l,c)=>{e(n,xW(t,r,s,a)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>l(u)).catch(u=>gW(u,c,r,o))})}function dP(e="storage"){return{get:async(t,n,r,s)=>lc(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,a)=>lc(t,"POST",n,s,a,r,e),put:async(t,n,r,s,a)=>lc(t,"PUT",n,s,a,r,e),head:async(t,n,r,s)=>lc(t,"HEAD",n,Se(Se({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,a)=>lc(t,"DELETE",n,s,a,r,e)}}const yW=dP("storage"),{get:Tu,post:ur,put:Jy,head:vW,remove:A0}=yW,Pn=dP("vectors");var Ol=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=uW(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Se(Se({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Jp(n))return{data:null,error:n};throw n}}},bW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Jp(t))return{data:null,error:t};throw t}}};let hP;hP=Symbol.toStringTag;var wW=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[hP]="BlobDownloadBuilder",this.promise=null}asStream(){return new bW(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Jp(t))return{data:null,error:t};throw t}}};const jW={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},JN={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var NW=class extends Ol{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let a;const o=Se(Se({},JN),r);let l=Se(Se({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&n instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),c&&a.append("metadata",s.encodeMetadata(c)),a.append("",n)):typeof FormData<"u"&&n instanceof FormData?(a=n,a.has("cacheControl")||a.append("cacheControl",o.cacheControl),c&&!a.has("metadata")&&a.append("metadata",s.encodeMetadata(c))):(a=n,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&a
597instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(l=Se(Se({},l),r.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?Jy:ur)(s.fetch,`${s.url}/object/${d}`,a,Se({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const a=s._removeEmptyFolders(e),o=s._getFinalPath(a),l=new URL(s.url+`/object/upload/sign/${o}`);return l.searchParams.set("token",t),s.handleOperation(async()=>{let c;const u=Se(Se({},JN),r),d=Se(Se({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:a,fullPath:(await Jy(s.fetch,l.toString(),c,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=Se({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const a=await ur(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+a.url),l=o.searchParams.get("token");if(!l)throw new Qp("No token returned by API");return{signedUrl:o.toString(),path:e,token:l}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await ur(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
597stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await ur(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const a=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await ur(r.fetch,`${r.url}/object/sign/${s}`,Se({expiresIn:t},a?{transform:n.transform}:{}),{headers:r.headers});const l=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"",c=a&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${r.url}${c}${l}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await ur(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(o=>Se(Se({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${a}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),a=s?`?${s}`:"",o=this._getFinalPath(e),l=()=>Tu(this.fetch,`${this.url}/${r}/${o}${a}`,{headers:this.headers,noResolveJson:!0},n);return new wW(l,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Qy(await Tu(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await vW(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Jp(s)){var r;const a=s instanceof Xy?s.status:s instanceof uP?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const a=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&r.push(o);let l=r.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${l}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await A0(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=Se(Se(Se({},jW),t),{},{prefix:e||""});return await ur(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=Se({},e);return await ur(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const kW="2.101.0",cd={"X-Client-Info":`storage-js/${kW}`};var SW=class extends Ol{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const a=s.href.replace(/\/$/,""),o=Se(Se({},cd),t);super(a,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Tu(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Tu(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await ur(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Jy(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await ur(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await A0(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},_W=class extends Ol{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Se(Se({},cd),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ur(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Tu(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await A0(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!hW(e))throw new Qp("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new cW({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
597),r=this.shouldThrowOnError;return new Proxy(n,{get(s,a){const o=s[a];return typeof o!="function"?o:async(...l)=>{try{return{data:await o.apply(s,l),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},EW=class extends Ol{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Se(Se({},cd),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Pn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Pn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},CW=class extends Ol{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Se(Se({},cd),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},TW=class extends Ol{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=Se(Se({},cd),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Pn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},AW=class extends TW{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new PW(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},PW=class extends EW{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,Se(Se({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,Se(Se({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new OW(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
597,OW=class extends CW{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,Se(Se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,Se(Se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,Se(Se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,Se(Se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,Se(Se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},RW=class extends SW{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new NW(this.url,this.headers,e,this.fetch)}get vectors(){return new AW(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _W(this.url+"/iceberg",this.headers,this.fetch)}};const fP="2.101.0",ro=30*1e3,Zy=3,Cg=Zy*ro,MW="http://localhost:9999",DW="supabase.auth.token",IW={"X-Client-Info":`gotrue-js/${fP}`},ev="X-Supabase-Api-Version",pP={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},LW=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,FW=10*60*1e3;class Au extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function ge(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class $W extends Au{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function zW(e){return ge(e)&&e.name==="AuthApiError"}class Wi extends Au{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Es extends Au{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}
597class En extends Es{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Tg(e){return ge(e)&&e.name==="AuthSessionMissingError"}class Ha extends Es{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class th extends Es{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class nh extends Es{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function BW(e){return ge(e)&&e.name==="AuthImplicitGrantRedirectError"}class ZN extends Es{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class UW extends Es{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class tv extends Es{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Ag(e){return ge(e)&&e.name==="AuthRetryableFetchError"}class ek extends Es{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class nv extends Es{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Uf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),tk=` 598\r=`.split(""),qW=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<tk.length;t+=1)e[tk[t].charCodeAt(0)]=-2;for(let t=0;t<Uf.length;t+=1)e[Uf[t].charCodeAt(0)]=t;return e})();function nk(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Uf[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Uf[r]),t.queuedBits-=6}}function mP(e,t,n){const r=qW[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function rk(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},a=o=>{HW(o,r,n)};for(let o=0;o<e.length;o+=1)mP(e.charCodeAt(o),s,a);return t.join("")}function VW(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function WW(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}VW(r,t)}}function HW(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Do(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)mP(e.charCodeAt(s),n,r);return new Uint8Array(t)}function KW(e){const t=[];return WW(e,n=>t.push(n)),new Uint8Array(t)}function Ji(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>nk(s,n,r)),nk(null,n,r),t.join("")}function GW(e){return Math.round(Date.now()/1e3)+e}function YW(){return Symbol("auth-callback")}const Bt=()=>typeof window<"u"&&typeof document<"u",Di={tested:!1,writable:!1},gP=()=>{if(!Bt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Di.tested)return Di.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Di.tested=!0,Di.writable=!0}catch{Di.tested=!0,Di.writable=!1}return Di.writable};function XW(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
598h((s,a)=>{t[a]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const xP=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),QW=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",so=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Ii=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},zt=async(e,t)=>{await e.removeItem(t)};class Zp{constructor(){this.promise=new Zp.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Zp.promiseConstructor=Promise;function rh(e){const t=e.split(".");if(t.length!==3)throw new nv("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!LW.test(t[r]))throw new nv("JWT not in base64url format");return{header:JSON.parse(rk(t[0])),payload:JSON.parse(rk(t[1])),signature:Do(t[2]),raw:{header:t[0],payload:t[1]}}}async function JW(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ZW(e,t){return new Promise((r,s)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await e(a);if(!t(a,null,o)){r(o);return}}catch(o){if(!t(a,o)){s(o);return}}})()})}function eH(e){return("0"+e.toString(16)).substr(-2)}function tH(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let a=0;a<56;a++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,eH).join("")}async function nH(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(a=>String.fromCharCode(a)).join("")}async function rH(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await nH(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ka(e,t,n=!1){const r=tH();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await so(e,`${t}-code-verifier`,s);const a=await rH(r);return[a,r===a?"plain":"s256"]}const sH=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function iH(e){const t=e.headers.get(ev);if(!t||!t.match(sH))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function aH(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function oH(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const lH=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ga(e){if(!lH.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Pg(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function cH(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const a=r.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function sk(e){return JSON.parse(JSON.stringify(e))}const Bi=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),uH=[502,503,504];async function ik(e){var t;if(!QW(e))throw new tv(Bi(e),0);if(uH.includes(e.status))throw new tv(Bi(e),e.status);let n;try{n=await e.json()}catch(a){throw new Wi(Bi(a),a)}let r;const s=iH(e);if(s&&s.getTime()>=pP["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new ek(Bi(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new En}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((a,o)=>
598a&&typeof o=="string",!0))throw new ek(Bi(n),e.status,n.weak_password.reasons);throw new $W(Bi(n),e.status||500,r)}const dH=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function je(e,t,n,r){var s;const a=Object.assign({},r==null?void 0:r.headers);a[ev]||(a[ev]=pP["2024-01-01"].name),r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await hH(e,t,n+l,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function hH(e,t,n,r,s,a){const o=dH(t,r,s,a);let l;try{l=await e(n,Object.assign({},o))}catch(c){throw console.error(c),new tv(Bi(c),0)}if(l.ok||await ik(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await ik(c)}}function ar(e){var t;let n=null;mH(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=GW(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function ak(e){const t=ar(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ws(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function fH(e){return{data:e,error:null}}function pH(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:a}=e,o=Pl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:a},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function ok(e){return e}function mH(e){return e.access_token&&e.refresh_token&&e.expires_in}const Og=["global","local","others"];class gH{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=xP(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,n=Og[0]){if(Og.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Og.join(", ")}`);try{return await je(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ge(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await je(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ws})}catch(r){if(ge(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Pl(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await je(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:pH,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ge(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await je(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ws})}catch(n){if(ge(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,a,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await je(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:""},xform:ok});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>
5980&&(p.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(x.split(";")[1].split("=")[1]);u[`${y}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(ge(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Ga(t);try{return await je(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ws})}catch(n){if(ge(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Ga(t);try{return await je(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Ws})}catch(r){if(ge(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Ga(t);try{return await je(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ws})}catch(r){if(ge(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Ga(t.userId);try{const{data:n,error:r}=await je(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Ga(t.userId),Ga(t.id);try{return{data:await je(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,a,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await je(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&a!==void 0?a:""},xform:ok});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(x.split(";")[1].split("=")[1]);u[`${y}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(ge(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await je(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await je(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await je(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ge(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await je(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await je(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await je(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(ge(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await je(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await je(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ge(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await je(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ge(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await je(this.fetch,"DELET
598E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ge(n))return{data:null,error:n};throw n}}}function lk(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Cr={debug:!!(globalThis&&gP()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class yP extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class ck extends yP{}async function xH(e,t,n){Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async a=>{if(a){clearTimeout(s),Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,a.name);try{return await n()}finally{Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,a.name)}}else{if(t===0)throw Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ck(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Cr.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(a){if(t>0&&clearTimeout(s),(a==null?void 0:a.name)==="AbortError"&&t>0){if(r.signal.aborted)return Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Cr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new ck(`Lock "${e}" was released because another request stole it`)}throw a}}function yH(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function vP(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function vH(e){return parseInt(e,16)}function bH(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function wH(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:a=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 599`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=vP(e.address),x=d?`${d}://${r}`:r,m=e.statement?`${e.statement} 600`:"",y=`${x} wants you to sign in with your Ethereum account: 601${p} 602 603${m}`;let g=`URI: ${h} 604Version: ${f} 605Chain ID: ${n}${o?` 606Nonce: ${o}`:""} 607Issued At: ${a.toISOString()}`;if(s&&(g+=` 608Expiration Time: ${s.toISOString()}`),l&&(g+=` 609Not Before: ${l.toISOString()}
609`),c&&(g+=` 610Request ID: ${c}`),u){let v=` 611Resources:`;for(const b of u){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);v+=` 612- ${b}`}g+=v}return`${y} 613${g}`}class wt extends Error{constructor({message:t,code:n,cause:r,name:s}){var a;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(a=s??(r instanceof Error?r.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=n}}class qf extends wt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function jH({error:e,options:t}){var n,r,s;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new wt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=a.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new wt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=a.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new wt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=a.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new wt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new wt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new wt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new wt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new wt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(bP(o)){if(a.rp.id!==o)return new wt({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new wt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new wt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new wt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new wt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function NH({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new wt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new wt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(bP(r)){if(n.rpId!==r)return new wt({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new wt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new wt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
613ROR",cause:e})}return new wt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class kH{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const SH=new kH;function _H(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Pl(e,["challenge","user","excludeCredentials"]),a=Do(t).buffer,o=Object.assign(Object.assign({},n),{id:Do(n.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:a,user:o});if(r&&r.length>0){l.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Do(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function EH(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Pl(e,["challenge","allowCredentials"]),s=Do(t).buffer,a=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){a.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const l=n[o];a.allowCredentials[o]=Object.assign(Object.assign({},l),{id:Do(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return a}function CH(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ji(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ji(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function TH(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ji(new Uint8Array(s.authenticatorData)),clientDataJSON:Ji(new Uint8Array(s.clientDataJSON)),signature:Ji(new Uint8Array(s.signature)),userHandle:s.userHandle?Ji(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function bP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function uk(){var e,t;return!!(Bt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function AH(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new qf("Browser returned unexpected credential type",t)}:{data:null,error:new qf("Empty credential response",t)}}catch(t){return{data:null,error:jH({error:t,options:e})}}}async function PH(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new qf("Browser returned unexpected credential type",t)}:{data:null,error:new qf("Empty credential response",t)}}catch(t){return{data:null,error:NH({error:t,options:e})}}}const OH={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},RH={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Vf(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const a in s){const o=s[a];if(o!==void 0)if(Array.isArray(o))r[a]=o;else if(n(o))r[a]=o;else if(t(o)){const l=r[a];t(l)?r[a]=Vf(l,o):r[a]=Vf(o)}else r[a]=o}return r}function MH(e,t){return Vf(OH,e,t||{})}function DH(e,t){return Vf(RH,e,t||{})}class IH{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},a){var o;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!l)return{data:null,error:c};const u=s??SH.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:d}=l.webauthn.credential_options.publicKey;if(!d.name){const h=r;if(h)d.name=`${d.id}:${h}`;else{const p=(await this.client.getUser()).data.user,x=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${x}`}}d.displayName||(d.displayName=d.name)}switch(l.webauthn.type){case"create":{const d=MH(l.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:h,error:f}=await AH({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const d=DH(l.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:h,error:f}=await PH(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(l){return ge(l)?{data:null,error:l}:{data:null,error:new Wi("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},a){if(!n)return{data:null,error:new Au("rpId is required for WebAuthn authentication")};try{if(!uk())return{data:null,error:new Wi("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:a});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(o){return ge(o)?{data:null,error:o}:{data:null,error:new Wi("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},a){if(!n)return{data:null,error:new Au("rpId is required for WebAuthn registration")};try{if(!uk())return{data:null,error:new Wi("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var h;
613return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:a});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return ge(o)?{data:null,error:o}:{data:null,error:new Wi("Unexpected error in register",o)}}}}yH();const LH={url:MW,storageKey:DW,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:IW,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function dk(e,t,n){return await n()}const Ya={};class Pu{get jwks(){var t,n;return(n=(t=Ya[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Ya[this.storageKey]=Object.assign(Object.assign({},Ya[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Ya[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ya[this.storageKey]=Object.assign(Object.assign({},Ya[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},LH),t);if(this.storageKey=a.storageKey,this.instanceID=(n=Pu.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Pu.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&Bt()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.admin=new gH({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=xP(a.fetch),this.lock=a.lock||dk,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&Bt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=xH:this.lock=dk,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new IH(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(a.storage?this.storage=a.storage:gP()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=lk(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=lk(this.memoryStorage)),Bt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}a.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${fP}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(Bt()&&(n=XW(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Bt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:a}=await this._getSessionFromURL(n,r);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),BW(a)){const c=(t=a.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:o,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ge(n)?this._returnResult({error:n}):this._returnResult({error:new Wi("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const a=await je(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:ar}),{data:o,error:l}=a;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(ge(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(t){var n,r,s;try{let a;if("email"in t){const{email:d,password:h,options:f}=t;let p=null,x=null;this.flowType==="pkce"&&([p,x]=await Ka(this.storage,this.storageKey)),a=await je(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:x},xform:ar})}else if("phone"in t){const{phone:d,password:h,options:f}=t;a=await je(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:ar})}else throw new th("You must provide either an email or phone number and a password");const{data:o,error:l}=a;if(l||!o)return await zt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(await zt(this.storage,`${this.storageKey}-code-verifier`),ge(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(t){try{let n;if("email"in t){const{email:a,password:o,options:l}=t;n=await je(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:ak})}else if("phone"in t){const{phone:a,password:o,options:l}=t;n=await je(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:ak})}else throw new th("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const a=new Ha;return this._returnResult({data:{user:null,session:null},error:a})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(ge(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,a;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(a=t.o
613ptions)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,a,o,l,c,u,d,h,f;let p,x;if("message"in t)p=t.message,x=t.signature;else{const{chain:m,wallet:y,statement:g,options:v}=t;let b;if(Bt())if(typeof y=="object")b=y;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")b=A.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=y}const w=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href),j=await b.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!j||j.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=vP(j[0]);let k=(r=v==null?void 0:v.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!k){const A=await b.request({method:"eth_chainId"});k=vH(A)}const S={domain:w.host,address:E,statement:g,uri:w.href,version:"1",chainId:k,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=wH(S),x=await b.request({method:"personal_sign",params:[bH(p),E]})}try{const{data:m,error:y}=await je(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:x},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:ar});if(y)throw y;if(!m||!m.session||!m.user){const g=new Ha;return this._returnResult({data:{user:null,session:null},error:g})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:y})}catch(m){if(ge(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var n,r,s,a,o,l,c,u,d,h,f,p;let x,m;if("message"in t)x=t.message,m=t.signature;else{const{chain:y,wallet:g,statement:v,options:b}=t;let w;if(Bt())if(typeof g=="object")w=g;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))w=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=g}const j=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in w&&w.signIn){const E=await w.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),v?{statement:v}:null));let k;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")k=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)k=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)x=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),m=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in w)||typeof w.signMessage!="function"||!("publicKey"in w)||typeof w!="object"||!w.publicKey||!("toBase58"in w.publicKey)||typeof w.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${j.host} wants you to sign in with your Solana account:`,w.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(s=(r=b==null?void 0:b.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((a=b==null?void 0:b.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((c=b==null?void 0:b.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((u=b==null?void 0:b.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((h=(d=b==null?void 0:b.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...b.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(` 614`);const E=await w.signMessage(new TextEncoder().encode(x),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:y,error:g}=await je(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:Ji(m)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:ar});if(g)throw g;if(!y||!y.session||!y.user){const v=new Ha;return this._returnResult({data:{user:null,session:null},error:v})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:g})}catch(y){if(ge(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(t){const n=await Ii(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new UW;const{data:a,error:o}=await je(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:ar});if(await zt(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!a||!a.session||!a.user){const l=new Ha;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:s??null}),error:o})}catch(a){if(await zt(this.storage,`${this.storageKey}-code-verifier`),ge(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:a,nonce:o}=t,l=await je(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:ar}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new Ha;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(ge(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,a,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Ka(this.storage,this.storageKey));const{error:h}=await je(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await je(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new th("You must provide either an email or phone number.")}catch(l){if(await zt(this.storage,`${this.storageKey}-code-verifier`),ge(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var n,r;try{let s,a;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,a=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:l}=await je(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:s,xform:ar});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(ge(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,a,o;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Ka(this.storage,this.storageKey));const u=await je(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:fH});return!((a=u.data)===null||a===void 0)&&a.url&&Bt()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await zt(this.storage,`${this.storageKey}-code-verifier`),ge(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new En;const{error:s}=await je(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(ge(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:a}=t,{error:o}=await je(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:a}=t,{data:o,error:l}=await je(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new th("You must provide either an email or phone number and a type")}catch(n){if(ge(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Ii(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
614id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Cg:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Ii(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Pg()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=cH(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await je(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ws}):await this._useSession(async n=>{var r,s,a;const{data:o,error:l}=n;if(l)throw l;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new En}:await je(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&a!==void 0?a:void 0,xform:Ws})})}catch(n){if(ge(n))return Tg(n)&&(await this._removeSession(),await zt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:a}=r;if(a)throw a;if(!s.session)throw new En;const o=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Ka(this.storage,this.storageKey));const{data:u,error:d}=await je(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:Ws});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await zt(this.storage,`${this.storageKey}-code-verifier`),ge(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new En;const n=Date.now()/1e3;let r=n,s=!0,a=null;const{payload:o}=rh(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};a=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(n){if(ge(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:l}=n;if(l)throw l;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new En;const{data:s,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ge(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!Bt())throw new nh("No browser detected.");
614if(t.error||t.error_description||t.error_code)throw new nh(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new ZN("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new nh("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new ZN("No code detected.");const{data:v,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:a,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!a||!l||!o||!u)throw new nh("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let f=d+h;c&&(f=parseInt(c));const p=f-d;p*1e3<=ro&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${h}s`);const x=f-h;d-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,f,d):d-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,f,d);const{data:m,error:y}=await this._getUser(a);if(y)throw y;const g={provider_token:r,provider_refresh_token:s,access_token:a,expires_in:h,expires_at:f,refresh_token:o,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:t.type},error:null})}catch(r){if(ge(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Ii(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:a}=n;if(a&&!Tg(a))return this._returnResult({error:a});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(zW(l)&&(l.status===404||l.status===401||l.status===403)||Tg(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await zt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=YW(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:a},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),console.error(a)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Ka(this.storage,this.storageKey,!0));try{return await je(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(a){if(await zt(this.storage,`${this.storageKey}-code-verifier`),ge(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async a=>{var o,l,c,u,d;const{data:h,error:f}=a;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await je(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Bt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(ge(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:a}}=n;if(s)throw s;const{options:o,provider:l,token:c,access_token:u,nonce:d}=t,h=await je(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=a==null?void 0:a.access_token)!==null&&r!==void 0?r:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:ar}),{data:f,error:p}=h;return p?this._returnResult({data:{user:null,session:null},error:p}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Ha}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:p}))}catch(s){if(await zt(this.storage,`${this.storageKey}-code-verifier`),ge(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:a,error:o}=n;
614if(o)throw o;return await je(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await ZW(async s=>(s>0&&await JW(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await je(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:ar})),(s,a)=>{const o=200*Math.pow(2,s);return a&&Ag(a)&&Date.now()+o-r<ro})}catch(r){if(this._debug(n,"error",r),ge(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Bt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Ii(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Ii(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await so(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Pg()}else if(s&&!s.user&&!s.user){const o=await Ii(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await zt(this.storage,this.storageKey+"-user"),await so(this.storage,this.storageKey,s)):s.user=Pg()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const a=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Cg;if(this._debug(r,`session has${a?"":" not"} expired with margin of ${Cg}s`),a){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Ag(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(s.access_token);!l&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new En;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Zp;const{data:a,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!a.session)throw new En;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const l={data:a.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(a){if(this._debug(s,"error",a),ge(a)){const o={data:null,error:a};return Ag(a)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(a),a}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){a.push(c)}});if(await Promise.all(o),a.length>0){for(let l=0;l<a.length;l+=1)console.error(a[l]);throw a[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await zt(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await so(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const a=sk(s);await so(this.storage,this.storageKey,a)}else{const s=sk(n);await so(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await zt(this.storage,this.storageKey),await zt(this.storage,this.storageKey+"-code-verifier"),await zt(this.storage,this.storageKey+"-user"),this.userStorage&&await zt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Bt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
614catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ro);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/ro);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ro}ms, refresh threshold is ${Zy} ticks`),s<=Zy&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof yP)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Bt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[a,o]=await Ka(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);s.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:a}=n;return a?this._returnResult({data:null,error:a}):await je(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:a,error:o}=n;
614if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await je(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:a}=n;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?CH(t.webauthn.credential_response):TH(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await je(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:a}=n;if(a)return this._returnResult({data:null,error:a});const o=await je(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:l}=o;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:_H(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:EH(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(a),a.status==="verified"&&s[a.factor_type].push(a);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,a;if(t)try{const{payload:p}=rh(t);let x=null;p.aal&&(x=p.aal);let m=x;const{data:{user:y},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((r=(n=y==null?void 0:y.factors)===null||n===void 0?void 0:n.filter(w=>w.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const b=p.amr||[];return{data:{currentLevel:x,nextLevel:m,currentAuthenticationMethods:b},error:null}}catch(p){if(ge(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:l}
614=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=rh(o.access_token);let u=null;c.aal&&(u=c.aal);let d=u;((a=(s=o.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(d="aal2");const f=c.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await je(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new En})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:a}=r;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new En});const o=await je(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&Bt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:a}=r;if(a)return this._returnResult({data:null,error:a});if(!s)return this._returnResult({data:null,error:new En});const o=await je(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&Bt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await je(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new En})})}catch(t){if(ge(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await je(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new En})})}catch(n){if(ge(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+FW>s)return r;const{data:a,error:o}=await je(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=s,r=a.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:x}
614=await this.getSession();if(x||!p.session)return this._returnResult({data:null,error:x});r=p.session.access_token}const{header:s,payload:a,signature:o,raw:{header:l,payload:c}}=rh(r);n!=null&&n.allowExpired||aH(a.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:a,header:s,signature:o},error:null}}const d=oH(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,KW(`${l}.${c}`)))throw new nv("Invalid JWT signature");return{data:{claims:a,header:s,signature:o},error:null}}catch(r){if(ge(r))return this._returnResult({data:null,error:r});throw r}}}Pu.nextInstanceID={};const FH=Pu,$H="2.101.0";let jc="";typeof Deno<"u"?jc="deno":typeof document<"u"?jc="web":typeof navigator<"u"&&navigator.product==="ReactNative"?jc="react-native":jc="node";const zH={"X-Client-Info":`supabase-js-${jc}/${$H}`},BH={headers:zH},UH={schema:"public"},qH={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},VH={};function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function WH(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HH(e){var t=WH(e,"string");return Ou(t)=="symbol"?t:t+""}function KH(e,t,n){return(t=HH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hk(Object(n),!0).forEach(function(r){KH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const GH=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),YH=()=>Headers,XH=(e,t,n)=>{const r=GH(n),s=YH();return async(a,o)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(a,yt(yt({},o),{},{headers:u}))}};function QH(e){return e.endsWith("/")?e:e+"/"}function JH(e,t){var n,r;const{db:s,auth:a,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,f={db:yt(yt({},c),s),auth:yt(yt({},u),a),realtime:yt(yt({},d),o),storage:{},global:yt(yt(yt({},h),l),{},{headers:yt(yt({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=l==null?void 0:l.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function ZH(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(QH(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var eK=class extends FH{constructor(e){super(e)}},tK=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const a=ZH(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const o=`sb-${a.hostname.split(".")[0]}-auth-token`,l={db:UH,realtime:VH,auth:yt(yt({},qH),{},{storageKey:o}),global:BH},c=JH(n??{},l);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=XH(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(yt({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new NV(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new RW(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new mV(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
614channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:a,flowType:o,lock:l,debug:c,throwOnError:u},d,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new eK({url:this.authUrl.href,headers:yt(yt({},f),d),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:l,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new rW(this.realtimeUrl.href,yt(yt({},e),{},{params:yt(yt({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const wP=(e,t,n)=>new tK(e,t,n);function nK(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}nK()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const rK="https://udpsykhbbodlczzwvvhe.supabase.co",sK="sb_publishable_xNu-1L_xkRSWxNrP43RFGw_N352xkdt",ue=wP(rK,sK),jP=e=>{var n;const t=((n=e.home_team_name)==null?void 0:n.toLowerCase())==="whitehawk";return{id:e.id,date:e.date,time:e.time,attendance:e.attendance||void 0,"home-team":{id:t?468:0,name:e.home_team_name,score:e.home_team_score!==null&&e.home_team_score!==void 0?e.home_team_score:void 0},"away-team":{id:t?0:468,name:e.away_team_name,score:e.away_team_score!==null&&e.away_team_score!==void 0?e.away_team_score:void 0},venue:e.venue,competition:{id:0,name:e.competition_name||"Pre-Season Friendly"},status:{short:e.status_short||(e.home_team_score!==null&&e.home_team_score!==void 0?"FT":"Upcoming"),full:e.status_full||(e.home_team_score!==null&&e.home_team_score!==void 0?"Full Time":"Upcoming")},match_report:e.match_report}},NP=()=>Lt({queryKey:["fwp-fixtures"],queryFn:async()=>{const[e,{data:t,error:n}]=await Promise.all([XA().catch(l=>(console.error("Failed to fetch FWP fixtures:",l),[])),ue.from("custom_fixtures").select("*").order("date",{ascending:!0})]);n&&console.error("Failed to fetch custom fixtures:",n);const r=(e||[]).filter(l=>!(t==null?void 0:t.find(u=>u.fwp_id===String(l.id)))),a=(t||[]).filter(l=>!l.is_hidden).map(jP);return[...r,...a].sort((l,c)=>{try{const u=l.time&&l.time.includes(":")?l.time:"00:00",d=c.time&&c.time.includes(":")?c.time:"00:00",h=new Date(`${l.date}T${u}`),f=new Date(`${c.date}T${d}`);return h.getTime()-f.getTime()}catch{return new Date(l.date).getTime()-new Date(c.date).getTime()}})},staleTime:1e3*60*2,gcTime:1e3*60*15,refetchInterval:e=>{const t=e.state.data;if(!t)return!1;const n=Ft(new Date,"yyyy-MM-dd");return t.some(s=>s.date===n)?1e3*30:!1}}),kP=e=>Lt({queryKey:["fwp-match",e],queryFn:async()=>{if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)){const{data:s,error:a}=await ue.from("custom_fixtures").select("*").eq("id",e).single();if(a)throw a;return jP(s)}const n=await L9(e),{data:r}=await ue.from("custom_fixtures").select("*").eq("fwp_id",e).maybeSingle();return r&&r.match_report&&(n.match_report=r.match_report),n},refetchInterval:t=>{var s,a,o,l,c;const n=t.state.data;return n?((s=n.status)==null?void 0:s.short)==="FT"||((a=n.status)==null?void 0:a.short)==="AET"||((o=n.status)==null?void 0:o.short)==="Pens"||((c=(l=n.status)==null?void 0:l.full)==null?void 0:c.includes("Full Time"))?!1:1e3*30:!1},enabled:!!e}),em=()=>Lt({queryKey:["fwp-league-table"],queryFn:F9,staleTime:1e3*60*5,gcTime:1e3*60*30}),P0=e=>Lt({queryKey:["fwp-competition-fixtures",e],queryFn:()=>$9(e),staleTime:1e3*60*2,gcTime:1e3*60*15,refetchInterval:t=>{const n=t.state.data;if(!n)return!1;const r=Ft(new Date,"yyyy-MM-dd");return n.some(a=>a.date===r)?1e3*30:!1},enabled:!!e&&e>0}),ud=()=>{const{data:e,...t}=NP();if(!e)return{fixtures:[],results:[],nextMatch:null,...t};const n=Vy(new Date),r=e.filter(o=>{var l,c,u,d,h;return((l=o.status)==null?void 0:l.short)==="FT"||((c=o.status)==null?void 0:c.short)==="AET"||((u=o.status)==null?void 0:u.short)==="Pens"||((h=(d=o.status)==null?void 0:d.full)==null?void 0:h.includes("Full Time"))||BN(n,nn(o.date))}).sort((o,l)=>new Date(l.date).getTime()-new Date(o.date).getTime()),s=e.filter(o=>{var l,c,u,d,h;return((l=o.status)==null?void 0:l.short)!=="FT"&&((c=o.status)==null?void 0:c.short)!=="AET"&&((u=o.status)==null?void 0:u.short)!=="Pens"&&!((h=(d=o.status)==null?void 0:d.full)!=null&&h.includes("Full Time"))&&!o.abandoned&&!BN(n,nn(o.date))}).sort((o,l)=>new Date(o.date).getTime()-new Date(l.date).getTime()),a=s.length>0?s[0]:null;return{fixtures:s,results:r,nextMatch:a,...t}},dd=(e=!1)=>Lt({queryKey:["posts",e],queryFn:async()=>{let t=ue.from("posts").select("id, title, slug, excerpt, image_url, image_offset, category, featured, published_at, status").order("published_at",{ascending:!1});e&&(t=t.eq("status","published"));const{data:n,error:r}=await t;if(r)throw r;return n}}),tm=(e="mens-first-team")=>Lt({queryKey:["players",e],queryFn:async()=>{const{data:t,error:n}=await ue.from("players").select("*").eq("team_slug",e).order("order_index",{ascending:!0}).order("name",{ascending:!0});if(n)throw n;return t}}),iK=e=>Lt({queryKey:["player",e],queryFn:async()=>{const{data:t,error:n}=await ue.from("players").select("*").eq("id",e).single();if(n)throw n;return t},enabled:!!e}),hd=()=>Lt({queryKey:["sponsors"],queryFn:async()=>{const{data:e,error:t}=await ue.from("sponsors").select("*").order("position",{ascending:!0});if(t)throw t;return e}}),aK=e=>Lt({queryKey:["posts",e],queryFn:async()=>{const{data:t,error:n}=await ue.from("posts").select("*").eq("slug",e).single();if(n)throw n;return t},enabled:!!e}),dt=e=>Lt({queryKey:["settings",e],queryFn:async()=>{const{data:t,error:n}=await ue.from("site_settings").select("*").eq("key",e).maybeSingle();if(n)throw n;return t}}),SP=()=>Lt({queryKey:["hidden-videos-v3"],queryFn:async()=>{const{data:e,error:t}=await ue.from("video_visibility").select("id");if(t)throw t;return e.map(n=>n.id)}}),oK=async(e,t)=>{if(t){const{error:n}=await ue.from("video_visibility").delete().eq("id",e);if(n)throw n}else{const{error:n}=await ue.from("video_visibility").upsert({id:e});if(n)throw n}},nm=e=>Lt({queryKey:["personnel",e],queryFn:async()=>{let t=ue.from("personnel").select("*").order("order_index",{ascending:!0}).order("name",{ascending:!0});e&&(t=t.eq("type",e));const{data:n,error:r}=await t;if(r)throw r;return n}}),lK=e=>Lt({queryKey:["personnel-member",e],queryFn:async()=>{const{data:t,error:n}=await ue.from("personnel").select("*").eq("id",e).single();if(n)throw n;return t},enabled:!!e}),Wf=async(e,t)=>{const n=t.map(a=>ue.from(e).update({order_index:a.order_index}).eq("id",a.id)),s=(await Promise.all(n)).find(a=>a.error);if(s)throw s.error;return!0},_P=()=>Lt({queryKey:["products"],queryFn:async()=>{const{data:e,error:t}=await ue.from("products").select("*").order("created_at",{ascending:!0});if(t)throw t;return(e||[]).map(n=>({id:n.id,name:n.name,price:parseFloat(n.price),category:n.category,image:n.image,description:n.description,badge:n.badge||void 0,sizes:n.sizes||[],stripeMockUrl:n.stripe_mock_url||void 0}))}}),Rg=768;function cK(){const[e,t]=N.useState(void 0);return N.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Rg-1}px)`),r=()=>{t(window.innerWidth<Rg)};return n.addEventListener("change",r),t(window.innerWidth<Rg),()=>n.removeEventListener("change",r)},[]),!!e}const uK=(e,t)=>{const n=s=>{switch(s){case"compact":return"h-[350px]";case"large":return"h-[750px]";case"fullscreen":return"h-[100svh]";default:return"h-[420px]"}}
614,r=s=>{switch(s){case"compact":return"md:h-[450px]";case"large":return"md:h-[900px]";case"fullscreen":return"md:h-[100svh]";default:return"md:h-[88vh]"}};return`${n(e)} ${r(t)}`},fk={hidden:{opacity:0,x:-2},visible:{opacity:1,x:0,transition:{duration:.01}}},dK={hidden:{opacity:1},visible:{opacity:1,transition:{staggerChildren:.12}}},hK={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.6,ease:"easeOut",delay:2.8}}},fK={hidden:{opacity:1},visible:{opacity:1,transition:{staggerChildren:.12,delayChildren:1.4}}},pk=(e,t=!1)=>{if(!e)return"TBD";if(e.toLowerCase().includes("whitehawk"))return"HAWKS";const n=e.trim();if(t){if(n.length<=12)return n;const s=n.split(" ");return s[0].toLowerCase()==="st"&&s.length>1?`${s[0]} ${s[1]}`:s[0].length>=4?s[0]:n.substring(0,12)}if(n.length<=18)return n;const r=n.replace(/Athletic/gi,"Ath").replace(/Borough/gi,"Boro").replace(/Community/gi,"Comm");return r.length<=18?r:n.substring(0,18).trim()},EP=({settings:e})=>{var E,k;const{custom_image_url:t,background_type:n="image",background_color:r="#8e160b",image_position:s=50}=e||{},{fixtures:a,results:o,isLoading:l}=ud(),u=[...a||[],...o||[]].find(S=>{var C,T,_,P,O,I,B,$;return(((C=S["home-team"])==null?void 0:C.id)===468||((T=S["away-team"])==null?void 0:T.id)===468||((O=(P=(_=S["home-team"])==null?void 0:_.name)==null?void 0:P.toLowerCase())==null?void 0:O.includes("whitehawk"))||(($=(B=(I=S["away-team"])==null?void 0:I.name)==null?void 0:B.toLowerCase())==null?void 0:$.includes("whitehawk")))&&Na(S)})||null,d=u?null:(a==null?void 0:a.find(S=>{var A,C,T,_;return((T=(C=(A=S["home-team"])==null?void 0:A.name)==null?void 0:C.toLowerCase())==null?void 0:T.includes("whitehawk"))||((_=S["home-team"])==null?void 0:_.id)===468}))||null,h=u||d||(o&&o.length>0?o[0]:null),[f,p]=N.useState(new Date);N.useEffect(()=>{const S=setInterval(()=>p(new Date),1e3);return()=>clearInterval(S)},[]);const x=N.useMemo(()=>{if(!d)return{days:0,hours:0,mins:0,secs:0};const S=nn(`${d.date}T${d.time}:00`),A=C0(S,f);return A<=0?{days:0,hours:0,mins:0,secs:0}:{days:Math.floor(A/86400),hours:Math.floor(A%86400/3600),mins:Math.floor(A%3600/60),secs:A%60}},[d,f]);if(l)return i.jsx("div",{className:"h-full w-full flex items-center justify-center bg-club-dark",children:i.jsx(Ie,{className:"w-8 h-8 text-[#8e160b] animate-spin"})});if(!h)return null;const m=!d&&!!h,y=typeof window<"u"&&window.innerWidth<1024,g=((E=h.status)==null?void 0:E.short)||"",v=Na(h),b=((k=h.status)==null?void 0:k.full)||"",w=g==="P-P",j=g==="CANC";return i.jsxs("div",{className:"relative h-full w-full overflow-hidden flex flex-col justify-center md:justify-end pb-6 md:pb-12 pt-14",children:[i.jsx("div",{className:"absolute inset-0",children:n==="color"?i.jsx("div",{className:"w-full h-full relative",style:{backgroundColor:r},children:i.jsx("div",{className:`absolute inset-0 flex items-center justify-center pointer-events-none overflow-hidden ${y?"opacity-[0.02] -right-1/4 scale-150":"opacity-[0.03]"}`,children:i.jsx("img",{src:YA,alt:"",className:"w-full max-w-none grayscale brightness-0 invert"})})}):i.jsxs(i.Fragment,{children:[i.jsx("img",{src:t||M9,alt:"",className:"w-full h-full object-cover",style:{objectPosition:`center ${s}%`}}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-club-dark via-club-dark/80 to-black/40 md:bg-gradient-to-r md:from-black/95 md:via-black/70 md:to-transparent"}),v&&i.jsx("div",{className:"absolute inset-0 bg-red-900/10 pointer-events-none animate-pulse-slow"}),j&&i.jsx("div",{className:"absolute inset-0 bg-red-950/30 pointer-events-none"}),w&&i.jsx("div",{className:"absolute inset-0 bg-amber-950/20 pointer-events-none"})]})}),i.jsx("div",{className:"relative container mx-auto px-6 md:px-12 flex flex-col h-full max-w-7xl justify-center md:justify-end",children:i.jsxs("div",{className:"flex flex-col items-start gap-0",children:[i.jsxs(re.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.5,duration:.5},className:"flex flex-wrap items-center gap-2 md:gap-3 mb-2 md:mb-4",children:[j?i.jsx("span",{className:"bg-red-600 text-white font-heading font-black text-xs md:text-sm px-3 py-1 rounded uppercase tracking-widest shadow-lg",children:"â ï¸ MATCH CANCELLED"}):w?i.jsx("span",{className:"bg-amber-500 text-white font-heading font-black text-xs md:text-sm px-3 py-1 rounded uppercase tracking-widest shadow-lg",children:"â ï¸ MATCH POSTPONED"}):i.jsx("span",{className:"font-heading text-sm md:text-base uppercase tracking-[0.2em] text-white/70",children:v?"Live Match":m?"L
614atest Result":"Next Home Match"}),i.jsxs("span",{className:"font-heading text-sm md:text-base uppercase tracking-[0.2em] text-white/70",children:[": ",Ft(nn(h.date),"EEEE do MMMM yyyy")]})]}),(()=>{var _,P,O,I;const S=pk((_=h["home-team"])==null?void 0:_.name,y),A=pk((P=h["away-team"])==null?void 0:P.name,y),C=Math.max(S.length,A.length),T=C>14?"text-[24vw] md:text-[6.8vw] lg:text-[7.6vw] xl:text-[8.4vw]":C>10?"text-[28vw] md:text-[7.5vw] lg:text-[8.2vw] xl:text-[9vw]":"text-[30vw] md:text-[9vw]";return i.jsxs("div",{className:`font-heading ${T} leading-[0.75] text-white uppercase tracking-tighter`,children:[i.jsx(re.div,{variants:dK,initial:"hidden",animate:"visible",className:"block",children:S.split("").concat(v||m?[" ",String(((O=h["home-team"])==null?void 0:O.score)||0)]:[" ","-"]).map((B,$)=>i.jsx(re.span,{variants:fk,className:"inline-block whitespace-pre",children:B},$))},v?"live-home":"next-home"),i.jsx(re.div,{variants:fK,initial:"hidden",animate:"visible",className:"block",children:A.split("").concat(v||m?[" ",String(((I=h["away-team"])==null?void 0:I.score)||0)]:[":"]).map((B,$)=>i.jsx(re.span,{variants:fk,className:"inline-block whitespace-pre",children:B},$))},v?"live-away":"next-away")]})})(),i.jsxs(re.div,{variants:hK,initial:"hidden",animate:"visible",className:"w-full flex flex-col items-start",children:[i.jsx("div",{className:"font-heading text-3xl sm:text-5xl text-white/90 uppercase tracking-[0.15em] sm:tracking-[0.2em] mt-2 mb-4 flex flex-wrap items-center gap-4",children:j?i.jsx("div",{className:"bg-red-600/90 text-white border border-red-400 px-4 py-1.5 rounded text-lg sm:text-2xl font-black tracking-widest flex items-center gap-2",children:i.jsx("span",{children:"MATCH CANCELLED â DO NOT TRAVEL"})}):w?i.jsx("div",{className:"bg-amber-500/90 text-white border border-amber-300 px-4 py-1.5 rounded text-lg sm:text-2xl font-black tracking-widest flex items-center gap-2",children:i.jsx("span",{children:"POSTPONED â NEW DATE TBC"})}):v?i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"relative flex h-3 w-3",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-red-500"})]}),i.jsx("span",{className:"text-red-500 font-black",children:"Live"}),i.jsx("span",{className:"opacity-60",children:b})]}):m?i.jsx("span",{className:"opacity-60",children:"Full Time"}):i.jsxs(i.Fragment,{children:[x.days,"D ",String(x.hours).padStart(2,"0"),"H ",String(x.mins).padStart(2,"0"),"M ",String(x.secs).padStart(2,"0"),"S"]})}),i.jsx("div",{className:"w-full h-4 bg-white mt-4 mb-10"}),j?i.jsxs("div",{className:"flex flex-col items-start gap-1",children:[i.jsx("span",{className:"font-heading text-xl sm:text-2xl text-red-400 uppercase tracking-widest flex items-center gap-3",children:"â ï¸ Match Cancelled â No Admission"}),i.jsx("div",{className:"h-0.5 w-24 bg-red-500"})]}):w?i.jsxs("div",{className:"flex flex-col items-start gap-1",children:[i.jsx("span",{className:"font-heading text-xl sm:text-2xl text-amber-400 uppercase tracking-widest flex items-center gap-3",children:"â ï¸ Match Postponed â Check Back For Updates"}),i.jsx("div",{className:"h-0.5 w-24 bg-amber-400"})]}):i.jsxs(he,{to:v?`/match-center/${h.id}`:m?`/match-report/${h.id}`:"https://whitehawkfc.ktckts.com/",target:v||m?"_self":"_blank",className:"group flex flex-col items-start gap-1",children:[i.jsx("span",{className:"font-heading text-2xl text-club-gold uppercase tracking-widest hover:brightness-110 transition-all flex items-center gap-3",children:v?i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"relative flex h-3 w-3",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-red-500"})]}),"Match Center â LIVE"]}):m?"Match Report":"Get Tickets"}),i.jsx("div",{className:"h-0.5 w-12 bg-club-gold group-hover:w-full transition-all duration-300"})]})]})]})})]})},CP=()=>{const{data:e,isLoading:t}=dd(!0),[n,r]=_0({loop:!0}
614,[E0({delay:5e3,stopOnInteraction:!1})]),s=N.useMemo(()=>(e==null?void 0:e.slice(0,3))||[],[e]),a=N.useCallback(()=>r&&r.scrollPrev(),[r]),o=N.useCallback(()=>r&&r.scrollNext(),[r]);return t?i.jsx("div",{className:"h-full w-full flex items-center justify-center bg-club-dark",children:i.jsx(Ie,{className:"w-8 h-8 text-[#8e160b] animate-spin"})}):i.jsxs("div",{className:"relative h-full w-full group overflow-hidden",children:[i.jsx("div",{className:"embla overflow-hidden h-full",ref:n,children:i.jsx("div",{className:"embla__container h-full [&>div]:h-full flex",children:s.map(l=>i.jsxs("div",{className:"embla__slide flex-[0_0_100%] h-full relative",children:[i.jsx("div",{className:"absolute inset-0",children:l.image_url?i.jsxs(i.Fragment,{children:[i.jsx("img",{src:l.image_url,alt:l.title,className:"w-full h-full object-cover",style:{objectPosition:`center ${l.image_offset!==void 0&&l.image_offset!==null?l.image_offset:50}%`}}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/50 via-black/40 to-black/90"})]}):i.jsx("div",{className:"w-full h-full bg-[#8e160b]"})}),i.jsx("div",{className:"relative h-full flex flex-col justify-end pb-24 md:pb-32 px-4 md:px-20 max-w-5xl mx-auto",children:i.jsxs(re.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},className:"space-y-4",children:[i.jsx("span",{className:"bg-[#8e160b] text-white text-[10px] font-heading uppercase tracking-[0.3em] px-3 py-1 rounded font-bold inline-block mb-2",children:l.category}),i.jsx("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase text-primary-foreground leading-none tracking-tight",children:l.title}),i.jsx("p",{className:"text-primary-foreground/70 font-body text-base md:text-lg max-w-xl line-clamp-2",children:l.excerpt}),i.jsx("div",{className:"pt-6",children:i.jsxs(he,{to:`/news/${l.slug}`,className:"group/btn inline-flex items-center gap-3 bg-white/10 hover:bg-white/20 backdrop-blur-md border border-white/20 text-primary-foreground font-heading text-sm uppercase tracking-widest px-8 py-4 rounded-sm transition-all border-b-2 border-b-[#8e160b]",children:["Read Story ",i.jsx(bf,{size:16,className:"group-hover/btn:translate-x-1 transition-transform"})]})})]})})]},l.id))})}),i.jsx("button",{onClick:a,className:"absolute left-4 top-1/2 -translate-y-1/2 w-12 h-12 rounded-full bg-black/20 backdrop-blur-sm border border-white/10 flex items-center justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:i.jsx(Qu,{size:24})}),i.jsx("button",{onClick:o,className:"absolute right-4 top-1/2 -translate-y-1/2 w-12 h-12 rounded-full bg-black/20 backdrop-blur-sm border border-white/10 flex items-center justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:i.jsx(vl,{size:24})}),i.jsx("div",{className:"absolute bottom-10 left-1/2 -translate-x-1/2 flex gap-2",children:s.map((l,c)=>i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/30"},c))})]})},pK=({settings:e})=>{const[t,n]=N.useState("match");return N.useEffect(()=>{const r=setTimeout(()=>n("posts"),12e3);return()=>clearTimeout(r)},[]),i.jsx("div",{className:"relative h-full w-full",children:i.jsx(ds,{mode:"wait",children:t==="match"?i.jsx(re.div,{initial:{opacity:1},exit:{opacity:0,x:-100},transition:{duration:1},className:"h-full",children:i.jsx(EP,{settings:e})},"match"):i.jsx(re.div,{initial:{opacity:0,x:100},animate:{opacity:1,x:0},transition:{duration:1},className:"h-full",children:i.jsx(CP,{})},"posts")})})},mK=()=>{var p;const{data:e,isLoading:t}=dt("homepage_hero"),{fixtures:n,results:r}=ud(),s=cK(),a=N.useMemo(()=>[...n||[],...r||[]].some(m=>{var g,v,b,w,j,E,k,S;return(((g=m["home-team"])==null?void 0:g.id)===468||((v=m["away-team"])==null?void 0:v.id)===468||((j=(w=(b=m["home-team"])==null?void 0:b.name)==null?void 0:w.toLowerCase())==null?void 0:j.includes("whitehawk"))||((S=(k=(E=m["away-team"])==null?void 0:E.name)==null?void 0:k.toLowerCase())==null?void 0:S.includes("whitehawk")))&&Na(m)}),[n,r]);if(t)return i.jsx("section",{className:"relative h-[420px] md:h-[88vh] bg-club-dark flex items-center justify-center",children:i.jsx(Ie,{className:"w-10 h-10 animate-spin text-[#8e160b]"})});const o=((p=e==null?void 0:e.value)==null?void 0:p.mode)||"match",l=a?"match":o,c=x=>{var y,g,v,b,w,j,E;const m=(y=e==null?void 0:e.value)==null?void 0:y[x];return m||{background_type:((g=e==null?void 0:e.value)==null?void 0:g.background_type)||"image",background_color:((v=e==null?void 0:e.value)==null?void 0:v.background_color)||"#8e160b",custom_image_url:((b=e==null?void 0:e.value)==null?void 0:b.custom_image_url)||"",image_position:((w=e==null?void 0:e.value)==null?void 0:w.image_position)!==void 0?(j=e==null?void 0:e.value)==null?void 0:j.image_position:50,hero_size:((E=e==null?void 0:e.value)==null?void 0:E.hero_size)||(x==="mobile"?"compact":"standard")}},u=c("mobile"),d=c("desktop"),h=s?u:d,f=h.background_type==="color"?"h-[100svh]":u
614K(u.hero_size,d.hero_size);return i.jsxs("section",{className:`relative ${f} bg-club-dark overflow-hidden transition-all duration-700`,children:[h.background_type==="image"&&i.jsx("div",{className:"absolute top-0 left-0 right-0 h-32 bg-gradient-to-b from-black via-black/40 to-transparent z-10 pointer-events-none"}),l==="match"&&i.jsx(EP,{settings:h}),l==="posts"&&i.jsx(CP,{}),l==="combined"&&i.jsx(pK,{settings:h})]})},mk=468,gK=(e,t)=>{const[n,r]=N.useState(new Date);return N.useEffect(()=>{const s=setInterval(()=>r(new Date),1e3);return()=>clearInterval(s)},[]),N.useMemo(()=>{try{if(!e||!t)return{d:"00",h:"00",m:"00",s:"00"};const s=nn(`${e}T${t}:00`),a=C0(s,n);return a<=0?{d:"00",h:"00",m:"00",s:"00"}:{d:String(Math.floor(a/86400)).padStart(2,"0"),h:String(Math.floor(a%86400/3600)).padStart(2,"0"),m:String(Math.floor(a%3600/60)).padStart(2,"0"),s:String(a%60).padStart(2,"0")}}catch{return{d:"00",h:"00",m:"00",s:"00"}}},[n,e,t])};function xK(e){try{return Ft(nn(e),"EEEE, d MMMM").toUpperCase()}catch{return""}}const yK=` 615@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap'); 616 617.fw-widget { 618 --bg: #0a0a0a; 619 --panel: #111111; 620 --line: rgba(255,255,255,0.10); 621 --muted: rgba(255,255,255,0.42); 622 --text: #f5f5f5; 623 --accent: #8e160b; 624 --outer: #ffffff; 625 626 background: var(--outer); 627 color: var(--text); 628 font-family: Inter, Arial, Helvetica, sans-serif; 629 padding: 32px 0; 630 border-top: 1px solid #eee; 631} 632 633.fw-widget * { box-sizing: border-box; } 634 635.fw-widget .wrap { 636 width: 100%; 637 max-width: 1400px; 638 margin: 0 auto; 639 padding: 0 16px; 640} 641 642.fw-widget .match-strip { 643 background: #141b2b; 644 min-height: 236px; 645 display: flex; 646 align-items: stretch; 647 box-shadow: 0 10px 30px rgba(0,0,0,0.12); 648} 649 650.fw-widget .strip-inner { 651 width: 100%; 652 display: flex; 653 align-items: stretch; 654 gap: 32px; 655 min-height: inherit; 656} 657 658.fw-widget .match-strip:first-of-type { 659 padding-left: calc((100% - 1400px) / 2 + 16px); 660 justify-content: flex-end; 661} 662 663.fw-widget .match-strip:last-of-type { 664 padding-right: calc((100% - 1400px) / 2 + 16px); 665 justify-content: flex-start; 666} 667 668@media (max-width: 1400px) { 669 .fw-widget .match-strip:first-of-type { padding-left: 16px; } 670 .fw-widget .match-strip:last-of-type { padding-right: 16px; } 671} 672 673.fw-widget .match-block { 674 position: relative; 675 flex: 1; 676 display: grid; 677 grid-template-columns: 54px minmax(0, 1fr); 678 column-gap: 20px; 679 align-items: stretch; 680 padding: 46px 0 0 24px; 681 border-right: 1px solid rgba(255,255,255,0.03); 682} 683 684.fw-widget .match-block.is-next { 685 border-left: 1px solid rgba(255,255,255,0.08); 686} 687 688.fw-widget .section-label { 689 position: absolute; 690 top: 14px; 691 left: 24px; 692 font-family: "Bebas Neue", sans-serif; 693 font-size: 26px; 694 letter-spacing: 0.8px; 695 line-height: 1; 696 text-transform: uppercase; 697 color: #fff; 698 pointer-events: none; 699} 700 701.fw-widget .date-box { 702 background: #0d121c; 703 display: flex; 704 flex-direction: column; 705 align-items: center; 706 justify-content: flex-start; 707 padding-top: 12px; 708 text-transform: uppercase; 709 font-family: "Bebas Neue", sans-serif; 710 letter-spacing: 0.5px; 711} 712 713.fw-widget .date-box .day { 714 font-size: 20px; 715 line-height: 1; 716 color: #fff; 717 font-weight: 400; 718} 719 720.fw-widget .date-box .month { 721 margin-top: 4px; 722 font-size: 14px; 723 line-height: 1; 724 color: rgba(255,255,255,0.78); 725 font-weight: 400; 726} 727 728.fw-widget .match-content { 729 display: flex; 730 flex-direction: column; 731 justify-content: space-between; 732 padding-bottom: 24px; /* Internal content padding */ 733 padding-right: 24px; 734} 735 736.fw-widget .competition { 737 color: #facc15; 738 text-transform: uppercase; 739 letter-spacing: 1.8px; 740 font-family: "Bebas Neue", sans-serif; 741 font-size: 14px; 742 margin-bottom: 8px; 743 white-space: nowrap; 744 overflow: hidden; 745 text-overflow: ellipsis; 746} 747 748.fw-widget .teams-row { 749 display: flex; 750 justify-content: space-between; 751 align-items: flex-start; 752 font-family: "Bebas Neue", sans-serif; 753 font-size: 26px; 754 font-weight: 400; 755 line-height: 1; 756 color: #f4f4f4; 757 text-transform: uppercase; 758 letter-spacing: 0.5px; 759} 760.fw-widget .teams-row .team-names { 761 white-space: nowrap; 762 overflow: hidden; 763 text-overflow: ellipsis; 764 padding-right: 12px; 765} 766.fw-widget .teams-row .scores { 767 color: var(--accent); 768 text-align: right; 769 flex-shrink: 0; 770 font-weight: 700; 771} 772 773.fw-widget .standings-wrap { 774 margin-top: auto; 775 padding-top: 20px; 776} 777 778.fw-widget .standings-btn { 779 appearance: none; 780 background: transparent; 781 color: #fff; 782 border: 1px solid rgba(255,255,255,0.65); 783 height: 36px; 784 min-width: 144px; 785 padding: 0 18px; 786 font-family: "Bebas Neue", sans-serif; 787 font-size: 22px; 788 letter-spacing: 0.8px; 789 text-transform: uppercase; 790 cursor: pointer; 791 transition: background 0.2s, color 0.2s; 792 white-space: nowrap; 793} 794.fw-widget .standings-btn:hover { background: #fff; color: #000; } 795 796.fw-widget .timer-box { 797 width: 320px; 798 background: #8e160b; 799 padding: 30px 24px; 800 display: flex; 801 flex-direction: column; 802 justify-content: center; 803 position: relative; 804 z-index: 20; 805 transform: translateY(-20px); 806 height: 80%; 807 box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 808 border: 1px solid rgba(255,255,255,0.15); 809} 810 811.fw-widget .countdown { 812 font-family: "Bebas Neue", sans-serif; 813 font-size: 66px; 814 line-height: 0.95; 815 letter-spacing: 1px; 816 color: #fff; 817 margin-bottom: 16px; 818 white-space: nowrap; 819} 820 821.fw-widget .countdown-sub { 822 font-family: "Bebas Neue", sans-serif; 823 font-size: 24px; 824 letter-spacing: 1px; 825 text-transform: uppercase; 826 color: rgba(255,255,255,0.8); 827} 828 829.fw-widget .bottom-link { 830 display: flex; 831 justify-content: flex-end; 832 background: var(--outer); 833 padding: 32px 0 0; 834} 835 836.fw-widget .fixtures-link { 837 display: inline-flex; 838 align-items: center; 839 gap: 14px; 840 color: #111; 841 text-decoration: none; 842 border-top: 1px solid #292929; 843 border-bottom: 1px solid #292929; 844 padding: 12px 16px 10px; 845 min-width: 250px; 846 justify-content: center; 847 font-family: "Bebas Neue", sans-serif; 848 font-size: 24px; 849 letter-spacing: 0.8px; 850 text-transform: uppercase; 851 transition: opacity 0.2s; 852} 853.fw-widget .fixtures-link:hover { opacity: 0.8; } 854.fw-widget .fixtures-link .arrow { font-size: 28px; line-height: 1; } 855 856@media (max-width: 1400px) { 857 .fw-widget .match-block { padding-left: 16px; column-gap: 14px; } 858 .fw-widget .timer-box { width: 320px; padding-left: 20px; padding-right: 20px; } 859} 860 861@media (max-width: 1200px) { 862 .fw-widget .strip-inner { flex-direction: column; gap: 4px; } 863 .fw-widget .match-strip:first-of-type, .fw-widget .match-strip:last-of-type { padding: 0 16px; } 864 .fw-widget .match-block { flex: 1; } 865 .fw-widget .timer-box { width: 100%; box-shadow: none; border-top: 1px solid rgba(255,255,255,0.05); transform: none; height: auto; } 866} 867 868@media (max-width: 800px) { 869 .fw-widget { padding: 16px 0; } 870 .fw-widget .match-strip { flex-direction: column; min-height: auto; } 871 .fw-widget .match-block { flex: 1 1 100%; padding-bottom: 20px; } 872 .fw-widget .match-block:not(:first-child) { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); } 873 .fw-widget .match-block.is-next { margin-left: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.08); } 874 .fw-widget .countdown { font-size: 48px; } 875 .fw-widget .fixtures-link { min-width: 100%; } 876} 877`,Mg=({fixture:e,label:t,btnLabel:n,showScore:r=!1,isNext:s=!1})=>{var f,p;if(!e)return i.jsxs("div",{className:`match-block ${s?"is-next":""}`,children:[t&&i.jsx("div",{className:"section-label",children:t}),i.jsx("div",{style:{color:"var(--muted)",textTransform:"uppercase",padding:"60px 24px"},children:"No match data"})]});const a=e["home-team"],o=e["away-team"];let l=e.competition.name;l.includes("Isthmian")&&(l="Isthmian");const c=Ft(nn(e.date),"dd"),u=Ft(nn(e.date),"MMM"),d=((f=e.status)==null?void 0:f.short)==="P-P",h=((p=e.status)==null?void 0:p.short)==="CANC";return i.jsxs("article",{className:`match-block ${s?"is-next":""}`,children:[t&&i.jsx("div",{className:"section-label",children:t}),i.jsxs("div",{className:"date-box",children:[i.jsx("div",{className:"day",children:c}),i.jsx("div",{className:"month",children:u})]}),i.jsxs("div",{className:"match-content",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"competition",title:e.competition.name,children:[l," · ",e.time,h&&i.jsx("span",{className:"ml-2 bg-red-600 text-white px-2 py-0.5 rounded text-[10px] tracking-wider font-bold",children:"CANCELLED"}),d&&i.jsx("span",{className:"ml-2 bg-amber-500 text-white px-2 py-0.5 rounded text-[10px] tracking-wider font-bold",children:"POSTPONED"})]}),i.jsxs("div",{className:"teams-row",children:[i.jsxs("div",{className:"team-names",children:[i.jsx("span",{className:a.name==="Whitehawk"||a.id===mk?"font-bold":"font-normal",children:a.name}),i.jsx("br",{}),i.jsx("span",{className:o.name==="Whitehawk"||o.id===mk?"font-bold":"font-normal",children:o.name})]}),r&&i.jsxs("div",{className:"scores",children:[a.score??"-",i.jsx("br",{}),o.score??"-"]})]})]}),h?i.jsx("div",{className:"standings-wrap",children:i.jsx("span",{className:"inline-flex items-center gap-1.5 bg-red-600 text-white px-4 py-2 text-xs font-heading font-bold uppercase tracking-wider",children:"Match Cancelled"})}):d?i.jsx("div",{className:"standings-wrap",children:i.jsx("span",{className:"inline-flex items-center gap-1.5 bg-amber-500 text-white px-4 py-2 text-xs font-heading font-bold uppercase tracking-wider",children:"Match Postponed"})}):n&&i.jsx("div",{className:"standings-wrap",children:i.jsx(he,{to:n==="STANDINGS"?"/standings":n==="REPORT"?`/match-report/${e.id}`:n==="PREVIEW"||n==="MATCH CENTER"?`/match-center/${e.id}`:"/matches",children:i.jsx("button",{className:"standings-btn",children:n})})})]})]})},vK=()=>{var l,c;const{results:e,nextMatch:t}=ud(),n=N.useMemo(()=>e.slice(0,2).reverse(),[e]),r=gK((t==null?void 0:t.date)||"",(t==null?void 0:t.t
877ime)||""),s=t?xK(t.date):"N/A",a=((l=t==null?void 0:t.status)==null?void 0:l.short)==="CANC",o=((c=t==null?void 0:t.status)==null?void 0:c.short)==="P-P";return i.jsxs("section",{children:[i.jsx("style",{children:yK}),i.jsxs("div",{className:"fw-widget",children:[i.jsxs("div",{className:"strip-inner",children:[i.jsxs("section",{className:"match-strip flex-1",children:[i.jsx(Mg,{fixture:n[0],label:"LAST MATCHES",btnLabel:"REPORT",showScore:!0}),i.jsx(Mg,{fixture:n[1],btnLabel:"REPORT",showScore:!0})]}),i.jsxs("section",{className:"match-strip flex-1",children:[i.jsx(Mg,{fixture:t||e[0],label:t?"NEXT MATCH":"LATEST RESULT",btnLabel:t?"PREVIEW":"REPORT",showScore:!t,isNext:!0}),i.jsx("div",{className:"timer-box",style:{backgroundColor:a?"#dc2626":o?"#d97706":void 0},children:t?a?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"countdown",style:{fontSize:"44px"},children:"CANCELLED"}),i.jsx("div",{className:"countdown-sub",children:"Match Will Not Be Played"})]}):o?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"countdown",style:{fontSize:"44px"},children:"POSTPONED"}),i.jsx("div",{className:"countdown-sub",children:"New Date To Be Confirmed"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"countdown",id:"countdown",children:[r.d,":",r.h,":",r.m,":",r.s]}),i.jsx("div",{className:"countdown-sub",id:"countdownDate",children:s})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"countdown",id:"countdown",children:"FT"}),i.jsx("div",{className:"countdown-sub",id:"countdownDate",children:"Season in Progress"})]})})]})]}),i.jsx("div",{className:"wrap",children:i.jsx("div",{className:"bottom-link",children:i.jsxs(he,{to:"/matches",className:"fixtures-link",children:[i.jsx("span",{className:"arrow",children:"â"}),i.jsx("span",{children:"FIXTURES AND RESULTS"})]})})})]})]})},gk=468,bK=()=>{var l;const{data:e,isLoading:t}=em(),n=(e==null?void 0:e.teams)||[],r=((l=e==null?void 0:e.competition)==null?void 0:l.id)||0,{data:s=[]}=P0(r),a=N.useMemo(()=>{const c=new Map;return s.forEach(u=>{Na(u)&&(c.set(u["home-team"].id,{homeScore:u["home-team"].score||0,awayScore:u["away-team"].score||0,homeTeamId:u["home-team"].id,awayTeamId:u["away-team"].id,homeTeamName:u["home-team"].name,awayTeamName:u["away-team"].name}),c.set(u["away-team"].id,{homeScore:u["home-team"].score||0,awayScore:u["away-team"].score||0,homeTeamId:u["home-team"].id,awayTeamId:u["away-team"].id,homeTeamName:u["home-team"].name,awayTeamName:u["away-team"].name}))}),c},[s]),o=N.useMemo(()=>{if(!n||n.length===0)return[];const c=n.findIndex(h=>h.id===gk);if(c===-1)return n.slice(0,5);let u=c-2;u<0&&(u=0);let d=u+5;return d>n.length&&(d=n.length,u=Math.max(0,d-5)),n.slice(u,d)},[n]);return i.jsx("div",{style:{padding:"60px 0",background:"#ffffff",borderTop:"1px solid #f0f0f0"},children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsx("div",{className:"flex items-end justify-between mb-8 pb-4",children:i.jsxs("div",{children:[i.jsx("h2",{className:"font-heading text-4xl md:text-6xl text-[#141b2b] uppercase tracking-wider leading-none",children:"Men's First Team League Table"}),i.jsx("div",{className:"h-1 w-12 bg-club-gold mt-4"})]})}),i.jsx("div",{className:"bg-white border border-[#e5e5e5] rounded-none overflow-hidden shadow-sm",children:i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"bg-[#141b2b] text-white",children:[i.jsx("th",{className:"py-4 px-3 font-heading text-sm uppercase tracking-widest text-center w-12",children:"#"}),i.jsx("th",{className:"py-4 px-4 font-heading text-sm uppercase tracking-widest min-w-[140px] md:min-w-[200px]",children:"Team"}),i.jsx("th",{className:"py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"P"}),i.jsx("th",{className:"py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"W"}),i.jsx("th",{className:"py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"D"}),i.jsx("th",{className:"py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"L"}),i.jsx("th",{className:"hidden md:table-cell py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"F"}),i.jsx("th",{className:"hidden md:table-cell py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"A"}),i.jsx("th",{className:"hidden md:table-cell py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"+/-"}),i.jsx("th",{className:"py-4 px-3 font-heading text-sm uppercase tracking-widest text-center",children:"Pts"})]})}),i.jsx("tbody",{children:t?i.jsx("tr",{children:i.jsx("td",{colSpan:10,className:"py-20 text-center text-muted-foreground font-heading text-sm uppercase tracking-widest animate-pulse",children:"Loading Table Dataâ¦"})}):o.map(c=>{const u=c.name==="Whitehawk"||c.id===gk;return i.jsxs("tr",{className:`transition-colors border-b border-[#eee] ${u?"bg-[#8e160b] text-white font-bold":"hover:bg-[#f8f8f8] text-[#333]"}`,children:[i.jsx("td",{className:"py-4 px-3 text-center font-heading text-lg tracking-widest",children:c.position}),i.jsx("td",{className:"py-4 px-4 font-heading text-lg uppercase tracking-widest relative group",children:i.jsxs("div",{className:"flex items-center justify-between gap-x-2 w-full",children:[i.jsx("span",{className:"truncate",children:c.name}),a.has(c.id)&&(()=>{const d=a.get(c.id),h=d.homeTeamId===c.id,f=h?d.homeScore:d.awayScore,p=h?d.awayScore:d.homeScore;let x="bg-[#d8a32a]";return f>p?x="bg-[#61a868]":f<p&&(x="bg-[#ed3c45]"),i.jsxs("span",{className:`px-2 py-0.5 rounded text-white text-sm md:text-base font-bold tabular-nums shrink-0 leading-none ${x}`,children:[d.homeScore,"-",d.awayScore]})})()]})}),i.jsx("td",{className:"py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["all-matches"].played}),i.jsx("td",{className:"py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["all-matches"].won}),i.jsx("td",{className:"py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["all-matches"].drawn}),i.jsx("td",{className:"py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["all-matches"].lost}),i.jsx("td",{className:"hidden md:table-cell py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["all-matches"].for}),i.jsx("td",{className:"hidden md:table-cell py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["all-matches"].against}),i.jsx("td",{className:"hidden md:table-cell py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["all-matches"]["goal-
877difference"]>0?`+${c["all-matches"]["goal-difference"]}`:c["all-matches"]["goal-difference"]}),i.jsx("td",{className:"py-4 px-3 text-center font-heading text-lg tracking-widest",children:c["total-points"]})]},c.id)})})]})})}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingTop:"32px",borderTop:"1px solid #e5e5e5"},children:i.jsxs(he,{to:"/standings",style:{display:"inline-flex",alignItems:"center",gap:"14px",color:"#111",textDecoration:"none",borderTop:"1px solid #292929",borderBottom:"1px solid #292929",padding:"12px 16px 10px",minWidth:"250px",justifyContent:"center",fontFamily:'"Bebas Neue", sans-serif',fontSize:"24px",letterSpacing:"0.8px",textTransform:"uppercase",transition:"opacity 0.2s"},onMouseEnter:c=>c.currentTarget.style.opacity="0.7",onMouseLeave:c=>c.currentTarget.style.opacity="1",children:[i.jsx("span",{style:{fontSize:"28px",lineHeight:"1"},children:"â"}),i.jsx("span",{children:"FULL STANDINGS"})]})})]})})},wK=()=>{const e=N.useRef(null),{data:t,isLoading:n}=dd(!0),r=a=>{if(!e.current)return;const o=340;e.current.scrollBy({left:a==="left"?-o:o,behavior:"smooth"})};if(n)return i.jsx("div",{className:"py-20 flex justify-center",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})});const s=(t==null?void 0:t.slice(0,8))||[];return i.jsx("section",{className:"py-16 md:py-24 bg-white overflow-hidden border-t border-gray-100",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs("div",{className:"flex items-end justify-between mb-12",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-heading text-4xl md:text-6xl text-[#141b2b] uppercase tracking-wider leading-none",children:"Latest News"}),i.jsx("div",{className:"h-1 w-12 bg-club-gold mt-4"})]}),i.jsxs("div",{className:"flex items-center gap-3 md:flex hidden",children:[i.jsx("button",{onClick:()=>r("left"),className:"w-12 h-12 flex items-center justify-center bg-gray-50 border border-gray-200 text-[#141b2b] hover:bg-gray-100 transition-all rounded-full",children:i.jsx(Qu,{size:24})}),i.jsx("button",{onClick:()=>r("right"),className:"w-12 h-12 flex items-center justify-center bg-gray-50 border border-gray-200 text-[#141b2b] hover:bg-gray-100 transition-all rounded-full",children:i.jsx(vl,{size:24})})]})]}),i.jsx("div",{className:"relative group/carousel",children:i.jsx("div",{ref:e,className:"flex gap-8 overflow-x-auto pb-8 hide-scrollbar snap-x snap-mandatory",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:s.map((a,o)=>{const l=new Date(a.published_at||Date.now()),c=l.getDate(),u=l.toLocaleString("en-GB",{month:"short"}).toUpperCase(),d=l.getFullYear();return i.jsx(he,{to:`/news/${a.slug}`,className:"flex-shrink-0 snap-start w-full md:w-[calc(33.333%-1.35rem)] group/card",children:i.jsxs("article",{className:"flex flex-col h-full bg-transparent",children:[i.jsxs("div",{className:"relative aspect-video overflow-hidden mb-5 border border-white/5 shadow-2xl",children:[a.image_url?i.jsx("img",{src:a.image_url,alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover/card:scale-110 brightness-90 group-hover/card:brightness-100",style:{objectPosition:`center ${a.image_offset!==void 0&&a.image_offset!==null?a.image_offset:50}%`}}):i.jsx("div",{className:"w-full h-full bg-[#8e160b]"}),i.jsx("div",{className:"absolute inset-0 bg-black/20 group-hover/card:bg-black/0 transition-colors duration-500"})]}),i.jsxs("div",{className:"px-1",children:[i.jsxs("div",{className:"flex items-center gap-2 font-heading text-xs md:text-sm tracking-widest mb-2",children:[i.jsx("span",{className:"text-club-gold font-bold",children:"CLUB NEWS"}),i.jsx("span",{className:"text-gray-300",children:"â¢"}),i.jsxs("span",{className:"text-gray-400 font-medium",children:[c," ",u," ",d]})]}),i.jsx("h3",{className:"text-[#141b2b] font-heading text-xl md:text-2xl line-clamp-2 leading-[1.1] group-hover/card:text-[#8e160b] transition-colors duration-300 uppercase",children:a.title}),a.excerpt&&i.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-2 mt-2 font-body",children:a.excerpt})]})]})},a.id)})})}),i.jsx("div",{style:{display:"flex",justifyContent:"flex-end",paddingTop:"32px",borderTop:"1px solid rgba(0,0,0,0.05)"},children:i.jsxs(he,{to:"/news",style:{display:"inline-flex",alignItems:"center",gap:"14px",color:"#141b2b",textDecoration:"none",borderTop:"1px solid rgba(20,27,43,0.4)",borderBottom:"1px solid rgba(20,27,43,0.4)",padding:"12px 16px 10px",minWidth:"250px",justifyContent:"center",fontFamily:'"Bebas Neue", sans-serif',fontSize:"24px",letterSpacing:"0.8px",textTransform:"uppercase",transition:"opacity 0.2s"},onMouseEnter:a=>a.currentTarget.style.opacity="0.7",onMouseLeave:a=>a.currentTarget.style.opacity="1",children:[i.jsx("span",{style:{fontSize:"28px",lineHeight:1},children:"â"}),i.jsx("span",{children:"ALL NEWS"})]})})]})})},jK=[{id:"RQvNaPxzIlg",title:"Tough Night at The Enclosed Ground | Whitehawk 1â3 Cheshunt",category:"MATCH HIGHLIGHTS",date:"27 MAR 202
8776",thumbnail:"https://img.youtube.com/vi/RQvNaPxzIlg/maxresdefault.jpg"},{id:"fOWziKNPTi0",title:"Defeat at Home | Whitehawk 0-3 Cray Wanderers Highlights",category:"MATCH HIGHLIGHTS",date:"17 MAR 2026",thumbnail:"https://img.youtube.com/vi/fOWziKNPTi0/maxresdefault.jpg"}],NK=async()=>{const n=`https://api.rss2json.com/v1/api.json?rss_url=${encodeURIComponent("https://www.youtube.com/feeds/videos.xml?channel_id=UCley7B4XSy1S-bd7Sed-SEw")}`,r=await fetch(n);if(!r.ok)throw new Error("Failed to fetch videos");return(await r.json()).items.map(a=>{var c;const o=a.link.match(/(?:v=|\/shorts\/|youtu\.be\/|embed\/)([a-zA-Z0-9_-]{11})/),l=o?o[1]:((c=a.link.split("/").pop())==null?void 0:c.replace("watch?v=",""))||"";return{id:l,title:a.title,category:a.title.toUpperCase().includes("HIGHLIGHTS")?"MATCH HIGHLIGHTS":"CLUB TV",date:Ft(new Date(a.pubDate),"dd MMM yyyy").toUpperCase(),thumbnail:`https://img.youtube.com/vi/${l}/maxresdefault.jpg`}})},kK=()=>{const e=N.useRef(null),{data:t,isLoading:n,isError:r}=Lt({queryKey:["youtube-videos"],queryFn:NK,staleTime:1e3*60*30}),{data:s,isLoading:a}=SP(),o=d=>{if(!e.current)return;const h=400;e.current.scrollBy({left:d==="left"?-h:h,behavior:"smooth"})},l=n||a,c=t==null?void 0:t.filter(d=>!(s!=null&&s.includes(d.id))),u=c||jK;return i.jsx("section",{className:"py-16 md:py-24 bg-[#141b2b] overflow-hidden",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs("div",{className:"flex items-end justify-between mb-12",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-heading text-4xl md:text-6xl text-white uppercase tracking-wider leading-none",children:"Videos"}),i.jsx("div",{className:"h-1 w-12 bg-club-gold mt-4"})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("button",{onClick:()=>o("left"),className:"w-12 h-12 flex items-center justify-center bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all rounded-full",children:i.jsx(Qu,{size:24})}),i.jsx("button",{onClick:()=>o("right"),className:"w-12 h-12 flex items-center justify-center bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all rounded-full",children:i.jsx(vl,{size:24})})]})]}),l?i.jsx("div",{className:"flex gap-6 overflow-hidden py-10",children:[1,2,3].map(d=>i.jsxs("div",{className:"flex-shrink-0 w-[300px] md:w-[420px] animate-pulse",children:[i.jsx("div",{className:"aspect-video bg-white/5 mb-4"}),i.jsx("div",{className:"h-4 w-1/3 bg-white/5 mb-2"}),i.jsx("div",{className:"h-6 w-full bg-white/5"})]},d))}):i.jsx("div",{ref:e,className:"flex gap-6 overflow-x-auto pb-8 hide-scrollbar snap-x snap-mandatory cursor-grab active:cursor-grabbing",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:u.map((d,h)=>i.jsx(re.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:h*.05},className:"flex-shrink-0 w-[300px] md:w-[420px] snap-start",children:i.jsxs("a",{href:`https://www.youtube.com/watch?v=${d.id}`,target:"_blank",rel:"noopener noreferrer",className:"group block",children:[i.jsxs("div",{className:"relative aspect-video overflow-hidden mb-5 shadow-2xl border border-white/5",children:[i.jsx("img",{src:d.thumbnail,alt:d.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110 brightness-90 group-hover:brightness-100",onError:f=>{f.target.src=`https://img.youtube.com/vi/${d.id}/hqdefault.jpg`}}),i.jsx("div",{className:"absolute inset-0 bg-black/30 group-hover:bg-black/10 transition-colors duration-500"}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx("div",{className:"w-14 h-14 md:w-20 md:h-20 flex items-center justify-center rounded-full border border-white/30 text-white bg-black/20 backdrop-blur-md group-hover:scale-110 group-hover:border-white transition-all duration-500 shadow-xl",children:i.jsx(FE,{className:"fill-white ml-1 w-6 h-6 md:w-8 md:h-8"})})})]}),i.jsxs("div",{className:"px-1",children:[i.jsxs("div",{className:"flex items-center gap-2 font-heading text-xs md:text-sm tracking-widest mb-2",children:[i.jsx("span",{className:"text-club-gold font-bold",children:d.category}),i.jsx("span",{className:"text-white/20",children:"â¢"}),i.jsx("span",{className:"text-white/60",children:d.date})]}),i.jsx("h3",{className:"text-white font-heading text-xl md:text-2xl line-clamp-2 leading-[1.1] group-hover:text-primary transition-colors duration-300 drop-shadow-md uppercase",children:d.title})]})]})},d.id+h))}),r&&!c&&i.jsx("div",{className:"text-center py-10",children:i.jsx("p",{className:"text-white/50 font-heading text-sm uppercase tracking-widest",children:"Unable to load latest videos. Showing recent highlights."})})]})})},SK=()=>i.jsx("section",{className:"py-16 md:py-24 bg-white border-t border-[#f0f0f0]",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs("div",{className:"mb-12",children:[i.jsx("h2",{className:"font-heading text-4xl md:text-6xl text-[#141b2b] uppercase tracking-wider leading-none",children:"Discover"}),i.jsx("div",{className:"h-1 w-12 bg-club-gold mt-4"})]}),i.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"group relative overflow-hidden bg-[#f8f8f8] border-l-4 border-[#8e160b] p-8 md:p-10 min-h-[300px] flex flex-col justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-3xl md:text-4xl uppercase tracking-widest text-[#141b2b] mb-4 leading-none",children:"About The Club"}),i.jsx("p",{className:"text-[#555] text-sm font-body mb-5 max-w-md leading-relaxed",children:"The club sits within the heart of East Brighton, a community club since 1945. Football brings everyone together â we look forward to seeing you at the Enclosed Ground!"}),i.jsxs("div",{className:"text-[#777] text-sm font-heading tracking-widest space-y-1.5",children:[i.jsxs("p",{children:[i.jsx("span",{className:"text-[#333]",children:"Adults"})," â £13"]}),i.jsxs("p",{children:[i.jsx("span",{className:"text-[#333]",children:"Concessions"})," â £8"]}),i.jsxs("p",{children:[i.jsx("span",{className:"text-[#333]",children:"Under 18s"})," â £5"]}),i.jsxs("p",{children:[i.jsx("span",{className:"text-[#333]",children:"Under 11s"})," â FREE"]})]})]}),i.jsx("div",{className:"mt-8 pt-6 border-t border-[#e5e5e5] flex justify-end",children:i.jsxs("a",{href:"/club",style:{display:"inline-flex",alignItems:"center",gap:"14px",color:"#111",textDecoration:"none",borderTop:"1px solid #292929",borderBottom:"1px solid #292929",padding:"12px 16px 10px",minWidth:"180px",justifyContent:"center",fontFamily:'"Bebas Neue", sans-serif',fontSize:"24px",letterSpacing:"0.8px",textTransform:"uppercase",transition:"opacity 0.2s"},onMouseEnter:e=>e.currentTarget.style.opacity="0.6",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:[i.jsx("span",{style:{fontSize:"28px",lineHeight:"1"},children:"â"}),i.jsx("span",{children:"ABOUT"})]})})]}),i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},className:"group relative overflow-hidden bg-[#f8f8f8] border-l-4 border-[#8e160b] p-8 md:p-10 min-h-[300px] flex flex-col justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-3xl md:text-4xl uppercase tracking-widest text-[#141b2b] mb-4 leading-none",children:"Volunteers Needed"}),i.jsx("p",{className:"text-[#555] text-sm font-body mb-5 max-w-md leading-relaxed",children:"Whitehawk FC are always on the lookout for additional sets of hands to help with the day to day running of the club."}),i.jsxs("div",{className:"text-[#777] text-sm font-heading tracking-widest space-y-1.5",children:[i.jsx("p",{children:"Matchday Stewards"}),i.jsx("p",{children:"Matchday Support Staff"}),i.jsx("p",{children:"50:50 Raffle Lead"})]})]}),i.jsx("div",{className:"mt-8 pt-6 border-t border-[#e5e5e5] flex justify-end",children:i.jsxs("a",{href:"/contact",style:{display:"inline-flex",alignItems:"center",gap:"14px",color:"#111",textDecoration:"none",borderTop:"1px solid #292929",borderBottom:"1px solid #292929",padding:"12px 16px 10px",minWidth:"180px",justifyContent:"center",fontFamily:'"Bebas Neue", sans-serif',fontSize:"24px",letterSpacing:"0.8px",textTransform:"uppercase",transition:"opacity 0.2s"},onMouseEnter:e=>e.currentTarget.style.opacity="0.6",onMouseLeave:e=>e.currentTarget.style.opacity="1",children:[i.jsx("span",{style:{fontSize:"28px",lineHeight:"1"},children:"â"}),i.jsx("span",{children:"MORE INFO"})]})})]})]})]})}),_K=()=>{const{data:e,isLoading:t}=hd();if(t)return i.jsx("div",{className:"py-20 flex justify-center bg-white border-t border-border",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-[#8e160b]"})});if(!e||e.length===0)return null;const n=e.filter(o=>o.is_visible!==!1);if(n.length===0)return null;const r=n.filter(o=>o.tier==="Elite"),s=n.filter(o=>o.tier!=="Elite"),a=(o,l)=>Array.from({length:Math.ceil(o.length/l)},(c,u)=>o.slice(u*l,u*l+l));return i.jsx("section",{className:"bg-white border-t border-[#eee]",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[r.length>0&&i.jsx("div",{className:"py-10 md:py-12 border-b border-[#f0f0f0]",children:i.jsx("div",{className:"flex flex-col items-center",style:{gap:"40px"},children:a(r,5).map((o,l)=>i.jsx("div",{className:"flex items-center justify-center flex-wrap",style:{gap:"33px"},children:o.map(c=>i.jsx(re.a,{href:c.website_url||"#",target:"_blank",rel:"noreferrer",initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"flex items-center justify-center transition-all duration-500 group",style:{height:"75px"},children:c.logo_url?i.jsx("img",{src:c.logo_url,alt:c.name,className:"max-h-full max-w-full object-contain min-w-[110px] md:min-w-[170px] opacity-90 hover:opacity-100 transition-all duration-500"}):i.jsx("span",{className:"font-heading text-lg uppercase tracking-widest text-[#141b2b]/30",children:c.name})},c.id))},l))})}),s.length>0&&i.jsx("div",{className:"py-12 md:py-16 border-b border-[#f0f0f0]",children:i.jsx("div",{className:"flex flex-col items-center",style:{gap:"40px"},children:a(s,5).map((o,l)=>i.jsx("div",{className:"flex items-center justify-center flex-wrap",style:{gap:"33px"},children:o.map(c=>i.jsx(re.a,{href:c.website_url||"#",target:"_blank",rel:"noreferrer",initial:{opacity:0}
877,whileInView:{opacity:1},viewport:{once:!0},className:"flex items-center justify-center transition-all duration-500 group",style:{height:"53px"},children:c.logo_url?i.jsx("img",{src:c.logo_url,alt:c.name,className:"max-h-full max-w-full object-contain opacity-80 hover:opacity-100 transition-all duration-500"}):i.jsx("span",{className:"font-heading text-xs uppercase tracking-widest text-[#141b2b]/20",children:c.name})},c.id))},l))})})]})})},Xa=({children:e,delay:t=0})=>i.jsx(re.div,{initial:{opacity:0,y:60},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-160px"},transition:{duration:.7,ease:[.22,1,.36,1],delay:t},children:e}),EK=()=>{const{data:e}=dt("homepage_layout"),t=Array.isArray(e==null?void 0:e.value)?e.value:["fixtures","news","table","videos","discover","sponsors"],n=(r,s)=>{switch(r){case"fixtures":return i.jsx(Xa,{delay:s*.1,children:i.jsx(vK,{})},r);case"news":return i.jsx(Xa,{delay:s*.1,children:i.jsx(wK,{})},r);case"table":return i.jsx(Xa,{delay:s*.1,children:i.jsx(bK,{})},r);case"videos":return i.jsx(Xa,{delay:s*.1,children:i.jsx(kK,{})},r);case"discover":return i.jsx(Xa,{delay:s*.1,children:i.jsx(SK,{})},r);case"sponsors":return i.jsx(Xa,{delay:s*.1,children:i.jsx(_K,{})},r);default:return null}};return i.jsxs(i.Fragment,{children:[i.jsx(mK,{}),i.jsx("div",{className:"flex flex-col",children:t.map((r,s)=>n(r,s))})]})},CK={GK:"Goalkeepers",DEF:"Defenders",MID:"Midfielders",FWD:"Forwards"},TK=()=>{var h,f;const{data:e,isLoading:t}=tm("mens-first-team"),{data:n,isLoading:r}=nm("football"),{data:s,isLoading:a}=dt("squad_visibility"),o=((h=s==null?void 0:s.value)==null?void 0:h.squad_coming_soon)??!1,l=((f=s==null?void 0:s.value)==null?void 0:f.staff_coming_soon)??!1,c=N.useMemo(()=>(e==null?void 0:e.filter(p=>p.is_active))||[],[e]),u=N.useMemo(()=>c.length?["GK","DEF","MID","FWD"].map(p=>({position:p,label:CK[p],players:c.filter(x=>x.position===p)})).filter(p=>p.players.length>0):[],[c]),d=N.useMemo(()=>(n==null?void 0:n.filter(p=>p.is_active))||[],[n]);return t||r||a?i.jsx("div",{className:"flex-1 flex items-center justify-center p-20 min-h-[50vh]",children:i.jsx(Ie,{className:"w-10 h-10 animate-spin text-[#8e160b]"})}):i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.03] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A1550-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-black",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"The Men's First Team"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Players ",i.jsx("br",{className:"hidden md:block"})," & Staff"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Meet the players and backroom staff representing the Hawks."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"space-y-32",children:[o?i.jsxs("div",{className:"group",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-16 border-b border-border/50 pb-8 transition-colors group-hover:border-[#8e160b]/30",children:[i.jsx("div",{className:"p-3 bg-[#8e160b]/5 rounded-xl",children:i.jsx(Xn,{size:24,className:"text-[#8e160b]"})}),i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black",children:"First Team Squad"})]}),i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"w-full bg-[#141b2b] text-white p-12 md:p-16 border border-border/30 shadow-md relative overflow-hidden flex flex-col items-center justify-center text-center rounded-xl",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.03] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A
8771550-scaled.jpg')] bg-cover bg-center"}),i.jsxs("div",{className:"relative z-10 max-w-lg space-y-6",children:[i.jsx("div",{className:"inline-flex p-4 rounded-full bg-[#8e160b]/10 text-club-gold border border-club-gold/20 mb-2",children:i.jsx(Xn,{size:48,className:"animate-pulse"})}),i.jsx("h3",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tight text-white",children:"Squad Coming Soon"}),i.jsx("p",{className:"font-body text-sm text-gray-400 leading-relaxed",children:"We are currently finalizing our playing squad for the upcoming season. Check back soon to meet the new signings and returning players representing the Hawks!"}),i.jsx("div",{className:"h-1.5 w-16 bg-club-gold mx-auto mt-4"})]})]})]}):u.map((p,x)=>i.jsxs("div",{className:"group",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-16 border-b border-border/50 pb-8 transition-colors group-hover:border-[#8e160b]/30",children:[i.jsx("div",{className:"p-3 bg-[#8e160b]/5 rounded-xl",children:i.jsx(Xn,{size:24,className:"text-[#8e160b]"})}),i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black",children:p.label})]}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8 sm:gap-16 md:gap-24",children:p.players.map((m,y)=>i.jsx(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.04,duration:.4},className:"group",children:i.jsxs(he,{to:`/player/${m.id}`,className:"block",children:[i.jsxs("div",{className:"relative w-full aspect-[3/4] mb-5 overflow-hidden rounded-xl bg-gradient-to-b from-muted/40 to-muted/10 border border-border/40 group-hover:border-[#8e160b]/30 transition-all duration-500",children:[m.photo_url?i.jsxs(i.Fragment,{children:[i.jsx("img",{src:m.photo_url,alt:m.name,className:"w-full h-full object-cover object-top transition-transform duration-700 group-hover:scale-105"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
877parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"})]}):i.jsx("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-[#141b2b] to-[#1f2940]",children:i.jsx("span",{className:"font-heading text-4xl md:text-5xl font-bold text-white/15 group-hover:text-white/25 transition-colors duration-500",children:m.name.split(" ").map(g=>g[0]).join("")})}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-3 translate-y-full group-hover:translate-y-0 transition-transform duration-500",children:i.jsxs("span",{className:"inline-block bg-[#8e160b] text-white font-heading text-[9px] uppercase tracking-widest px-3 py-1.5 rounded-md",children:[m.appearances," Apps · ",m.goals," Goals"]})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h3",{className:"font-heading text-base md:text-lg font-bold uppercase tracking-tight text-black leading-tight group-hover:text-[#8e160b] transition-colors duration-300",children:m.name}),m.is_captain&&i.jsx("span",{className:"bg-club-gold text-white text-[10px] font-heading font-bold px-1.5 py-0.5 rounded-sm",title:"Captain",children:"C"})]}),i.jsx("p",{className:"font-body text-[11px] text-muted-foreground uppercase tracking-widest font-medium mt-1 leading-relaxed",children:m.position})]})},m.name))})]},p.position)),l?i.jsxs("div",{className:"group",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-16 border-b border-border/50 pb-8 transition-colors group-hover:border-[#8e160b]/30",children:[i.jsx("div",{className:"p-3 bg-[#8e160b]/5 rounded-xl",children:i.jsx(Zt,{size:24,className:"text-[#8e160b]"})}),i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black",children:"Management Team"})]}),i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"w-full bg-[#141b2b] text-white p-12 md:p-16 border border-border/30 shadow-md relative overflow-hidden flex flex-col items-center justify-center text-center rounded-xl",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.03] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A1550-scaled.jpg')] bg-cover bg-center"}),i.jsxs("div",{className:"relative z-10 max-w-lg space-y-6",children:[i.jsx("div",{className:"inline-flex p-4 rounded-full bg-[#8e160b]/10 text-club-gold border border-club-gold/20 mb-2",children:i.jsx(Zt,{size:48,className:"animate-pulse"})}),i.jsx("h3",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tight text-white",children:"Staff Coming Soon"}),i.jsx("p",{className:"font-body text-sm text-gray-400 leading-relaxed",children:"Our coaching staff and backroom team details are being updated for the new season. Stay tuned for official announcements!"}),i.jsx("div",{className:"h-1.5 w-16 bg-club-gold mx-auto mt-4"})]})]})]}):d.length>0&&i.jsxs("div",{className:"group",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-16 border-b border-border/50 pb-8 transition-colors group-hover:border-[#8e160b]/30",children:[i.jsx("div",{className:"p-3 bg-[#8e160b]/5 rounded-xl",children:i.jsx(Zt,{size:24,className:"text-[#8e160b]"})}),i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black",children:"Management Team"})]}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8 sm:gap-16 md:gap-24",children:d.map((p,x)=>i.jsx(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:x*.04,duration:.4},className:"group",children:i.jsxs(he,{to:`/staff/${p.id}`,className:"block",children:[i.jsxs("div",{className:"relative w-full aspect-[3/4] mb-5 overflow-hidden rounded-xl bg-gradient-to-b from-muted/40 to-muted/10 border border-border/40 group-hover:border-[#8e160b]/30 transition-all duration-500",children:[p.image_url?i.jsxs(i.Fragment,{children:[i.jsx("img",{src:p.image_url,alt:p.name,className:"w-full h-full object-cover object-top transition-transform duration-700 group-hover:scale-105"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
877parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"})]}):i.jsx("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-[#141b2b] to-[#1f2940]",children:i.jsx("span",{className:"font-heading text-4xl md:text-5xl font-bold text-white/15 group-hover:text-white/25 transition-colors duration-500",children:p.name.split(" ").map(m=>m[0]).join("")})}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-3 translate-y-full group-hover:translate-y-0 transition-transform duration-500",children:i.jsx("span",{className:"inline-block bg-[#8e160b] text-white font-heading text-[9px] uppercase tracking-widest px-3 py-1.5 rounded-md",children:p.role})})]}),i.jsx("h3",{className:"font-heading text-base md:text-lg font-bold uppercase tracking-tight text-black leading-tight group-hover:text-[#8e160b] transition-colors duration-300",children:p.name}),i.jsx("p",{className:"font-body text-[11px] text-muted-foreground uppercase tracking-widest font-medium mt-1 leading-relaxed",children:p.role})]})},p.name))})]})]})})}),i.jsxs("section",{className:"py-24 bg-[#141b2b] text-white relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2020-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsxs("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase mb-6 leading-none tracking-tighter",children:["One Club. ",i.jsx("br",{})," One Community."]}),i.jsx("div",{className:"h-1 w-24 bg-club-gold mx-auto"})]})})]})]})},AK=[{name:"ALL SEASON",value:"all"},{name:"JUL",value:6},{name:"AUG",value:7},{name:"SEP",value:8},{name:"OCT",value:9},{name:"NOV",value:10},{name:"DEC",value:11},{name:"JAN",value:0},{name:"FEB",value:1},{name:"MAR",value:2},{name:"APR",value:3},{name:"MAY",value:4},{name:"JUN",value:5}],PK=({match:e})=>{var o,l,c,u,d,h,f,p,x,m,y;e["home-team"].id===468||e["home-team"].name;const t=e["home-team"],n=e["away-team"],r=((o=e.status)==null?void 0:o.short)==="FT"||((l=e.status)==null?void 0:l.short)==="AET"||((c=e.status)==null?void 0:c.short)==="Pens"||((d=(u=e.status)==null?void 0:u.full)==null?void 0:d.includes("Full Time")),s=nn(e.date),a=Ft(s,"dd MMMM yyyy");return i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:`bg-white border ${((h=e.status)==null?void 0:h.short)==="CANC"?"border-red-400 ring-1 ring-red-400":((f=e.status)==null?void 0:f.short)==="P-P"?"border-amber-400 ring-1 ring-amber-400":"border-border/60"} rounded-sm flex flex-col shadow-sm hover:shadow-md transition-all duration-300 group`,children:[i.jsxs("div",{className:"px-4 py-3 border-b border-border/40 flex items-center justify-between",children:[i.jsx("span",{className:"text-[10px] font-heading font-bold uppercase tracking-widest text-[#8e160b]",children:e.competition.name.replace("Isthmian League","").trim()||"League"}),((p=e.status)==null?void 0:p.short)==="CANC"?i.jsx("span",{className:"text-[10px] font-heading uppercase bg-red-600 text-white font-black px-2 py-0.5 rounded tracking-wider",children:"CANCELLED"}):((x=e.status)==null?void 0:x.short)==="P-P"?i.jsx("span",{className:"text-[10px] font-heading uppercase bg-amber-500 text-white font-black px-2 py-0.5 rounded tracking-wider",children:"POSTPONED"}):r&&i.jsx("span",{className:"text-[10px] font-heading uppercase text-muted-foreground font-bold italic",children:"FT"})]}),i.jsxs("div",{className:"p-5 flex-1 flex flex-col items-center justify-center space-y-4",children:[i.jsxs("div",{className:"w-full grid grid-cols-[1fr_auto_1fr] items-center gap-4",children:[i.jsx("div",{className:"flex flex-col items-center justify-center text-center",children:i.jsx("span",{className:"font-heading text-lg font-bold uppercase tracking-wide leading-tight line-clamp-2",children:t.name})}),i.jsx("div",{className:"flex flex-col items-center justify-center",children:r?i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-2xl font-heading font-black",children:t.score}),i.jsx("span",{className:"text-xl font-heading text-muted-foreground",children:"-"}),i.jsx("span",{className:"text-2xl font-heading font-black",children:n.score})]}):((m=e.status)==null?void 0:m.short)==="CANC"?i.jsx("div",{className:"bg-red-100 border border-red-300 text-red-700 px-3 py-1 rounded-full text-center",children:i.jsx("span",{className:"text-xs font-heading font-black tracking-wider",children:"CANCELLED"})}):((y=e.status)==null?void 0:y.short)==="P-P"?i.jsx("div",{className:"bg-amber-100 border border-amber-300 text-amber-800 px-3 py-1 rounded-full text-center",children:i.jsx("span",{className:"text-xs font-heading font-black tracking-wider",children:"P - P"})}):i.jsx("div",{className:"bg-muted px-3 py-1 rounded-full",children:i.jsx("span",{className:"text-xs font-heading font-bold",children:e.time})})}),i.jsx("div",{className:"flex flex-col items-center justify-center text-center",children:i.jsx("span",{className:"font-heading text-lg font-bold uppercase tracking-wide leading-tight line-clamp-2",children:n.name})})]}),i.jsxs("div",{className:"text-center space-y-1",children:[i.jsxs("p",{className:"text-[11px] font-bold text-foreground",children:[a," - ",e.time]}),i.jsxs("p",{className:"text-[10px] text-muted-foreground font-medium flex items-center justify-center gap-1",children:[i.jsx(Zu,{size:10,
877className:"shrink-0"}),i.jsx("span",{className:"truncate max-w-[180px]",children:e.venue})]})]})]}),(()=>{var w;const g=(w=e.status)==null?void 0:w.short,v=Na(e);if(g==="CANC")return i.jsxs("div",{className:"flex items-center justify-center gap-2 w-full py-3 border-t border-red-200 bg-red-600 text-white font-heading text-[10px] uppercase font-bold tracking-widest",children:[i.jsx(RE,{size:12}),"Match Cancelled"]});if(g==="P-P")return i.jsxs("div",{className:"flex items-center justify-center gap-2 w-full py-3 border-t border-amber-200 bg-amber-500 text-white font-heading text-[10px] uppercase font-bold tracking-widest",children:[i.jsx(OE,{size:12}),"Postponed â Check Back for Updates"]});const b=r?`/match-report/${e.id}`:`/match-center/${e.id}`;return i.jsx(he,{to:b,className:`flex items-center justify-center gap-2 w-full py-3 transition-colors border-t border-border/40 font-heading text-[10px] uppercase font-bold tracking-widest ${v?"bg-red-600 text-white animate-pulse":"bg-muted/40 group-hover:bg-[#8e160b] group-hover:text-white"}`,children:v?i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"relative flex h-2 w-2",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-white opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-white"})]}),"Match Center â LIVE"]}):r?"Match Report":"Match Preview"})})()]})},OK=()=>{const e=new Date().getMonth(),[t,n]=N.useState(e),[r,s]=N.useState("all"),{data:a=[],isLoading:o}=NP();em();const l=N.useMemo(()=>[...a].sort((d,h)=>new Date(d.date).getTime()-new Date(h.date).getTime()),[a]),c=N.useMemo(()=>["all",...Array.from(new Set(a.map(h=>h.competition.name)))],[a]),u=N.useMemo(()=>l.filter(d=>{const h=Yq(nn(d.date)),f=t==="all"||h===t,p=r==="all"||d.competition.name===r;return f&&p}),[l,t,r]);return i.jsxs("div",{className:"min-h-screen bg-[#f9f9f9]",children:[i.jsx("section",{className:"bg-white pt-20 pb-12 md:pt-28 md:pb-16 border-b border-border/50",children:i.jsxs("div",{className:"container mx-auto px-4 text-center",children:[i.jsx("h1",{className:"font-heading text-5xl md:text-7xl font-bold uppercase tracking-tight text-black leading-none mb-4",children:"Fixtures & Results"}),i.jsx("p",{className:"font-heading text-2xl md:text-3xl font-bold text-muted-foreground uppercase",children:"2026/27 Season"})]})}),i.jsx("section",{className:"bg-white border-b border-border shadow-sm sticky top-[84px] md:top-[124px] z-30",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsx("div",{className:"flex items-center justify-center gap-0 overflow-x-auto no-scrollbar py-2 border-b border-border/40",children:AK.map(d=>i.jsxs("button",{onClick:()=>n(d.value),className:`px-4 py-3 font-heading text-[11px] uppercase tracking-widest transition-all whitespace-nowrap relative ${t===d.value?"text-[#8e160b] font-bold":"text-muted-foreground hover:text-black"}`,children:[d.name,t===d.value&&i.jsx(re.div,{layoutId:"activeMonth",className:"absolute bottom-1 left-4 right-4 h-0.5 bg-[#8e160b]"})]},d.name))}),i.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 py-4",children:[c.map(d=>i.jsx("button",{onClick:()=>s(d),className:`px-4 py-1.5 rounded-full font-heading text-[10px] uppercase tracking-widest border transition-all ${r===d?"bg-black text-white border-black":"bg-transparent text-muted-foreground border-border hover:border-black hover:text-black"}`,children:d==="all"?"All Competitions":d.replace("Isthmian League","League")},d)),i.jsxs(he,{to:"/standings",className:"ml-4 flex items-center gap-2 px-4 py-1.5 rounded-full font-heading text-[10px] uppercase tracking-widest border transition-all bg-white text-muted-foreground border-[#8e160b]/30 text-[#8e160b] hover:bg-[#8e160b]/5",children:[i.jsx(Po,{size:12}),"View Standings"]})]})]})}),i.jsx("section",{className:"py-12 md:py-16",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsx(re.div,{initial:{opacity:0}
877,animate:{opacity:1},children:o?i.jsxs("div",{className:"p-20 flex flex-col items-center gap-4 text-muted-foreground",children:[i.jsx(Ie,{className:"w-10 h-10 animate-spin text-[#8e160b]"}),i.jsx("p",{className:"font-heading uppercase tracking-widest text-xs",children:"Live Match Syncing..."})]}):u.length>0?i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:u.map(d=>i.jsx(PK,{match:d},d.id))}):i.jsx("div",{className:"py-32 text-center",children:i.jsx("p",{className:"font-heading text-muted-foreground uppercase tracking-widest text-sm",children:"No matches found for this period."})})},"grid")})})]})},RK=468,MK=()=>{var o;const{data:e,isLoading:t}=em(),n=(e==null?void 0:e.teams)||[],r=((o=e==null?void 0:e.competition)==null?void 0:o.id)||0,{data:s=[]}=P0(r),a=N.useMemo(()=>{const l=new Map;return s.forEach(c=>{var d,h;Na(c)&&(l.set(c["home-team"].id,{homeScore:c["home-team"].score||0,awayScore:c["away-team"].score||0,homeTeamId:c["home-team"].id,awayTeamId:c["away-team"].id,homeTeamName:c["home-team"].name,awayTeamName:c["away-team"].name,status:((d=c.status)==null?void 0:d.full)||"Live"}),l.set(c["away-team"].id,{homeScore:c["home-team"].score||0,awayScore:c["away-team"].score||0,homeTeamId:c["home-team"].id,awayTeamId:c["away-team"].id,homeTeamName:c["home-team"].name,awayTeamName:c["away-team"].name,status:((h=c.status)==null?void 0:h.full)||"Live"}))}),l},[s]);return i.jsxs("div",{className:"min-h-screen bg-[#f9f9f9]",children:[i.jsx("section",{className:"bg-white pt-20 pb-12 md:pt-28 md:pb-16 border-b border-border/50",children:i.jsxs("div",{className:"container mx-auto px-4 text-center",children:[i.jsx("h1",{className:"font-heading text-5xl md:text-7xl font-bold uppercase tracking-tight text-black leading-none mb-4",children:"League Table"}),i.jsx("p",{className:"font-heading text-2xl md:text-3xl font-bold text-muted-foreground uppercase",children:"Isthmian Premier Division · 2026/27"}),i.jsx("div",{className:"h-1.5 w-24 bg-club-gold mx-auto mt-8"})]})}),i.jsx("section",{className:"py-12 md:py-20",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsx("div",{className:"bg-white border border-[#e5e5e5] rounded-none overflow-hidden shadow-md",children:i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"bg-[#141b2b] text-white",children:[i.jsx("th",{className:"py-4 md:py-5 px-3 md:px-4 font-heading text-sm md:text-base uppercase tracking-widest text-center w-12 md:w-16",children:"#"}),i.jsx("th",{className:"py-4 md:py-5 px-4 md:px-6 font-heading text-sm md:text-base uppercase tracking-widest min-w-[180px] md:min-w-[240px]",children:"Team"}),i.jsx("th",{className:"py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"P"}),i.jsx("th",{className:"py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"W"}),i.jsx("th",{className:"py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"D"}),i.jsx("th",{className:"py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"L"}),i.jsx("th",{className:"hidden md:table-cell py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"F"}),i.jsx("th",{className:"hidden md:table-cell py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"A"}),i.jsx("th",{className:"hidden md:table-cell py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"+/-"}),i.jsx("th",{className:"py-4 md:py-5 px-3 font-heading text-sm md:text-base uppercase tracking-widest text-center",children:"Pts"})]})}),i.jsx("tbody",{children:t?i.jsx("tr",{children:i.jsxs("td",{colSpan:10,className:"py-32 text-center text-muted-foreground font-heading text-lg uppercase tracking-widest animate-pulse",children:[i.jsx(Ie,{className:"animate-spin text-[#8e160b] mx-auto mb-4",size:40}),"Syncing Official Standings..."]})}):n.map(l=>
877{const c=l.name==="Whitehawk"||l.id===RK,u=a.get(l.id);return i.jsxs("tr",{className:`transition-colors border-b border-[#eee] ${c?"bg-[#8e160b] text-white font-bold":"hover:bg-[#f8f8f8] text-[#333]"}`,children:[i.jsx("td",{className:"py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l.position}),i.jsx("td",{className:"py-4 md:py-5 px-4 md:px-6 font-heading text-xl md:text-2xl uppercase tracking-widest relative group",children:i.jsxs("div",{className:"flex items-center justify-between gap-x-2 w-full",children:[i.jsx("span",{className:"truncate",children:l.name}),u&&(()=>{const d=u.homeTeamId===l.id,h=d?u.homeScore:u.awayScore,f=d?u.awayScore:u.homeScore;let p="bg-[#d8a32a]";return h>f?p="bg-[#61a868]":h<f&&(p="bg-[#ed3c45]"),i.jsxs("span",{className:`px-2 py-0.5 md:px-2.5 md:py-1 rounded text-white text-base md:text-lg font-bold tabular-nums shrink-0 leading-none ${p}`,children:[u.homeScore,"-",u.awayScore]})})()]})}),i.jsx("td",{className:"py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["all-matches"].played}),i.jsx("td",{className:"py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["all-matches"].won}),i.jsx("td",{className:"py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["all-matches"].drawn}),i.jsx("td",{className:"py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["all-matches"].lost}),i.jsx("td",{className:"hidden md:table-cell py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["all-matches"].for}),i.jsx("td",{className:"hidden md:table-cell py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["all-matches"].against}),i.jsx("td",{className:"hidden md:table-cell py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["all-matches"]["goal-difference"]>0?`+${l["all-matches"]["goal-difference"]}`:l["all-matches"]["goal-difference"]}),i.jsx("td",{className:"py-4 md:py-5 px-3 text-center font-heading text-xl md:text-2xl tracking-widest",children:l["total-points"]})]},l.id)})})]})})}),i.jsx("div",{className:"mt-12 text-center",children:i.jsxs("p",{className:"text-muted-foreground font-body text-sm italic",children:["Table data powered by Football Web Pages · Last updated: ",new Date().toLocaleDateString()]})})]})})]})},DK=Cb("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),le=N.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},a)=>{const o=r?PD:"button";return i.jsx(o,{className:Pe(DK({variant:t,size:n,className:e})),ref:a,...s})});le.displayName="Button";const IK={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},LK={hidden:{opacity:0,y:20},visible:{opacity:1,y:0}},sh=({title:e,sponsors:t,tierType:n})=>{if(t.length===0)return null;const r={Elite:"h-24 md:h-32",Prestige:"h-16 md:h-20",Signature:"h-12 md:h-16",Classic:"h-10 md:h-12"},s={Elite:"max-w-4xl",Prestige:"max-w-5xl",Signature:"max-w-5xl",Classic:"max-w-6xl"};return i.jsxs("div",{className:"mb-20",children:[n!=="Elite"&&i.jsx("div",{className:"flex justify-center mb-12",children:i.jsx("div",{className:"h-px bg-border w-24"})}
877),i.jsx(re.div,{variants:IK,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:`flex items-center justify-center gap-x-12 gap-y-12 flex-wrap mx-auto ${s[n]}`,children:t.map(a=>i.jsxs(re.div,{variants:LK,className:"group transition-all duration-500",children:[i.jsx("a",{href:a.website_url||"#",target:"_blank",rel:"noreferrer",className:`flex flex-col items-center justify-center ${r[n]} transition-all duration-500`,children:a.logo_url?i.jsx("img",{src:a.logo_url,alt:a.name,className:"max-h-full max-w-[280px] object-contain opacity-80 group-hover:opacity-100 group-hover:scale-105 transition-all duration-500 ease-in-out"}):i.jsx("span",{className:"font-heading text-xs uppercase tracking-widest text-[#141b2b]/30",children:a.name})}),n==="Elite"&&i.jsxs("div",{className:"mt-8 flex flex-col items-center border-t border-border/40 pt-4 opacity-80 group-hover:opacity-100 transition-opacity",children:[i.jsx("span",{className:"font-heading text-sm font-bold uppercase tracking-tight mb-1 text-black",children:a.name}),i.jsxs("div",{className:"flex items-center gap-1.5 text-[9px] uppercase tracking-[0.2em] text-[#8e160b] font-bold",children:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-club-gold"})," Principal Partner"]})]}),n==="Prestige"&&i.jsx("div",{className:"mt-4 opacity-0 group-hover:opacity-60 transition-opacity text-center",children:i.jsx("span",{className:"font-heading text-[10px] uppercase tracking-widest text-muted-foreground",children:a.name})})]},a.id))})]})},FK=()=>{const{data:e,isLoading:t}=hd(),n=(e==null?void 0:e.filter(l=>l.is_visible!==!1))||[],r=n.filter(l=>l.tier==="Elite"),s=n.filter(l=>l.tier==="Prestige"),a=n.filter(l=>l.tier==="Signature"),o=n.filter(l=>l.tier==="Classic");return i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"relative py-20 md:py-32 bg-white border-b border-border/50 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://thehawksfc.com/wp-content/uploads/2023/04/E8A6820.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-[0.4em] text-[#8e160b] font-bold mb-6",children:"Partnership Opportunities"}),i.jsxs("h1",{className:"font-heading text-5xl md:text-8xl font-bold uppercase text-black leading-tight tracking-tighter",children:["Grow with ",i.jsx("br",{className:"hidden md:block"})," The Hawks"]}),i.jsx("p",{className:"font-body text-muted-foreground/80 max-w-2xl mx-auto mt-8 text-base md:text-xl leading-relaxed",children:"Join a vibrant community-focused club with a reach that extends far beyond the Enclosed Ground. Let's create a partnership that delivers real value for your brand."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mx-auto mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-12 text-black",children:[{icon:i.jsx(Zt,{className:"text-[#8e160b]",size:32}),title:"Vibrant Community",desc:"Connect with thousands of passionate local fans and over 30 youth teams within our club ecosystem."},{icon:i.jsx(Po,{className:"text-[#8e160b]",size:32}),title:"Digital Reach",desc:"High engagement across social platforms and our automated website powered by real-time FWP data."},{icon:i.jsx(Gx,{className:"text-[#8e160b]",size:32}),title:"Brand Visibility",desc:"From pitchside boards to front-of-shirt sponsorship, get your brand seen by visitors and media."}].map((l,c)=>i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:c*.1},className:"flex flex-col items-center text-center p-8 rounded-2xl bg-white border border-border/50 hover:border-[#8e160b]/30 transition-all",children:[i.jsx("div",{className:"mb-6",children:l.icon}),i.jsx("h3",{className:"font-heading text-lg font-bold uppercase mb-4 tracking-tight",children:l.title}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:l.desc})]},c))})})}),i.jsx("section",{className:"py-20 md:py-32 bg-[#141b2b] text-white",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-widest text-club-gold mb-2",children:"Corporate Tiers"}),i.jsx("h2",{className:"font-heading text-4xl md:text-5xl font-bold uppercase tracking-tighter text-white leading-none",children:"Partnership Packages"})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:[{name:"Classic",price:"£895",subtitle:"+ VAT per season",extraFee:"Board manufacture & installation: £125 + VAT",icon:i.jsx(lI,{size:20}),features:["8ft pitchside advertising board","1 Complimentary Season Ticket (Worth £250)","Company logo and hyperlink on the Whitehawk FC website","Company logo featured in every home Matchday Programme","Access to the Sponsors Lounge throughout the season","Invitation to the annual Sponsors Evening"]},{name:"Signature",price:"£1,495",subtitle:"+ VAT per season",extraFee:"Board manufacture & installation: £250 + VAT",icon:i.jsx(Gx,{size:20}),features:["16ft pitchside advertising board","2 Complimentary Season Tickets (Worth £500)","Company logo and hyperlink on the Whitehawk FC website","Company logo featured in every home Matchday Programme","Access to the Sponsors Lounge throughout the season","Invitation to the annual Sponsors Evening"]},{name:"Prestige",price:"£2,495",subtitle:"+ VAT per season",extraFee:"Board manufacture & installation: £500 + VAT",icon:i.jsx(Po,{size:20}),popular:!0,features:["2 à 16ft pitchside advertising boards","4 Complimentary Season Tickets (Worth £1,000)","Company logo and hyperlink on the Whitehawk FC website","Company logo featured in every home Matchday Programme","Access to the Sponsors Lounge throughout the season","Half-page advert in every home Matchday Programme","Dedicated sponsor spotlight on social media","Featured business profile on the website","Invitation to the annual Sponsors Evening"]},{name:"Elite",price:"£3,995",subtitle:"+ VAT per season",extraFee:"Board manufacture & installation: £1,000 + VAT",icon:i.jsx(A3,{size:20}),features:["4 à 16ft pitchside advertising boards","8 Complimentary Season Tickets (Worth £2,000)","Company logo and hyperlink on the Whitehawk FC website","Company logo featured in every home Matchday Programme","Access to the Sponsors Lounge throughout the season","Full-page advert in every home Matchday Programme","Match Sponsor for one home league fixture","Complimentary hospital
877ity for up to 8 guests","Dedicated sponsor spotlight on social media","Premium business profile on the website","Complimentary signed first team shirt","Invitation to the annual Sponsors Evening"]}].map((l,c)=>i.jsxs("div",{className:`relative p-8 rounded-2xl border ${l.popular?"border-[#8e160b] border-2 bg-[#8e160b]/10":"border-white/10 bg-white/5"} flex flex-col`,children:[l.popular&&i.jsx("span",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-[#8e160b] text-white text-[10px] font-heading uppercase px-3 py-1 rounded-full font-bold tracking-widest",children:"Most Popular"}),i.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[i.jsx("div",{className:`w-10 h-10 rounded-lg flex items-center justify-center shrink-0 ${l.popular?"bg-[#8e160b] text-white":"bg-white/10 text-white"}`,children:l.icon}),i.jsxs("div",{className:"text-right",children:[i.jsx("span",{className:"font-heading text-xl font-bold",children:l.price}),i.jsx("div",{className:"text-[9px] uppercase tracking-widest text-white/50",children:l.subtitle})]})]}),i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-2 text-white",children:l.name}),i.jsx("p",{className:"text-xs text-white/70 mb-6 font-medium",children:l.extraFee}),i.jsx("ul",{className:"space-y-4 mb-10 flex-1",children:l.features.map((u,d)=>i.jsxs("li",{className:"flex items-start gap-3 text-sm text-white/80",children:[i.jsx(Xu,{size:14,className:"text-club-gold shrink-0 mt-0.5"}),i.jsx("span",{className:"leading-tight",children:u})]},d))}),i.jsx(le,{className:`w-full font-heading uppercase tracking-widest text-xs h-12 ${l.popular?"bg-[#8e160b] hover:bg-[#8e160b]/90 text-white":"bg-white text-black hover:bg-white/90"}`,variant:l.popular?"default":"secondary",children:"Request Brochure"})]},c))})]})}),i.jsx("section",{className:"py-20 md:py-32 bg-white border-y border-border/50",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs("div",{className:"text-center mb-24",children:[i.jsx("h2",{className:"font-heading text-5xl md:text-8xl font-bold uppercase mb-6 tracking-tighter text-black leading-none",children:"Meet Our Partners"}),i.jsx("p",{className:"font-body text-muted-foreground max-w-2xl mx-auto text-lg md:text-xl leading-relaxed",children:"We are proud to work with businesses that share our commitment to community and sporting excellence."}),i.jsx("div",{className:"h-1.5 w-24 bg-club-gold mx-auto mt-10"})]}),t?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Ie,{className:"w-10 h-10 animate-spin text-[#8e160b]"})}):i.jsxs(i.Fragment,{children:[i.jsx(sh,{title:"",sponsors:r,tierType:"Elite"}),i.jsx(sh,{title:"",sponsors:s,tierType:"Prestige"}),i.jsx(sh,{title:"",sponsors:a,tierType:"Signature"}),i.jsx(sh,{title:"",sponsors:o,tierType:"Classic"})]})]})}),i.jsx("section",{className:"py-20 md:py-32 bg-white text-black",children:i.jsxs("div",{className:"container mx-auto px-4 text-center",children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-widest text-[#8e160b] mb-4",children:"Sponsor A Game"}),i.jsxs("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase mb-16 tracking-tighter text-black leading-none",children:["Matchday ",i.jsx("br",{})," Impact"]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 text-left",children:[{icon:i.jsx(Po,{size:24,className:"text-[#8e160b]"}),title:"Match Sponsor",price:"£500 + VAT",desc:"Become the principal sponsor for a home league fixture and enjoy the ultimate Whitehawk matchday experience.",features:["Hospitality in The Trafalgar Terrace for up to 8 guests","Matchday programme front cover recognition","Full-page advertisement in the Matchday Programme","PA announcements before the match & at half-time","Presentation of the Player of the Match award","Company branding on matchday social media","Company logo on the digital match graphics","Team sheet branding","Presentation photograph for press & social media"]},{icon:i.jsx(rI,{size:24,className:"text-[#8e160b]"}),title:"Ball Sponsorship",price:"£150",desc:"Special mention in the boardroom and on social media, plus a signed match ball presentation photo.",features:["Boardroom Mention","Signed Ball","Presentation Photo"]},{icon:i.jsx(Xn,{size:24,className:"text-[#8e160b]"}),title:"Player Sponsorship",price:"£250",desc:"Individual kit sponsorship of your favorite Hawk. Includes program recognition and social mentions.",features:["Home/Away Shirt","Program Name","Player Event Invitation"]}].map((l,c)=>i.jsxs("div",{className:"p-10 bg-white border border-border rounded-2xl hover:border-[#8e160b]/30 transition-all group",children:[i.jsxs("div",{className:"flex justify-between items-start mb-8",children:[i.jsx("div",{className:"p-3 bg-muted rounded-xl group-hover:bg-[#8e160b] group-hover:text-white transition-colors",children:l.icon}),i.jsx("span",{className:"font-heading text-2xl font-bold",children:l.price})]}),i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-4 text-black",children:l.title}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed mb-8",children:l.desc}),i.jsx("ul",{className:"space-y-3",children:l.features.map((u,d)=>i.jsxs("li",{className:"flex items-center gap-3 text-xs uppercase tracking-widest font-heading font-medium text-muted-foreground",children:[i.jsx("div",{className:"h-1 w-1 bg-[#8e160b] rounded-full"})," ",u]},d))})]},c))})]})}),i.jsxs("section",{className:"py-24 md:py-32 bg-white border-t border-border/50 relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-y-0 right-0 w-1/2 bg-[#8e160b]/5 -skew-x-12 translate-x-1/4"}),i.jsxs("div",{className:"container mx-auto px-4 text-center relative z-10",children:[i.jsxs("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase text-black mb-6 tracking-tighter leading-none",children:["Secure Your ",i.jsx("br",{className:"md:hidden"})," Partnership"]}
877),i.jsx("p",{className:"font-body text-muted-foreground/80 max-w-xl mx-auto mb-12 text-lg md:text-xl",children:"We'd love to chat about how a partnership with Whitehawk FC can work for your business. No hard sell â just a conversation about community."}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-6",children:[i.jsx("a",{href:"tel:02045827336",children:i.jsxs(le,{size:"lg",className:"bg-[#8e160b] hover:bg-[#8e160b]/90 text-white h-16 px-10 font-heading uppercase tracking-widest text-sm gap-3 shadow-xl shadow-[#8e160b]/20",children:[i.jsx(Pp,{size:18})," 020 4582 7336"]})}),i.jsx("a",{href:"mailto:[email protected]",children:i.jsxs(le,{size:"lg",variant:"outline",className:"h-16 px-10 font-heading uppercase tracking-widest text-sm gap-3 border-[#8e160b]/30 text-[#8e160b] hover:bg-[#8e160b]/5",children:[i.jsx(ys,{size:18})," Email Us"]})})]}),i.jsx("p",{className:"font-body text-[10px] text-muted-foreground uppercase mt-12 tracking-[0.3em]",children:"Speak with our Commercial Manager"}),i.jsx("div",{className:"h-1.5 w-16 bg-club-gold mx-auto mt-8"})]})]})]})},$K=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"relative py-20 md:py-32 bg-white border-b border-border/50 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://thehawksfc.com/wp-content/uploads/2023/04/E8A6820.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-[0.4em] text-[#8e160b] font-bold mb-6",children:"Premium Experiences"}),i.jsxs("h1",{className:"font-heading text-5xl md:text-8xl font-bold uppercase text-black leading-tight tracking-tighter",children:["The Box ",i.jsx("br",{className:"hidden md:block"})," & Terrace"]}),i.jsx("p",{className:"font-body text-muted-foreground/80 max-w-2xl mx-auto mt-8 text-base md:text-xl leading-relaxed",children:"Experience the Enclosed Ground in unmatched style. From the buzz of matchday hospital
877ity to hosting your own private event, our newly renovated boardroom is the heart of the club."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mx-auto mt-10"})]})})]}),i.jsxs("section",{className:"relative w-full overflow-hidden",style:{height:"60vh",minHeight:"400px"},children:[i.jsx("img",{src:"/boardroom.jpg",alt:"Hawks Boardroom & Terrace overlooking the pitch",className:"w-full h-full object-cover object-center"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent"}),i.jsxs("div",{className:"absolute bottom-8 left-0 right-0 text-center text-white",children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-[0.4em] text-club-gold mb-2",children:"The Hawks Boardroom"}),i.jsx("p",{className:"font-heading text-2xl md:text-4xl font-bold uppercase tracking-tighter",children:"Premium Views. Unmatched Atmosphere."})]})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 items-center",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsxs("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-8 leading-none",children:["Matchday ",i.jsx("br",{})," Hospitality"]}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed mb-12",children:[i.jsx("p",{children:"Join us in the revamped Hawks Boardroom for a matchday experience like no other. Whether you're booking as an individual or securing the entire box for your group, you'll enjoy a premium atmosphere overlooking the pitch."}),i.jsx("p",{className:"mt-4",children:"Our private terrace provides the best view in the ground, while inside, our wall-mounted screens keep you updated with live scores and club sponsors in a dedicated media environment."})]}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[{icon:i.jsx(Tb,{size:20}),text:"Matchday Buffet or Two-Course Meal (by request)"},{icon:i.jsx(P1,{size:20}),text:"Live Scores & Media on TVs"},{icon:i.jsx(oI,{size:20}),text:"Private Bar"},{icon:i.jsx(L3,{size:20}),text:"Exclusive Terrace Access"}].map((e,t)=>i.jsxs("div",{className:"flex items-center gap-3 p-4 border border-border/50 rounded-xl",children:[i.jsx("div",{className:"p-2 bg-[#8e160b]/5 text-[#8e160b] rounded-lg",children:e.icon}),i.jsx("span",{className:"font-heading text-sm uppercase tracking-wide font-bold",children:e.text})]},t))})]}),i.jsx("div",{className:"lg:col-span-5",children:i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white shadow-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-white border-b border-white/10 pb-4",children:"Book For Saturday"}),i.jsxs("div",{className:"space-y-6 mb-10",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"font-body text-sm opacity-70",children:"Individual Booking"}),i.jsx("span",{className:"font-heading text-xl font-bold",children:"Contact for pricing"})]}),i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"font-body text-sm opacity-70",children:"Private Box (Up to 15)"}),i.jsx("span",{className:"font-heading text-xl font-bold text-club-gold",children:"Contact for pricing"})]})]}),i.jsx("a",{href:"mailto:[email protected]",className:"block w-full bg-[#8e160b] text-white font-heading uppercase py-4 rounded-lg tracking-widest text-sm text-center hover:bg-[#7a1309] transition-colors shadow-lg shadow-black/20",children:"Book Matchday Now"}),i.jsx("p",{className:"text-center font-body text-[10px] uppercase tracking-widest mt-6 opacity-40 italic",children:"Incl. Match Ticket & Program"})]})})]})})}),i.jsxs("section",{className:"py-24 bg-[#8e160b] text-white relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-[0.3em] text-club-gold font-bold mb-6",children:"Non-Matchday"}),i.jsxs("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase mb-8 leading-none tracking-tighter",children:["Hire Our ",i.jsx("br",{})," Box"]}),i.jsx("p",{className:"font-body text-lg md:text-xl opacity-90 leading-relaxed mb-10",children:"Looking for a unique venue for your next event? The boardroom and clubroom are available for private hire across Brighton. Hire for meetings or events. Can seat 16 people more if standing. We provide a flexible space with a fully licensed bar."}),i.jsx("div",{className:"h-1 w-24 bg-club-gold mb-12"}),i.jsxs("div",{className:"flex flex-wrap gap-4",children:[i.jsx("a",{href:"mailto:[email protected]",children:i.jsx(le,{size:"lg",className:"bg-white text-[#8e160b] hover:bg-white/90 font-heading uppercase tracking-widest text-xs h-14 px-8",children:"Enquire for Hire"})}),i.jsxs("div",{className:"flex items-center gap-4 text-white/80 font-body text-sm px-4",children:[i.jsx("div",{className:"h-10 w-10 rounded-full border border-white/20 flex items-center justify-center",children:i.jsx(P1,{size:16})}),"Full Media & AV Setup"]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"h-64 roun
877ded-2xl bg-white/5 border border-white/10 flex flex-col items-center justify-center p-6 text-center group hover:bg-white/10 transition-colors",children:[i.jsx("h4",{className:"font-heading text-2xl font-bold uppercase mb-2",children:"Parties"}),i.jsx("p",{className:"font-body text-[10px] uppercase tracking-widest opacity-60",children:"Fully Licensed Bar"})]}),i.jsxs("div",{className:"h-64 rounded-2xl bg-white/5 border border-white/10 flex flex-col items-center justify-center p-6 text-center mt-12 group hover:bg-white/10 transition-colors",children:[i.jsx("h4",{className:"font-heading text-2xl font-bold uppercase mb-2",children:"Meetings"}),i.jsx("p",{className:"font-body text-[10px] uppercase tracking-widest opacity-60",children:"WIFI & AV Included"})]}),i.jsxs("div",{className:"h-64 rounded-2xl bg-white/5 border border-white/10 flex flex-col items-center justify-center p-6 text-center -mt-12 group hover:bg-white/10 transition-colors",children:[i.jsx("h4",{className:"font-heading text-2xl font-bold uppercase mb-2",children:"Functions"}),i.jsx("p",{className:"font-body text-[10px] uppercase tracking-widest opacity-60",children:"Bespoke Catering"})]}),i.jsxs("div",{className:"h-64 rounded-2xl bg-white/5 border border-white/10 flex flex-col items-center justify-center p-6 text-center group hover:bg-white/10 transition-colors",children:[i.jsx("h4",{className:"font-heading text-2xl font-bold uppercase mb-2",children:"Wakes"}),i.jsx("p",{className:"font-body text-[10px] uppercase tracking-widest opacity-60",children:"Peaceful Environment"})]})]})]})})]}),i.jsx("section",{className:"py-24 md:py-32 bg-white relative overflow-hidden text-center",children:i.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[i.jsxs("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase text-black mb-6 tracking-tighter leading-none",children:["Get in ",i.jsx("br",{className:"md:hidden"})," Touch"]}),i.jsx("p",{className:"font-body text-muted-foreground/80 max-w-xl mx-auto mb-12 text-lg md:text-xl",children:"We'd love to host you at the Enclosed Ground. Contact our commercial team for availability."}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-6",children:[i.jsx("a",{href:"tel:02045827336",children:i.jsxs(le,{size:"lg",className:"bg-[#8e160b] hover:bg-[#8e160b]/90 text-white h-16 px-10 font-heading uppercase tracking-widest text-sm gap-3 shadow-xl shadow-[#8e160b]/20",children:[i.jsx(Pp,{size:18})," 020 4582 7336"]})}),i.jsx("a",{href:"mailto:[email protected]",children:i.jsxs(le,{size:"lg",variant:"outline",className:"h-16 px-10 font-heading uppercase tracking-widest text-sm gap-3 border-[#8e160b]/30 text-[#8e160b] hover:bg-[#8e160b]/5 transition-colors",children:[i.jsx(ys,{size:18})," Email Us"]})})]}),i.jsx("div",{className:"h-1.5 w-16 bg-club-gold mx-auto mt-12"})]})})]}),zK=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"relative py-20 md:py-32 bg-white border-b border-border/50 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2020-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-[0.4em] text-[#8e160b] font-bold mb-6",children:"The Hawks Matchday Experience"}),i.jsxs("h1",{className:"font-heading text-5xl md:text-8xl font-bold uppercase text-black leading-tight tracking-tighter",children:["The ",i.jsx("br",{className:"hidden md:block"})," Fanzone"]}),i.jsx("p",{className:"font-body text-muted-foreground/80 max-w-2xl mx-auto mt-8 text-base md:text-xl leading-relaxed",children:"Experience the most inclusive and vibrant fanzone in non-league football. Featuring craft beer from Bison Beer, local food, and the worldâfamous Hawks atmosphere."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mx-auto mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:[{icon:i.jsx(Tb,{className:"text-[#8e160b]",size:28}),title:"Local Food",desc:"A rotation of Brighton's finest independent street food vend
877ors every matchday."},{icon:i.jsx(k3,{className:"text-[#8e160b]",size:28}),title:"Craft Bar",desc:"Featuring local brews from UnBarred, Brooksteed and more. Real ale for real fans."},{icon:i.jsx(LE,{className:"text-[#8e160b]",size:28}),title:"Live Music",desc:"Pre-match sets from local Brighton artists and DJs to get the ground jumping."},{icon:i.jsx(Zt,{className:"text-[#8e160b]",size:28}),title:"Family Zone",desc:"Dedicated space for younger fans with games, activities and a chance to meet the mascot."}].map((e,t)=>i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t*.1},className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/20 transition-all",children:[i.jsx("div",{className:"mb-6",children:e.icon}),i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-3 text-black",children:e.title}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:e.desc})]},t))})})}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsxs("div",{className:"container mx-auto px-4 text-center",children:[i.jsx("h2",{className:"font-heading text-4xl md:text-6xl font-bold uppercase text-black mb-8",children:"Bison Beer x The Hawks Social"}),i.jsx("p",{className:"font-body text-muted-foreground/80 max-w-2xl mx-auto text-base md:text-xl leading-relaxed",children:"Whitehawk FC has partnered with Brighton & Hove brewhouse Bison Beer, who will be manning the bar at The Hawks Social."})]})}),i.jsxs("section",{className:"py-24 bg-[#141b2b] text-white relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-white/10"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[i.jsxs(re.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-[0.3em] text-club-gold font-bold mb-6",children:"More Than 90 Minutes"}),i.jsxs("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase mb-8 leading-none tracking-tighter",children:["Brighton's Best ",i.jsx("br",{})," Kept Secret"]}),i.jsx("p",{className:"font-body text-lg opacity-80 leading-relaxed mb-8",children:"The Enclosed Ground is famous for its atmosphere. We pride ourselves on being a club for everyoneâno matter who you are or where you're from. Our fanzone is the heart of that community."}),i.jsx("div",{className:"space-y-4",children:["Award-winning matchday program","Inclusive, family-friendly environment","Independent merchandise stall","The 'Din' â Brighton's most vocal supporters"].map((e,t)=>i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Gx,{size:16,className:"text-club-gold"}),i.jsx("span",{className:"font-heading uppercase text-sm tracking-wide",children:e})]},t))})]}),i.jsxs(re.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"relative aspect-square md:aspect-video lg:aspect-square rounded-2xl overflow-hidden shadow-2xl",children:[i.jsx("img",{src:"https://thehawksfc.com/wp-content/uploads/2023/10/E8A3750-scaled.jpg",alt:"Hawks Fans",className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#141b2b]/60 to-transparent"})]})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4 text-center",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("h2",{className:"font-heading text-4xl md:text-6xl font-bold uppercase text-black mb-8 tracking-tighter",children:"Planning Your Visit"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 text-left mt-16",children:[i.jsxs("div",{className:"p-8 bg-muted/30 rounded-2xl border border-border/50",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-[#8e160b]/10 flex items-center justify-center text-[#8e160b]",children:i.jsx(sl,{size:20})}),i.jsx("h4",{className:"font-heading text-lg font-bold uppercase",children:"When to arrive"})]}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"Our fanzone opens 2 hours before kick-off. Arrive early to soak up the atmosphere and grab the best food!"})]}),i.jsxs("div",{className:"p-8 bg-muted/30 rounded-2xl border border-border/50",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-[#8e160b]/10 flex items-center justify-center text-[#8e160b]",children:i.jsx(Zu,{size:20})}),i.jsx("h4",{className:"font-heading text-lg font-bold uppercase",children:"Where to find us"})]}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"The fanzone is located directly behind the main stand at the Enclosed Ground. Just follow the music!"})]})]}),i.jsx("div",{className:"mt-16",children:i.jsxs(le,{size:"lg",className:"bg-[#8e160b] hover:bg-[#8e160b]/90 text-white font-heading uppercase tracking-widest text-sm h-16 px-12 gap-3 shadow-xl shadow-[#8e160b]/20",children:["Get Match Tickets ",i.jsx(bf,{size:18})]})})]})})})]}),BK={"Club Leadership":{icon:i.jsx(AE,{size:20}),accent:"from-[#8e160b] to-[#c22b1a]",description:"The leadership team guiding Whitehawk FCâs vision and strategic direction."},"Club Officers":{icon:i.jsx(Xn,{size:20}),accent:"from-[#141b2b] to-[#2a3550]",description:"Senior officials representing the administration, heritage and identity of the club."},"Commercial, Media & Events":{icon:i.jsx(jf,{size:20}),accent:"from-[#8e160b] to-[#c22b1a]",description:"Supporting the clubâs commercial growth, communications, events and engagement."},"Club & Ground Operations":{icon:i.jsx(Op,{size:20}),accent:"from-[#141b2b] to-[#2a3550]",description:"Keeping the club and the Enclosed Ground running smoothly."},"Matchday Operations":{icon:i.jsx(Zt,{size:20}),accent:"from-[#8e160b] to-[#c22b1a]",description:"Delivering safe, welcoming and well-organised matchdays at the Enclosed Ground."},"Club Ambassadors":{icon:i.jsx(Xn,{size:20}),accent:"from-[#141b2b] to-[#2a3550]",description:"Representing Whitehawk FC and helping promote the club within the wider community."}},UK=()=>{const{data:e,isLoading:t}=nm("club"),n=N.useMemo(()=>e?e.reduce((s,a)=>(s[a.department]||(s[a.department]=[]),s[a.department].push(a),s),{}):{},[e]),r=N.useMemo(()=>
877{if(!n)return[];const s=["Club Leadership","Club Officers","Commercial, Media & Events","Club & Ground Operations","Matchday Operations","Club Ambassadors"];return Object.keys(n).sort((a,o)=>s.indexOf(a)-s.indexOf(o))},[n]);return i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-[#141b2b] pt-20 pb-16 md:pt-28 md:pb-24 overflow-hidden relative text-white",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.08] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A1550-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-[#141b2b]"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-4 font-heading text-sm uppercase tracking-[0.4em] font-bold text-club-gold",children:"Behind the Scenes"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-[0.9] text-white md:text-9xl tracking-tighter",children:["Club ",i.jsx("br",{})," Personnel"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-white/60 leading-relaxed",children:"Meet the dedicated team working behind the scenes at the Enclosed Ground to keep Whitehawk FC moving forward on and off the pitch."}),i.jsxs("div",{className:"flex items-center gap-4 mt-10",children:[i.jsx("div",{className:"h-1.5 w-16 bg-club-gold rounded-full"}),i.jsx("div",{className:"h-1.5 w-8 bg-club-gold/40 rounded-full"}),i.jsx("div",{className:"h-1.5 w-4 bg-club-gold/20 rounded-full"})]})]})})]}),i.jsx("section",{className:"py-20 md:py-28 bg-white min-h-[400px]",children:i.jsx("div",{className:"container mx-auto px-4",children:t?i.jsxs("div",{className:"flex flex-col items-center justify-center py-32 text-muted-foreground",children:[i.jsx(Ie,{className:"w-10 h-10 animate-spin mb-4 text-[#8e160b]"}),i.jsx("p",{className:"font-heading uppercase tracking-widest text-xs",children:"Loading Personnel..."})]}):i.jsx("div",{className:"space-y-28",children:r.map((s,a)=>{var c;const o=BK[s]||{icon:i.jsx(Zt,{size:20}),accent:"from-[#8e160b] to-[#c22b1a]",description:""},l=((c=n[s])==null?void 0:c.filter(u=>u.is_active))||[];return l.length===0?null:i.jsxs(re.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.6,delay:a*.05},children:[i.jsxs("div",{className:"flex flex-col md:flex-row md:items-end gap-6 md:gap-12 mb-14",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:`p-2.5 rounded-xl bg-gradient-to-br ${o.accent} text-white`,children:o.icon}),i.jsx("span",{className:"font-heading text-[10px] uppercase tracking-[0.25em] text-[#8e160b] font-extrabold",children:"Department"})]}),i.jsx("h2",{className:"font-heading text-4xl md:text-6xl font-bold uppercase tracking-tighter text-black leading-[0.9]",children:s})]}),o.description&&i.jsx("p",{className:"font-body text-sm text-muted-foreground max-w-sm leading-relaxed pb-1",children:o.description})]}),i.jsx("div",{className:"h-px w-full bg-gradient-to-r from-[#8e160b]/30 via-border/50 to-transparent mb-14"}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-16 md:gap-24",children:l.map((u,d)=>i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:d*.04,duration:.4},className:"group cursor-default",children:[i.jsxs("div",{className:"relative w-full aspect-[3/4] mb-5 overflow-hidden rounded-xl bg-gradient-to-b from-muted/40 to-muted/10 border border-border/40 group-hover:border-[#8e160b]/30 transition-all duration-500",children:[u.image_url?i.jsxs(i.Fragment,{children:[i.jsx("img",{src:u.image_url,alt:u.name,className:"w-full h-full object-cover object-top transition-transform duration-700 group-hover:scale-105"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
877parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"})]}):i.jsx("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-[#141b2b] to-[#1f2940]",children:i.jsx("span",{className:"font-heading text-4xl md:text-5xl font-bold text-white/15 group-hover:text-white/25 transition-colors duration-500",children:u.name.split(" ").map(h=>h[0]).join("")})}),u.is_honorary&&i.jsx("div",{className:"absolute top-3 right-3 z-10",children:i.jsx("span",{className:"inline-block bg-amber-500 text-white font-heading text-[9px] uppercase tracking-widest px-3 py-1.5 rounded-md shadow-sm border border-amber-400",children:"Honorary"})}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-3 translate-y-full group-hover:translate-y-0 transition-transform duration-500",children:i.jsx("span",{className:"inline-block bg-[#8e160b] text-white font-heading text-[9px] uppercase tracking-widest px-3 py-1.5 rounded-md",children:u.role})})]}),i.jsx("h3",{className:"font-heading text-base md:text-lg font-bold uppercase tracking-tight text-black leading-tight group-hover:text-[#8e160b] transition-colors duration-300",children:u.name}),i.jsx("p",{className:"font-body text-[11px] text-muted-foreground uppercase tracking-widest font-medium mt-1 leading-relaxed",children:u.role})]},u.id))})]},s)})})})}),i.jsxs("section",{className:"py-28 bg-[#141b2b] text-white relative overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.06] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2020-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-transparent via-club-gold to-transparent"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsx("div",{className:"max-w-4xl mx-auto text-center",children:i.jsxs(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-[0.3em] text-club-gold font-bold mb-6",children:"Get Involved"}),i.jsxs("h2",{className:"font-heading text-4xl md:text-7xl font-bold uppercase mb-8 leading-[0.85] tracking-tighter",children:["The Engine ",i.jsx("br",{})," Room"]}),i.jsx("p",{className:"font-body text-base md:text-lg text-white/60 leading-relaxed max-w-2xl mx-auto mb-12",children:"Passionate about the club? We are always looking for volunteers to help on matchdays and across our community projects. Be part of something special."}),i.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-3 bg-gradient-to-r from-[#8e160b] to-[#b71c1c] text-white font-heading uppercase py-4 px-10 rounded-xl tracking-widest text-sm hover:from-[#7a1309] hover:to-[#9a1818] transition-all duration-300 shadow-lg hover:shadow-xl hover:shadow-[#8e160b]/20",children:[i.jsx(ys,{size:16}),"Volunteer With Us"]})]})})})]})]})},qK="http://fulltime.thefa.com/fixtures.html?selectedSeason=44984867&selectedFixtureGroupAgeGroup=0&selectedFixtureGroupKey=1_717953301&selectedDateCode=all&selectedClub=215233936&selectedTeam=854369197&selectedRelatedFixtureOption=3&selectedFixtureDateStatus=&selectedFixtureStatus=&previousSelectedFixtureGroupAgeGroup=&previousSelectedFixtureGroupKey=1_717953301&previousSelectedClub=215233936&itemsPerPage=25",VK="https://fulltime.thefa.com/table.html?league=5559379&selectedSeason=44984867&selectedDivision=36318434&selectedCompetition=0&selectedFixtureGroupKey=1_717953301",WK="https://fulltime.thefa.com/results.html?league=5559379&selectedSeason=44984867&selectedDivision=36318434&selectedCompetition=0&selectedFixtureGroupKey=1_717953301",xk="https://fulltime.thefa.com/displayTeam.html?id=264393933",HK="https://fulltime.thefa.com/index.html?divisionseason=416411432",KK=[{id:"women-match-centre",name:"Whitehawk Women",shortLabel:"Women",competition:"Sussex County Women & Girls League â Open Age Championship",summary:"Senior womenâs fixtures, results and league standing are tracked through FA Full-Time, matching the official club page setup.",squadNote:"The official Whitehawk Women page currently marks the squad section as coming soon. Iâve left this as an intentional placeholder until the club publishes the player list.",resources:{fixtures:{href:qK,label:"Upcoming fixtures",status:"live",note:"Open the FA Full-Time fixtures page to see the latest scheduled matches for Whitehawk Women."},results:{href:WK,label:"Latest results",status:"live",note:"Use the FA Full-Time results page for completed match results and form updates."},table:{href:VK,label:"League table",status:"live",note:"View the current Open Age Championship standings on the FA Full-Time table page."}}},{id:"u18-match-centre",name:"Whitehawk U18",shortLabel:"U18",competition:"Isthmian Youth League South Division",summary:"The U18s sit at the top of the pathway, with fixtures and results published on FA Full-Time and linked from the official Whitehawk team page.",resources:{fixtures:{href:xk,label:"Upcoming fixtures",status:"live",note:"Open the FA Full-Time U18 page for upcoming matches and the current schedule."},results:{href:xk,label:"Latest results",status:"live",note:"Use the same FA Full-Time U18 page for completed results and recent match outcomes."},table:{href:HK,label:"League table",status:"live",note:"Open the Isthmian Youth League competition page for standings and broader league context."}}}],GK=()=>{const e=KK.find(t=>
877t.id==="women-match-centre");return i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2020-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Football for All"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Whitehawk ",i.jsx("br",{className:"hidden md:block"})," Women"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Our women's first team is a vital part of the club, competing at a high level and inspiring the next generation of female footballers in Brighton and beyond."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"Pioneering Progress"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"Established with a mission to provide elite-level football for women in our community, Whitehawk Women has grown rapidly into a competitive force. We play our home games at the Enclosed Ground, sharing the same premium facilities as the men's first team."}),i.jsx("p",{className:"mt-6",children:"Our focus is on creating a professional environment where players can excel, develop, and represent the Hawks with pride."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"Training"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Tuesday & Thursday evenings at the Enclosed Ground."})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"Matchdays"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Sundays, 2:00 PM KO at the Enclosed Ground."})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"bg-[#141b2b] p-10 rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-4 tracking-tight",children:"Match Centre"}),i.jsx("p",{className:"font-body text-sm text-gray-400 mb-8 leading-relaxed",children:e==null?void 0:e.summary}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("a",{href:e==null?void 0:e.resources.fixtures.href,target:"_blank",rel:"noreferrer noopener",className:"flex items-center justify-between p-4 rounded-xl bg-white/5 hover:bg-white/10 transition-colors border border-white/10 group",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(S3,{size:18,className:"text-club-gold"}),i.jsx("span",{className:"font-heading uppercase text-sm tracking-wider",children:"Fixtures"})]}),i.jsx(ua,{size:16,className:"text-white/50 group-hover:text-white transition-colors"})]}),i.jsxs("a",{href:e==null?void 0:e.resources.results.href,target:"_blank",rel:"noreferrer noopener",className:"flex items-center justify-between p-4 rounded-xl bg-white/5 hover:bg-white/10 transition-colors border border-white/10 group",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Po,{size:18,className:"text-club-gold"}),i.jsx("span",{className:"font-heading uppercase text-sm tracking-wider",children:"Results"})]}),i.jsx(ua,{size:16,className:"text-white/50 group-hover:text-white transition-colors"})]}),i.jsxs("a",{href:e==null?void 0:e.resources.table.href,target:"_blank",rel:"noreferrer noopener",className:"flex items-center justify-between p-4 rounded-xl bg-white/5 hover:bg-white/10 transition-colors border border-white/10 group",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(q3,{size:18,className:"text-club-gold"}),i.jsx("span",{className:"font-heading uppercase text-sm tracking-wider",children:"League Table"})]}),i.jsx(ua,{size:16,className:"text-white/50 group-hover:text-white transition-colors"})]})]})]}),i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Interested in playing for or sponsoring the women's team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2",children:["Enquire Now ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]})},YK=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"The Future Hawks"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Whitehawk ",i.jsx("br",{className:"hidden md:block"})," Under 18s"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Managed by Matt Dorn and competing in the Sussex County Football League (SCFL), our U18s bridge the gap between youth football and the senior squad, focusing on technical excellence, tactical understanding, and a clear pathway to the first team."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"Building Tomorrow"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"At Whitehawk FC, our U18 team is a critical component of our long-term strategy. We pride ourselves on creating an environment that challenges players to reach their potential, with several former U18s having progressed directly into our first-team squad."}),i.jsx("p",{className:"mt-6",children:"Competing in the Sussex County Football League under the management of Matt Dorn, our players experience a high level of competition, preparing them for the rigours of senior football."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Trials"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Trials for the 2025/26 season take place in early Summer. Registered Hawks Youth players are automatically considered."})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"Training"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Monday evenings, 7:00 PM - 9:00 PM. Elite technical focus."})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"bg-[#141b2b] p-10 rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Recent Match"}),i.jsxs("div",{className:"border-b border-white/5 pb-6",children:[i.jsx("p",{className:"text-[10px] uppercase tracking-widest text-club-gold mb-1",children:"Youth League · 12 Apr"}),i.jsxs("div",{className:"flex justify-between items-center text-sm font-heading mb-4",children:[i.jsx("span",{children:"Horsham U18"}),i.jsx("span",{className:"text-club-gold",children:"1 - 2"}),i.jsx("span",{className:"opacity-70",children:"Whitehawk U18"})]})]})]}),i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U18 development pathway?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),XK=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-black",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Growing Together"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Youth ",i.jsx("br",{className:"hidden md:block"})," Pathway"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"More than just football. Our youth pathway provides a structured, supportive environment for boys and girls to develop their skills, build friendships, and be part of the Hawks community."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"Football for Brighton"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"From Under 7s up to Under 16s, our youth setup is at the heart of Whitehawk FC. We focus on fun, development, and community impact. Our coaches are FA qualified and committed to providing a safe, inclusive environment for all young players."}),i.jsx("p",{className:"mt-6",children:"Whether your child is just starting their football journey or looking to take their game to the next level, Whitehawk offers a pathway that prioritises enjoyment and long-term growth."})]}),i.jsxs("div",{className:"mt-16 space-y-8",children:[i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-4",children:"Ages 7-11: Foundation Phase"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Focus on ball mastery, creative play, and falling in love with the game."})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-4",children:"Ages 12-16: Development Phase"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Tactical understanding, position-specific training, and competitive league experience."})]})]})]}),i.jsxs("div",{className:"lg:col-span-5",children:[i.jsxs("div",{className:"p-10 bg-white border border-[#8e160b]/20 rounded-2xl shadow-sm",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Interested?"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-8",children:"Want to learn more about our youth teams or trial for the upcoming season?"}),i.jsx("a",{href:"mailto:[email protected]",className:"bg-[#8e160b] text-white font-heading uppercase py-4 px-8 rounded-lg tracking-widest text-sm inline-block w-full text-center hover:bg-[#7a1309] transition-colors",children:"Email Our Youth Secretary"})]}),i.jsxs("div",{className:"mt-12 p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Volunteering"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Our youth setup is run by passionate volunteers. If you're a parent or local resident interested in helping, we'd love to hear from you."}),i.jsx("div",{className:"h-0.5 w-12 bg-club-gold"})]})]})]})})})]}),QK=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A1550-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-black",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Heart of Brighton"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Community ",i.jsx("br",{className:"hidden md:block"})," Football"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Whitehawk FC is committed to providing a space where everyone, regardless of age or ability, can enjoy the game and be part of our unique community."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"Football for Everyone"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"Our community football initiatives go beyond the pitch. We are proud of our diversity and inclusivity, offering sessions that bring together different parts of the Brighton community. From walking football for seniors to open-age community sessions, we aim to make the Hawks a welcoming space for all."}),i.jsx("p",{className:"mt-6",children:"Our impact is built on the belief that football can change lives, reduce isolation, and create lasting connections."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors group",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-4 transition-colors group-hover:text-[#8e160b]",children:"Hawks Together"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Inclusion sessions providing a supportive environment for players with diverse needs."})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors group",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-4 transition-colors group-hover:text-[#8e160b]",children:"Over 50s"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Walking football and senior sessions focused on health, fitness, and socialising."})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"bg-[#141b2b] p-10 rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Our Mission"}),i.jsxs("div",{className:"space-y-4 font-body text-sm opacity-90 leading-relaxed",children:[i.jsx("p",{children:"To use football as a vehicle for positive social change in the Whitehawk and wider Brighton area."}),i.jsx("p",{children:"To ensure financial barriers never prevent a child or adult from playing the game they love."}),i.jsx("p",{children:"To create a safe, supportive, and celebratory space for all people."})]})]}),i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Get Involved"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to join one of our community sessions or volunteer your time?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2",children:["Enquire Now ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),JK=[{name:"Under 16s",ageGroup:"U16",manager:"Ian Jackson",league:"Div 1 MSYFL",path:"/teams/academy/u16"},{name:"Under 15s",ageGroup:"U15",manager:"John Nolan",league:"Div 2 MSYFL",path:"/teams/academy/u15"},{name:"Under 14s",ageGroup:"U14",manager:"Matt Weston",league:"Div 1 MSYFL",path:"/teams/academy/u14"},{name:"Under 13s",ageGroup:"U13",manager:"Danny Collins",league:"Div 2 MSYFL",path:"/teams/academy/u13"},{name:"Under 13s Red",ageGroup:"U13 Red",manager:"Andrew Joinson",league:"Div 1 MSYFL",additionalLeague:"JPL",path:"/teams/academy/u13-red"},{name:"Under 13s White",ageGroup:"U13 White",manager:"Nick Fogden",league:"Div 2 SSYFL",additionalLeague:"JPL",path:"/teams/academy/u13-white"},{name:"Under 12s",ageGroup:"U12",manager:"Jim Townsend",league:"Div 1 SSYFL",additionalLeague:"JPL",path:"/teams/academy/u12"},{name:"Under 7s / Under 8s",ageGroup:"U7 / U8",manager:"Karl Anscombe",league:"Crawley & District Youth League",note:"Playing up a year as U8s",path:"/teams/academy/u7"}],ZK={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.08,duration:.5,ease:"easeOut"}})},eG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk FC Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Youth ",i.jsx("br",{className:"hidden md:block"})," Teams"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Home to our youth teams from Under 7s through to Under 16s. Whitehawk Youth is where the next generation of Hawks learn, develop, and compete across Sussex and beyond."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-4",children:"Our Teams"}),i.jsx("p",{className:"font-body text-lg text-muted-foreground max-w-2xl mb-16",children:"Each of our youth teams competes in local and regional leagues, guided by dedicated FA-qualified coaches committed to player development."}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6",children:JK.map((e,t)=>i.jsx(re.div,{custom:t,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-40px"},variants:ZK,children:i.jsxs(he,{to:e.path,className:"group block p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/40 hover:shadow-lg transition-all duration-300 h-full",children:[i.jsxs("div",{className:"flex items-start justify-between mb-6",children:[i.jsx("div",{className:"bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-xl px-4 py-2",children:i.jsx("span",{className:"font-heading text-xl font-bold text-[#8e160b] uppercase tracking-tight",children:e.ageGroup})}),i.jsx(vl,{size:20,className:"text-muted-foreground/40 group-hover:text-[#8e160b] group-hover:translate-x-1 transition-all mt-2"})]}),i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase tracking-tight text-black mb-4",children:e.name}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-body text-xs uppercase tracking-widest text-muted-foreground/60",children:"Manager"}),i.jsx("span",{className:"font-body text-sm text-black font-medium",children:e.manager})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-body text-xs uppercase tracking-widest text-muted-foreground/60",children:"League"}),i.jsx("span",{className:"font-body text-sm text-black font-medium",children:e.league})]}),e.additionalLeague&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-body text-xs uppercase tracking-widest text-muted-foreground/60",children:"Also"}),i.jsx("span",{className:"font-body text-sm text-black font-medium",children:e.additionalLeague})]}),e.note&&i.jsx("p",{className:"font-body text-xs text-[#8e160b]/70 italic mt-2",children:e.note})]}),i.jsx("div",{className:"h-0.5 w-0 group-hover:w-12 bg-club-gold mt-6 transition-all duration-500"})]})},e.path))})]})}),i.jsx("section",{className:"py-20 bg-[#141b2b]",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 max-w-4xl mx-auto",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-white",children:"Join Whitehawk Youth"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-8 leading-relaxed",children:"Want your child to be part of Whitehawk Youth? We welcome new players at all age groups. Get in touch to find out about trials and training sessions."}),i.jsx("a",{href:"mailto:[email protected]",className:"bg-[#8e160b] text-white font-heading uppercase py-4 px-8 rounded-lg tracking-widest text-sm inline-block hover:bg-[#7a1309] transition-colors",children:"Contact Us"})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-white",children:"Volunteering"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6 leading-relaxed",children:"Our youth setup is powered by incredible volunteers â parents, coaches, and community members. If you'd like to get involved, we'd love to hear from you."}),i.jsx("div",{className:"h-0.5 w-12 bg-club-gold"})]})]})})})]}),tG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under 7s ",i.jsx("br",{className:"hidden md:block"})," / Under 8s"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Our youngest Hawks! The U7/U8 team focuses on fun, friendship, and falling in love with football under the guidance of Karl Anscombe."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"The Under 7s are our youngest squad at Whitehawk FC, and under the management of Karl Anscombe, they are playing up a year as U8s in the Crawley & District Youth League. This early exposure to competitive football gives our youngest players an incredible head start."}),i.jsx("p",{className:"mt-6",children:"At this age, the emphasis is firmly on enjoyment, developing basic skills, and building a love for the game. Training sessions are fun and engaging, with small-sided games helping players develop confidence with the ball."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Karl Anscombe"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Crawley & District Youth League (playing up as U8s)"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U7/U8 team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),nG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under ",i.jsx("br",{className:"hidden md:block"})," 12s"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Competing at the highest level in SSYFL Division 1 and the Junior Premier League, our U12s are developing technically skilled and tactically aware young players."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"Our Under 12s compete in Division 1 of the Sussex Sunday Youth Football League and the prestigious Junior Premier League. Under the management of Jim Townsend, the team has established itself as one of the strongest in the county at this age group."}),i.jsx("p",{className:"mt-6",children:"The dual-league setup provides players with a fantastic range of competitive experiences, testing themselves against the best teams week in, week out. Development remains the priority, but the standards are high and the players are rising to the challenge."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Jim Townsend"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Division 1 SSYFL · Junior Premier League (JPL)"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U12 team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),rG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under 13s ",i.jsx("br",{className:"hidden md:block"})," Red"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"One of three Whitehawk teams at U13 level, the Reds compete in MSYFL Division 1 and the Junior Premier League under Andrew Joinson."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"The U13 Red squad is one of three Whitehawk teams competing at this age group, reflecting the incredible strength and depth of our youth setup. Managed by Andrew Joinson, they play in Division 1 of the Mid Sussex Youth Football League alongside the prestigious Junior Premier League."}),i.jsx("p",{className:"mt-6",children:"Having multiple teams at U13 level means more young players have the opportunity to develop within the Whitehawk pathway, with each team benefiting from quality coaching and competitive league football."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Andrew Joinson"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Division 1 MSYFL · Junior Premier League (JPL)"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U13 Red team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),sG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under 13s ",i.jsx("br",{className:"hidden md:block"})," White"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"The U13 White team provides another pathway for talented young players, competing in SSYFL Division 2 and the JPL under Nick Fogden."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"The U13 White squad offers another route for talented young players at Whitehawk. Managed by Nick Fogden, the team competes in Division 2 of the Sussex Sunday Youth Football League and the Junior Premier League."}),i.jsx("p",{className:"mt-6",children:"Playing across two leagues gives every player maximum game time and competitive exposure. The coaching philosophy remains consistent across all our U13 teams â develop the player, not just the result."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Nick Fogden"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Division 2 SSYFL · Junior Premier League (JPL)"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U13 White team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),iG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under ",i.jsx("br",{className:"hidden md:block"})," 13s"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Our third U13 squad ensures every young player at this age group has a home at Whitehawk, competing in MSYFL Division 2 under Danny Collins."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"Having three teams at U13 level is a testament to the growth of Whitehawk's youth setup. The U13 squad, managed by Danny Collins, competes in Division 2 of the Mid Sussex Youth Football League and provides a nurturing environment for development."}),i.jsx("p",{className:"mt-6",children:"Every player matters at Whitehawk, and having this third team at U13 ensures that no talented young player misses out on the chance to develop within our youth structure."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Danny Collins"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Division 2 MSYFL"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U13 team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),aG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under ",i.jsx("br",{className:"hidden md:block"})," 14s"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Competing at the top level in MSYFL Division 1, our U14s are at an important stage of development under the guidance of Matt Weston."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"The Under 14s represent an important stage in a young player's development. Competing in Division 1 of the Mid Sussex Youth Football League under Matt Weston, the focus shifts towards more advanced tactical understanding while maintaining a positive, development-first approach."}),i.jsx("p",{className:"mt-6",children:"At this level, players are beginning to develop their understanding of the game at a deeper level, with training sessions focusing on position-specific skills, team shape, and decision-making under pressure."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Matt Weston"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Division 1 MSYFL"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U14 team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),oG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under ",i.jsx("br",{className:"hidden md:block"})," 15s"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"At a pivotal stage of their football journey, our U15s compete in MSYFL Division 2 under John Nolan, preparing for the transition to older youth football."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"The U15s are at a pivotal point in their football journey, preparing for the transition to U16 and ultimately the U18 development squad. Managed by John Nolan, the team competes in Division 2 of the Mid Sussex Youth Football League."}),i.jsx("p",{className:"mt-6",children:"At this stage, the coaching emphasis balances competitive results with individual development, ensuring players are ready for the increased demands of older youth football and, for the most talented, the pathway to our U18s."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"John Nolan"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Division 2 MSYFL"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U15 team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),lG=()=>i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.05] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Whitehawk Youth"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Under ",i.jsx("br",{className:"hidden md:block"})," 16s"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"The final step before the U18 development squad. Our U16s compete in MSYFL Division 1 under Ian Jackson, honing their skills for the next level."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 md:gap-24",children:[i.jsxs("div",{className:"lg:col-span-7",children:[i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase tracking-tighter text-black mb-10",children:"About the Team"}),i.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground font-body leading-relaxed",children:[i.jsx("p",{children:"The Under 16s represent the final step before the U18 development squad and are a critical part of Whitehawk's player pathway. Competing in Division 1 of the Mid Sussex Youth Football League under Ian Jackson, the standards are high and the expectations match."}),i.jsx("p",{className:"mt-6",children:"Players at this level are working towards a potential pathway into the Whitehawk U18s and, ultimately, the first team. The coaching focuses on preparing players physically, technically, and mentally for the demands of senior football."})]}),i.jsxs("div",{className:"mt-16 grid grid-cols-1 sm:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-8 bg-[#8e160b]/5 border border-[#8e160b]/20 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2 text-[#8e160b]",children:"Manager"}),i.jsx("p",{className:"font-body text-sm text-[#8e160b]/80",children:"Ian Jackson"})]}),i.jsxs("div",{className:"p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/30 transition-colors",children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase mb-2",children:"League"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Division 1 MSYFL"})]})]})]}),i.jsxs("div",{className:"lg:col-span-5 space-y-12",children:[i.jsxs("div",{className:"p-10 border border-border/50 rounded-2xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight text-black",children:"Contact"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"Want to find out more about the U16 team?"}),i.jsxs("a",{href:"mailto:[email protected]",className:"font-heading uppercase tracking-widest text-sm text-[#8e160b] hover:text-[#7a1309] flex items-center gap-2 transition-colors",children:["Get in Touch ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]}),i.jsxs("div",{className:"p-10 bg-[#141b2b] rounded-2xl text-white",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 tracking-tight",children:"Youth Hub"}),i.jsx("p",{className:"font-body text-sm text-white/70 mb-6",children:"View all of our youth teams and find out how to get involved."}),i.jsxs(he,{to:"/teams/academy",className:"font-heading uppercase tracking-widest text-sm text-club-gold hover:text-white flex items-center gap-2 transition-colors",children:["View All Teams ",i.jsx("div",{className:"h-0.5 w-6 bg-club-gold"})]})]})]})]})})})]}),_e=N.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:Pe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));_e.displayName="Input";const cG=()=>{const{data:e,isLoading:t}=dd(!0),[n,r]=N.useState("All"),[s,a]=N.useState(""),o=N.useMemo(()=>e?["All",...Array.from(new Set(e.map(d=>d.category)))]:["All"],[e]),l=N.useMemo(()=>e?e.filter(d=>{const h=n==="All"||d.category===n,f=!s||d.title.toLowerCase().includes(s.toLowerCase())||d.excerpt.toLowerCase().includes(s.toLowerCase());return h&&f}):[],[e,n,s]),c=N.useMemo(()=>l.find(d=>d.featured),[l]),u=N.useMemo(()=>l.filter(d=>d.id!==(c==null?void 0:c.id)),[l,c]);return t?i.jsx("div",{className:"flex-1 flex items-center justify-center p-20",children:i.jsx(Ie,{className:"w-10 h-10 animate-spin text-primary"})}):i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-club-dark py-16 md:py-24",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-widest text-club-gold",children:"Whitehawk FC"}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase leading-none text-primary-foreground md:text-6xl",children:"News"}),i.jsx("p",{className:"mt-4 max-w-2xl font-body text-base text-primary-foreground
877/70",children:"The latest match reports, club updates, transfer news and more from across the Hawks."})]})}),i.jsx("section",{className:"border-b border-border bg-muted/40",children:i.jsxs("div",{className:"container mx-auto flex flex-col gap-4 px-4 py-5 md:flex-row md:items-center md:justify-between",children:[i.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(d=>i.jsx("button",{onClick:()=>r(d),className:`rounded-full border px-4 py-1.5 font-heading text-xs uppercase tracking-wider transition-colors ${n===d?"border-primary bg-primary text-primary-foreground":"border-border bg-background text-muted-foreground hover:border-foreground/30 hover:text-foreground"}`,children:d},d))}),i.jsxs("div",{className:"relative w-full max-w-xs",children:[i.jsx(cl,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),i.jsx(_e,{value:s,onChange:d=>a(d.target.value),placeholder:"Search newsâ¦",className:"h-9 pl-9 font-body text-sm"})]})]})}),c&&i.jsx("section",{className:"py-10 md:py-14 bg-[#0a0a0a]",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsx(he,{to:`/news/${c.slug}`,children:i.jsxs(re.article,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"group relative cursor-pointer overflow-hidden rounded-2xl border border-white/10 bg-neutral-900 h-[450px] md:h-[550px]",children:[c.image_url?i.jsx("img",{src:c.image_url,alt:c.title,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-700 brightness-75 group-hover:brightness-90",style:{objectPosition:`center ${c.image_offset!==void 0&&c.image_offset!==null?c.image_offset:50}%`}}):i.jsx("div",{className:"absolute inset-0 bg-[#8e160b]"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/40 to-transparent opacity-90 group-hover:opacity-100 transition-opacity duration-300"}),i.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-8 md:p-12 flex flex-col justify-end max-w-4xl",children:[i.jsxs("span",{className:"mb-4 inline-block w-fit rounded bg-club-gold px-3 py-1 font-heading text-xs font-bold uppercase tracking-widest text-club-dark",children:["Featured: ",c.category]}),i.jsx("h2",{className:"font-heading text-3xl font-bold uppercase leading-[1.1] text-white group-hover:text-primary transition-colors md:text-5xl drop-shadow-xl",children:c.title}),i.jsx("p",{className:"mt-4 font-body text-base leading-relaxed text-white/70 line-clamp-2 max-w-2xl",children:c.excerpt}),i.jsx("div",{className:"mt-8 w-fit bg-white text-black font-heading py-3 px-10 text-center uppercase tracking-wider text-sm transition-all duration-300 transform group-hover:bg-primary group-hover:text-white",children:"Read Full Article"})]})]})})})}),i.jsx("section",{className:"pb-16 md:pb-24 bg-[#0a0a0a]",children:i.jsx("div",{className:"container mx-auto px-4",children:u.length===0&&!c?i.jsx("p",{className:"py-20 text-center font-body text-muted-foreground",children:"No articles match your search."}):i.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:i.jsx(ds,{mode:"popLayout",children:u.map((d,h)=>i.jsx(he,{to:`/news/${d.slug}`,children:i.jsxs(re.article,{layout:!0,initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,scale:.95},transition:{delay:h*.05},className:"group relative flex cursor-pointer flex-col overflow-hidden rounded-xl border border-white/10 bg-neutral-900 h-[450px] md:h-[500px]",children:[d.image_url?i.jsx("img",{src:d.image_url,alt:d.title,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-105 transition-transform duration-700 brightness-90 group-hover:brightness-100",style:{objectPosition:`center ${d.image_offset!==void 0&&d.image_offset!==null?d.image_offset:50}%`}}):i.jsx("div",{className:"absolute inset-0 bg-[#8e160b]"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/40 to-transparent opacity-90 group-hover:opacity-100 transition-opacity duration-300"}),i.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-6 flex flex-col justify-end min-h-[50%]",children:[i.jsx("span",{className:"mb-3 inline-block w-fit roun
877ded bg-club-gold/90 px-2 py-0.5 font-heading text-[10px] font-bold uppercase tracking-widest text-club-dark",children:d.category}),i.jsx("h3",{className:"font-heading text-2xl text-white uppercase leading-[1.1] mb-6 drop-shadow-lg group-hover:text-primary transition-colors duration-300 line-clamp-3",children:d.title}),i.jsx("div",{className:"w-full bg-white text-black font-heading py-3 text-center uppercase tracking-wider text-sm transition-all duration-300 transform group-hover:bg-primary group-hover:text-white",children:"Read Article"})]})]})},d.id))})})})})]})},uG=()=>{var u,d,h,f,p,x,m,y;const{slug:e}=_l(),{data:t,isLoading:n}=aK(e||""),{data:r}=hd(),{fixtures:s,isLoading:a}=ud(),l=((r==null?void 0:r.filter(g=>g.tier==="Elite"&&g.is_visible!==!1))||[]).slice(0,3),c=(s==null?void 0:s.find(g=>{var v,b,w,j;return((w=(b=(v=g["home-team"])==null?void 0:v.name)==null?void 0:b.toLowerCase())==null?void 0:w.includes("whitehawk"))||((j=g["home-team"])==null?void 0:j.id)===468}))||null;return n?i.jsx("div",{className:"flex-1 flex items-center justify-center p-20",children:i.jsx(Ie,{className:"w-10 h-10 animate-spin text-primary"})}):t?i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:t.image_url?"relative h-[65vh] min-h-[400px] w-full overflow-hidden":"bg-[#141b2b] pt-32 pb-16 w-full",children:[t.image_url&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"absolute inset-0 club-gradient opacity-20"}),i.jsx("img",{src:t.image_url,alt:t.title,className:"absolute inset-0 w-full h-full object-cover",style:{objectPosition:`center ${t.image_offset!==void 0&&t.image_offset!==null?t.image_offset:50}%`}}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/20 to-black/30"})]}),i.jsx("div",{className:t.image_url?"absolute bottom-0 left-0 right-0 p-4 md:p-12":"container mx-auto px-4",children:i.jsx("div",{className:t.image_url?"container mx-auto":"",children:i.jsxs(re.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},className:"max-w-4xl",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(he,{to:"/news",children:i.jsxs(le,{variant:"ghost",size:"sm",className:"bg-white/10 text-white hover:bg-white/20 h-8 text-[10px] uppercase font-heading tracking-widest border border-white/20 backdrop-blur-md",children:[i.jsx(bi,{size:12,className:"mr-1"})," Back"]})}),i.jsx("span",{className:"bg-primary text-white text-[10px] font-heading uppercase tracking-widest px-3 py-1 rounded-sm font-bold shadow-lg shadow-primary/20",children:t.category})]}),i.jsx("h1",{className:"font-heading text-4xl md:text-6xl lg:text-7xl font-bold uppercase text-white leading-[0.95] tracking-tight drop-shadow-2xl",children:t.title}),i.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-8 text-white/80",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(sl,{size:16,className:"text-primary"}),i.jsx("span",{className:"text-sm font-body uppercase tracking-wider",children:Ft(new Date(t.published_at),"MMMM d, yyyy")})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(nI,{size:16,className:"text-primary"}),i.jsx("span",{className:"text-sm font-body uppercase tracking-wider",children:"Whitehawk FC"})]})]})]})})})]}),i.jsx("section",{className:"py-16 md:py-24",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12",children:[i.jsxs("article",{className:"lg:col-span-8",children:[t.excerpt&&i.jsx("div",{className:"mb-12 border-l-4 border-primary pl-8 py-2",children:i.jsx("p",{className:"text-xl md:text-2xl font-body italic text-muted-foreground leading-relaxed",children:t.excerpt})}),i.jsx("div",{className:"prose prose-lg max-w-none prose-headings:font-heading prose-headings:uppercase prose-headings:text-black prose-p:font-body prose-p:text-black/80 prose-a:text-[#8e160b] hover:prose-a:text-[#8e160b]/80 transition-colors",dangerouslySetInnerHTML:{__html:t.body}}),i.jsxs("div",{className:"mt-16 pt-8 border-t border-border flex flex-col sm:flex-row items-center justify-between gap-6",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"text-xs font-heading font-semibold uppercase tracking-widest text-muted-foreground",children:"Share this story:"}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsx(le,{variant:"outline",size:"sm",className:"h-9 w-9 p-0 rounded-full hover:bg-primary hover:text-white hover:border-primary transition-all",children:i.jsx($E,{size:16})})})]}),i.jsx(he,{to:"/news",children:i.jsx(le,{variant:"link",className:"font-heading uppercase tracking-widest text-xs h-9 underline decoration-primary decoration-2 underline-offset-8",children:"More News From Enclosed Ground"})})]})]}),i.jsxs("aside",{className:"lg:col-span-4 space-y-12",children:[i.jsxs("div",{className:"bg-muted/30 border border-border p-8 rounded-2xl",children:[i.jsxs("h4",{className:"font-heading text-lg font-bold uppercase mb-6 flex items-center gap-2 text-black",children:[i.jsx("div",{className:"w-2 h-2 bg-[#8e160b] rounded-full animate-pulse"}),"Next Home Match"]}),a?i.jsx("div",{className:"text-center py-6 bg-muted/50 rounded-xl text-muted-foreground shadow-sm flex justify-center",children:i.jsx(Ie,{className:"w-6 h-6 animate-spin text-primary"})}):c?i.jsxs("div",{className:"text-center py-6 bg-[#8e160b] rounded-xl text-white shadow-xl",children:[i.jsxs("p",{className:"text-[10px] font-heading uppercase tracking-widest text-[#facc15] mb-3",children:[c.venue||"Enclosed Ground"," ⢠",Ft(nn(c.date),"EEE d MMM")]}),i.jsxs("h5",{className:"font-heading text-2xl font-bold uppercase px-4 truncate",children:[((d=(u=c["home-team"])==null?void 0:u.name)==null?void 0:d.toLowerCase())==="whitehawk"?"HAWKS":((f=(h=c["home-team"])==null?void 0:h.name)==null?void 0:f.split(" ")[0])||"TBD",i.jsx("span",{className:"text-white/60 mx-2 text-lg",children:"vs"}),((x=(p=c["away-team"])==null?void 0:p.name)==null?void 0:x.toLowerCase())==="whitehawk"?"HAWKS":((y=(m=c["away-team"])==null?void 0:m.name)==null?void 0:y.split(" ")[0])||"TBD"]}),i.jsx("a",{href:"https://whitehawkfc.ktckts.com/",target:"_blank",rel:"noopener noreferrer",children:i.jsx(le,{className:"mt-6 font-heading uppercase text-xs h-9 tracking-widest w-4/5 mx-auto bg-club-gold text-black hover:bg-club-gold/90 transition-all shadow-lg active:scale-95",children:"Get Tickets"})})]}):i.jsx("div",{className:"text-center py-6 bg-muted/50 rounded-xl text-muted-foreground shadow-sm",children:i.jsx("p",{className:"font-heading uppercase text-sm",children:"No upcoming home matches"})})]}),l.length>0&&i.jsxs("div",{className:"space-y-6",children:[i.jsx("h4",{className:"font-heading text-lg font-bold uppercase border-b border-border pb-3",children:"Official Partners"}),i.jsx("div",{className:"grid grid-cols-3 gap-4",children:l.map(g=>i.jsx("a",{href:g.website_url||"#",target:"_blank",rel:"noreferrer",className:"aspect-video bg-muted/20 rounded-lg border border-border/50 flex items-center justify-center p-2 md:p-4 grayscale opacity-40 hover:grayscale-0 hover:opacity-100 transition-all",children:g.logo_url?i.jsx("img",{src:g.logo_url,alt:g.name,className:"max-h-full max-w-full object-contain"}):i.jsx("span",{className:"font-heading text-[8px] uppercase text-center text-muted-foreground",children:g.name})},g.id))})]})]})]})})})]}):i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-20",children:[i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase mb-4",children:"Post Not Found"}),i.jsx("p",{className:"text-muted-foreground mb-8",children:"The article you are looking for does not exist or has been moved."}),i.jsx(he,{to:"/news",children:i.jsxs(le,{className:"font-heading uppercase tracking-widest text-xs gap-2",children:[i.jsx(bi,{size:16})," Back to News"]})})]})},es=N.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:Pe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
877es.displayName="Card";const ts=N.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:Pe("flex flex-col space-y-1.5 p-6",e),...t}));ts.displayName="CardHeader";const ns=N.forwardRef(({className:e,...t},n)=>i.jsx("h3",{ref:n,className:Pe("text-2xl font-semibold leading-none tracking-tight",e),...t}));ns.displayName="CardTitle";const Ui=N.forwardRef(({className:e,...t},n)=>i.jsx("p",{ref:n,className:Pe("text-sm text-muted-foreground",e),...t}));Ui.displayName="CardDescription";const rs=N.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:Pe("p-6 pt-0",e),...t}));rs.displayName="CardContent";const dG=N.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:Pe("flex items-center p-6 pt-0",e),...t}));dG.displayName="CardFooter";const hG=[{title:"General Enquiries",icon:ys,description:"For any general questions about the club, matchdays, or events.",email:"[email protected]"},{title:"Commercial & Sponsorship",icon:D3,description:"Interested in sponsoring the Hawks or advertising at the The Enclosed Ground?",email:"[email protected]"},{title:"Media & Press",icon:jf,description:"Press accreditation, interview requests and media enquiries.",email:"[email protected]"},{title:"Youth & Academy",icon:Zt,description:"Enquiries about the youth pathway, trials, and junior football.",email:"[email protected]"},{title:"Community & Volunteering",icon:Ju,description:"Want to volunteer on matchdays or get involved with community projects?",email:"[email protected]"}],fG=()=>i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.3em] font-bold text-[#8e160b]",children:"Get In Touch"}),i.jsx("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:"Contact Us"}),i.jsx("p",{className:"mt-6 max-w-3xl font-body text-lg text-muted-foreground leading-relaxed",children:"Whether you're a supporter, sponsor, journalist or just want to find out more about the Hawks, we'd love to hear from you."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})}),i.jsx("section",{className:"py-12 md:py-20",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid gap-8 lg:grid-cols-2",children:[i.jsx(re.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"overflow-hidden rounded-2xl border border-border shadow-sm",children:i.jsx("iframe",{title:"The Enclosed Ground Location",src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1260.10923!2d-0.0973596!3d50.8209484!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x487585dd66464d95%3A0x23a7938ca910df32!2sWhitehawk%20FC!5e0!3m2!1sen!2suk!4v1721122500000!5m2!1sen!2suk",width:"100%",height:"100%",style:{border:0,minHeight:400},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})}),i.jsxs(re.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"flex flex-col justify-center",children:[i.jsx("p",{className:"mb-2 font-heading text-xs uppercase tracking-[0.3em] text-primary",children:"Our Home"}),i.jsx("h2",{className:"font-heading text-3xl font-bold uppercase text-foreground md:text-4xl",children:"The Enclosed Ground"}),i.jsx("p",{className:"mt-4 font-body text-sm leading-relaxed text-muted-foreground",children:"Home of Whitehawk FC since the club's founding, the Enclosed Ground sits in East Brighton Park and has been the heart of Hawks football for generations. The ground is accessible by bus and has limited parking nearby."}),i.jsxs("div",{className:"mt-8 space-y-5",children:[i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(Zu,{size:18})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-sm font-semibold uppercase tracking-wide text-foreground",children:"Address"}),i.jsxs("p",{className:"font-body text-sm text-muted-foreground",children:["The Enclosed Ground",i.jsx("br",{}),"East Brighton Park, Wilson Avenue",i.jsx("br",{}),"Brighton BN2 5TS"]})]})]}),i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(bl,{size:18})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-sm font-semibold uppercase tracking-wide text-foreground",children:"Matchdays"}),i.jsxs("p",{className:"font-body text-sm text-muted-foreground",children:["Gates typically open 1 hour before kick-off.",i.jsx("br",{}),"Saturday 3:00 PM · Tuesday 7:45 PM"]})]})]}),i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(Pp,{size:18})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-sm font-semibold uppercase tracking-wide text-foreground",children:"Phone"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Matchday enquiries only"})]})]}),i.jsxs("a",{href:"https://maps.google.com/?q=The+Enclosed+Ground+Wilson+Avenue+Brighton+BN2+5TS",target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-2 rounded-full border border-primary bg-primary/5 px-5 py-2.5 font-heading text-xs uppercase tracking-wider text-primary transition-colors hover:bg-primary hover:text-primary-foreground",children:["Get Directions ",i.jsx(ua,{size:12})]})]})]})]})})}),i.jsx("section",{className:"border-t border-border bg-white py-12 md:py-20 text-center",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs("div",{className:"mb-10 max-w-2xl",children:[i.jsx("p",{className:"mb-2 font-heading text-xs uppercase tracking-[0.3em] text-primary",children:"Departments"}),i.jsx("h2",{className:"font-heading text-3xl font-bold uppercase text-foreground md:text-4xl",children:"Who To Contact"}),i.jsx("p",{className:"mt-3 font-body text-sm leading-relaxed text-muted-foreground",children:"Reach the right people at the club. All enquiries are handled by volunteers, so please allow a few days for a response."})]}),i.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:hG.map((e,t)=>i.jsx(re.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:t*.06},children:i.jsxs(es,{className:"h-full border-border bg-card/95 transition-shadow hover:shadow-md",children:[i.jsxs(ts,{className:"pb-3",children:[i.jsx("div",{className:"mb-2 flex h-10 w-10 items-center justify-center rounded-full bg-primary/10 text-primary",children:i.jsx(e.icon,{size:18})}),i.jsx(ns,{className:"font-heading text-base uppercase tracking-wide text-foreground",children:e.title})]}),i.jsxs(rs,{children:[i.jsx("p",{className:"mb-4 font-body text-sm leading-relaxed text-muted-foreground",children:e.description}),i.jsx("a",{href:`mailto:${e.email}`,className:"font-heading text-xs uppercase tracking-wider text-primary hover:text-primary/80 transition-colors",children:e.email})]})]})}
877,e.title))})]})}),i.jsx("section",{className:"py-12 md:py-16",children:i.jsxs("div",{className:"container mx-auto px-4 text-center",children:[i.jsx("p",{className:"mb-2 font-heading text-xs uppercase tracking-[0.3em] text-primary",children:"Follow The Hawks"}),i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase text-foreground md:text-3xl",children:"Find Us Online"}),i.jsx("p",{className:"mx-auto mt-3 max-w-md font-body text-sm text-muted-foreground",children:"Stay connected with the latest news, matchday content and behind-the-scenes updates."}),i.jsx("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-4",children:[{label:"Twitter / X",href:"https://twitter.com/whitaborhawks"},{label:"Instagram",href:"https://instagram.com/whitehawkfc"},{label:"Facebook",href:"https://facebook.com/WhitehawkFootballClub"},{label:"Official Site",href:"https://whitehawkfc.com"}].map(e=>i.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer noopener",className:"rounded-full border border-border bg-background px-5 py-2.5 font-heading text-xs uppercase tracking-wider text-muted-foreground transition-colors hover:border-primary hover:text-primary",children:e.label},e.label))})]})})]}),TP=N.createContext(null),pG=({children:e})=>{const[t,n]=N.useState([]),[r,s]=N.useState(!1),a=h=>{n(f=>f.find(x=>x.id===h.id&&x.size===h.size)?f.map(x=>x.id===h.id&&x.size===h.size?{...x,quantity:x.quantity+1}:x):[...f,{...h,quantity:1}]),s(!0)},o=h=>{n(f=>f.filter(p=>p.id!==h))},l=(h,f)=>{if(f<=0){o(h);return}n(p=>p.map(x=>x.id===h?{...x,quantity:f}:x))},c=()=>n([]),u=t.reduce((h,f)=>h+f.quantity,0),d=t.reduce((h,f)=>h+f.price*f.quantity,0);return i.jsx(TP.Provider,{value:{items:t,addItem:a,removeItem:o,updateQuantity:l,clearCart:c,totalItems:u,totalPrice:d,isOpen:r,openCart:()=>s(!0),closeCart:()=>s(!1)},children:e})},O0=()=>{const e=N.useContext(TP);if(!e)throw new Error("useCart must be used within a CartProvider");return e},mG=[{q:"How does the myPOS checkout work?",a:"When you click 'Checkout', you are securely redirected to the myPOS payment page. You complete your transaction there using Card, Apple Pay, or Google Pay. Once complete, you are redirected back to our site with a payment confirmation, and you'll receive a receipt from myPOS."},{q:"How are merchandise items delivered?",a:"We offer local UK shipping via Royal Mail (3-5 business days) for £4.50. Alternatively, you can choose free local pickup from the clubhouse on match days."},{q:"Are clothing sizes true to fit?",a:"Yes, our shirts and hoodies are standard athletic UK fit. We recommend ordering your normal size, or sizing up if you prefer a looser fit."},{q:"What is our merchandise returns policy?",a:"We offer a 14-day return or exchange policy on all unworn clothing items with original tags still attached. Custom printed shirts cannot be returned."}],gG=()=>{var v;const{addItem:e}=O0(),{data:t,isLoading:n,error:r}=_P(),{data:s,isLoading:a}=dt("shop_settings"),[o,l]=N.useState("all"),[c,u]=N.useState(new Set),[d,h]=N.useState(null),[f,p]=N.useState({}),x=n||a;if(((v=s==null?void 0:s.value)==null?void 0:v.coming_soon)??!1)return i.jsxs("div",{className:"bg-[#141b2b] min-h-[90vh] flex flex-col justify-center items-center relative overflow-hidden px-4 py-20 text-white",children:[i.jsx("div",{className:"absolute top-1/4 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] rounded-full bg-[#8e160b]/10 blur-[120px] pointer-events-none"}),i.jsx("div",{className:"absolute bottom-1/4 left-1/4 w-[300px] h-[300px] rounded-full bg-club-gold/5 blur-[100px] pointer-events-none"}),i.jsxs("div",{className:"container max-w-2xl mx-auto relative z-10 text-center space-y-8",children:[i.jsxs(re.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.5},className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/5 border border-white/10 backdrop-blur-md text-club-gold text-xs font-heading font-bold uppercase tracking-widest mb-4",children:[i.jsx(bl,{size:12,className:"animate-pulse"})," Launching Soon"]}),i.jsxs(re.div,{initial:{opacity:0,y:30}
877,animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},className:"space-y-4",children:[i.jsxs("h1",{className:"font-heading text-5xl md:text-7xl font-bold uppercase tracking-tight leading-none bg-gradient-to-b from-white to-white/70 bg-clip-text text-transparent",children:["Club Shop ",i.jsx("br",{}),i.jsx("span",{className:"text-[#8e160b]",children:"Coming Soon"})]}),i.jsx("p",{className:"font-body text-white/60 text-base md:text-lg max-w-lg mx-auto leading-relaxed",children:"We are currently updating the official Whitehawk FC online store with our brand new 2026/27 range. Check back soon to grab your gear!"})]}),i.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"pt-6",children:i.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center",children:i.jsx(le,{asChild:!0,className:"bg-[#8e160b] hover:bg-[#8e160b]/90 text-white font-heading uppercase text-xs tracking-widest h-12 px-8",children:i.jsxs(he,{to:"/",children:[i.jsx(bi,{size:14,className:"mr-2"})," Back to Homepage"]})})})})]})]});const y=t?o==="all"?t:t.filter(b=>b.category===o):[],g=(b,w)=>{e({id:b.id,name:b.name,price:b.price,image:b.image,category:b.category,size:w}),u(j=>new Set(j).add(b.id)),setTimeout(()=>{u(j=>{const E=new Set(j);return E.delete(b.id),E})},1500)};return i.jsxs("div",{className:"bg-white min-h-screen",children:[i.jsxs("section",{className:"relative py-20 md:py-32 bg-white border-b border-border/50 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?q=80&w=1200&auto=format&fit=crop')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-[0.4em] text-[#8e160b] font-bold mb-6",children:"Official Club Shop"}),i.jsx("h1",{className:"font-heading text-5xl md:text-8xl font-bold uppercase text-black leading-tight tracking-tighter",children:"Get Your Gear"}),i.jsx("p",{className:"font-body text-muted-foreground/80 max-w-2xl mx-auto mt-8 text-base md:text-xl leading-relaxed",children:"Support the Hawks on and off the pitch. Buy official shirts, hoodies, training wear, hats, scarves, pins, and accessories."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mx-auto mt-10"})]})})]}),i.jsx("section",{className:"bg-slate-50 border-b border-border/50 py-5",children:i.jsxs("div",{className:"container mx-auto px-4 flex flex-col md:flex-row items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-9 h-9 rounded-full bg-[#8e160b]/10 flex items-center justify-center text-[#8e160b]",children:i.jsx(tI,{size:18})}),i.jsxs("div",{className:"text-left",children:[i.jsx("span",{className:"font-heading text-xs uppercase font-bold tracking-wider text-[#8e160b]",children:"Secure myPOS Checkout"}),i.jsx("p",{className:"text-xs text-slate-500 font-body mt-0.5",children:"Add items to your cart and checkout securely via our myPOS payment gateway."})]})]}),i.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold bg-[#8e160b]/10 text-[#8e160b] border border-[#8e160b]/20 font-body shrink-0",children:[i.jsx(A1,{size:12})," Bank-Grade Encryption"]})]})}),i.jsx("section",{className:"py-16 md:py-24",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2 md:gap-4 mb-12 md:mb-16 border-b border-slate-100 pb-8",children:[{id:"all",label:"All Items"},{id:"shirts",label:"Shirts & Hoodies"},{id:"hats-scarves",label:"Hats & Scarves"},{id:"accessories",label:"Pins & Accessories"}].map(b=>i.jsx("button",{onClick:()=>l(b.id),className:`px-6 py-2.5 rounded-full font-heading text-xs uppercase tracking-widest font-semibold transition-all ${o===b.id?"bg-[#8e160b] text-white shadow-md shadow-[#8e160b]/20":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:b.label},b.id))}),x&&i.jsxs("div",{className:"flex flex-col items-center justify-center py-20",children:[i.jsx(Ie,{className:"w-10 h-10 animate-spin text-[#8e160b] mb-4"}),i.jsx("p",{className:"font-heading text-sm uppercase tracking-wider text-slate-400",children:"Loading Products..."})]}),r&&i.jsx("div",{className:"text-center py-20",children:i.jsx("p",{className:"text-red-500 font-heading",children:"Failed to load shop items. Please try again later."})}),!x&&!r&&y.length===0&&i.jsx("div",{className:"text-center py-20",children:i.jsx("p",{className:"font-heading text-slate-400",children:"No products found in this category."})}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-10",children:y.map(b=>{var S,A,C,T,_;const w=f[b.id]||((A=(S=b.sizes)==null?void 0:S.find(P=>P.stock>0))==null?void 0:A.size)||((T=(C=b.sizes)==null?void 0:C[0])==null?void 0:T.size)||"One Size",j=(_=b.sizes)==null?void 0:_.find(P=>P.size===w),E=!b.sizes||b.sizes.every(P=>P.stock<=0),k=j?j.stock<=0:!0;return i.jsxs(re.div,{layout:!0,initial:{opacity:0,scale:.95}
877,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.3},className:"group flex flex-col bg-white border border-slate-200 rounded-2xl overflow-hidden shadow-sm hover:shadow-lg transition-all duration-300",children:[i.jsxs("div",{className:"relative aspect-[4/3] w-full bg-slate-100 overflow-hidden",children:[i.jsx("img",{src:b.image,alt:b.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),b.badge&&i.jsx("span",{className:"absolute top-4 left-4 bg-club-gold text-black text-[10px] font-heading font-bold uppercase px-3 py-1 rounded-full tracking-wider",children:b.badge}),i.jsxs("span",{className:"absolute top-4 right-4 bg-white/90 backdrop-blur-sm text-black text-xs font-heading font-bold uppercase px-3 py-1 rounded-full",children:["£",b.price.toFixed(2)]})]}),i.jsxs("div",{className:"p-6 md:p-8 flex-1 flex flex-col",children:[i.jsx("span",{className:"font-heading text-[10px] text-[#8e160b] font-bold uppercase tracking-widest mb-2 block",children:b.category}),i.jsx("h3",{className:"font-heading text-xl font-bold text-black uppercase mb-3 line-clamp-1 group-hover:text-[#8e160b] transition-colors",children:b.name}),i.jsx("p",{className:"font-body text-sm text-slate-500 leading-relaxed mb-6 flex-1",children:b.description}),b.sizes&&b.sizes.length>0&&!(b.sizes.length===1&&b.sizes[0].size==="One Size")&&i.jsxs("div",{className:"mb-6",children:[i.jsx("span",{className:"text-[10px] uppercase font-heading font-bold text-slate-400 tracking-wider block mb-2",children:"Select Size"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:b.sizes.map(P=>{const O=w===P.size,I=P.stock<=0;return i.jsx("button",{disabled:I,onClick:()=>p(B=>({...B,[b.id]:P.size})),className:`h-8 min-w-[32px] px-2.5 rounded text-xs font-heading font-bold uppercase transition-all ${I?"bg-slate-100 text-slate-300 line-through cursor-not-allowed":O?"bg-[#8e160b] text-white shadow-sm shadow-[#8e160b]/20":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:P.size},P.size)})}),j&&j.stock>0&&j.stock<=5&&i.jsxs("span",{className:"text-[10px] text-orange-600 font-body block mt-2 font-medium",children:["â ï¸ Only ",j.stock," left in stock!"]})]}),i.jsx(le,{disabled:E||k,onClick:()=>g(b,w),className:`w-full h-12 font-heading uppercase text-xs tracking-widest transition-all flex items-center justify-center gap-2 ${c.has(b.id)?"bg-green-600 hover:bg-green-600 text-white":E||k?"bg-slate-200 text-slate-400 cursor-not-allowed":"bg-black hover:bg-[#8e160b] text-white"}`,children:c.has(b.id)?i.jsxs(i.Fragment,{children:[i.jsx(Xu,{size:14})," Added to Cart!"]}):E?"Out of Stock":k?`Size ${w} Out of Stock`:i.jsxs(i.Fragment,{children:[i.jsx(ed,{size:14})," Add to Cart"]})})]})]},b.id)})})]})}),i.jsxs("section",{className:"py-20 md:py-28 bg-[#141b2b] text-white overflow-hidden relative border-y border-white/5",children:[i.jsx("div",{className:"absolute inset-y-0 right-0 w-1/3 bg-[#8e160b]/5 -skew-x-12 translate-x-1/4"}),i.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[i.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-16",children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-widest text-club-gold mb-3",children:"Official Whitehawk FC Payment Partner"}),i.jsx("h2",{className:"font-heading text-4xl md:text-6xl font-bold uppercase mb-6 tracking-tighter leading-none",children:"Powered by myPOS"}),i.jsx("p",{className:"font-body text-white/70 max-w-xl mx-auto text-sm md:text-base leading-relaxed",children:"We partner with myPOS, a leading secure payment provider, to offer a fast, reliable, and highly secure checkout experience for all our online orders."})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[{icon:i.jsx(P3,{className:"text-club-gold",size:28}),title:"Instant Secure Payment",desc:"Your transaction is completed instantly via myPOS, ensuring a fast checkout experience so you can secure your official merchandise immediately."},{icon:i.jsx(A1,{className:"text-club-gold",size:28}),title:"Bank-Grade Security",desc:"myPOS handles all card details, complying with PCI-DSS standards and
877Strong Customer Authentication (SCA). We never see or store your card number."},{icon:i.jsx(Hx,{className:"text-club-gold",size:28}),title:"All Major Cards & Wallets",desc:"Easily pay using Visa, Mastercard, Apple Pay, or Google Pay. Fully optimized for a seamless checkout experience on both mobile and desktop."}].map((b,w)=>i.jsxs("div",{className:"p-8 bg-white/5 border border-white/10 rounded-2xl",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-white/10 flex items-center justify-center mb-6",children:b.icon}),i.jsx("h3",{className:"font-heading text-lg font-bold uppercase mb-3 text-white tracking-wide",children:b.title}),i.jsx("p",{className:"font-body text-sm text-white/60 leading-relaxed",children:b.desc})]},w))}),i.jsxs("div",{className:"mt-20 border-t border-white/10 pt-16 max-w-4xl mx-auto",children:[i.jsx("h3",{className:"font-heading text-xl font-bold text-center uppercase tracking-wider mb-10 text-white",children:"How myPOS Checkout Works"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 relative",children:[{step:"01",title:"Add to Cart",desc:"Browse the shop, select your size, and add items to your cart."},{step:"02",title:"Secure Redirect",desc:"Click checkout â our site securely passes your order to myPOS."},{step:"03",title:"Pay & Done",desc:"Enter your card details on the myPOS page. You'll get a receipt instantly."}].map((b,w)=>i.jsxs("div",{className:"flex gap-4 items-start relative z-10 bg-[#141b2b]",children:[i.jsx("span",{className:"font-heading text-4xl font-extrabold text-[#8e160b]",children:b.step}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-heading text-sm font-bold uppercase mb-1 tracking-wide text-white",children:b.title}),i.jsx("p",{className:"font-body text-xs text-white/50",children:b.desc})]})]},w))})]})]})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-widest text-[#8e160b] mb-3",children:"Questions & Answers"}),i.jsx("h2",{className:"font-heading text-4xl font-bold uppercase tracking-tighter text-black",children:"Shop FAQs"})]}),i.jsx("div",{className:"space-y-4",children:mG.map((b,w)=>{const j=d===w;return i.jsxs("div",{className:"border border-slate-200 rounded-xl overflow-hidden transition-colors",children:[i.jsxs("button",{onClick:()=>h(j?null:w),className:"w-full px-6 py-5 flex items-center justify-between text-left font-heading text-base font-bold text-black uppercase tracking-wide hover:text-[#8e160b] transition-colors",children:[i.jsx("span",{children:b.q}),i.jsx(il,{size:18,className:`transition-transform shrink-0 ml-4 ${j?"rotate-180 text-[#8e160b]":"text-slate-400"}`})]}),i.jsx(ds,{initial:!1,children:j&&i.jsx(re.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"overflow-hidden bg-slate-50",children:i.jsx("p",{className:"px-6 pb-6 pt-2 font-body text-sm text-slate-600 leading-relaxed",children:b.a})})})]},w)})})]})})]})},xG=468,yG=({match:e})=>{var r,s,a,o,l,c,u,d,h,f,p,x;if(!e)return null;const t=e["home-team"],n=e["away-team"];return i.jsxs("div",{className:"relative w-full flex-grow flex flex-col items-center justify-center p-10 overflow-hidden shrink-0 border-b border-black/40",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-[#c8102e] via-[#a50d26] to-[#7a0a1c]"}),i.jsx("div",{className:"absolute inset-0 opacity-10 pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"24px 24px"}}),i.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20%] bg-gradient-to-t from-black/20 to-transparent pointer-events-none"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center mb-8",children:[i.jsx("span",{className:"font-heading text-white text-xl sm:text-3xl tracking-[0.2em] drop-shadow-md opacity-90 uppercase leading-none",children:e.competition.name}),i.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[i.jsx("div",{className:"h-px w-6 bg-white/20"}),i.jsx("span",{className:"font-body text-[#ffd700] text-[9px] sm:text-xs font-black tracking-[0.3em] uppercase",children:"MATCHDAY LIVE"}),i.jsx("div",{className:"h-px w-6 bg-white/20"})]})]}),((r=e.status)==null?void 0:r.short)==="CANC"&&i.jsx("div",{className:"relative z-10 mb-6 bg-red-600 border border-white/40 px-6 py-2.5 rounded shadow-2xl text-center",children:i.jsx("span",{className:"font-heading text-white text-sm sm:text-lg font-black uppercase tracking-widest flex items-center gap-2 justify-center",children:"â ï¸ THIS MATCH HAS BEEN CANCELLED â DO NOT TRAVEL"})}),((s=e.status)==null?void 0:s.short)==="P-P"&&i.jsx("div",{className:"relative z-10 mb-6 bg-amber-500 border border-white/40 px-6 py-2.5 rounded shadow-2xl text-center",children:i.jsx("span",{className:"font-heading text-white text-sm sm:text-lg font-black uppercase tracking-widest flex items-center gap-2 justify-center",children:"â ï¸ THIS MATCH HAS BEEN POSTPONED â NEW DATE TBC"})}),i.jsxs("div",{className:"relative z-10 w-full max-w-[1100px] grid grid-cols-[1fr_auto_1fr] items-center gap-4 sm:gap-8 px-8",children:[i.jsxs("div",{className:"flex flex-col items-center text-center px-4",children:[i.jsx("h2",{className:"font-heading text-white text-3xl sm:text-5xl font-black drop-shadow-md uppercase tracking-tighter leading-[0.9]",children:t.name}),i.jsxs("div",{className:"mt-4 flex flex-col gap-1 items-center max-h-[80px] overflow-hidden",children:[(a=t.goals)==null?void 0:a.slice(0,3).map((m,y)=>i.jsxs("span",{className:"font-body text-white/80 text-[10px] sm:text-xs font-bold whitespace-nowrap",children:[m.description," ",m.minute,"'"]},y)),(((o=t.goals)==null?void 0:o.length)||0)>3&&i.jsx("span",{className:"text-white/40 text-[8px]",children:"+ MORE"})]})]}),i.jsxs("div",{className:"flex flex-col items-center justify-center",children:[i.jsxs("div",{className:"flex items-center gap-4 sm:gap-8",children:[i.jsx("span",{className:"font-heading text-white text-[80px] sm:text-[110px] font-black leading-none drop-shadow-heavy select-none tabular-nums tracking-tighter",children:t.score??"0"}),i.jsx("span",{className:"font-heading text-white/30 text-5xl sm:text-7xl font-black leading-none select-none",children:"-"}),i.jsx("span",{className:"font-heading text-white text-[80px] sm:text-[110px] font-black leading-none drop-shadow-heavy select-none tabular-nums tracking-tighter",children:n.score??"0"})]}),i.jsx("div",{className:`mt-1 ${((l=e.status)==null?void 0:l.short)==="CANC"?"bg-red-700":((c=e.status)==null?void 0:c.short)==="P-P"?"bg-amber-600":"bg-black/80"} border border-white/20 px-4 py-1.5 shadow-xl min-w-[120px] flex justify-center`,children:i.jsxs("span",{className:"font-heading text-white text-xl sm:text-3xl tabular-nums font-black tracking-widest flex items-center gap-3",children:[i.jsx(bl,{size:20,className:"text-[#ffd700] animate-pulse"}),((u=e.status)==null?void 0:u.short)==="CANC"?"CANCELLED":((d=e.status)==null?void 0:d.short)==="P-P"?"POSTPONED":Na(e)?((h=e.status)==null?void 0:h.short)||"LIVE":((f=e.status)==null?void 0:f.short)||e.time]})}),i.jsx("span",{className:"mt-4 font-body text-white/30 text-[10px] sm:text-sm font-black uppercase tracking-[0.4em] px-4 text-center select-none truncate max-w-[200px]",children:e.venue})]}),i.jsxs("div",{className:"flex flex-col items-center text-center px-4",children:[i.jsx("h2",{className:"font-heading text-white text-3xl sm:text-5xl font-black drop-shadow-md uppercase tracking-tighter leading-[0.9]",children:n.name}),i.jsxs("div",{className:"mt-4 flex flex-col gap-1 items-center max-h-[80px] overflow-hidden",children:[(p=n.goals)==null?void 0:p.slice(0,3).map((m,y)=>i.jsxs("span",{className:"font-body text-white/80 text-[10px] sm:text-xs font-bold whitespace-nowrap",children:[m.description," ",m.minute,"'"]},y)),(((x=n.goals)==null?void 0:x.length)||0)>3&&i.jsx("span",{className:"text-white/40 text-[8px]",children:"+ MORE"})]})]})]})]})},yk=({match:e})=>{const t=N.useMemo(()=>
877{if(!e)return[];const n=[],r=s=>{var l;const a=e[s],o=a.name.substring(0,3).toUpperCase();(l=a.goals)==null||l.forEach(c=>n.push({type:"GOAL",minute:c.minute,team:o,desc:`${c.description}`,icon:i.jsx(wf,{size:14,className:"text-green-600"})})),["line-up","substitutes"].forEach(c=>{var u;(u=a[c])==null||u.forEach(d=>{const h=d.player["last-name"]||d.player["first-name"];d.cautioned&&n.push({type:"CARD",minute:d.cautioned.minute,team:o,desc:`${h} (Yellow)`,icon:i.jsx("div",{className:"w-3 h-4 bg-yellow-400 border border-black/10 rounded-sm"})}),d["sent-off"]&&n.push({type:"CARD",minute:d["sent-off"].minute,team:o,desc:`${h} (Red)`,icon:i.jsx("div",{className:"w-3 h-4 bg-red-600 border border-black/10 rounded-sm"})}),d["substituted-off"]&&n.push({type:"SUB",minute:d["substituted-off"].minute,team:o,desc:`OUT: ${h}`,icon:i.jsx(BE,{size:14,className:"text-red-500"})}),d["substituted-on"]&&n.push({type:"SUB",minute:d["substituted-on"].minute,team:o,desc:`IN: ${h}`,icon:i.jsx(UE,{size:14,className:"text-blue-500"})})})})};return r("home-team"),r("away-team"),n.sort((s,a)=>a.minute-s.minute)},[e]);return i.jsxs("div",{className:"h-[200px] lg:h-[240px] w-full bg-white overflow-hidden flex flex-col shrink-0",children:[i.jsxs("div",{className:"bg-gray-100 py-2 px-6 border-b border-gray-200 flex items-center justify-between",children:[i.jsx("span",{className:"font-heading text-gray-400 text-xs tracking-widest uppercase font-black",children:"LATEST UPDATES"}),i.jsx("span",{className:"font-heading text-red-600 text-[10px] tracking-widest uppercase font-black",children:"MATCH FEED LIVE"})]}),i.jsx("div",{className:"flex-1 overflow-y-auto no-scrollbar",children:t.length>0?i.jsx("table",{className:"w-full text-left border-collapse",children:i.jsx("tbody",{children:t.map((n,r)=>i.jsxs("tr",{className:"border-b border-gray-100 hover:bg-gray-50 transition-colors",children:[i.jsx("td",{className:"py-3 px-6 w-16",children:i.jsxs("span",{className:"font-heading text-gray-400 text-sm font-black tabular-nums",children:[n.minute,"'"]})}),i.jsx("td",{className:"py-3 px-2 w-10 flex justify-center mt-0.5",children:n.icon}),i.jsx("td",{className:"py-3 px-4 w-24",children:i.jsx("span",{className:"font-heading text-blue-800 text-xs font-black tracking-widest uppercase",children:n.team})}),i.jsx("td",{className:"py-3 px-4",children:i.jsx("span",{className:"font-heading text-gray-800 text-base font-black uppercase tracking-tight",children:n.desc})})]},r))})}):i.jsxs("div",{className:"h-full flex flex-col items-center justify-center opacity-20 p-12 text-center",children:[i.jsx(PE,{size:48,className:"mb-4 text-gray-400"}),i.jsx("p",{className:"font-heading text-xl uppercase tracking-widest text-gray-400",children:"Waiting for events..."})]})})]})},vG=({compId:e})=>{const{data:t,isLoading:n}=em(),r=((t==null?void 0:t.teams)||[]).slice(0,24);return n?i.jsx("div",{className:"text-white/50 p-8 font-heading animate-pulse",children:"TRANSMITTING TABLE DATA..."}):i.jsxs("div",{className:"h-full flex flex-col bg-gradient-to-b from-[#0038a8] via-[#002b80] to-[#001740] border-l border-white/10 overflow-hidden",children:[i.jsx("div",{className:"bg-white/10 py-4 px-6 shadow-sm border-b border-white/5 shrink-0",children:i.jsxs("h3",{className:"font-heading uppercase tracking-widest text-xl font-black text-white flex items-center justify-between",children:["LEAGUE TABLE",i.jsx(J3,{size:14,className:"text-red-500 animate-pulse"})]})}),i.jsx("div",{className:"flex-1 overflow-y-auto no-scrollbar scroll-smooth",children:i.jsxs("table",{className:"w-full text-white tabular-nums border-collapse",children:[i.jsx("thead",{className:"sticky top-0 bg-[#0038a8] z-10 shadow-lg border-b border-white/10",children:i.jsxs("tr",{className:"text-white/40 text-[9px] font-black uppercase",children:[i.jsx("th",{className:"py-3 px-4 text-left",children:"POS"}),i.jsx("th",{className:"py-3 px-4 text-left",children:"TEAM"}),i.jsx("th",{className:"py-3 px-2 text-center",children:"P"}),i.jsx("th",{className:"py-3 px-2 text-center",children:"GD"}),i.jsx("th",{className:"py-3 px-6 text-center",children:"PTS"})]})}),i.jsx("tbody",{children:r.map(s=>{const a=s.id===xG||s.name==="Whitehawk";return i.jsxs("tr",{className:`${a?"bg-white text-black font-black":"hover:bg-white/5 text-white/95"} border-b border-white/5 transition-colors`,children:[i.jsx("td",{className:"py-2 px-4 text-sm font-bold opacity-70",children:s.position}),i.jsx("td",{className:"py-2 px-4 text-sm font-black uppercase truncate max-w-[140px] tracking-tight",children:s.name}),i.jsx("td",{className:"py-2 px-2 text-center text-[10px] opacity-60 font-medium",children:s["all-matches"].played}),i.jsx("td",{className:"py-2 px-2 text-center text-[10px] opacity-60 font-medium",children:s["all-matches"]["goal-
877difference"]}),i.jsx("td",{className:`py-2 px-6 text-center text-base font-black ${a?"":"text-[#ffd700]"}`,children:s["total-points"]})]},s.id)})})]})})]})},bG=({compId:e,matchDate:t,currentId:n})=>{const{data:r=[]}=P0(e),s=r.filter(l=>l.date===t&&l.id!==n),[a,o]=N.useState(new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}));return N.useEffect(()=>{const l=setInterval(()=>o(new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})),6e4);return()=>clearInterval(l)},[]),i.jsxs("div",{className:"shrink-0 relative z-30 h-14 bg-black/90 flex items-center overflow-hidden border-t-[3px] border-black/20 shadow-[0_-10px_20px_rgba(0,0,0,0.5)]",children:[i.jsxs("div",{className:"bg-white h-full flex items-center px-6 gap-6 border-r border-black/10 shrink-0 shadow-[10px_0_20px_rgba(0,0,0,0.3)] relative z-20",children:[i.jsxs("div",{className:"flex items-center gap-2 select-none leading-none",children:[i.jsx("span",{className:"font-heading text-red-600 text-2xl font-black italic tracking-tighter uppercase",children:"Whitehawk"}),i.jsx("span",{className:"font-heading text-blue-700 text-2xl font-black italic tracking-tighter uppercase",children:"News"})]}),i.jsx("div",{className:"h-4 w-px bg-black/10"}),i.jsx("span",{className:"font-heading text-black text-2xl font-black tabular-nums tracking-wider",children:a})]}),i.jsx("div",{className:"flex-1 h-full bg-[#fff200] relative flex items-center overflow-hidden",children:i.jsx(re.div,{className:"flex items-center gap-20 whitespace-nowrap pl-16 pr-16",animate:{x:[0,-2500]},transition:{duration:55,repeat:1/0,ease:"linear"},children:s.length>0?[...s,...s,...s].map((l,c)=>{var u;return i.jsxs("div",{className:"flex items-center gap-4 text-black font-body font-black uppercase text-base tracking-tighter",children:[i.jsx("span",{className:"opacity-60 font-heading text-[10px] tracking-widest",children:((u=l.status)==null?void 0:u.short)||"KO"}),i.jsx("span",{children:l["home-team"].name}),i.jsxs("span",{className:"bg-black text-white px-2.5 py-0.5 tabular-nums ring-1 ring-black shadow-lg",children:[l["home-team"].score??"0"," - ",l["away-team"].score??"0"]}),i.jsx("span",{children:l["away-team"].name}),i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-black/20 mx-4"})]},c)}):i.jsx("div",{className:"text-black font-heading font-black uppercase text-sm tracking-widest opacity-60",children:"/// BROADCAST LIVE FROM THE ENCLOSED GROUND /// HAWA-A-A-Y THE HAWKS ///"})})}),i.jsx("div",{className:"bg-red-700 h-full flex items-center px-8 shrink-0 border-l border-white/10 shadow-[-10px_0_20px_rgba(0,0,0,0.2)]",children:i.jsx("span",{className:"font-heading text-white text-lg font-black tracking-[0.2em] uppercase italic drop-shadow-md",children:"LIVE HUB"})})]})},wG=()=>{const{id:e}=_l(),{data:t,isLoading:n,error:r}=kP(e||""),s=N.useRef(null),[a,o]=N.useState(!1),[l,c]=N.useState("report"),u=()=>{var d;document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():(d=s.current)==null||d.requestFullscreen().catch(h=>{console.error("Fullscreen error:",h.message)})};return N.useEffect(()=>{const d=()=>o(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",d),()=>document.removeEventListener("fullscreenchange",d)},[]),n?i.jsx("div",{className:"min-h-screen bg-[#111] text-white flex justify-center items-center font-heading text-2xl animate-pulse italic uppercase tracking-widest",children:"TRANSMISSION CONNECTING..."}):r||!t?i.jsx("div",{className:"min-h-screen bg-[#111] text-white flex justify-center items-center font-heading text-2xl text-red-500 uppercase",children:"SIGNAL LOST - MATCH UNAVAILABLE"}):i.jsxs("div",{ref:s,className:`relative flex flex-col w-full h-full text-white font-sans bg-black overflow-hidden ${a?"fixed inset-0 z-50":"min-h-[calc(100vh-80px)]"}`,children:[i.jsxs("div",{className:"absolute top-4 left-4 z-[60] flex items-center gap-2 opacity-15 hover:opacity-100 transition-opacity",children:[!a&&i.jsx(he,{to:"/matches",className:"bg-black/95 text-white p-2 border border-white/20 transition-colors shadow-xl hover:bg-white hover:text-black",children:i.jsx(Qu,{size:16})}),i.jsx("button",{onClick:u,className:"bg-black/95 text-white px-4 py-2 font-heading text-xs uppercase border border-white/20 flex items-center gap-3 transition-all hover:bg-white hover:text-black shadow-xl",children:a?i.jsxs(i.Fragment,{children:[i.jsx(H3,{size:14})," EXIT HUD"]}):i.jsxs(i.Fragment,{children:[i.jsx(G3,{size:14})," BROADCAST MODE"]})})]}),i.jsxs("div",{className:"flex-1 flex flex-col md:flex-row min-h-0 relative",children:[i.jsxs("div",{className:"flex-1 min-h-0 flex flex-col relative overflow-hidden",children:[i.jsx(yG,{match:t}),t.match_report?i.jsxs("div",{className:"flex-1 flex flex-col min-h-0 bg-white",children:[i.jsxs("div",{className:"flex items-center bg-gray-100 border-b border-gray-200 shrink-0",children:[i.jsx("button",{onClick:()=>c("activity"),className:`px-8 py-3 font-heading uppercase text-xs font-black tracking-widest transition-colors ${l==="activity"?"bg-white text-red-600 border-t-2 border-t-red-600 border-r border-r-gray-200":"text-gray-500 hover:bg-gray-50 border-t-2 border-t-transparent border-r border-r-gray-200"}`,children:"Match Activity"}),i.jsx("button",{onClick:()=>c("report"),className:`px-8 py-3 font-heading uppercase text-xs font-black tracking-widest transition-colors ${l==="report"?"bg-white text-red-600 border-t-2 border-t-red-600 border-r border-r-gray-200":"text-gray-500 hover:bg-gray-50 border-t-2 border-t-transparent border-r border-r-gray-200"}`,children:"Match Report"})]}),l==="activity"?i.jsx(yk,{match:t}):i.jsx("div",{className:"flex-1 overflow-y-auto bg-white p-6 md:p-10 text-black",children:i.jsx("div",{className:"prose prose-sm md:prose-base max-w-3xl mx-auto prose-img:rounded-md prose-headings:font-heading prose-headings:uppercase prose-headings:tracking-tight prose-a:text-red-600",dangerouslySetInnerHTML:{__html:t.match_report}})})]}):i.jsx(yk,{match:t})]}),i.jsx("div",{className:"w-full md:w-[320px] lg:w-[420px] shrink-0 flex flex-col relative z-10 shadow-[-30px_0_60px_rgba(0,0,0,0.8)] border-l border-white/5",children:i.jsx(vG,{compId:t.competition.id})})]}),i.jsx(bG,{compId:t.competition.id,matchDate:t.date,currentId:e||""})]})},ih=({p:e})=>{const t=`${e.player["first-name"]||""} ${e.player["last-name"]||""}`.trim();return i.jsxs("div",{className:"flex items-center gap-2 py-2 px-1",children:[i.jsx("span",{className:"font-heading text-[11px] text-muted-foreground tabular-nums w-5 text-center",children:e.shirt}),i.jsxs("span",{className:"font-body text-sm font-semibold text-foreground",children:[t,e.captain&&i.jsx("span",{className:"ml-1 text-[9px] font-heading text-club-gold font-black",children:"(C)"})]}),i.jsxs("span",{className:"flex items-center gap-1 ml-auto",children:[e.cautioned&&i.jsx("div",{className:"w-2.5 h-3.5 bg-yellow-400 rounded-[1px] border border-black/10",title:`Yellow ${e.cautioned.minute}'`}),e["sent-off"]&&i.jsx("div",{className:"w-2.5 h-3.5 bg-red-600 rounded-[1px] border border-black/10",title:`Red ${e["sent-off"].minute}'`}),e["substituted-off"]&&i.jsxs("span",{className:"text-[10px] font-heading text-red-500 font-bold flex items-center gap-0.5",children:[i.jsx(BE,{size:10})," ",e["substituted-off"].minute,"'"]}),e["substituted-on"]&&i.jsxs("span",{className:"text-[10px] font-heading text-green-600 font-bold flex items-center gap-0.5",children:[i.jsx(UE,{size:10})," ",e["substituted-on"].minute,"'"]})]})]})},jG=()=>{var m,y,g,v,b,w;const{id:e}=_l(),{data:t,isLoading:n,error:r}=kP(e||"");if(n)return i.jsx("div",{className:"min-h-screen bg-[#f9f9f9] flex items-center justify-center",children:i.jsx(Ie,{className:"w-10 h-10 animate-spin text-[#8e160b]"})});if(r||!t)return i.jsxs("div",{className:"min-h-screen bg-[#f9f9f9] flex flex-col items-center justify-center gap-4 text-center px-4",children:[i.jsx(zE,{size:48,className:"text-[#8e160b] opacity-40"}),i.jsx("p",{className:"font-heading text-xl uppercase tracking-widest text-muted-foreground",children:"Match data unavailable"}),i.jsx(he,{to:"/matches",className:"font-heading text-sm uppercase tracking-widest text-[#8e160b] underline underline-offset-4",children:"Back to Fixtures"})]});const s=t["home-team"],a=t["away-team"],o=((m=s["line-up"])==null?void 0:m.length)>0||((y=a["line-up"])==null?void 0:y.length)>0,l=((g=s.goals)==null?void 0:g.length)>0||((v=a.goals)==null?void 0:v.length)>0,c=s["line-up"]||[],u=s.substitutes||[],d=a["line-up"]||[],h=a.substitutes||[],f=s.goals||[],p=a.goals||[];let x="";try{x=Ft(nn(t.date),"EEEE do MMMM yyyy")}catch{x=t.date}return i.jsxs("div",{className:"min-h-screen bg-[#f9f9f9]",children:[i.jsxs("section",{className:"relative bg-gradient-to-br from-[#0f0f0f] via-[#1a1a1a] to-[#0f0f0f] pt-20 pb-16 md:pt-28 md:pb-20 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.04] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"20px 20px"}}),i.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[i.jsxs(he,{to:"/matches",className:"inline-flex items-center gap-1.5 text-white/50 hover:text-white transition-colors font-heading text-xs uppercase tracking-widest mb-8",children:[i.jsx(Qu,{size:14})," Back to Fixtures"]}),i.jsxs("div",{className:"flex flex-col items-center text-center mb-10",children:[i.jsx("span",{className:"font-heading text-[#8e160b] text-xs uppercase tracking-[0.3em] font-bold mb-2",children:((b=t.competition)==null?void 0:b.name)||"Match Report"}),i.jsxs("span",{className:"font-body text-white/40 text-xs",children:[x," ⢠KO ",t.time]})]}),i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},className:"flex items-center justify-center gap-6 md:gap-14",children:[i.jsx("div",{className:"flex flex-col items-center text-center min-w-0 flex-1 max-w-[200px]",children:i.jsx("h2",{className:"font-heading text-white text-xl md:text-3xl font-black uppercase tracking-tight leading-tight",children:s.name})}),i.jsxs("div",{className:"flex items-center gap-3 md:gap-6 shrink-0",children:[i.jsx("span",{className:"font-heading text-white text-5xl md:text-8xl font-black leading-none tabular-nums",children:s.score??0}),i.jsx("span",{className:"font-heading text-white/20 text-3xl md:text-5xl font-black",children:"-"}),i.jsx("span",{className:"font-heading text-white text-5xl md:text-8xl font-black leading-none tabular-nums",children:a.score??0})]}),i.jsx("div",{className:"flex flex-col items-center text-center min-w-0 flex-1 max-w-[200px]",children:i.jsx("h2",{className:"font-heading text-white text-xl md:text-3xl font-black uppercase tracking-tight leading-tight",children:a.name})})]}),i.jsxs("div",{className:"flex items-center justify-center gap-6 mt-6 text-white/30 text-xs font-heading uppercase tracking-widest",children:[s["half-time-score"]!==void 0&&a["half-time-score"]!==void 0&&i.jsxs("span",{children:["HT: ",s["half-time-score"]," - ",a["half-time-score"]]}),i.jsx("span",{className:"bg-white/10 text-white/60 px-3 py-1 rounded-full font-bold",children:((w=t.status)==null?void 0:w.short)||"FT"})]}),i.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-6 mt-6 text-white/25 text-[10px] font-body uppercase tracking-wider",children:[t.venue&&i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Zu,{size:10})," ",t.venue]}),t.attendance&&i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Zt,{size:10})," Att: ",t.attendance]}),t.referee&&i.jsxs("span",{className:"flex items-center gap-1.5",children:[i.jsx(Xn,{size:10})," Ref: ",t.referee]})]})]})]}),i.jsx("section",{className:"container mx-auto px-4 py-10 md:py-16 max-w-5xl",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-10",children:[i.jsxs("div",{className:"space-y-10",children:[t.match_report&&i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:[i.jsx("h3",{className:"font-heading text-xl font-bold uppercase tracking-tight mb-6 flex items-center gap-2 border-b-2 border-[#8e160b] pb-3",children:"Match Report"}),i.jsx("div",{className:"prose prose-sm md:prose-base max-w-none prose-headings:font-heading prose-headings:uppercase prose-headings:tracking-tight prose-a:text-[#8e160b] prose-img:rounded-md prose-p:text-gray-700 prose-p:leading-relaxed",dangerouslySetInnerHTML:{__html:t.match_report}})]}),l&&i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:[i.jsxs("h3",{className:"font-heading text-xl font-bold uppercase tracking-tight mb-6 flex items-center gap-2 border-b-2 border-[#8e160b] pb-3",children:[i.jsx(wf,{size:18,className:"text-[#8e160b]"})," Goals"]}),i.jsx("div",{className:"bg-white border border-border/60 rounded-lg overflow-hidden shadow-sm",children:[...f.map(j=>({...j,team:s.name})),...p.map(j=>({...j,team:a.name}))].sort((j,E)=>j.minute-E.minute).map((j,E)=>{var k,S;return i.jsxs("div",{className:"flex items-center gap-4 px-5 py-3.5 border-b border-border/30 last:border-b-0 hover:bg-muted/20 transition-colors",children:[i.jsxs("span",{className:"font-heading text-sm text-muted-foreground tabular-nums w-10 text-right font-bold",children:[j.minute,"'"]}),i.jsx(wf,{size:14,className:"text-green-600 shrink-0"}),i.jsxs("div",{children:[i.jsx("span",{className:"font-body text-sm font-semibold text-foreground",children:j.description||`${((k=j.player)==null?void 0:k["first-name"])||""} ${((S=j.player)==null?void 0:S["last-name"])||""}`.trim()}),i.jsx("span",{className:"text-[10px] font-heading text-muted-foreground uppercase tracking-widest ml-2",children:j.team})]})]},E)})})]}),!t.match_report&&!l&&i.jsxs("div",{className:"py-20 text-center text-muted-foreground",children:[i.jsx("p",{className:"font-heading uppercase tracking-widest text-sm",children:"No match report available yet."}),i.jsx("p",{className:"font-body text-xs mt-2 opacity-60",children:"Check back soon â reports are published after the final whistle."})]})]}),i.jsx("div",{className:"space-y-8",children:o&&i.jsxs(i.Fragment,{children:[i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{delay:.3},children:[i.jsx("h4",{className:"font-heading text-sm font-bold uppercase tracking-widest mb-3 text-[#8e160b] border-b-2 border-[#8e160b] pb-2",children:s.name}),i.jsxs("div",{className:"bg-white border border-border/60 rounded-lg shadow-sm overflow-hidden",children:[i.jsx("div",{className:"px-4 py-2 bg-muted/30 border-b border-border/30",children:i.jsx("span",{className:"font-heading text-[9px] uppercase tracking-widest text-muted-foreground font-bold",children:"Starting XI"})}),i.jsx("div",{className:"divide-y divide-border/20 px-3",children:c.map((j,E)=>i.jsx(ih,{p:j},E))}),u.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"px-4 py-2 bg-muted/30 border-t border-b border-border/30",children:i.jsx("span",{className:"font-heading text-[9px] uppercase tracking-widest text-muted-foreground font-bold",children:"Substitutes"})}),i.jsx("div",{className:"divide-y divide-border/20 px-3",children:u.map((j,E)=>i.jsx(ih,{p:j},E))})]})]})]}),i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},children:[i.jsx("h4",{className:"font-heading text-sm font-bold uppercase tracking-widest mb-3 text-gray-600 border-b-2 border-gray-300 pb-2",children:a.name}),i.jsxs("div",{className:"bg-white border border-border/60 rounded-lg shadow-sm overflow-hidden",children:[i.jsx("div",{className:"px-4 py-2 bg-muted/30 border-b border-border/30",children:i.jsx("span",{className:"font-heading text-[9px] uppercase tracking-widest text-muted-foreground font-bold",children:"Starting XI"})}),i.jsx("div",{className:"divide-y divide-border/20 px-3",children:d.map((j,E)=>i.jsx(ih,{p:j},E))}),h.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"px-4 py-2 bg-muted/30 border-t border-b border-border/30",children:i.jsx("span",{className:"font-heading text-[9px] uppercase tracking-widest text-muted-foreground font-bold",children:"Substitutes"})}),i.jsx("div",{className:"divide-y divide-border/20 px-3",children:h.map((j,E)=>i.jsx(ih,{p:j},E))})]})]})]})]})})]})})]})},NG=()=>{const{id:e}=_l(),{data:t,isLoading:n}=iK(e||"");return n?i.jsx("div",{className:"flex h-[50vh] items-center justify-center",children:i.jsx(Ie,{className:"h-8 w-8 animate-spin text-[#8e160b]"})}):t?i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"relative pt-32 pb-16 bg-[#141b2b] text-white overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2020-scaled.jpg')] bg-cover bg-center"}),i.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[i.jsxs(he,{to:"/teams",className:"inline-flex items-center gap-2 text-white/70 hover:text-white transition-colors mb-8 font-body uppercase tracking-wider text-sm",children:[i.jsx(bi,{size:16})," Back to Squad"]}),i.jsxs("div",{className:"flex flex-col md:flex-row gap-12 items-end",children:[i.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative w-64 h-80 shrink-0 mx-auto md:mx-0 rounded-lg overflow-hidden bg-white/5 border-2 border-white/10",children:t.photo_url?i.jsx("img",{src:t.photo_url,alt:t.name,className:"w-full h-full object-cover"}):i.jsx("div",{className:"w-full h-full flex items-center justify-center",children:i.jsx("span",{className:"font-heading text-6xl font-bold text-white/20",children:t.name.split(" ").map(r=>r[0]).join("")})})}),i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-center md:text-left flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx("div",{className:"px-4 py-1.5 bg-[#8e160b] text-white font-body text-xs font-bold uppercase tracking-widest rounded-full",children:t.position}),t.is_captain&&i.jsxs("div",{className:"px-4 py-1.5 bg-club-gold text-white font-body text-xs font-bold uppercase tracking-widest rounded-full flex items-center gap-1.5",children:[i.jsx(Xn,{size:12})," Captain"]})]}),i.jsx("h1",{className:"font-heading text-5xl md:text-7xl font-bold uppercase mb-2 leading-none tracking-tighter",children:t.name})]})]})]})]}),i.jsx("section",{className:"py-16 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"grid md:grid-cols-3 gap-12",children:[i.jsxs("div",{className:"space-y-6",children:[i.jsxs("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 border-b-2 border-gray-100 pb-4 flex items-center gap-2",children:[i.jsx(Xn,{className:"text-[#8e160b]"})," Season Stats"]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"bg-gray-50 p-6 rounded-xl border border-gray-100 text-center flex flex-col items-center justify-center group hover:border-[#8e160b]/30 transition-colors",children:[i.jsx(I3,{className:"text-[#8e160b] mb-2",size:24}),i.jsx("span",{className:"font-heading text-4xl font-bold text-black mb-1",children:t.appearances||0}),i.jsx("span",{className:"font-body text-xs text-muted-foreground uppercase tracking-wider font-medium",children:"Appearances"})]}),i.jsxs("div",{className:"bg-gray-50 p-6 rounded-xl border border-gray-100 text-center flex flex-col items-center justify-center group hover:border-[#8e160b]/30 transition-colors",children:[i.jsx(wf,{className:"text-[#8e160b] mb-2",size:24}),i.jsx("span",{className:"font-heading text-4xl font-bold text-black mb-1",children:t.goals||0}),i.jsx("span",{className:"font-body text-xs text-muted-foreground uppercase tracking-wider font-medium",children:"Goals"})]}),i.jsxs("div",{className:"bg-gray-50 p-6 rounded-xl border border-gray-100 text-center flex flex-col items-center justify-center col-span-2 group hover:border-[#8e160b]/30 transition-colors",children:[i.jsx($3,{className:"text-[#8e160b] mb-2",size:24}),i.jsx("span",{className:"font-heading text-4xl font-bold text-black mb-1",children:t.assists||0}),i.jsx("span",{className:"font-body text-xs text-muted-foreground uppercase tracking-wider font-medium",children:"Assists"})]})]})]}),i.jsxs("div",{className:"md:col-span-2",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 border-b-2 border-gray-100 pb-4",children:"Player Biography"}),i.jsx("div",{className:"prose prose-lg max-w-none prose-headings:font-heading prose-headings:uppercase prose-p:font-body prose-p:text-gray-600 prose-p:leading-relaxed",children:t.bio?i.jsx("div",{dangerouslySetInnerHTML:{__html:t.bio.replace(/\n/g,"<br />")}}):i.jsx("p",{className:"italic text-gray-400",children:"Biography coming soon."})})]})]})})})]}):i.jsxs("div",{className:"container mx-auto py-24 text-center",children:[i.jsx("h2",{className:"text-3xl font-heading font-bold mb-4",children:"Player Not Found"}),i.jsxs(he,{to:"/teams",className:"text-[#8e160b] hover:underline flex items-center justify-center gap-2",children:[i.jsx(bi,{size:16})," Back to Teams"]})]})}
877,kG=()=>{const{id:e}=_l(),{data:t,isLoading:n}=lK(e||"");return n?i.jsx("div",{className:"flex h-[50vh] items-center justify-center",children:i.jsx(Ie,{className:"h-8 w-8 animate-spin text-[#8e160b]"})}):t?i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"relative pt-32 pb-16 bg-[#141b2b] text-white overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2020-scaled.jpg')] bg-cover bg-center"}),i.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[i.jsxs(he,{to:"/teams",className:"inline-flex items-center gap-2 text-white/70 hover:text-white transition-colors mb-8 font-body uppercase tracking-wider text-sm",children:[i.jsx(bi,{size:16})," Back to Squad"]}),i.jsxs("div",{className:"flex flex-col md:flex-row gap-12 items-end",children:[i.jsx(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative w-64 h-80 shrink-0 mx-auto md:mx-0 rounded-lg overflow-hidden bg-white/5 border-2 border-white/10",children:t.image_url?i.jsx("img",{src:t.image_url,alt:t.name,className:"w-full h-full object-cover"}):i.jsx("div",{className:"w-full h-full flex items-center justify-center",children:i.jsx("span",{className:"font-heading text-6xl font-bold text-white/20",children:t.name.split(" ").map(r=>r[0]).join("")})})}),i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"text-center md:text-left flex-1",children:[i.jsx("div",{className:"flex items-center gap-2 mb-4",children:i.jsxs("div",{className:"px-4 py-1.5 bg-[#8e160b] text-white font-body text-xs font-bold uppercase tracking-widest rounded-full flex items-center gap-1.5",children:[i.jsx(AE,{size:12})," ",t.role]})}),i.jsx("h1",{className:"font-heading text-5xl md:text-7xl font-bold uppercase mb-2 leading-none tracking-tighter",children:t.name})]})]})]})]}),i.jsx("section",{className:"py-16 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsxs("div",{className:"max-w-4xl",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase mb-6 border-b-2 border-gray-100 pb-4",children:"Biography"}),i.jsx("div",{className:"prose prose-lg max-w-none prose-headings:font-heading prose-headings:uppercase prose-p:font-body prose-p:text-gray-600 prose-p:leading-relaxed",children:t.bio?i.jsx("div",{dangerouslySetInnerHTML:{__html:t.bio.replace(/\n/g,"<br />")}}):i.jsx("p",{className:"italic text-gray-400",children:"Biography coming soon."})})]})})})]}):i.jsxs("div",{className:"container mx-auto py-24 text-center",children:[i.jsx("h2",{className:"text-3xl font-heading font-bold mb-4",children:"Staff Member Not Found"}),i.jsxs(he,{to:"/teams",className:"text-[#8e160b] hover:underline flex items-center justify-center gap-2",children:[i.jsx(bi,{size:16})," Back to Teams"]})]})},SG=()=>{const e=_s();return N.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),i.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),i.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),i.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},_G=()=>i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.3em] font-bold text-[#8e160b]",children:"Legal Information"}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase leading-tight text-black md:text-6xl tracking-tighter",children:"Terms & Conditions"}),i.jsx("p",{className:"mt-4 font-body text-sm text-muted-foreground",children:"Last Updated: July 2026"}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mt-6"})]})}),i.jsx("section",{className:"py-12 md:py-20 bg-white",children:i.jsx("div",{className:"container mx-auto px-4 max-w-4xl font-body text-base text-muted-foreground leading-relaxed space-y-8",children:i.jsxs(re.div,{initial:{opacity:0,y:15}
877,animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-6",children:[i.jsx("p",{children:"Welcome to the official website and online store of Whitehawk Football Club. These Terms & Conditions govern your use of our website (https://whitehawkfc.com) and the purchase of any products from our online shop."}),i.jsx("p",{children:"By accessing or using our website, you agree to be bound by these terms. If you do not agree, please do not use our services."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"1. Operating Company & Contact Information"}),i.jsxs("p",{children:["This website and online store are operated by ",i.jsx("strong",{children:"WHITEHAWK FOOTBALL CLUB LIMITED"}),", a company registered in England and Wales under Company Number 14984206."]}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Registered Office:"})," Ground Floor Offices, Suite 1, The Enclosed Ground, East Brighton Park, Wilson Avenue, Brighton, East Sussex, United Kingdom, BN2 5TS"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Operating Ground:"})," The Enclosed Ground, East Brighton Park, Wilson Avenue, Brighton, BN2 5TS"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Email:"})," [email protected]"]})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"2. Use of the Website"}),i.jsx("p",{children:"You agree to use this website only for lawful purposes. You must not use our website to transmit or distribute malicious software, or attempt to gain unauthorized access to our systems, servers, or checkout portals."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"3. Product Descriptions and Pricing"}),i.jsx("p",{children:"We make every effort to display the colors, specifications, and details of our products accurately. However, we cannot guarantee that your device's display will perfectly reflect the actual products."}),i.jsx("p",{children:"All prices shown are in GBP (£) and are inclusive of VAT (where applicable) but exclude delivery costs, which will be clearly displayed before you finalize your order. We reserve the right to adjust pricing and product availability at any time without prior notice."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"4. Purchases & Payment Checkout"}),i.jsxs("p",{children:["When you purchase items via our online store, the checkout transactions are processed securely through our payment provider, ",i.jsx("strong",{children:"myPOS"}),"."]}),i.jsx("p",{children:"You agree to provide current, complete, and accurate purchase and account details for all purchases. We reserve the right to refuse or cancel any order if fraudulent, unauthorized, or illegal activity is suspected."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"5. Intellectual Property"}),i.jsx("p",{children:"All content on this website, including but not limited to text, graphics, logos, images, audio clips, digital downloads, and software, is the property of Whitehawk Football Club Limited or its content suppliers and is protected by copyright and intellectual property laws."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"6. Limitation of Liability"}),i.jsx("p",{children:"To the maximum extent permitted by law, Whitehawk Football Club Limited will not be liable for any direct, indirect, incidental, or consequential damages resulting from the use or inability to use this website, or the purchase and use of products."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"7. Governing Law"}),i.jsx("p",{children:"These Terms & Conditions and any separate agreements whereby we provide you services shall be governed by and construed in accordance with the laws of England and Wales. Any disputes arising shall be subject to the exclusive jurisdiction of the English courts."})]})})})]}),EG=()=>i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.3em] font-bold text-[#8e160b]",children:"Legal Information"}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase leading-tight text-black md:text-6xl tracking-tighter",children:"Refund & Return Policy"}),i.jsx("p",{className:"mt-4 font-body text-sm text-muted-foreground",children:"Last Updated: July 2026"}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mt-6"})]})}),i.jsx("section",{className:"py-12 md:py-20 bg-white",children:i.jsx("div",{className:"container mx-auto px-4 max-w-4xl font-body text-base text-muted-foreground leading-relaxed space-y-8",children:i.jsxs(re.div,{initial:{opacity:0,y:15}
877,animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-6",children:[i.jsx("p",{children:"At Whitehawk Football Club, we want you to be fully satisfied with your purchase. If you are not completely happy with your online order, we are here to help with our refund, return, and cancellation options."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"1. Returns Window"}),i.jsxs("p",{children:["Under the UK Consumer Contracts Regulations, you have the right to cancel your order and return goods within ",i.jsx("strong",{children:"14 days"})," of receiving them. The item must be returned to us within 14 days of notifying us of your intent to return it."]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"2. Condition of Returned Items"}),i.jsx("p",{children:"To be eligible for a full refund or exchange:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsx("li",{children:"Items must be unused, unwashed, and in the same condition that you received them."}),i.jsx("li",{children:"Items must be in their original packaging with all tags still attached."}),i.jsx("li",{children:"Customized items (e.g. replica shirts printed with custom names or numbers) cannot be returned or refunded unless there is a manufacturing defect."})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"3. How to Start a Return"}),i.jsxs("p",{children:["To initiate a return, please email us at ",i.jsx("a",{href:"mailto:[email protected]",className:"text-[#8e160b] hover:underline font-semibold",children:"[email protected]"})," with your Order ID (e.g., WHF-XXXXXXXX) and details of the item(s) you wish to return."]}),i.jsx("p",{children:"You can return items by post or in person at the club shop on matchdays. Unless the item is faulty or incorrect, you will be responsible for paying the shipping costs for returning your item. We recommend using a trackable shipping service."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"4. Refunds Process"}),i.jsx("p",{children:"Once your return is received and inspected, we will send you an email to notify you that we have received your returned item and whether your refund is approved."}),i.jsxs("p",{children:["If approved, your refund will be processed and automatically applied to your original method of payment (via myPOS) within ",i.jsx("strong",{children:"5 to 10 business days"}),", depending on your card issuer."]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"5. Order Cancellations"}),i.jsxs("p",{children:["If you wish to cancel an order you have just placed, please contact us immediately at ",i.jsx("a",{href:"mailto:[email protected]",className:"text-[#8e160b] hover:underline font-semibold",children:"[email protected]"}),". If the order has not yet been dispatched, we will cancel the order and process a full refund. If the order has already been dispatched, you will need to follow the standard return process after receipt."]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"6. Damaged or Faulty Items"}),i.jsx("p",{children:"In the unlikely event that you receive a damaged or faulty product, please contact us within 14 days of receipt with photos of the issue. We will arrange a replacement or full refund, including return shipping costs."})]})})})]}),CG=()=>i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.3em] font-bold text-[#8e160b]",children:"Legal Information"}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase leading-tight text-black md:text-6xl tracking-tighter",children:"Delivery Terms"}),i.jsx("p",{className:"mt-4 font-body text-sm text-muted-foreground",children:"Last Updated: July 2026"}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mt-6"})]})}),i.jsx("section",{className:"py-12 md:py-20 bg-white",children:i.jsx("div",{className:"container mx-auto px-4 max-w-4xl font-body text-base text-muted-foreground leading-relaxed space-y-8",children:i.jsxs(re.div,{initial:{opacity:0,y:15}
877,animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-6",children:[i.jsx("p",{children:"We aim to dispatch all shop orders quickly so you can represent the Hawks as soon as possible. Below are the details of our shipping methods, rates, and delivery timeframes."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"1. Delivery Destinations"}),i.jsxs("p",{children:["We deliver to addresses within the United Kingdom. For international shipping enquiries, please contact us at ",i.jsx("a",{href:"mailto:[email protected]",className:"text-[#8e160b] hover:underline font-semibold",children:"[email protected]"})," before placing an order to get a custom shipping quote."]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"2. Delivery Options & Costs"}),i.jsx("p",{children:"We offer the following shipping methods, which are calculated and displayed at checkout:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Standard Delivery (Royal Mail 2nd Class):"})," £3.99 (Delivered within 3â5 working days)"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Express Delivery (Royal Mail 1st Class):"})," £5.99 (Delivered within 1â2 working days)"]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Local Collection (Free):"})," Collect in person from the The Enclosed Ground Club Shop during matchdays or office hours. We will email you once your order is ready for pickup."]})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"3. Order Processing & Dispatch"}),i.jsxs("p",{children:["All orders are packed and dispatched by our volunteer team. We aim to process and ship orders within ",i.jsx("strong",{children:"2 to 3 working days"})," of receiving cleared payment. Orders placed over the weekend or on public holidays will be processed on the next business day."]}),i.jsx("p",{children:"Please note that during peak times (such as pre-season kit launches or the holiday season), dispatch times may be slightly longer."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"4. Tracking and Support"}),i.jsxs("p",{children:["If a trackable delivery method is selected, we will provide the tracking link in your dispatch confirmation email. If you have not received your package within 7 working days of receiving your dispatch email, please reach out to us at ",i.jsx("a",{href:"mailto:[email protected]",className:"text-[#8e160b] hover:underline font-semibold",children:"[email protected]"})," so we can investigate."]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"5. Damaged or Lost Shipments"}),i.jsx("p",{children:"If your order arrives damaged, please retain all packaging and contact us within 48 hours of receipt. If an order is deemed lost in transit (not delivered after 10 working days), we will file a claim with the carrier and arrange a replacement or refund."})]})})})]}),TG=()=>i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.3em] font-bold text-[#8e160b]",children:"Legal Information"}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase leading-tight text-black md:text-6xl tracking-tighter",children:"Privacy Policy"}),i.jsx("p",{className:"mt-4 font-body text-sm text-muted-foreground",children:"Last Updated: July 2026"}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mt-6"})]})}),i.jsx("section",{className:"py-12 md:py-20 bg-white",children:i.jsx("div",{className:"container mx-auto px-4 max-w-4xl font-body text-base text-muted-foreground leading-relaxed space-y-8",children:i.jsxs(re.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-6",children:[i.jsx("p",{children:'Whitehawk Football Club ("we", "us", or "our") is committed to protecting and respecting your privacy. This Privacy Policy explains how we
877collect, use, disclose, and safeguard your personal data when you visit our website (https://whitehawkfc.com) and purchase items from our online shop.'}),i.jsxs("p",{children:["For the purpose of applicable data protection laws (including the UK GDPR and Data Protection Act 2018), the data controller is ",i.jsx("strong",{children:"Whitehawk Football Club Limited"}),"."]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"1. Information We Collect"}),i.jsx("p",{children:"We may collect and process the following information about you:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Contact Information:"})," Your name, billing address, shipping address, email address, and phone number when you place an order or contact us."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Payment Details:"})," Transaction details processed securely via our payment provider (myPOS). We do not store your credit/debit card numbers directly on our servers."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Technical Data:"})," Internet protocol (IP) address, browser type, time zone setting, and operating system when you browse the site."]})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"2. How We Use Your Information"}),i.jsx("p",{children:"We use your information to:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsx("li",{children:"Process and deliver your shop orders."}),i.jsx("li",{children:"Process payments and prevent fraudulent transactions."}),i.jsx("li",{children:"Provide customer support and respond to your enquiries."}),i.jsx("li",{children:"Comply with legal and regulatory obligations."})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"3. Sharing Your Data"}),i.jsx("p",{children:"We do not sell, rent, or trade your personal data. We only share data with trusted third parties who assist us in operating our website and fulfilling your orders:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Payment Processor:"})," myPOS, to safely process your transactions."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Delivery Services:"})," Postal services and couriers to ship your products."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Web Hosting:"})," Our website hosting and database providers."]})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"4. Data Security"}),i.jsx("p",{children:"We implement appropriate technical and organizational measures to secure your personal data. All online transactions are processed through secure checkout sessions using SSL encryption. However, please be aware that no transmission of data over the internet can be guaranteed to be 100% secure."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"5. Your Rights"}),i.jsxs("p",{children:["Under UK and EU data protection laws, you have the right to access, correct, delete, or restrict the processing of your personal data. To exercise any of these rights, please email us at ",i.jsx("a",{href:"mailto:[email protected]",className:"text-[#8e160b] hover:underline font-semibold",children:"[email protected]"}),"."]})]})})})]}),AG=()=>i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.3em] font-bold text-[#8e160b]",children:"Legal Information"}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase leading-tight text-black md:text-6xl tracking-tighter",children:"Cookie Policy"}),i.jsx("p",{className:"mt-4 font-body text-sm text-muted-foreground",children:"Last Updated: July 2026"}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mt-6"})]})}),i.jsx("section",{className:"py-12 md:py-20 bg-white",children:i.jsx("div",{className:"container mx-auto px-4 max-w-4xl font-body text-base text-muted-foreground leading-relaxed space-y-8",children:i.jsxs(re.div,{initial:{opacity:0,y:15}
877,animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-6",children:[i.jsx("p",{children:"This Cookie Policy explains how Whitehawk Football Club uses cookies and similar technologies to recognize you when you visit our website (https://whitehawkfc.com). It explains what these technologies are and why we use them, as well as your rights to control our use of them."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"1. What are Cookies?"}),i.jsx("p",{children:"Cookies are small data files that are placed on your computer or mobile device when you visit a website. Cookies are widely used by website owners in order to make their websites work, or to work more efficiently, as well as to provide reporting information."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"2. Why do we use Cookies?"}),i.jsx("p",{children:"We use first-party and third-party cookies for several reasons:"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"Essential Cookies:"})," These cookies are strictly necessary to provide you with services available through our website and to use some of its features, such as accessing secure areas, using the shopping cart, and checking out."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Performance and Functionality Cookies:"})," These cookies are used to enhance the performance and functionality of our website but are non-essential to their use (for example, remembering your cart items)."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"Analytics and Customization Cookies:"})," These cookies collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are."]})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"3. How can you control Cookies?"}),i.jsx("p",{children:"You have the right to decide whether to accept or reject cookies. You can set or amend your web browser controls to accept or refuse cookies. If you choose to reject cookies, you may still use our website, though your access to some functionality and areas of our website may be restricted (for example, you may not be able to maintain items in your shopping cart)."})]})})})]}),PG=()=>i.jsxs(i.Fragment,{children:[i.jsx("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.3em] font-bold text-[#8e160b]",children:"Club Policy"}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase leading-tight text-black md:text-6xl tracking-tighter",children:"Safeguarding"}),i.jsx("p",{className:"mt-4 font-body text-sm text-muted-foreground",children:"Whitehawk Football Club is committed to safeguarding children, young people, and vulnerable adults."}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mt-6"})]})}),i.jsx("section",{className:"py-12 md:py-20 bg-white",children:i.jsx("div",{className:"container mx-auto px-4 max-w-4xl font-body text-base text-muted-foreground leading-relaxed space-y-8",children:i.jsxs(re.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-6",children:[i.jsxs("div",{className:"flex gap-4 p-5 rounded-xl bg-[#8e160b]/5 border border-[#8e160b]/10 text-black",children:[i.jsx(Xn,{className:"text-[#8e160b] shrink-0",size:24}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-heading text-sm uppercase tracking-wider font-bold text-[#8e160b] mb-1",children:"Safeguarding is Everyone's Responsibility"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"At Whitehawk FC, the health, safety, and welfare of every child and young person are of paramount importance. We subscribe to The Football Associationâs (The FA) Safeguarding Children Policy and Procedures."})]})]}),i.jsx("p",{children:"Whitehawk Football Club acknowledges its responsibility to safeguard the welfare of every child and young person (defined as anyone under the age of 18) who has been entrusted to its care. We are committed to working to provide a safe and positive environment for all participants."}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"Our Key Principles"}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsx("li",{children:"The child's welfare is, and must al
877ways be, the paramount consideration."}),i.jsx("li",{children:"All children and young people have a right to be protected from abuse, regardless of their age, gender, disability, race, sexual orientation, or religious beliefs."}),i.jsx("li",{children:"All suspicions and allegations of abuse will be taken seriously and responded to swiftly and appropriately."}),i.jsx("li",{children:"Working in partnership with other organizations, children, and their parents/carers is essential to promote their welfare."})]}),i.jsx("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8",children:"Reporting Concerns & Contact Information"}),i.jsx("p",{children:"If you have a safeguarding concern or require advice regarding a child, young person, or vulnerable adult at our club, please contact our Safeguarding Team immediately:"}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 mt-4",children:[i.jsxs("div",{className:"p-5 border border-border rounded-xl bg-card",children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-widest text-[#8e160b] font-bold mb-2",children:"Club Welfare Officer (CWO)"}),i.jsx("h3",{className:"font-heading text-lg font-bold text-black mb-3",children:"Kay Stringer"}),i.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[i.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 hover:text-[#8e160b] transition-colors",children:[i.jsx(ys,{size:16})," [email protected]"]}),i.jsxs("a",{href:"tel:07756602784",className:"flex items-center gap-2 hover:text-[#8e160b] transition-colors",children:[i.jsx(Pp,{size:16})," 07756 602784"]})]})]}),i.jsxs("div",{className:"p-5 border border-border rounded-xl bg-card",children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-widest text-muted-foreground font-bold mb-2",children:"Alternative Contacts"}),i.jsx("h3",{className:"font-heading text-lg font-bold text-black mb-3",children:"General Enquiries"}),i.jsx("div",{className:"space-y-2 text-sm text-muted-foreground",children:i.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 hover:text-[#8e160b] transition-colors",children:[i.jsx(ys,{size:16})," [email protected]"]})})]})]}),i.jsxs("h2",{className:"font-heading text-xl font-bold text-black uppercase tracking-wide mt-8 flex items-center gap-2",children:[i.jsx(zE,{className:"text-amber-500",size:20})," If you cannot reach the CWO or if a child is in immediate danger:"]}),i.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[i.jsx("li",{children:"Contact the Sussex County FA Designated Safeguarding Officer."}),i.jsxs("li",{children:["Contact The FA's Safeguarding Team on ",i.jsx("strong",{children:"0800 169 1863"})," or email ",i.jsx("a",{href:"mailto:[email protected]",className:"text-[#8e160b] hover:underline font-semibold",children:"[email protected]"}),"."]}),i.jsxs("li",{children:["Contact the NSPCC Helpline on ",i.jsx("strong",{children:"0808 800 5000"}),"."]}),i.jsxs("li",{children:["Call the Police (",i.jsx("strong",{children:"999"})," in an emergency or ",i.jsx("strong",{children:"101"})," for non-emergencies) or Children's Social Care."]})]})]})})})]}),OG=()=>i.jsxs("div",{className:"bg-white min-h-screen",children:[i.jsxs("section",{className:"relative py-20 md:py-32 bg-[#0d1526] text-white overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?q=80&w=1200&auto=format&fit=crop')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl mx-auto",children:[i.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold bg-club-gold/20 text-club-gold border border-club-gold/30 font-body mb-6",children:[i.jsx(T3,{size:12,className:"animate-pulse"})," Exciting Upgrades Underway"]}),i.jsx("h1",{className:"font-heading text-5xl md:text-8xl font-bold uppercase leading-none tracking-tighter mb-6",children:"Hire Our Pitch"}),i.jsx("p",{className:"font-body text-white/70 max-w-xl mx-auto text-sm md:text-base leading-relaxed",children:"We are currently transforming our main ground into a state-of-the-art 3G pitch facility, available for community and private hire very soon."}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mx-auto mt-8"})]})})]}),i.jsx("section",{className:"py-16 md:py-24",children:i.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:i.jsxs("div",{className:"grid gap-12 lg:grid-cols-2 items-center",children:[i.jsxs(re.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"space-y-6",children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-widest text-[#8e160b] font-bold",children:"New Facilities"}),i.jsx("h2",{className:"font-heading text-3xl md:text-4xl font-bold uppercase text-black",children:"State-of-the-Art 3G Football Pitch"}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:"As part of our commitment to the local community and the growth of football in East Brighton, we are installing a brand new, all-weather 3G playing surface at the Enclosed Ground."}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:"Whether you are a local grassroots club looking for a regular training venue, hosting a corporate tournament, or running a soccer school, our new pitch will provide the perfect professional environment."})]}),i.jsxs(re.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"p-8 border border-border rounded-3xl bg-slate-50 relative overflow-hidden",children:[i.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 bg-club-gold/10 rounded-full blur-2xl -translate-y-1/2 translate-x-1/2"}),i.jsx("h3",{className:"font-heading text-xl font-bold uppercase text-black mb-4",children:"Pitch Features"}),i.jsx("ul",{className:"space-y-4",children:[{icon:Xn,title:"FA Approved Surface",desc:"Fully certified 3G turf designed for peak performance and player safety."},{icon:Zt,title:"Versatile Layouts",desc:"Can be configured for full 11-a-side matches or split for smaller sided games (5-a-side/7-a-side)."},{icon:bl,title:"Modern Floodlighting",desc:"Energy-efficient LED floodlights allowing for evening matches and late training sessions."},{icon:sl,title:"Changing Rooms",desc:"Access to clean, secure changing rooms and hot showers on site."}].map((e,t)=>i.jsxs("li",{className:"flex gap-4 items-start",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#8e160b]/10 flex items-center justify-center text-[#8e160b] shrink-0 mt-0.5",children:i.jsx(e.icon,{size:16})}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-heading text-sm font-bold text-black uppercase tracking-wide",children:e.title}),i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.desc})]})]},t))})]})]})})}),i.jsx("section",{className:"py-16 md:py-24 bg-slate-50 border-t border-border/50 text-center",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-widest text-[#8e160b] font-bold mb-4",children:"Register Interest"}),i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase text-black mb-6",children:"Join the Waiting List"}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed mb-8 max-w-xl mx-auto",children:"Bookings will open soon. Contact our commercial team today to register your interest, secure your training slot, or receive updates on the project completion."}),i.jsxs("a",{href:"mailto:[email protected]?subject=3G%20Pitch%20Hire%20Enquiry",className:"inline-flex items-center justify-center gap-2 px-8 py-3.5 bg-black hover:bg-[#8e160b] text-white rounded-full font-heading text-xs uppercase tracking-widest font-semibold transition-all shadow-lg hover:shadow-xl",children:[i.jsx(ys,{size:16})," Contact Commercial Team"]})]})})]}),RG=()=>i.jsxs("div",{className:"bg-white min-h-screen",children:[i.jsxs("section",{className:"relative py-20 md:py-32 bg-[#0d1526] text-white overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 opacity-15 bg-[url('https://images.unsplash.com/photo-1543007630-9710e4a00a20?q=80&w=1200&auto=format&fit=crop')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:i.jsxs(re.div,{initial:{opacity:0,y:20}
877,animate:{opacity:1,y:0},transition:{duration:.6},className:"max-w-3xl mx-auto",children:[i.jsx("p",{className:"font-heading text-sm uppercase tracking-[0.4em] text-club-gold font-bold mb-6",children:"Venue Hire"}),i.jsx("h1",{className:"font-heading text-5xl md:text-8xl font-bold uppercase leading-none tracking-tighter mb-6",children:"Hire Our Clubhouse"}),i.jsx("p",{className:"font-body text-white/70 max-w-xl mx-auto text-sm md:text-base leading-relaxed",children:"Looking for a unique, spacious venue with a fully licensed bar and food options for your next party, meeting, or event?"}),i.jsx("div",{className:"h-1.5 w-20 bg-club-gold mx-auto mt-8"})]})})]}),i.jsx("section",{className:"py-16 md:py-24",children:i.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:i.jsxs("div",{className:"grid gap-12 lg:grid-cols-2 items-center",children:[i.jsxs(re.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"space-y-6",children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-widest text-[#8e160b] font-bold",children:"The Perfect Venue"}),i.jsx("h2",{className:"font-heading text-3xl md:text-4xl font-bold uppercase text-black",children:"Versatile Space for Any Event"}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:"The Whitehawk FC clubhouse is located at the The Enclosed Ground in East Brighton Park. Surrounded by nature yet easily accessible, our clubhouse offers a flexible indoor venue space suitable for a wide range of functions."}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:"Whether you are celebrating a birthday, staging a wedding reception, holding a business meeting, organizing community sessions, or hosting a wake, we offer a welcoming atmosphere, comfortable seating, and first-class services."})]}),i.jsxs(re.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"p-8 border border-border rounded-3xl bg-slate-50 relative overflow-hidden",children:[i.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 bg-[#8e160b]/5 rounded-full blur-2xl -translate-y-1/2 translate-x-1/2"}),i.jsx("h3",{className:"font-heading text-xl font-bold uppercase text-black mb-4",children:"Venue Features"}),i.jsx("ul",{className:"space-y-4",children:[{icon:R3,title:"Fully Licensed Bar",desc:"A well-stocked bar featuring draft beers, ales, wines, spirits, and soft drinks at competitive prices."},{icon:Tb,title:"Food & Catering",desc:"Flexible food options including hot/cold buffet catering, matchday style kitchen food, or external caterer access."},{icon:Zt,title:"Capacity up to 120 Guests",desc:"Ample room for dancing, dining, or presentations, with customizable table layouts and seating."},{icon:LE,title:"Sound System & Tech",desc:"Equipped with speakers, projector screens, flat screen TVs, and space for a live DJ or acoustic performance."}].map((e,t)=>i.jsxs("li",{className:"flex gap-4 items-start",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#8e160b]/10 flex items-center justify-center text-[#8e160b] shrink-0 mt-0.5",children:i.jsx(e.icon,{size:16})}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-heading text-sm font-bold text-black uppercase tracking-wide",children:e.title}),i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.desc})]})]},t))})]})]})})}),i.jsx("section",{className:"py-16 md:py-24 bg-slate-50 border-t border-b border-border/50",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center",children:[i.jsxs("div",{className:"max-w-2xl mx-auto mb-12",children:[i.jsx("h2",{className:"font-heading text-3xl font-bold uppercase text-black mb-4",children:"Food & Bar Catering"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"We work with you to craft the perfect refreshments menu for your guests. From casual finger food to hot meals, we can cater to dietary requirements."})]}),i.jsx("div",{className:"grid gap-6 md:grid-cols-3",children:[{title:"Finger Buffet",desc:"Assorted sandwiches, wraps, light bites, and classic party favorites. Perfect for casual birthday parties and networking."},{title:"Licensed Bar Service",desc:"Fully staffed bar serving popular lagers, local craft beer, premium spirits, prosecco, and non-alcoholic choices."},{title:"Custom Hot Catering",desc:"Coordinated catering, offering everything from artisan burgers and chips to hot pies and tailored dinner setups."}].map((e,t)=>i.jsxs("div",{className:"p-6 bg-white border border-border rounded-2xl shadow-sm hover:shadow-md transition-shadow",children:[i.jsx("h3",{className:"font-heading text-base font-bold text-black uppercase mb-2",children:e.title}),i.jsx("p",{className:"font-body text-xs text-muted-foreground leading-relaxed",children:e.desc})]},t))})]})}),i.jsx("section",{className:"py-16 md:py-24 text-center bg-white",children:i.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[i.jsx("p",{className:"font-heading text-xs uppercase tracking-widest text-[#8e160b] font-bold mb-4",children:"Get In Touch"}),i.jsx("h2",{className:"font-heading text-3xl md:text-5xl font-bold uppercase text-black mb-6",children:"Book the Clubhouse"}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed mb-8 max-w-xl mx-auto",children:"Get in touch to check availability, schedule a viewing, or get a custom venue hire quote. Our volunteers will get back to you within a few business days."}),i.jsxs("a",{href:"mailto:[email protected]?subject=Clubhouse%20Hire%20Enquiry",className:"inline-flex items-center justify-center gap-2 px-8 py-3.5 bg-black hover:bg-[#8e160b] text-white rounded-full font-heading text-xs uppercase tracking-widest font-semibold transition-all shadow-lg hover:shadow-xl",children:[i.jsx(ys,{size:16})," Enquire About Clubhouse Hire"]})]})})]});function MG(){const e=[{title:"Flickr Match Album",photographer:"AG Schofield",description:"Official high-quality matchday action photography. Access comprehensive albums capturing recent games, player goals, and pitch-side drama.",url:"https://www.flickr.com/photos/agschofield/albums",icon:i.jsx(_3,{className:"w-8 h-8 text-[#8e160b]"}),buttonText:"Open Flickr Album",tag:"Official Galleries"},{title:"Flickr Photo Archive",photographer:"Hawks Photos",description:"The official visual archive of Whitehawk FC. Browse historical match photos, squad portraits, and community events over the seasons.",url:"https://www.flickr.com/photos/hawksphotos/",icon:i.jsx(ll,{className:"w-8 h-8 text-[#8e160b]"}),buttonText:"Browse Photo Archive",tag:"Historical Archive"},{title:"Facebook Fan Group",photographer:"Hawks Community",description:"Connect with fellow Hawks fans. Share your own matchday photos, join discu
877ssions, and view fan-taken snapshots from the Enclosed Ground and away trips.",url:"https://www.facebook.com/groups/843349912463876",icon:i.jsx(DE,{className:"w-8 h-8 text-[#8e160b]"}),buttonText:"Visit Facebook Group",tag:"Community Hub"}];return i.jsxs(i.Fragment,{children:[i.jsxs("section",{className:"bg-white border-b border-border/50 pt-20 pb-12 md:pt-28 md:pb-16 overflow-hidden relative text-black",children:[i.jsx("div",{className:"absolute inset-0 opacity-[0.03] bg-[url('https://thehawksfc.com/wp-content/uploads/2023/10/E8A2100-scaled.jpg')] bg-cover bg-center"}),i.jsx("div",{className:"container mx-auto px-4 relative z-10",children:i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[i.jsx("p",{className:"mb-2 font-heading text-sm uppercase tracking-[0.4em] font-bold text-[#8e160b]",children:"Club"}),i.jsxs("h1",{className:"font-heading text-5xl font-bold uppercase leading-tight text-black md:text-8xl tracking-tighter",children:["Match ",i.jsx("br",{className:"hidden md:block"})," Photos"]}),i.jsx("p",{className:"mt-8 max-w-2xl font-body text-lg text-muted-foreground leading-relaxed",children:"Explore match action, fan galleries, and historic snapshots captured across our official channels and community spaces."}),i.jsx("div",{className:"h-2 w-24 bg-club-gold mt-10"})]})})]}),i.jsx("section",{className:"py-20 md:py-32 bg-white",children:i.jsx("div",{className:"container mx-auto px-4",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto",children:e.map((t,n)=>i.jsxs(re.div,{initial:{opacity:0,y:25},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:n*.1},className:"group flex flex-col justify-between p-8 border border-border/50 rounded-2xl hover:border-[#8e160b]/40 hover:shadow-lg transition-all duration-300 bg-white",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[i.jsx("div",{className:"p-4 bg-[#8e160b]/5 border border-[#8e160b]/15 rounded-xl",children:t.icon}),i.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-[#8e160b]/80 bg-[#8e160b]/5 px-3 py-1 rounded-full border border-[#8e160b]/10",children:t.tag})]}),i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase tracking-tight text-black mb-1",children:t.title}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground uppercase tracking-widest font-medium mb-6",children:["By ",t.photographer]}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed mb-8",children:t.description})]}),i.jsx("div",{children:i.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"w-full flex items-center justify-center gap-2 bg-[#8e160b] text-white font-heading uppercase py-4 px-6 rounded-lg tracking-widest text-xs hover:bg-[#7a1309] transition-all duration-300 group-hover:shadow-md",children:[t.buttonText,i.jsx(ua,{size:14,className:"opacity-80"})]})})]},t.title))})})}),i.jsx("section",{className:"py-20 bg-[#141b2b] text-white",children:i.jsx("div",{className:"container mx-auto px-4 text-center",children:i.jsxs("div",{className:"max-w-xl mx-auto space-y-6",children:[i.jsx("h3",{className:"font-heading text-2xl md:text-3xl font-bold uppercase tracking-tight",children:"Have photos to share?"}),i.jsxs("p",{className:"font-body text-sm text-white/70 leading-relaxed",children:["We love seeing matchday through your eyes! Post your photos in the Facebook group or tag us on Twitter and Instagram using ",i.jsx("span",{className:"text-club-gold font-bold",children:"#FNK"}),"."]}),i.jsx("div",{className:"h-0.5 w-12 bg-club-gold mx-auto mt-6"})]})})})]})}const DG=()=>{const[e,t]=N.useState(null),[n,r]=N.useState(null),[s,a]=N.useState(!0),[o,l]=N.useState(!1),c=Bp(),u=_s();N.useEffect(()=>{const x=async y=>{if(!y){a(!1),c("/admin/login");return}const{data:g,error:v}=await ue.from("admin_users").select("*").eq("email",y.user.email).single();(v||!g)&&console.error("Admin check failed",v),r(g),t(y),a(!1)};ue.auth.getSession().then(({data:{session:y}})=>{x(y)});const{data:{subscription:m}}=ue.auth.onAuthStateChange((y,g)=>{x(g)});return()=>m.unsubscribe()},[c]);const d=async()=>{await ue.auth.signOut(),c("/admin/login")};if(s)return i.jsx("div",{className:"h-screen w-screen flex items-center justify-center bg-club-dark text-white font-heading uppercase text-xl animate-pulse",children:"Hawks Admin"});if(!e)return null;const h=[{label:"Dashboard",href:"/admin",icon:gc,roleKey:"dashboard"}
877,{label:"News Posts",href:"/admin/posts",icon:Ao,roleKey:"posts"},{label:"Squad",href:"/admin/squad",icon:Zt,roleKey:"squad"},{label:"Personnel",href:"/admin/personnel",icon:Xn,roleKey:"personnel"},{label:"Videos",href:"/admin/videos",icon:FE,roleKey:"videos"},{label:"Sponsors",href:"/admin/sponsors",icon:Ju,roleKey:"sponsors"},{label:"Fixtures",href:"/admin/fixtures",icon:sl,roleKey:"fixtures"},{label:"Shop",href:"/admin/products",icon:ed,roleKey:"shop"},{label:"Settings",href:"/admin/settings",icon:Op,roleKey:"settings"},{label:"Menu Pages",href:"/admin/menu-pages",icon:z3,roleKey:"settings"},{label:"Admin Users",href:"/admin/users",icon:Ph,roleKey:"admin_users"}],f=!(n!=null&&n.roles)||n.roles.includes("admin_users"),p=[...h.filter(x=>!(n!=null&&n.roles)||n.roles.includes(x.roleKey)),...f?[]:[{label:"My Account",href:"/admin/users",icon:Ph,roleKey:""}]];return i.jsxs("div",{className:"min-h-screen bg-muted/30 flex",children:[i.jsx("div",{className:Pe("fixed inset-0 bg-black/50 z-40 lg:hidden transition-opacity",o?"opacity-100":"opacity-0 pointer-events-none"),onClick:()=>l(!1)}),i.jsxs("aside",{className:Pe("fixed inset-y-0 left-0 w-64 bg-club-dark text-white z-50 transition-transform duration-300 lg:relative lg:translate-x-0 pb-10",o?"translate-x-0":"-translate-x-full"),children:[i.jsxs("div",{className:"p-6 flex items-center gap-3 border-b border-white/10",children:[i.jsx("div",{className:"bg-white/10 p-1 rounded-full w-8 h-8 flex items-center justify-center border border-white/5 shadow-inner",children:i.jsx("img",{src:"https://thehawksfc.com/wp-content/uploads/2023/04/cropped-twitter-badge-round.png",alt:"Whitehawk FC Logo",className:"w-full h-full object-contain"})}),i.jsx("span",{className:"font-heading font-bold uppercase tracking-wider text-sm",children:"Hawks Admin"})]}),i.jsx("nav",{className:"mt-6 px-4 space-y-1",children:p.map(x=>i.jsxs(he,{to:x.href,onClick:()=>l(!1),className:Pe("flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-heading uppercase tracking-wide transition-colors",u.pathname===x.href?"bg-primary text-white":"text-white/60 hover:text-white hover:bg-white/5"),children:[i.jsx(x.icon,{size:18}),x.label]},x.href))}),i.jsxs("div",{className:"absolute bottom-6 left-4 right-4 space-y-2",children:[i.jsxs(he,{to:"/",className:"flex items-center gap-3 px-4 py-3 rounded-lg text-xs font-heading uppercase tracking-wide text-white/40 hover:text-white hover:bg-white/5 transition-colors",children:[i.jsx(ua,{size:16}),"View Site"]}),i.jsxs(le,{onClick:d,variant:"ghost",className:"w-full justify-start gap-3 text-white/60 hover:text-white hover:bg-white/5 font-heading uppercase tracking-wide text-xs",children:[i.jsx(W3,{size:16}),"Logout"]})]})]}),i.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[i.jsxs("header",{className:"h-16 bg-white border-b border-border flex items-center justify-between px-4 lg:px-8 shrink-0",children:[i.jsx("button",{onClick:()=>l(!0),className:"lg:hidden p-2 text-muted-foreground hover:text-foreground",children:i.jsx(IE,{size:24})}),i.jsxs("div",{className:"flex items-center gap-4 ml-auto",children:[i.jsxs("div",{className:"hidden sm:flex flex-col items-end",children:[i.jsx("span",{className:"text-xs font-heading font-semibold uppercase",children:e.user.email}),i.jsx("span",{className:"text-[10px] text-muted-foreground uppercase opacity-70",children:"Administrator"})]}),i.jsx("div",{className:"w-8 h-8 rounded-full bg-club-dark/5 flex items-center justify-center border border-border",children:i.jsx(Ph,{size:16,className:"text-muted-foreground"})})]})]}),i.jsx("main",{className:"flex-1 overflow-y-auto p-4 lg:p-8",children:i.jsx(nT,{})})]})]})},AP="/assets/ionos-logo-CUgfqM1t.png",IG=[{label:"Players & Staff",path:"/teams",id:"first-team-players"},{label:"Matches",path:"/matches",id:"first-team-matches"},{label:"Table",path:"/standings",id:"first-team-table"}],LG=[{label:"Whitehawk Women",path:"/teams/women",id:"teams-women"},{label:"Whitehawk U18",path:"/teams/u18",id:"teams-u18"},{label:"Youth",path:"/teams/academy",id:"teams-youth"}],PP=[{label:"First Team",path:"/teams",id:"first-team",children:IG},{label:"Teams",path:"/teams",id:"teams",children:LG},{label:"Club",path:"/club",id:"club",children:[{label:"Club Personnel",path:"/pers
877onnel",id:"club-personnel"},{label:"Match Photos",path:"/match-photos",id:"club-photos"},{label:"Hire Our Pitch",path:"/hire-pitch",id:"club-pitch"},{label:"Hire Our Clubhouse",path:"/hire-clubhouse",id:"club-clubhouse"}]},{label:"Fanzone",path:"/fanzone",id:"fanzone"},{label:"News",path:"/news",id:"news"}],OP=[{label:"Tickets",path:"https://whitehawkfc.ktckts.com/",id:"tickets"},{label:"Hospitality",path:"/hospitality",id:"hospitality"},{label:"Sponsor",path:"/sponsor",id:"sponsor"},{label:"Shop",path:"/shop",id:"shop"},{label:"Contact",path:"/contact",id:"contact"}],Hf=(e,t)=>e.filter(n=>!n.id||!t.includes(n.id)).map(n=>{var r;return{...n,children:(r=n.children)==null?void 0:r.filter(s=>!s.id||!t.includes(s.id))}}),rv=(e,t)=>e===t||e.startsWith(`${t}/`),RP=({isScrolled:e})=>{const{totalItems:t,openCart:n}=O0();return i.jsxs("button",{onClick:n,"aria-label":"Open cart",className:`relative flex items-center justify-center ml-2 text-primary-foreground/80 hover:text-primary-foreground transition-all duration-300 ${e?"p-2":"p-2.5"}`,children:[i.jsx(ed,{size:e?18:20}),t>0&&i.jsx(re.span,{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},className:"absolute -top-0.5 -right-0.5 bg-club-gold text-black text-[9px] font-extrabold font-heading w-4 h-4 rounded-full flex items-center justify-center leading-none",children:t>9?"9+":t},t)]})},FG=()=>{var w;const e=_s(),[t,n]=N.useState(!1),[r,s]=N.useState(null),[a,o]=N.useState(null);dt("club_brand");const{data:l}=dt("homepage_hero"),{data:c}=dt("menu_visibility"),u=((w=c==null?void 0:c.value)==null?void 0:w.hidden)||[],d=AP,h=Hf(PP,u),f=Hf(OP,u);N.useEffect(()=>{const j=()=>{n(window.scrollY>20)};return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[]);const p=e.pathname==="/",x=t||r!==null||!p,m=typeof window<"u"&&window.innerWidth<1024,y=l==null?void 0:l.value,g=y?m?y.mobile||y:y.desktop||y:null,v=p&&(g==null?void 0:g.background_type)==="color",b=(g==null?void 0:g.background_color)||"#8e160b";return i.jsx("header",{className:"hidden lg:block fixed top-0 left-0 right-0 z-50 transition-all duration-300",onMouseLeave:()=>{s(null),o(null)},children:i.jsxs("div",{className:`transition-all duration-300 relative w-full ${x?"shadow-xl":"bg-transparent"}`,style:{backgroundColor:x?v?b:"#8e160b":"transparent"},children:[i.jsxs("div",{className:`container mx-auto flex items-center justify-between py-0 px-8 transition-all duration-300 ${t?"h-16":"h-20 md:h-28"}`,children:[i.jsx("nav",{className:"flex-1 flex justify-end items-center gap-0",children:h.map(j=>{const E=rv(e.pathname,j.path);return i.jsx("div",{className:"group relative",onMouseEnter:()=>j.children?s(j):s(null),children:j.path.startsWith("http")?i.jsx("a",{href:j.path,target:"_blank",rel:"noopener noreferrer",className:`flex items-center gap-1.5 px-4 font-heading uppercase transition-all duration-300 border-b-3 ${t?"py-2 text-md":"py-5 text-lg"} border-transparent text-primary-foreground/80 hover:text-primary-foreground`,children:j.label}):i.jsxs(he,{to:j.path,className:`flex items-center gap-1.5 px-4 font-heading uppercase transition-all duration-300 border-b-3 ${t?"py-2 text-md":"py-5 text-lg"} ${E||(r==null?void 0:r.path)===j.path?"border-club-gold text-primary-foreground":"border-transparent text-primary-foreground/80 hover:text-primary-foreground"}`,children:[j.label,j.children&&i.jsx(il,{size:14,className:`transition-transform opacity-60 ${(r==null?void 0:r.path)===j.path?"rotate-180":""}`})]})},j.label)})}),i.jsx("div",{className:"flex-shrink-0 px-12 relative z-[60] flex items-center justify-center",children:i.jsx(he,{to:"/",className:"flex items-center justify-center",onMouseEnter:()=>s(null),children:i.jsx("img",{alt:"Whitehawk FC",className:`transition-all duration-300 object-contain ${t?"h-11 w-11":"h-16 w-16 md:h-20 md:w-20"}`,src:d})})}),i.jsxs("nav",{className:"flex-1 flex justify-start items-center gap-0",children:[f.map(j=>{const E=rv(e.pathname,j.path);return i.jsx("div",{className:"group relative",onMouseEnter:()=>j.children?s(j):s(null),children:j.path.startsWith("http")?i.jsx("a",{href:j.path,target:"_blank",rel:"noopener noreferrer",className:`flex items-center gap-1.5 px-4 font-heading uppercase transition-all duration-300 border-b-3 ${t?"py-2 text-md":"py-5 text-lg"}
877 border-transparent text-primary-foreground/80 hover:text-primary-foreground`,children:j.label}):i.jsxs(he,{to:j.path,className:`flex items-center gap-1.5 px-4 font-heading uppercase transition-all duration-300 border-b-3 ${t?"py-2 text-md":"py-5 text-lg"} ${E||(r==null?void 0:r.path)===j.path?"border-club-gold text-primary-foreground":"border-transparent text-primary-foreground/80 hover:text-primary-foreground"}`,children:[j.label,j.children&&i.jsx(il,{size:14,className:`transition-transform opacity-60 ${(r==null?void 0:r.path)===j.path?"rotate-180":""}`})]})},j.label)}),i.jsx(RP,{isScrolled:t})]})]}),i.jsx(ds,{children:r&&r.children&&i.jsx(re.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden border-t border-white/10 shadow-2xl",style:{backgroundColor:v?b:"#8e160b"},children:i.jsxs("div",{className:"container mx-auto px-8 py-16 flex border-b border-white/5",children:[i.jsx("div",{className:"w-1/3 pr-12",children:i.jsx("h2",{className:"font-heading text-8xl text-white uppercase leading-none tracking-tighter opacity-90",children:r.label})}),i.jsx("div",{className:"flex-1",children:r.label==="Teams"?i.jsxs("div",{className:"flex gap-12",children:[i.jsxs("div",{className:"w-80 space-y-6",children:[i.jsx(he,{to:"/teams/women",onMouseEnter:()=>o(null),onClick:()=>s(null),className:"block font-heading text-2xl uppercase text-white hover:text-club-gold transition-colors tracking-wider",children:"Whitehawk Women"}),i.jsx(he,{to:"/teams/u18",onMouseEnter:()=>o(null),onClick:()=>s(null),className:"block font-heading text-2xl uppercase text-white hover:text-club-gold transition-colors tracking-wider",children:"Whitehawk U18"}),i.jsxs("div",{onMouseEnter:()=>o("youth"),className:"group/youth flex items-center justify-between cursor-pointer font-heading text-2xl uppercase text-white hover:text-club-gold transition-colors tracking-wider",children:[i.jsx(he,{to:"/teams/academy",onClick:()=>{s(null),o(null)},className:"hover:text-club-gold",children:"Youth"}),i.jsx(vl,{size:18,className:"text-white/60 group-hover/youth:text-club-gold group-hover/youth:translate-x-1 transition-transform ml-2"})]})]}),i.jsx("div",{className:"flex-1 min-h-[220px]",children:i.jsx(ds,{children:a==="youth"&&i.jsxs(re.div,{initial:{opacity:0,x:-15},animate:{opacity:1,x:0},exit:{opacity:0,x:-15},transition:{duration:.2},className:"grid grid-cols-1 sm:grid-cols-2 gap-y-3.5 gap-x-12 border-l border-white/10 pl-12",children:[i.jsx("div",{className:"col-span-2 mb-2",children:i.jsx(he,{to:"/teams/academy",onClick:()=>{s(null),o(null)},className:"font-heading text-xs uppercase tracking-[0.2em] text-club-gold hover:underline font-extrabold",children:"Youth Hub Overview â"})}),i.jsx(he,{to:"/teams/academy/u16",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 16s"}),i.jsx(he,{to:"/teams/academy/u15",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 15s"}),i.jsx(he,{to:"/teams/academy/u14",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 14s"}),i.jsx(he,{to:"/teams/academy/u13",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 13s"}),i.jsx(he,{to:"/teams/academy/u13-red",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 13s Red"}),i.jsx(he,{to:"/teams/academy/u13-white",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 13s White"}),i.jsx(he,{to:"/teams/academy/u12",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 12s"}),i.jsx(he,{to:"/teams/academy/u7",onClick:()=>{s(null),o(null)},className:"block font-heading text-base uppercase text-white/85 hover:text-club-gold transition-colors tracking-wide",children:"Under 7s / Under 8s"})]})})})]}):i.jsx("div",{className:"space-y-6",children:r.children.map(j=>j.path.startsWith("http")?i.jsx("a",{href:j.path,target:"_blank",rel:"noopener noreferrer",onClick:()=>s(null),className:"block font-heading text-2xl uppercase text-white hover:text-club-gold transition-colors tracking-wider",children:j.label},j.path):i.jsx(he,{to:j.path,onClick:()=>s(null),className:"block font-heading text-2xl uppercase text-white hover:text-club-gold transition-colors tracking-wider",children:j.label},j.path))})})]})})})]})})},$G=()=>{var E;const e=_s(),[t,n]=N.useState(!1),[r,s]=N.useState(null),[a,o]=N.useState(!1),[l,c]=N.useState(!1);dt("club_brand");const{data:u}=dt("homepage_hero"),{data:d}=dt("menu_visibility"),h=((E=d==null?void 0:d.value)==null?void 0:E.hidden)||[],f=AP,p=Hf(PP,h),x=Hf(OP,h);N.useEffect(()=>{const k=()=>{c(window.scrollY>20)};return window.addEventListener("scroll",k),()=>window.removeEventListener("scroll",k)},[]);const m=e.pathname==="/",y=l||!m,g=typeof window<"u"&&window.innerWidth<1024,v=u==null?void 0:u.value,b=v?g?v.mobile||v:v.desktop||v:null,w=m&&(b==null?void 0:b.background_type)==="color",j=(b==null?void 0:b.background_color)||"#8e160b";return i.jsxs(i.Fragment,{children:[i.jsx("header",{className:`lg:hidden fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${y?"shadow-md border-b border-white/10":"bg-transparent"}`,style:{backgroundColor:y?w?j:"#8e160b":"transparent"},children:i.jsxs("div",{className:`flex items-center justify-between px-4 transition-all duration-300 relative ${l?"py-1.5":"py-3"}`,children:[i.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center",children:i.jsx(he,{to:"/",className:"flex items-center gap-3",children:i.jsx("img",{src:f,alt:"Whitehawk FC",className:`transition-all duration-300 object-contain ${l?"h-10 w-10":"h-14 w-14"}`})})}),i.jsxs("div",{className:"flex items-center gap-3 invisible",children:[" ",i.jsx("div",{className:"h-11 w-11"})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(RP,{isScrolled:l}),i.jsx("button",{onClick:()=>{t&&s(null),n(!t)},className:"text-primary-foreground p-2 relative z-50","aria-label":"Toggle navigation",children:t?i.jsx(ul,{size:28}):i.jsx(IE,{size:28})})]})]})}),i.jsx(ds,{children:t&&i.jsx(re.div,{initial:{opacity:0,y:-10}
877,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"lg:hidden fixed top-[72px] left-0 right-0 z-40 bg-club-dark/95 backdrop-blur-sm border-b border-primary/20",children:[...p,...x].map(k=>{const S=rv(e.pathname,k.path),A=r===k.label;return k.children?i.jsxs("div",{className:"border-b border-primary-foreground/10",children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-4",children:[i.jsx(he,{to:k.path,onClick:()=>n(!1),className:`font-heading text-2xl uppercase tracking-wider ${S?"text-club-gold":"text-primary-foreground/80"}`,children:k.label}),i.jsx("button",{type:"button",onClick:()=>s(A?null:k.label),className:"text-primary-foreground/80 p-2","aria-label":`Toggle ${k.label} submenu`,children:i.jsx(il,{size:18,className:A?"rotate-180 transition-transform":"transition-transform"})})]}),A?i.jsx("div",{className:"pb-3",children:k.children.map(C=>{const T=C.path.startsWith("http");return C.label==="Youth"?i.jsxs("div",{className:"w-full",children:[i.jsxs("div",{className:"flex items-center justify-between px-10 py-2",children:[i.jsxs(he,{to:C.path,onClick:()=>n(!1),className:"font-heading text-xl uppercase tracking-wider text-primary-foreground/70 hover:text-primary-foreground",children:[C.label," Hub"]}),i.jsx("button",{type:"button",onClick:()=>o(!a),className:"text-primary-foreground/60 p-2","aria-label":"Toggle Youth Teams submenu",children:i.jsx(il,{size:16,className:a?"rotate-180 transition-transform":"transition-transform"})})]}),a&&i.jsxs("div",{className:"pl-14 pb-2 space-y-2.5 border-l border-white/10 ml-10 mb-2",children:[i.jsx(he,{to:"/teams/academy/u16",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U16s"}),i.jsx(he,{to:"/teams/academy/u15",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U15s"}),i.jsx(he,{to:"/teams/academy/u14",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U14s"}),i.jsx(he,{to:"/teams/academy/u13",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U13s"}),i.jsx(he,{to:"/teams/academy/u13-red",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U13s Red"}),i.jsx(he,{to:"/teams/academy/u13-white",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U13s White"}),i.jsx(he,{to:"/teams/academy/u12",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U12s"}),i.jsx(he,{to:"/teams/academy/u7",onClick:()=>n(!1),className:"block py-1 font-heading text-lg uppercase text-primary-foreground/50 hover:text-club-gold",children:"U7 / U8s"})]})]},C.path):T?i.jsx("a",{href:C.path,target:"_blank",rel:"noopener noreferrer",onClick:()=>n(!1),className:"block px-10 py-2.5 font-heading text-xl uppercase tracking-wider text-primary-foreground/70 hover:text-primary-foreground",children:C.label},C.path):i.jsx(he,{to:C.path,onClick:()=>n(!1),className:"block px-10 py-2.5 font-heading text-xl uppercase tracking-wider text-primary-foreground/70 hover:text-primary-foreground",children:C.label},C.path)})}):null]},k.label):k.path.startsWith("http")?i.jsx("a",{href:k.path,target:"_blank",rel:"noopener noreferrer",onClick:()=>n(!1),className:"flex items-center px-6 py-4 font-heading text-2xl uppercase tracking-wider border-b border-primary-foreground/10 text-primary-foreground/80 hover:text-club-gold",children:k.label},k.path):i.jsx(he,{to:k.path,onClick:()=>n(!1),className:`flex items-center px-6 py-4 font-heading text-2xl uppercase tracking-wider border-b border-primary-foreground/10 ${S?"text-club-gold bg-primary/10":"text-primary-foreground/80"}`,children:k.label},k.path)})})})]})},zG=()=>i.jsxs(i.Fragment,{children:[i.jsx(FG,{}),i.jsx($G,{})]}),BG=()=>{var w,j,E;const{data:e,isLoading:t}=dt("fixtures_ticker"),{data:n}=dt("homepage_hero"),{nextMatch:r,isLoading:s}=ud(),[a,o]=N.useState(new Date);N.useEffect(()=>{const k=setInterval(()=>
877o(new Date),1e3);return()=>clearInterval(k)},[]);const l=N.useMemo(()=>{if(!r)return null;const k=nn(`${r.date}T${r.time}:00`),S=C0(k,a);return S<=0?null:{days:Math.floor(S/86400),hours:Math.floor(S%86400/3600),mins:Math.floor(S%3600/60),secs:S%60}},[r,a]);if(t||((w=e==null?void 0:e.value)==null?void 0:w.enabled)!==!0)return null;const c=typeof window<"u"&&window.innerWidth<1024,u=n==null?void 0:n.value,d=u?c?u.mobile||u:u.desktop||u:null,h=(d==null?void 0:d.background_type)==="color",f=(d==null?void 0:d.background_color)||"#8e160b",p=Array(6).fill(null),x=((j=r==null?void 0:r.status)==null?void 0:j.short)==="CANC",m=((E=r==null?void 0:r.status)==null?void 0:E.short)==="P-P";let y="LOADING NEXT MATCH...";if(!s)if(r){const k=r["home-team"].name==="Whitehawk"||r["home-team"].id===468,S=k?r["away-team"].name:r["home-team"].name,A=k?"HOME":"AWAY",C=Ft(nn(r.date),"EEE d MMM").toUpperCase(),T=r.competition.name.includes("Isthmian League")?"LEAGUE":"CUP";if(x)y=`â ï¸ MATCH CANCELLED: ${C} VS. ${S.toUpperCase()} (${T}) â DO NOT TRAVEL`;else if(m)y=`â ï¸ MATCH POSTPONED: ${C} VS. ${S.toUpperCase()} (${T}) â NEW DATE TBC`;else{let _="";l&&(_=` â IN ${l.days}D ${String(l.hours).padStart(2,"0")}H ${String(l.mins).padStart(2,"0")}M ${String(l.secs).padStart(2,"0")}S`),y=`NEXT ${A} GAME: ${C} VS. ${S.toUpperCase()} (${T}) â ${r.time} KO${_}`}}else y="NO UPCOMING MATCHES SCHEDULED";const g=x?"MATCH CANCELLED":m?"MATCH POSTPONED":"UP THE HAWKS!",v=x?"#dc2626":m?"#d97706":h?f:"var(--club-gold, #e8c32a)",b=x||m||h?"#ffffff":"#141b2b";return i.jsx("div",{className:"fixed top-[56px] lg:top-[96px] left-0 right-0 z-[45] overflow-hidden h-7 flex items-center transition-colors duration-500",style:{backgroundColor:v},children:i.jsx(re.div,{className:"flex items-center whitespace-nowrap",animate:{x:["0%","-50%"]},transition:{x:{repeat:1/0,repeatType:"loop",duration:45,ease:"linear"}},children:p.map((k,S)=>i.jsxs("div",{className:"flex items-center",children:[i.jsxs("span",{className:"px-4 font-heading uppercase tracking-wider flex items-center gap-2 text-xs font-semibold",style:{color:b},children:[i.jsx("span",{className:"inline-block w-3.5 h-3.5 rounded-sm overflow-hidden",children:i.jsx("img",{alt:"",className:"w-full h-full object-contain",src:`https://img.icons8.com/?size=100&id=2865&format=png&color=${x||m||h?"ffffff":"000000"}`})}),y]}),i.jsx("span",{className:"px-4 font-heading uppercase tracking-widest font-bold text-xs py-0.5 px-3 rounded-sm",style:{backgroundColor:x||m?"rgba(0,0,0,0.3)":h?"rgba(255,255,255,0.1)":"#141b2b",color:x||m||h?"#ffffff":"#e8c32a"},children:g})]},S))})})},UG=[{heading:"Whitehawk FC",links:[{label:"News",path:"/news"},{label:"First Team",path:"/teams/first-team"},{label:"Matches & Results",path:"/matches"},{label:"The Club",path:"/club"},{label:"Tickets",path:"/tickets"},{label:"Hire Our Pitch",path:"/hire-pitch"},{label:"Hire Our Clubhouse",path:"/hire-clubhouse"},{label:"Contact Us",path:"/contact"}]},{heading:"Partners",links:[{label:"Sponsorship Packages",path:"/sponsor"},{label:"Become a Sponsor",path:"/sponsor"},{label:"Community",path:"/club"}]},{heading:"Legal",links:[{label:"Terms & Conditions",path:"/terms"},{label:"Refund & Return Policy",path:"/refund-policy"},{label:"Delivery Terms",path:"/delivery-terms"},{label:"Privacy Policy",path:"/privacy-policy"},{label:"Cookie Policy",path:"/cookie-policy"},{label:"Safeguarding",path:"/safeguarding"}]}],qG=[{key:"facebook",Icon:DE,label:"Facebook"},{key:"instagram",Icon:F3,label:"Instagram"},{key:"twitter",Icon:iI,label:"X / Twitter"},{key:"youtube",Icon:qE,label:"YouTube"},{key:"tiktok",Icon:X3,label:"TikTok"},{key:"linkedin",Icon:U3,label:"LinkedIn"}],VG=()=>{const{data:e}=dt("club_socials"),t=(e==null?void 0:e.value)||{},n=qG.filter(({key:r})=>!!t[r]);return i.jsxs("footer",{className:"bg-[#0d1526]",children:[n.length>0&&i.jsx("div",{className:"bg-white border-b border-gray-200 py-8",children:i.jsx("div",{className:"container mx-auto px-6 max-w-6xl flex justify-center",children:i.jsx("div",{className:"flex items-center gap-7",children:n.map(({key:r,Icon:s,label:a})=>i.jsx("a",{href:t[r],target:"_blank",rel:"noreferrer","aria-label":a,className:"text-[#141b2b]/50 hover:text-[#8e160b] transition-colors duration-200",children:i.jsx(s,{size:20})},r))})})}),i.jsx("div",{className:"container mx-auto px-6 max-w-6xl py-14",children:i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-10",children:[UG.map(r=>i.jsxs("div",{children:[i.jsx("h5",{className:"font-heading text-[11px] uppercase tracking-[0.18em] text-[#8e160b] mb-5 font-semibold",children:r.heading}),i.jsx("ul",{className:"space-y-3",children:r.links.map(s=>i.jsx("li",{children:i.jsx(he,{to:s.path,className:"text-white/50 hover:text-white text-sm font-body transition-colors duration-200 leading-snug",children:s.label})},s.label))})]},r.heading)),i.jsx("div",{className:"flex items-start justify-end",children:i.jsx(he,{to:"/",children:i.jsx("img",{src:YA,alt:"Whitehawk FC",className:"h-28 w-28 object-contain opacity-90 hover:opacity-100 transition-opacity duration-300"})})})]})}),i.jsx("div",{className:"border-t border-white/8",children:i.jsxs("div",{className:"container mx-auto px-6 max-w-6xl py-6 flex flex-col md:flex-row items-start md:items-center justify-between gap-4",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsxs("p",{className:"text-white/25 text-xs font-body",children:["© ",new Date().getFullYear()," Whitehawk Football Club. All rights reserved."]}),i.jsx("p",{className:"text-white/20 text-[11px] font-body leading-normal max-w-xl",children:"WHITEHAWK FOOTBALL CLUB LIMITED (Company No: 14984206)."})]}),i.jsxs("div",{className:"text-left md:text-right space-y-1 self-start md:self-center",children:[i.jsx("p",{className:"text-white/25 text-[11px] font-body",children:"Designed & Built by Henry Summers"}),i.jsx("p",{className:"text-white/20 text-xs font-body",children:"The Enclosed Ground, East Brighton Park, Brighton, BN2 5TS"})]})]})})]})}
877,WG=()=>{const{items:e,removeItem:t,updateQuantity:n,clearCart:r,totalItems:s,totalPrice:a,isOpen:o,closeCart:l}=O0(),[c,u]=N.useState(!1),[d,h]=N.useState(""),[f,p]=N.useState(""),[x,m]=N.useState(""),[y,g]=N.useState(""),[v,b]=N.useState(""),[w,j]=N.useState(""),[E,k]=N.useState(""),[S,A]=N.useState(""),[C,T]=N.useState("standard"),[_,P]=N.useState(""),[O,I]=N.useState(!1),[B,$]=N.useState(null),q=()=>{h(""),p(""),u(!0),$(null)},L=async()=>{I(!0),$(null);try{const D=(()=>{try{const W=localStorage.getItem("checkoutInfo");return W?JSON.parse(W):{}}catch{return{}}})(),R=await fetch("/mypos-checkout.php",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:e.map(W=>({name:W.name,price:W.price,quantity:W.quantity,size:W.size})),email:d,name:x,address1:y,address2:v,city:w,postcode:E,country:S,shippingOption:C})});try{localStorage.removeItem("checkoutInfo")}catch{}const F=await R.text();let U;try{U=JSON.parse(F)}catch{throw new Error("Unexpected response from checkout server. Please try again.")}if(!R.ok||U.error)throw new Error(U.error||"Checkout failed. Please try again.");if(!U.url||!U.params)throw new Error("Invalid checkout response. Please contact the club.");const V=document.createElement("form");V.method="POST",V.action=U.url,V.style.display="none",Object.entries(U.params).forEach(([W,M])=>{const z=document.createElement("input");z.type="hidden",z.name=W,z.value=String(M),V.appendChild(z)}),document.body.appendChild(V),V.submit()}catch(D){I(!1),$(D instanceof Error?D.message:"An unexpected error occurred.")}};return i.jsxs(i.Fragment,{children:[i.jsx(ds,{children:o&&i.jsx(re.div,{initial:{opacity:0}
877,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm",onClick:l},"backdrop")}),i.jsx(ds,{children:o&&i.jsxs(re.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md z-[70] bg-white shadow-2xl flex flex-col",children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-slate-100",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(ed,{size:20,className:"text-[#8e160b]"}),i.jsx("h2",{className:"font-heading text-lg font-bold uppercase tracking-wider text-black",children:"Your Cart"}),s>0&&i.jsx("span",{className:"bg-[#8e160b] text-white text-xs font-bold font-heading w-5 h-5 rounded-full flex items-center justify-center",children:s})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[e.length>0&&i.jsx("button",{onClick:r,className:"text-xs font-heading uppercase tracking-wider text-slate-400 hover:text-[#8e160b] transition-colors px-2 py-1",children:"Clear All"}),i.jsx("button",{onClick:l,className:"p-2 rounded-full hover:bg-slate-100 text-slate-500 hover:text-black transition-colors","aria-label":"Close cart",children:i.jsx(ul,{size:20})})]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:e.length===0?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-5 px-6 text-center",children:[i.jsx("div",{className:"w-20 h-20 rounded-full bg-slate-100 flex items-center justify-center",children:i.jsx(Q3,{size:32,className:"text-slate-300"})}),i.jsx("p",{className:"font-heading text-base font-bold uppercase text-black mb-1",children:"Your cart is empty"}),i.jsx("p",{className:"font-body text-sm text-slate-500",children:"Add some Hawks gear to get started!"})]}),i.jsx(le,{onClick:l,className:"bg-[#8e160b] hover:bg-[#8e160b]/90 text-white font-heading uppercase text-xs tracking-widest h-11 px-6",children:"Browse the Shop"})]}):i.jsx("div",{className:"divide-y divide-slate-100",children:e.map(D=>i.jsxs(re.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,x:40},className:"flex gap-4 px-6 py-5",children:[i.jsx("div",{className:"w-20 h-20 rounded-xl overflow-hidden bg-slate-100 shrink-0 border border-slate-100",children:i.jsx("img",{src:D.image,alt:D.name,className:"w-full h-full object-cover"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("span",{className:"font-heading text-[9px] text-[#8e160b] font-bold uppercase tracking-widest",children:D.category}),i.jsx("h3",{className:"font-heading text-sm font-bold text-black uppercase leading-tight mt-0.5 line-clamp-2",children:D.name}),D.size&&i.jsxs("p",{className:"font-body text-[10px] text-slate-400 uppercase tracking-wider mt-0.5",children:["Size: ",D.size]}),i.jsxs("p",{className:"font-heading text-sm font-bold text-[#8e160b] mt-1",children:["£",(D.price*D.quantity).toFixed(2)]}),i.jsxs("div",{className:"flex items-center gap-0 mt-3",children:[i.jsx("button",{onClick:()=>n(D.id,D.quantity-1),className:"w-7 h-7 rounded-l-lg border border-slate-200 flex items-center justify-center hover:bg-slate-100 transition-colors",children:i.jsx(K3,{size:12})}),i.jsx("span",{className:"w-8 h-7 border-t border-b border-slate-200 flex items-center justify-center font-heading text-xs font-bold",children:D.quantity}),i.jsx("button",{onClick:()=>n(D.id,D.quantity+1),className:"w-7 h-7 rounded-r-lg border border-slate-200 flex items-center justify-center hover:bg-slate-100 transition-colors",children:i.jsx(vs,{size:12})}),i.jsx("button",{onClick:()=>t(D.id),className:"ml-3 p-1.5 rounded-lg hover:bg-red-50 text-slate-300 hover:text-[#8e160b] transition-colors",children:i.jsx(Pi,{size:14})})]})]})]},D.id))})}),e.length>0&&i.jsxs("div",{className:"border-t border-slate-100 px-6 py-6 bg-white",children:[i.jsxs("div",{className:"space-y-2 mb-6",children:[i.jsxs("div",{className:"flex justify-between items-center text-sm",children:[i.jsxs("span",{className:"font-body text-slate-500",children:["Subtotal (",s," ",s===1?"item":"items",")"]}),i.jsxs("span",{className:"font-heading font-bold text-black",children:["£",a.toFixed(2)]})]}),i.jsxs("div",{className:"flex justify-between items-center text-sm",children:[i.jsx("span",{className:"font-body text-slate-500",children:"Shipping"}),i.jsx("span",{className:"font-heading font-bold text-green-600 text-xs uppercase tracking-wide",children:"Calculated at checkout"})]}),i.jsxs("div",{className:"border-t border-slate-100 pt-2 flex justify-between items-center",children:[i.jsx("span",{className:"font-heading text-base font-bold uppercase text-black",children:"Total"}),i.jsxs("span",{className:"font-heading text-xl font-extrabold text-[#8e160b]",children:["£",a.toFixed(2)]})]})]}),i.jsxs(le,{onClick:q,className:"w-full h-13 bg-[#8e160b] hover:bg-[#8e160b]/90 text-white font-heading uppercase text-xs tracking-widest h-12 flex items-center justify-center gap-2 shadow-lg shadow-[#8e160b]/20",children:[i.jsx(Hx,{size:16})," Checkout via myPOS ",i.jsx(bf,{size:14})]}),i.jsx("button",{onClick:l,className:"w-full mt-3 font-heading text-xs uppercase tracking-widest text-slate-400 hover:text-black transition-colors py-2",children:"Continue Shopping"}),i.jsxs("div",{className:"flex items-center justify-center gap-4 mt-4 pt-4 border-t border-slate-100",children:[i.jsx("span",{className:"font-body text-[10px] text-slate-400 flex items-center gap-1",children:"ð Secure Checkout"}),i.jsx("span",{className:"font-body text-[10px] text-slate-400 flex items-center gap-1",children:"ð³ myPOS Protected"}),i.jsx("span",{className:"font-body text-[10px] text-slate-400 flex items-center gap-1",children:"ð¦ UK Delivery"})]})]})]},"drawer")}),i.jsx(ds,{children:c&&i.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:i.jsxs(re.div,{initial:{scale:.9,opacity:0}
877,animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"bg-white rounded-3xl shadow-2xl w-full max-w-md md:max-w-lg lg:max-w-4xl border border-slate-100 overflow-hidden",children:[i.jsx("button",{onClick:()=>{O||u(!1)},disabled:O,className:"absolute top-4 right-4 p-2 rounded-full hover:bg-slate-100 text-slate-400 hover:text-black transition-colors disabled:opacity-30",children:i.jsx(ul,{size:20})}),i.jsxs("div",{className:"p-8 grid gap-6 md:grid-cols-2",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"nameInput",children:"Full name"}),i.jsx("input",{id:"nameInput",type:"text",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",placeholder:"John Doe",value:x,onChange:D=>{m(D.target.value),_&&P("")}})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"address1Input",children:"Address line 1"}),i.jsx("input",{id:"address1Input",type:"text",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",placeholder:"123 Main St",value:y,onChange:D=>{g(D.target.value),_&&P("")}})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"address2Input",children:"Address line 2 (optional)"}),i.jsx("input",{id:"address2Input",type:"text",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",placeholder:"Apartment, suite, etc.",value:v,onChange:D=>b(D.target.value)})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"cityInput",children:"City"}),i.jsx("input",{id:"cityInput",type:"text",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",placeholder:"London",value:w,onChange:D=>{j(D.target.value),_&&P("")}})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"postcodeInput",children:"Postcode"}),i.jsx("input",{id:"postcodeInput",type:"text",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",placeholder:"SW1A 1AA",value:E,onChange:D=>{k(D.target.value),_&&P("")}})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"countryInput",children:"Country"}),i.jsx("input",{id:"countryInput",type:"text",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",placeholder:"United Kingdom",value:S,onChange:D=>{A(D.target.value),_&&P("")}})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"shippingSelect",children:"Shipping"}),i.jsxs("select",{id:"shippingSelect",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",value:C,onChange:D=>T(D.target.value),children:[i.jsx("option",{value:"standard",children:"Standard â free"}),i.jsx("option",{value:"express",children:"Express â +£5.00"})]})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"emailInput",children:"Email address"}),i.jsx("input",{id:"emailInput",type:"email",className:"w-full rounded-md border-gray-300 shadow-sm focus:border-[#8e160b] focus:ring-[#8e160b]",placeholder:"[email protected]",value:d,onChange:D=>{h(D.target.value),f&&p("")}}),f&&i.jsx("p",{className:"mt-1 text-sm text-red-600",children:f}),_&&i.jsx("p",{className:"mt-1 text-sm text-red-600",children:_})]}),i.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#8e160b] flex items-center justify-center",children:i.jsx(Hx,{size:15,className:"text-white"})}),i.jsx("span",{className:"font-heading text-xs uppercase font-extrabold tracking-widest text-[#8e160b]",children:"myPOS Secure Checkout"})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsx("h3",{className:"font-heading text-2xl font-bold uppercase text-black mb-2",children:"Order Summary"}),i.jsx("p",{className:"font-body text-sm text-slate-500 mb-6 leading-relaxed",children:'Review your order below. Clicking "Pay with myPOS" will redirect you to the secure myPOS payment page.'}),i.jsxs("div",{className:"bg-slate-50 rounded-2xl p-4 mb-6 space-y-3",children:[e.map(D=>i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("img",{src:D.image,alt:D.name,className:"w-10 h-10 object-cover rounded-lg border border-slate-200"}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-heading text-xs font-bold uppercase text-black truncate",children:D.name}),i.jsxs("p",{className:"font-body text-[10px] text-slate-500",children:[D.size&&`Size: ${D.size} | `,"Qty: ",D.quantity]})]}),i.jsxs("span",{className:"font-heading text-sm font-bold text-[#8e160b]",children:["£",(D.price*D.quantity).toFixed(2)]})]},D.id)),i.jsxs("div",{className:"border-t border-slate-200 pt-3 flex justify-between",children:[i.jsx("span",{className:"font-heading text-sm font-bold uppercase",children:"Total"}),i.jsxs("span",{className:"font-heading text-base font-extrabold text-[#8e160b]",children:["£",a.toFixed(2)]})]})]}),B&&i.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-3 mb-4",children:i.jsx("p",{className:"font-body text-xs text-red-600",children:B})}),i.jsxs("div",{className:"flex flex-col gap-3",children:[i.jsx(le,{onClick:()=>
877{if(!x.trim()||!y.trim()||!w.trim()||!E.trim()||!S.trim()){P("Please complete all required address fields");return}if(!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(d)){p("Please enter a valid email address");return}L()},disabled:O,className:"w-full h-12 bg-[#8e160b] hover:bg-[#8e160b]/90 text-white font-heading uppercase text-xs tracking-widest gap-2 flex items-center justify-center disabled:opacity-60",children:O?i.jsxs(i.Fragment,{children:[i.jsx(Ie,{size:15,className:"animate-spin"})," Redirecting to myPOSâ¦"]}):i.jsxs(i.Fragment,{children:["Pay with myPOS ",i.jsx(bf,{size:14})]})}),i.jsx(le,{variant:"outline",onClick:()=>u(!1),disabled:O,className:"w-full h-12 font-heading uppercase text-xs tracking-widest border-slate-200 text-slate-600 disabled:opacity-30 mt-3",children:"Back to Cart"}),i.jsx("p",{className:"font-body text-[10px] text-slate-400 text-center mt-4",children:"ð You will be securely redirected to myPOS to enter your card details. We never store payment information."})]})]})]})]})})})]})},HG=()=>{const e=_s(),{data:t}=dt("homepage_hero");N.useEffect(()=>{window.scrollTo(0,0)},[e.pathname]);const n=e.pathname==="/",r=typeof window<"u"&&window.innerWidth<1024,s=t==null?void 0:t.value,a=s?r?s.mobile||s:s.desktop||s:null,o=n&&(a==null?void 0:a.background_type)==="color",l=(a==null?void 0:a.background_color)||"#8e160b";return i.jsx(pG,{children:i.jsxs("div",{className:`min-h-screen flex flex-col transition-colors duration-500 ${n?"":"bg-white"}`,style:{backgroundColor:o?l:n?"#000000":"#ffffff"},children:[i.jsx(zG,{}),i.jsx(BG,{}),i.jsx("main",{className:"flex-1 pt-[82px] lg:pt-[114px]",children:i.jsx(nT,{})}),i.jsx(VG,{}),i.jsx(WG,{})]})})};var KG="Label",MP=N.forwardRef((e,t)=>i.jsx(Oe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));MP.displayName=KG;var DP=MP;const GG=Cb("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),He=N.forwardRef(({className:e,...t},n)=>i.jsx(DP,{ref:n,className:Pe(GG(),e),...t}));He.displayName=DP.displayName;var YG=Object.defineProperty,XG=Object.defineProperties,QG=Object.getOwnPropertyDescriptors,Kf=Object.getOwnPropertySymbols,IP=Object.prototype.hasOwnProperty,LP=Object.prototype.propertyIsEnumerable,sv=(e,t,n)=>t in e?YG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tn=(e,t)=>{for(var n in t||(t={}))IP.call(t,n)&&sv(e,n,t[n]);if(Kf)for(var n of Kf(t))LP.call(t,n)&&sv(e,n,t[n]);return e},FP=(e,t)=>XG(e,QG(t)),JG=(e,t)=>{var n={};for(var r in e)IP.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kf)for(var r of Kf(e))t.indexOf(r)<0&&LP.call(e,r)&&(n[r]=e[r]);return n},Rt=(e,t,n)=>(sv(e,typeof t!="symbol"?t+"":t,n),n),fl=(e,t,n)=>new Promise((r,s)=>{var a=c=>{try{l(n.next(c))}catch(u){s(u)}},o=c=>{try{l(n.throw(c))}catch(u){s(u)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(a,o);l((n=n.apply(e,t)).next())}),ZG="hCaptcha-script",Bh="hCaptchaOnLoad",vk="script-error",Hs="@hCaptcha/loader";function eY(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function $P(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function zP(e){return e||document.head}function tY(e){var t;e.setTag("source",Hs),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",Tn({},nY())),e.setContext("device",FP(Tn({},sY()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function nY(){var e,t,n,r,s,a;let o=navigator.userAgent,l,c;return o.indexOf("Firefox")!==-1?(l="Firefox",c=(e=o.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):o.indexOf("Edg")!==-1?(l="Microsoft Edge",c=(t=o.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):o.indexOf("Chrome")!==-1&&o.indexOf("Safari")!==-1?(l="Chrome",c=(n=o.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):o.indexOf("Safari")!==-1&&o.indexOf("Chrome")===-1?(l="Safari",c=(r=o.match(/Version\/([\d.]+)/))==null?void 0:r[1]):o.indexOf("Opera")!==-1||o.indexOf("OPR")!==-1?(l="Opera",c=(s=o.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:s[2]):o.indexOf("MSIE")!==-1||o.indexOf("Trident")!==-1?(l="Internet Explorer",c=(a=o.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:a[2]):(l="Unknown",c="Unknown"),{name:l,version:c}}function rY(e){return new Promise(t=>setTimeout(t,e))}function sY(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var iY=class BP{constructor(t){Rt(this,"_parent"),Rt(this,"breadcrumbs",[]),Rt(this,"context",{}),Rt(this,"extra",{}),Rt(this,"tags",{}),Rt(this,"request"),Rt(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new BP(this)}
877setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=Tn(Tn({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((r,s)=>{var a;return r.breadcrumbs=[...(a=r.breadcrumbs)!=null?a:[],...s.breadcrumbs],r.extra=Tn(Tn({},r.extra),s.extra),r.contexts=Tn(Tn({},r.contexts),s.context),r.tags=Tn(Tn({},r.tags),s.tags),s.user&&(r.user=s.user),s.request&&(r.request=s.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},aY=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oY=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,lY=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cY=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,ah="?",bk="An unknown error occurred",uY="0.0.4";function dY(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function Xt(e){return(e+256).toString(16).substring(1)}function hY(){let e=dY(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Xt(e[0])+Xt(e[1])+Xt(e[2])+Xt(e[3])+"-"+Xt(e[4])+Xt(e[5])+"-"+Xt(e[6])+Xt(e[7])+"-"+Xt(e[8])+Xt(e[9])+"-"+Xt(e[10])+Xt(e[11])+Xt(e[12])+Xt(e[13])+Xt(e[14])+Xt(e[15])}var fY=[[aY,"chrome"],[lY,"winjs"],[oY,"gecko"]];function pY(e){var t,n,r,s;if(!e.stack)return null;let a=[],o=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,` 878`))!=null?r:[];for(let l=0;l<o.length;++l){let c=null,u=null,d=null;for(let[h,f]of fY)if(u=h.exec(o[l]),u){d=f;break}if(!(!u||!d)){if(d==="chrome")c={filename:(s=u[2])!=null&&s.startsWith("address at ")?u[2].substring(11):u[2],function:u[1]||ah,lineno:u[3]?+u[3]:null,colno:u[4]?+u[4]:null};else if(d==="winjs")c={filename:u[2],function:u[1]||ah,lineno:+u[3],colno:u[4]?+u[4]:null};else if(d==="gecko")l===0&&!u[5]&&e.columnNumber!==void 0&&a.length>0&&(a[0].column=e.columnNumber+1),c={filename:u[3],function:u[1]||ah,lineno:u[4]?+u[4]:null,colno:u[5]?+u[5]:null};else continue;!c.function&&c.lineno&&(c.function=ah),a.push(c)}}return a.length?a.reverse():null}function mY(e){let t=pY(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function gY(e){let t=cY.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let r=n[5].split("/"),s=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(s?"/"+s:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function xY(e,t,n){var r,s;let a=Tn({event_id:hY().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:uY},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){a.message=(s=(r=e.error)==null?void 0:r.message)!=null?s:"Unknown error",a.fingerprint=[a.message];let o=[],l=e.error;for(let c=0;c<5&&l&&(o.push(mY(l)),!(!l.cause||!(l.cause instanceof Error)));c++)l=l.cause;a.exception={values:o.reverse()}}return e.type==="message"&&(a.message=e.message,a.level=e.level),a}function yY(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
878if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:r}=n,s=JG(n,["message"]),a=new Error(typeof r=="string"?r:bk);return Object.assign(a,s)}let t=new Error(bk);return Object.assign(t,{cause:e})}function vY(e,t,n){return fl(this,null,function*(){var r,s;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let a;if(n){let c=new AbortController;a=c.signal,setTimeout(()=>c.abort(),n)}let o=yield fetch(e,FP(Tn({},t),{signal:a})),l=yield o.text();return{status:o.status,body:l}}return yield new Promise((a,o)=>{var l,c;let u=new XMLHttpRequest;if(u.open((l=t==null?void 0:t.method)!=null?l:"GET",e),u.onload=()=>a({status:u.status,body:u.responseText}),u.onerror=()=>o(new Error("XHR Network Error")),t==null?void 0:t.headers)for(let[d,h]of Object.entries(t.headers))u.setRequestHeader(d,h);if(n){let d=setTimeout(()=>{u.abort(),o(new Error("Request timed out"))},n);u.onloadend=()=>{clearTimeout(d)}}u.send((c=t==null?void 0:t.body)==null?void 0:c.toString())})}catch(a){return{status:0,body:(s=(r=a==null?void 0:a.toString)==null?void 0:r.call(a))!=null?s:"Unknown error"}}})}var mn,iv=(mn=class{constructor(e){Rt(this,"apiURL"),Rt(this,"dsn"),Rt(this,"environment"),Rt(this,"release"),Rt(this,"sampleRate"),Rt(this,"debug"),Rt(this,"_scope"),Rt(this,"shouldBuffer",!1),Rt(this,"bufferlimit",20),Rt(this,"buffer",[]);var t,n,r,s,a;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(r=e.scope)!=null?r:new iY,this.apiURL=gY(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(s=e.buffer)!=null?s:!1,this.bufferlimit=(a=e.bufferLimit)!=null?a:20}static init(e){mn._instance||(mn._instance=new mn(e))}static get instance(){if(!mn._instance)throw new Error("Sentry has not been initialized");return mn._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return mn.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){mn.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:yY(e),scope:t??this._scope})}static captureException(e,t){mn.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){mn.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return fl(this,null,function*(){try{this.log("Sending sentry event",e);let n=xY(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},s={type:"event"},a=JSON.stringify(r)+` 879`+JSON.stringify(s)+` 880`+JSON.stringify(n),o=yield vY(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:a},t);this.log("Sentry response",o.status),o.status!==200&&(console.log(o.body),console.error("Failed to send event to Sentry",o))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return fl(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return mn.instance.flush(e)}static reset(){mn._instance=void 0}},Rt(mn,"_instance"),mn),bY="https://[email protected]/6",wY="2.3.0",jY="production";function NY(e=!0){if(!e)return wk();iv.init({dsn:bY,release:wY,environment:jY});let t=iv.scope;return tY(t),wk(t)}function wk(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&iv.captureException(t,e)}}}function kY({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r="anonymous",apihost:s="https://js.hcaptcha.com",cleanup:a=!1,secureApi:o=!1,scriptSource:l=""}={},c){let u=zP(e),d=$P(u);return new Promise((h,f)=>{let p=d.document.createElement("script");p.id=ZG,l?p.src=`${l}?onload=${Bh}`:o?p.src=`${s}/1/secure-api.js?onload=${Bh}`:p.src=`${s}/1/api.js?onload=${Bh}`,p.crossOrigin=r,p.async=n;let x=(m,y)=>{try{!o&&a&&u.removeChild(p),y(m)}catch(g){f(g)}};p.onload=m=>x(m,h),p.onerror=m=>{c&&c(p.src),x(m,f)},p.src+=t!==""?`&${t}`:"",u.appendChild(p)})}var oh=[];function SY(e={cleanup:!1},t){try{t.addBreadcrumb({category:Hs,message:"hCaptcha loader params",data:e});let n=zP(e.scriptLocation),r=$P(n),s=oh.find(({scope:o})=>o===r.window);if(s)return t.addBreadcrumb({category:Hs,message:"hCaptcha already loaded"}),s.promise;let a=new Promise((o,l)=>fl(this,null,function*(){try{r.window[Bh]=()=>{t.addBreadcrumb({category:Hs,message:"hCaptcha script called onload function"}),o(r.window.hcaptcha)};let c=eY({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield kY(Tn({query:c},e),u=>{t.captureRequest({url:u,method:"GET"})}),t.addBreadcrumb({category:Hs,message:"hCaptcha loaded",data:s})}catch{t.addBreadcrumb({category:Hs,message:"hCaptcha failed to load"});let u=oh.findIndex(d=>d.scope===r.window);u!==-1&&oh.splice(u,1),l(new Error(vk))}}));return oh.push({promise:a,scope:r.window}),a}catch(n){return t.captureException(n),Promise.reject(new Error(vk))}}function UP(e,t,n=0){return fl(this,null,function*(){var r,s;let a=(r=e.maxRetries)!=null?r:2,o=(s=e.retryDelay)!=null?s:1e3,l=n<a?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield SY(e,t)}catch(c){return t.addBreadcrumb({category:Hs,message:l}),n>=a?(t.captureException(c),Promise.reject(c)):(t.addBreadcrumb({category:Hs,message:`Waiting ${o}ms before retry attempt ${n+1}`}),yield rY(o),n+=1,UP(e,t,n))}})}function _Y(){return fl(this,arguments,function*(e={}){let t=NY(e.sentry);return yield UP(e,t)})}function jk(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function Nk(e){return e||document.head}var EY=class extends N.Component{constructor(e){super(e),this._hcaptcha=void 0,this.renderCaptcha=this.renderCaptcha.bind(this),this.resetCaptcha=this.resetCaptcha.bind(this),this.removeCaptcha=this.removeCaptcha.bind(this),this.isReady=this.isReady.bind(this),this._onReady=null,this.loadCaptcha=this.loadCaptcha.bind(this),this.handleOnLoad=this.handleOnLoad.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleExpire=this.handleExpire.bind(this),this.handleError=this.handleError.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.handleChallengeExpired=this.handleChallengeExpired.bind(this),this.ref=N.createRef(),this.apiScriptRequested=!1,this.sentryHub=null,this.captchaId="",this._pendingExecute=null,this.state={isApiReady:!1,isRemoved:!1,elementId:e.id}}componentDidMount(){let e=Nk(this.props.scriptLocation),t=jk(e);if(this._hcaptcha=t.window.hcaptcha||void 0,typeof this._hcaptcha<"u"){this.setState({isApiReady:!0},()=>{this.renderCaptcha()});return}this.loadCaptcha()}componentWillUnmount(){let e=this._hcaptcha,t=this.captchaId;if(this._cancelPendingExecute("react-component-unmounted"),!!this.isReady())try{e.reset(t),e.remove(t)}catch{}finally{this.captchaId="",this._onReady=null}}shouldComponentUpdate(e,t){return!(this.state.isApiReady!==t.isApiReady||this.state.isRemoved!==t.isRemoved)}componentDidUpdate(e){["sitekey","size","theme","tabindex","languageOverride","endpoint"].every(t=>e[t]===this.props[t])||this.removeCaptcha(()=>{this.renderCaptcha()})}loadCaptcha(){if(this.apiScriptRequested)return;let{apihost:e,assethost:t,endpoint:n,host:r,imghost:s,languageOverride:a,reCaptchaCompat:o,reportapi:l,sentry:c,custom:u,loadAsync:d,scriptLocation:h,scriptSource:f,secureApi:p,cleanup:x=!0,userJourneys:m}=this.props;_Y({render:"explicit",apihost:e,assethost:t,endpoint:n,hl:a,host:r,imghost:s,recaptchacompat:o===!1?"off":null,reportapi:l,sentry:c,custom:u,loadAsync:d,scriptLocation:h,scriptSource:f,secureApi:p,cleanup:x,uj:m!==void 0?m:!1}).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}renderCaptcha(e){let{onReady:t}=this.props,{isApiReady:n}=this.state,r=this.captchaId;if(!n||r)return;
880let s=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),a=this._hcaptcha.render(this.ref.current,s);this.captchaId=a,this.setState({isRemoved:!1},()=>{e&&e(),t&&t(),this._onReady&&this._onReady(a)})}resetCaptcha(){let e=this._hcaptcha,t=this.captchaId;this.isReady()&&(e.reset(t),this._cancelPendingExecute("hcaptcha-reset"))}removeCaptcha(e){let t=this._hcaptcha,n=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},()=>{this.captchaId="",t.remove(n),e&&e()})}handleOnLoad(){this.setState({isApiReady:!0},()=>{let e=Nk(this.props.scriptLocation),t=jk(e);this._hcaptcha=t.window.hcaptcha,this.renderCaptcha(()=>{let{onLoad:n}=this.props;n&&n()})})}handleSubmit(e){let{onVerify:t}=this.props,{isRemoved:n}=this.state,r=this._hcaptcha,s=this.captchaId;if(typeof r>"u"||n)return;let a=r.getResponse(s),o=r.getRespKey(s);t&&t(a,o)}handleExpire(){let{onExpire:e}=this.props,t=this._hcaptcha,n=this.captchaId;this.isReady()&&(t.reset(n),e&&e())}handleError(e){let{onError:t}=this.props,n=this._hcaptcha,r=this.captchaId;this.isReady()&&n.reset(r),t&&t(e)}isReady(){let{isApiReady:e,isRemoved:t}=this.state;return e&&!t}_cancelPendingExecute(e){if(!this._pendingExecute)return;let t=this._pendingExecute;this._pendingExecute=null;let n=new Error(e);t.reject(n)}handleOpen(){!this.isReady()||!this.props.onOpen||this.props.onOpen()}handleClose(){!this.isReady()||!this.props.onClose||this.props.onClose()}handleChallengeExpired(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()}execute(e=null){e=typeof e=="object"?e:null;try{let t=this._hcaptcha,n=this.captchaId;if(e&&e.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return e&&e.async?new Promise((s,a)=>{this._pendingExecute={resolve:s,reject:a},this._onReady=o=>{if(this._pendingExecute)try{let l=t.execute(o,e);l&&typeof l.then=="function"?l.then(c=>{this._pendingExecute=null,s(c)}).catch(c=>{this._pendingExecute=null,a(c)}):(this._pendingExecute=null,a(new Error("hcaptcha-execute-no-promise")))}catch(l){this._pendingExecute=null,a(l)}}}):(this._onReady=s=>{t.execute(s,e)},null);let r=t.execute(n,e);return e&&e.async&&r&&typeof r.then=="function"?new Promise((s,a)=>{this._pendingExecute={resolve:s,reject:a},r.then(o=>{this._pendingExecute=null,s(o)}).catch(o=>{this._pendingExecute=null,a(o)})}):r}catch(t){return e&&e.async?Promise.reject(t):null}}close(){let e=this._hcaptcha,t=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return e.close(t)}setData(e){let t=this._hcaptcha,n=this.captchaId;this.isReady()&&(e&&typeof e!="object"&&(e=null),t.setData(n,e))}getResponse(){return this._hcaptcha.getResponse(this.captchaId)}getRespKey(){return this._hcaptcha.getRespKey(this.captchaId)}render(){let{elementId:e}=this.state;return N.createElement("div",{ref:this.ref,id:e})}};N.createContext();var CY=EY;const TY=()=>{const[e,t]=N.useState(""),[n,r]=N.useState(""),[s,a]=N.useState(""),[o,l]=N.useState(!1),c=Bp(),u=async d=>{d.preventDefault(),l(!0);try{const{error:h}=await ue.auth.signInWithPassword({email:e,password:n});if(h)throw h;ie.success("Welcome back, Hawk!"),c("/admin")}catch(h){ie.error(h.message||"Invalid credentials")}finally{l(!1)}};return i.jsxs("div",{className:"min-h-screen bg-club-dark flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-trans
880parent to-primary/5 pointer-events-none"}),i.jsxs(re.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"w-full max-w-md bg-[#0a0a0a] border border-white/10 rounded-2xl p-8 shadow-2xl relative z-10",children:[i.jsxs("div",{className:"flex flex-col items-center mb-8",children:[i.jsx("div",{className:"w-20 h-20 bg-white/10 backdrop-blur-sm rounded-full flex items-center justify-center mb-6 shadow-xl border border-white/10 p-1",children:i.jsx("img",{src:"https://thehawksfc.com/wp-content/uploads/2023/04/cropped-twitter-badge-round.png",alt:"Whitehawk FC",className:"w-full h-full object-contain"})}),i.jsx("h1",{className:"font-heading text-2xl md:text-3xl font-bold uppercase text-white tracking-widest",children:"Hawks Admin"}),i.jsx("p",{className:"text-white/50 text-xs font-heading uppercase tracking-widest mt-1",children:"Official Content Management"})]}),i.jsxs("form",{onSubmit:u,className:"space-y-6",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(He,{htmlFor:"email",className:"text-white/70 text-[10px] uppercase tracking-widest font-heading ml-1",children:"Email Address"}),i.jsxs("div",{className:"relative",children:[i.jsx(ys,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/30"}),i.jsx(_e,{id:"email",type:"email",placeholder:"[email protected]",value:e,onChange:d=>t(d.target.value),required:!0,className:"bg-white/5 border-white/10 text-white pl-10 h-11 focus:ring-primary focus:border-primary transition-all"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("div",{className:"flex justify-between items-center ml-1",children:i.jsx(He,{htmlFor:"password",className:"text-white/70 text-[10px] uppercase tracking-widest font-heading",children:"Password"})}),i.jsxs("div",{className:"relative",children:[i.jsx(V3,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/30"}),i.jsx(_e,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:n,onChange:d=>r(d.target.value),required:!0,className:"bg-white/5 border-white/10 text-white pl-10 h-11 focus:ring-primary focus:border-primary transition-all"})]})]}),i.jsx("div",{className:"flex justify-center pt-2",children:i.jsx(CY,{sitekey:"5dd2a5e8-1ff2-48d6-9f34-59ccc42ef098",onVerify:d=>a(d),theme:"dark"})}),i.jsx(le,{type:"submit",disabled:o,className:"w-full h-11 font-heading uppercase tracking-widest text-sm bg-primary hover:bg-primary/90 transition-all shadow-lg shadow-primary/20",children:o?i.jsx(Ie,{className:"w-5 h-5 animate-spin"}):"Sign In"})]}),i.jsx("div",{className:"mt-10 pt-6 border-t border-white/5 text-center",children:i.jsx("p",{className:"text-white/30 text-[9px] font-heading uppercase tracking-wider",children:"Unauthorized access is strictly prohibited."})})]})]})},AY=()=>{const{data:e}=dd(),{data:t}=tm(),{data:n}=hd(),r=[{label:"News Posts",value:(e==null?void 0:e.length)||0,icon:Ao,color:"text-blue-600",bg:"bg-blue-50"},{label:"Squad Size",value:(t==null?void 0:t.length)||0,icon:Zt,color:"text-red-600",bg:"bg-red-50"},{label:"Partners",value:(n==null?void 0:n.length)||0,icon:Ju,color:"text-amber-600",bg:"bg-amber-50"}],s=(e==null?void 0:e.slice(0,5))||[];return i.jsxs("div",{className:"space-y-8",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:"Overview"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"Welcome back to the Hawks FC control center."})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:r.map(a=>i.jsx("div",{className:"bg-card border border-border p-6 rounded-xl shadow-sm",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-heading uppercase tracking-wider text-muted-foreground mb-1",children:a.label}),i.jsx("p",{className:"text-3xl font-bold",children:a.value})]}),i.jsx("div",{className:a.bg+" p-3 rounded-lg",children:i.jsx(a.icon,{className:a.color,size:24})})]})},a.label))}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"p-6 border-b border-border flex items-center justify-between",children:[i.jsxs("h2",{className:"font-heading text-sm font-bold uppercase tracking-wider flex items-center gap-2",children:[i.jsx(bl,{size:16,className:"text-primary"}),"Recent News"]}),i.jsx(he,{to:"/admin/posts/new",children:i.jsxs(le,{size:"sm",variant:"outline",className:"h-8 text-xs gap-1 font-heading uppercase",children:[i.jsx(vs,{size:14})," New Post"]})})]}),i.jsxs("div",{className:"divide-y divide-border",children:[s.map(a=>i.jsxs("div",{className:"p-4 hover:bg-muted/30 transition-colors flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium line-clamp-1",children:a.title}),i.jsxs("p",{className:"text-[10px] text-muted-foreground uppercase mt-0.5",children:[Ft(new Date(a.published_at),"MMM d, yyyy")," ⢠",a.category," ⢠",a.status==="draft"?"Draft":"Published"]})]}),i.jsx(he,{to:`/admin/posts/edit/${a.id}`,children:i.jsx(le,{variant:"ghost",size:"sm",className:"h-7 text-[10px] uppercase font-heading",children:"Edit"})})]},a.id)),s.length===0&&i.jsx("div",{className:"p-8 text-center text-muted-foreground text-sm",children:"No posts yet."})]}),i.jsx("div",{className:"p-4 bg-muted/20 text-center border-t border-border",children:i.jsx(he,{to:"/admin/posts",className:"text-xs font-heading uppercase tracking-wider text-primary hover:underline",children:"View all posts"})})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-club-dark text-white p-6 rounded-xl shadow-lg relative overflow-hidden",children:[i.jsxs("div",{className:"relative z-10",children:[i.jsx("h3",{className:"font-heading text-lg font-bold uppercase mb-2",children:"Editor Tip"}),i.jsx("p",{className:"text-white/70 text-sm leading-relaxed mb-4",children:"When uploading images for news posts, try to use high-quality landscape photos. The best size is 1200x600 pixels."}),i.jsxs("div",{className:"inline-flex items-center gap-2 text-primary text-xs font-heading font-bold uppercase tracking-widest cursor-pointer hover:translate-x-1 transition-transform",children:["Learn more ",i.jsx(sI,{size:14})]})]}),i.jsx("div",{className:"absolute -right-4 -bottom-4 opacity-10",children:i.jsx(Ao,{size:120})})]}),i.jsxs("div",{className:"bg-white border border-border p-6 rounded-xl shadow-sm",children:[i.jsx("h3",{className:"font-heading text-sm font-bold uppercase mb-3",children:"Qu
880ick Actions"}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs(he,{to:"/admin/posts/new",className:"p-3 bg-muted/50 rounded-lg text-center hover:bg-muted transition-colors",children:[i.jsx(Ao,{size:20,className:"mx-auto mb-2 text-primary"}),i.jsx("span",{className:"text-[10px] font-heading uppercase",children:"Add News"})]}),i.jsxs(he,{to:"/admin/squad",className:"p-3 bg-muted/50 rounded-lg text-center hover:bg-muted transition-colors",children:[i.jsx(Zt,{size:20,className:"mx-auto mb-2 text-primary"}),i.jsx("span",{className:"text-[10px] font-heading uppercase",children:"New Player"})]}),i.jsxs(he,{to:"/admin/settings",className:"p-3 bg-muted/50 rounded-lg text-center hover:bg-muted transition-colors",children:[i.jsx(Op,{size:20,className:"mx-auto mb-2 text-primary"}),i.jsx("span",{className:"text-[10px] font-heading uppercase",children:"Hero Settings"})]}),i.jsxs(he,{to:"/admin/users",className:"p-3 bg-muted/50 rounded-lg text-center hover:bg-muted transition-colors",children:[i.jsx(Zt,{size:20,className:"mx-auto mb-2 text-primary"}),i.jsx("span",{className:"text-[10px] font-heading uppercase",children:"Admin Users"})]})]})]})]})]})]})};var PY=N.createContext(void 0);function rm(e){const t=N.useContext(PY);return e||t||"ltr"}var Dg=0;function qP(){N.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kk()),document.body.insertAdjacentElement("beforeend",e[1]??kk()),Dg++,()=>{Dg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Dg--}},[])}function kk(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ig="focusScope.autoFocusOnMount",Lg="focusScope.autoFocusOnUnmount",Sk={bubbles:!1,cancelable:!0},OY="FocusScope",R0=N.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...o}=e,[l,c]=N.useState(null),u=Ln(s),d=Ln(a),h=N.useRef(null),f=Ge(t,m=>c(m)),p=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let m=function(b){if(p.paused||!l)return;const w=b.target;l.contains(w)?h.current=w:Fs(h.current,{select:!0})},y=function(b){if(p.paused||!l)return;const w=b.relatedTarget;w!==null&&(l.contains(w)||Fs(h.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const j of b)j.removedNodes.length>0&&Fs(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const v=new MutationObserver(g);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),v.disconnect()}}},[r,l,p.paused]),N.useEffect(()=>{if(l){Ek.add(p);const m=document.activeElement;if(!l.contains(m)){const g=new CustomEvent(Ig,Sk);l.addEventListener(Ig,u),l.dispatchEvent(g),g.defaultPrevented||(RY(FY(VP(l)),{select:!0}),document.activeElement===m&&Fs(l))}return()=>{l.removeEventListener(Ig,u),setTimeout(()=>{const g=new CustomEvent(Lg,Sk);l.addEventListener(Lg,d),l.dispatchEvent(g),g.defaultPrevented||Fs(m??document.body,{select:!0}),l.removeEventListener(Lg,d),Ek.remove(p)},0)}}},[l,u,d,p]);const x=N.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(y&&g){const v=m.currentTarget,[b,w]=MY(v);b&&w?!m.shiftKey&&g===w?(m.preventDefault(),n&&Fs(b,{select:!0})):m.shiftKey&&g===b&&(m.preventDefault(),n&&Fs(w,{select:!0})):g===v&&m.preventDefault()}},[n,r,p.paused]);return i.jsx(Oe.div,{tabIndex:-1,...o,ref:f,onKeyDown:x})});R0.displayName=OY;function RY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fs(r,{select:t}),document.activeElement!==n)return}function MY(e){const t=VP(e),n=_k(t,e),r=_k(t.reverse(),e);return[n,r]}function VP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _k(e,t){for(const n of e)if(!DY(n,{upTo:t}))return n}function DY(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function IY(e){return e instanceof HTMLInputElement&&"select"in e}function Fs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&IY(e)&&t&&e.select()}}var Ek=LY();function LY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ck(e,t),e.unshift(t)},remove(t){var n;e=Ck(e,t),(n=e[0])==null||n.resume()}}}function Ck(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function FY(e){return e.filter(t=>t.tagName!=="A")}var Fg="rovingFocusGroup.onEntryFocus",$Y={bubbles:!1,cancelable:!0},fd="RovingFocusGroup",[av,WP,zY]=Nb(fd),[BY,Rl]=zn(fd,[zY]),[UY,qY]=BY(fd),HP=N.forwardRef((e,t)=>
vendor: 1,313 bytes, line 880
880i.jsx(av.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(av.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(VY,{...e,ref:t})})}));HP.displayName=fd;var VY=N.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=N.useRef(null),p=Ge(t,f),x=rm(a),[m,y]=Ai({prop:o,defaultProp:l??null,onChange:c,caller:fd}),[g,v]=N.useState(!1),b=Ln(u),w=WP(n),j=N.useRef(!1),[E,k]=N.useState(0);return N.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(Fg,b),()=>S.removeEventListener(Fg,b)},[b]),i.jsx(UY,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:m,onItemFocus:N.useCallback(S=>y(S),[y]),onItemShiftTab:N.useCallback(()=>v(!0),[]),onFocusableItemAdd:N.useCallback(()=>k(S=>S+1),[]),onFocusableItemRemove:N.useCallback(()=>k(S=>S-1),[]),children:i.jsx(Oe.div,{tabIndex:g||E===0?-1:0,"data-orientation":r,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:xe(e.onMouseDown,()=>{j.current=!0}),onFocus:xe(e.onFocus,S=>{const A=!j.current;if(S.target===S.currentTarget&&A&&!g){const C=new CustomEvent(Fg,$Y);if(S.currentTarget.dispatchEvent(C),!C.defaultPrevented){const T=w().filter(B=>B.focusable),_=T.find(B=>B.active),P=T.find(B=>
vendor: 4,773 bytes, line 880
880B.id===m),I=[_,P,...T].filter(Boolean).map(B=>B.ref.current);YP(I,d)}}j.current=!1}),onBlur:xe(e.onBlur,()=>v(!1))})})}),KP="RovingFocusGroupItem",GP=N.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:a,children:o,...l}=e,c=da(),u=a||c,d=qY(KP,n),h=d.currentTabStopId===u,f=WP(n),{onFocusableItemAdd:p,onFocusableItemRemove:x,currentTabStopId:m}=d;return N.useEffect(()=>{if(r)return p(),()=>x()},[r,p,x]),i.jsx(av.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:i.jsx(Oe.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:xe(e.onMouseDown,y=>{r?d.onItemFocus(u):y.preventDefault()}),onFocus:xe(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:xe(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const g=KY(y,d.orientation,d.dir);if(g!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let b=f().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();const w=b.indexOf(y.currentTarget);b=d.loop?GY(b,w+1):b.slice(w+1)}setTimeout(()=>YP(b))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:m!=null}):o})})});GP.displayName=KP;var WY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function HY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function KY(e,t,n){const r=HY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return WY[r]}function YP(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function GY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var M0=HP,D0=GP,YY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qa=new WeakMap,lh=new WeakMap,ch={},$g=0,XP=function(e){return e&&(e.host||XP(e.parentNode))},XY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=XP(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},QY=function(e,t,n,r){var s=XY(t,Array.isArray(e)?e:[e]);ch[n]||(ch[n]=new WeakMap);var a=ch[n],o=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))d(f);else try{var p=f.getAttribute(r),x=p!==null&&p!=="false",m=(Qa.get(f)||0)+1,y=(a.get(f)||0)+1;Qa.set(f,m),a.set(f,y),o.push(f),m===1&&x&&lh.set(f,!0),y===1&&f.setAttribute(n,"true"),x||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return d(t),l.clear(),$g++,function(){o.forEach(function(h){var f=Qa.get(h)-1,p=a.get(h)-1;Qa.set(h,f),a.set(h,p),f||(lh.has(h)||h.removeAttribute(r),lh.delete(h)),p||h.removeAttribute(n)}),$g--,$g||(Qa=new WeakMap,Qa=new WeakMap,lh=new WeakMap,ch={})}},QP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=YY(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),QY(r,s,n,"aria-hidden")):function(){return null}},Uh="right-scroll-bar-position",qh="width-before-scroll-bar",JY="with-scroll-bars-hidden",ZY="--removed-body-scroll-bar-size";function zg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eX(e,t){var n=N.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var tX=typeof window<"u"?N.useLayoutEffect:N.useEffect,Tk=new WeakMap;function nX(e,t){var n=eX(null,function(r){return e.forEach(function(s){return zg(s,r)})});return tX(function(){var r=Tk.get(n);if(r){var s=new Set(r),a=new Set(e),o=n.current;s.forEach(function(l){a.has(l)||zg(l,null)}),a.forEach(function(l){s.has(l)||zg(l,o)})}Tk.set(n,e)},[e]),n}function rX(e){return e}function sX(e,t){t===void 0&&(t=rX);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(a),o=n}var c=function(){var d=o;o=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};
vendor: 10,279 bytes, lines 880-920
880u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function iX(e){e===void 0&&(e={});var t=sX(null);return t.options=Fr({async:!0,ssr:!1},e),t}var JP=function(e){var t=e.sideCar,n=Pl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return N.createElement(r,Fr({},n))};JP.isSideCarExport=!0;function aX(e,t){return e.useMedium(t),JP}var ZP=iX(),Bg=function(){},sm=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:Bg,onWheelCapture:Bg,onTouchMoveCapture:Bg}),s=r[0],a=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noRelative,x=e.noIsolation,m=e.inert,y=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,b=e.gapMode,w=Pl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=f,E=nX([n,t]),k=Fr(Fr({},w),s);return N.createElement(N.Fragment,null,d&&N.createElement(j,{sideCar:ZP,removeScrollBar:u,shards:h,noRelative:p,noIsolation:x,inert:m,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:b}),o?N.cloneElement(N.Children.only(l),Fr(Fr({},k),{ref:E})):N.createElement(v,Fr({},k,{className:c,ref:E}),l))});sm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};sm.classNames={fullWidth:qh,zeroRight:Uh};var oX=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lX(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=oX();return t&&e.setAttribute("nonce",t),e}function cX(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function uX(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dX=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lX())&&(cX(t,n),uX(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hX=function(){var e=dX();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eO=function(){var e=hX(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},fX={left:0,top:0,right:0,gap:0},Ug=function(e){return parseInt(e||"",10)||0},pX=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Ug(n),Ug(r),Ug(s)]},mX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fX;var t=pX(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},gX=eO(),Io="data-scroll-locked",xX=function(e,t,n,r){var s=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),` 881 .`.concat(JY,` { 882 overflow: hidden `).concat(r,`; 883 padding-right: `).concat(l,"px ").concat(r,`; 884 } 885 body[`).concat(Io,`] { 886 overflow: hidden `).concat(r,`; 887 overscroll-behavior: contain; 888 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 889 padding-left: `.concat(s,`px; 890 padding-top: `).concat(a,`px; 891 padding-right: `).concat(o,`px; 892 margin-left:0; 893 margin-top:0; 894 margin-right: `).concat(l,"px ").concat(r,`; 895 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),` 896 } 897 898 .`).concat(Uh,` { 899 right: `).concat(l,"px ").concat(r,`; 900 } 901 902 .`).concat(qh,` { 903 margin-right: `).concat(l,"px ").concat(r,`; 904 } 905 906 .`).concat(Uh," .").concat(Uh,` { 907 right: 0 `).concat(r,`; 908 } 909 910 .`).concat(qh," .").concat(qh,` { 911 margin-right: 0 `).concat(r,`; 912 } 913 914 body[`).concat(Io,`] { 915 `).concat(ZY,": ").concat(l,`px; 916 } 917`)},Ak=function(){var e=parseInt(document.body.getAttribute(Io)||"0",10);return isFinite(e)?e:0},yX=function(){N.useEffect(function(){return document.body.setAttribute(Io,(Ak()+1).toString()),function(){var e=Ak()-1;e<=0?document.body.removeAttribute(Io):document.body.setAttribute(Io,e.toString())}},[])},vX=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;yX();var a=N.useMemo(function(){return mX(s)},[s]);return N.createElement(gX,{styles:xX(a,!t,s,n?"":"!important")})},ov=!1;if(typeof window<"u")try{var uh=Object.defineProperty({},"passive",{get:function(){return ov=!0,!0}});window.addEventListener("test",uh,uh),window.removeEventListener("test",uh,uh)}catch{ov=!1}var Ja=ov?{passive:!1}:!1,bX=function(e){return e.tagName==="TEXTAREA"},tO=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bX(e)&&n[t]==="visible")},wX=function(e){return tO(e,"overflowY")},jX=function(e){return tO(e,"overflowX")},Pk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=nO(e,r);if(s){var a=rO(e,r),o=a[1],l=a[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},NX=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},kX=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nO=function(e,t){return e==="v"?wX(t):jX(t)},rO=function(e,t){return e==="v"?NX(t):kX(t)},SX=function(e,t){return e==="h"&&t==="rtl"?-1:1},_X=function(e,t,n,r,s){var a=SX(e,window.getComputedStyle(t).direction),o=a*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{if(!l)break;var p=rO(e,l),x=p[0],m=p[1],y=p[2],g=m-y-a*x;(x||g)&&nO(e,l)&&(h+=g,f+=x);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},dh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ok=function(e){return[e.deltaX,e.deltaY]},Rk=function(e){return e&&"current"in e?e.current:e},EX=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CX=function(e){return` 918 .block-interactivity-`.concat(e,` {pointer-events: none;} 919 .allow-interactivity-`).concat(e,` {pointer-events: all;} 920`)},TX=0,Za=[];function AX(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),s=N.useState(TX++)[0],a=N.useState(eO)[0],o=N.useRef(e);N.useEffect(function(){o.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=hV([e.lockRef.current],(e.shards||[]).map(Rk),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=N.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var g=dh(m),v=n.current,b="deltaX"in m?m.deltaX:v[0]-g[0],w="deltaY"in m?m.deltaY:v[1]-g[1],j,E=m.target,k=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in m&&k==="h"&&E.type==="range")return!1;var S=Pk(k,E);if(!S)return!0;if(S?j=k:(j=k==="v"?"h":"v",S=Pk(k,E)),!S)return!1;if(!r.current&&"changedTouches"in m&&(b||w)&&(r.current=j),!j)return!0;var A=r.current||j;return _X(A,y,m,A==="h"?b:w,!0)},[]),c=N.useCallback(function(m){var y=m;if(!(!Za.length||Za[Za.length-1]!==a)){var g="deltaY"in y?Ok(y):dh(y),v=t.current.filter(function(j){return j.name===y.type&&(j.target===y.target||y.target===j.shadowParent)&&EX(j.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(Rk).filter(Boolean).filter(function(j){return j.contains(y.target)}),w=b.length>0?l(y,b[0]):!o.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),u=N.useCallback(function(m,y,g,v){var b={name:m,delta:y,target:g,should:v,shadowParent:PX(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),d=N.useCallback(function(m){n.current=dh(m),r.current=void 0},[]),h=N.useCallback(function(m){u(m.type,Ok(m),m.target,l(m,e.lockRef.current))},[]),f=N.useCallback(function(m){u(m.type,dh(m),m.target,l(m,e.lockRef.current))},[]);N.useEffect(function(){return Za.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ja),document.addEventListener("touchmove",c,Ja),document.addEventListener("touchstart",d,Ja),function(){Za=Za.filter(function(m){return m!==a}),document.removeEventListener("wheel",c,Ja),document.removeEventListener("touchmove",c,Ja),document.removeEventListener("touchstart",d,Ja)}},[]);var p=e.removeScrollBar,x=e.inert;return N.createElement(N.Fragment,null,x?N.createElement(a,{styles:CX(s)}):null,p?N.createElement(vX,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function PX(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const OX=aX(ZP,AX);var I0=N.forwardRef(function(e,t){return N.createElement(sm,Fr({},e,{ref:t,sideCar:OX}))});I0.classNames=sm.classNames;var lv=["Enter"," "],RX=["ArrowDown","PageUp","Home"],sO=["ArrowUp","PageDown","End"],MX=[...RX,...sO],DX={ltr:[...lv,"ArrowRight"],rtl:[...lv,"ArrowLeft"]},IX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pd="Menu",[Ru,LX,FX]=Nb(pd),[Ra,iO]=zn(pd,[FX,Lp,Rl]),im=Lp(),aO=Rl(),[$X,Ma]=Ra(pd),[zX,md]=Ra(pd),oO=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:a,modal:o=!0}=e,l=im(t),[c,u]=N.useState(null),d=N.useRef(!1),h=Ln(a),f=rm(s);return N.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),i.jsx(q6,{...l,children:i.jsx($X,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:i.jsx(zX,{scope:t,onClose:N.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:f,modal:o,children:r})})})};oO.displayName=pd;var BX="MenuAnchor",L0=N.forwardRef((e,t)=>
vendor: 12,874 bytes, line 920
920{const{__scopeMenu:n,...r}=e,s=im(n);return i.jsx(wC,{...s,...r,ref:t})});L0.displayName=BX;var F0="MenuPortal",[UX,lO]=Ra(F0,{forceMount:void 0}),cO=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,a=Ma(F0,t);return i.jsx(UX,{scope:t,forceMount:n,children:i.jsx(Bn,{present:n||a.open,children:i.jsx(Cp,{asChild:!0,container:s,children:r})})})};cO.displayName=F0;var Zn="MenuContent",[qX,$0]=Ra(Zn),uO=N.forwardRef((e,t)=>{const n=lO(Zn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,a=Ma(Zn,e.__scopeMenu),o=md(Zn,e.__scopeMenu);return i.jsx(Ru.Provider,{scope:e.__scopeMenu,children:i.jsx(Bn,{present:r||a.open,children:i.jsx(Ru.Slot,{scope:e.__scopeMenu,children:o.modal?i.jsx(VX,{...s,ref:t}):i.jsx(WX,{...s,ref:t})})})})}),VX=N.forwardRef((e,t)=>{const n=Ma(Zn,e.__scopeMenu),r=N.useRef(null),s=Ge(t,r);return N.useEffect(()=>{const a=r.current;if(a)return QP(a)},[]),i.jsx(z0,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:xe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),WX=N.forwardRef((e,t)=>{const n=Ma(Zn,e.__scopeMenu);return i.jsx(z0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HX=rl("MenuContent.ScrollLock"),z0=N.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,disableOutsideScroll:x,...m}=e,y=Ma(Zn,n),g=md(Zn,n),v=im(n),b=aO(n),w=LX(n),[j,E]=N.useState(null),k=N.useRef(null),S=Ge(t,k,y.onContentChange),A=N.useRef(0),C=N.useRef(""),T=N.useRef(0),_=N.useRef(null),P=N.useRef("right"),O=N.useRef(0),I=x?I0:N.Fragment,B=x?{as:HX,allowPinchZoom:!0}:void 0,$=L=>{var z,H;const D=C.current+L,R=w().filter(G=>!G.disabled),F=document.activeElement,U=(z=R.find(G=>G.ref.current===F))==null?void 0:z.textValue,V=R.map(G=>G.textValue),W=sQ(V,D,U),M=(H=R.find(G=>G.textValue===W))==null?void 0:H.ref.current;(function G(Y){C.current=Y,window.clearTimeout(A.current),Y!==""&&(A.current=window.setTimeout(()=>G(""),1e3))})(D),M&&setTimeout(()=>M.focus())};N.useEffect(()=>()=>window.clearTimeout(A.current),[]),qP();const q=N.useCallback(L=>{var R,F;return P.current===((R=_.current)==null?void 0:R.side)&&aQ(L,(F=_.current)==null?void 0:F.area)},[]);return i.jsx(qX,{scope:n,searchRef:C,onItemEnter:N.useCallback(L=>{q(L)&&L.preventDefault()},[q]),onItemLeave:N.useCallback(L=>{var D;q(L)||((D=k.current)==null||D.focus(),E(null))},[q]),onTriggerLeave:N.useCallback(L=>{q(L)&&L.preventDefault()},[q]),pointerGraceTimerRef:T,onPointerGraceIntentChange:N.useCallback(L=>{_.current=L},[]),children:i.jsx(I,{...B,children:i.jsx(R0,{asChild:!0,trapped:s,onMountAutoFocus:xe(a,L=>{var D;L.preventDefault(),(D=k.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:i.jsx(Gu,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,children:i.jsx(M0,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:E,onEntryFocus:xe(c,L=>{g.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(jC,{role:"menu","aria-orientation":"vertical","data-state":_O(y.open),"data-radix-menu-content":"",dir:g.dir,...v,...m,ref:S,style:{outline:"none",...m.style},onKeyDown:xe(m.onKeyDown,L=>{const R=L.target.closest("[data-radix-menu-content]")===L.currentTarget,F=L.ctrlKey||L.altKey||L.metaKey,U=L.key.length===1;R&&(L.key==="Tab"&&L.preventDefault(),!F&&U&&$(L.key));const V=k.current;if(L.target!==V||!MX.includes(L.key))return;L.preventDefault();const M=w().filter(z=>!z.disabled).map(z=>z.ref.current);sO.includes(L.key)&&M.reverse(),nQ(M)}),onBlur:xe(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(A.current),C.current="")}),onPointerMove:xe(e.onPointerMove,Mu(L=>{const D=L.target,R=O.current!==L.clientX;if(L.currentTarget.contains(D)&&R){const F=L.clientX>O.current?"right":"left";P.current=F,O.current=L.clientX}}))})})})})})})});uO.displayName=Zn;var KX="MenuGroup",B0=N.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(Oe.div,{role:"group",...r,ref:t})});B0.displayName=KX;var GX="MenuLabel",dO=N.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(Oe.div,{...r,ref:t})});dO.displayName=GX;var Gf="MenuItem",Mk="menu.itemSelect",am=N.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,a=N.useRef(null),o=md(Gf,e.__scopeMenu),l=$0(Gf,e.__scopeMenu),c=Ge(t,a),u=N.useRef(!1),d=()=>{const h=a.current;if(!n&&h){const f=new CustomEvent(Mk,{bubbles:!0,cancelable:!0});h.addEventListener(Mk,p=>r==null?void 0:r(p),{once:!0}),kb(h,f),f.defaultPrevented?u.current=!1:o.onClose()}};return i.jsx(hO,{...s,ref:c,disabled:n,onClick:xe(e.onClick,d),onPointerDown:h=>{var f;(f=e.onPointerDown)==null||f.call(e,h),u.current=!0},onPointerUp:xe(e.onPointerUp,h=>{var f;u.current||(f=h.currentTarget)==null||f.click()}),onKeyDown:xe(e.onKeyDown,h=>{const f=l.searchRef.current!=="";n||f&&h.key===" "||lv.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});am.displayName=Gf;var hO=N.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...a}=e,o=$0(Gf,n),l=aO(n),c=N.useRef(null),u=Ge(t,c),[d,h]=N.useState(!1),[f,p]=N.useState("");return N.useEffect(()=>{const x=c.current;x&&p((x.textContent??"").trim())},[a.children]),i.jsx(Ru.ItemSlot,{scope:n,disabled:r,textValue:s??f,children:i.jsx(D0,{asChild:!0,...l,focusable:!r,children:i.jsx(Oe.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:xe(e.onPointerMove,Mu(x=>{r?o.onItemLeave(x):(o.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(e.onPointerLeave,Mu(x=>o.onItemLeave(x))),onFocus:xe(e.onFocus,()=>h(!0)),onBlur:xe(e.onBlur,()=>h(!1))})})})}),YX="MenuCheckboxItem",fO=N.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return i.jsx(yO,{scope:e.__scopeMenu,checked:n,children:i.jsx(am,{role:"menuitemcheckbox","aria-checked":Yf(n)?"mixed":n,...s,ref:t,"data-state":q0(n),onSelect:xe(s.onSelect,()=>r==null?void 0:r(Yf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});fO.displayName=YX;var pO="MenuRadioGroup",[XX,QX]=Ra(pO,{value:void 0,onValueChange:()=>{}}),mO=N.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,a=Ln(r);return i.jsx(XX,{scope:e.__scopeMenu,value:n,onValueChange:a,children:i.jsx(B0,{...s,ref:t})})});mO.displayName=pO;var gO="MenuRadioItem",xO=N.forwardRef((e,t)=>{const{value:n,...r}=e,s=QX(gO,e.__scopeMenu),a=n===s.value;return i.jsx(yO,{scope:e.__scopeMenu,checked:a,children:i.jsx(am,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":q0(a),onSelect:xe(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});xO.displayName=gO;var U0="MenuItemIndicator",[yO,JX]=Ra(U0,{checked:!1}),vO=N.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,a=JX(U0,n);return i.jsx(Bn,{present:r||Yf(a.checked)||a.checked===!0,children:i.jsx(Oe.span,{...s,ref:t,"data-state":q0(a.checked)})})});vO.displayName=U0;var ZX="MenuSeparator",bO=N.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(Oe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});bO.displayName=ZX;var eQ="MenuArrow",wO=N.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=im(n);return i.jsx(NC,{...s,...r,ref:t})});wO.displayName=eQ;var tQ="MenuSub",[Zoe,jO]=Ra(tQ),Nc="MenuSubTrigger",NO=N.forwardRef((e,t)=>{const n=Ma(Nc,e.__scopeMenu),r=md(Nc,e.__scopeMenu),s=jO(Nc,e.__scopeMenu),a=$0(Nc,e.__scopeMenu),o=N.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=N.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return N.useEffect(()=>d,[d]),N.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),i.jsx(L0,{asChild:!0,...u,children:i.jsx(hO,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":_O(n.open),...e,ref:Ep(t,s.onTriggerChange),onClick:h=>{var f;(f=e.onClick)==null||f.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:xe(e.onPointerMove,Mu(h=>{a.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:xe(e.onPointerLeave,Mu(h=>{var p,x;d();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const m=(x=n.content)==null?void 0:x.dataset.side,y=m==="right",g=y?-5:5,v=f[y?"left":"right"],b=f[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:h.clientX+g,y:h.clientY},{x:v,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x:v,y:f.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(h),h.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:xe(e.onKeyDown,h=>{var p;const f=a.searchRef.current!=="";e.disabled||f&&h.key===" "||DX[r.dir].includes(h.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),h.preventDefault())})})})});NO.displayName=Nc;var kO="MenuSubContent",SO=N.forwardRef((e,t)=>{const n=lO(Zn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,a=Ma(Zn,e.__scopeMenu),o=md(Zn,e.__scopeMenu),l=jO(kO,e.__scopeMenu),c=N.useRef(null),u=Ge(t,c);return i.jsx(Ru.Provider,{scope:e.__scopeMenu,children:i.jsx(Bn,{present:r||a.open,children:i.jsx(Ru.Slot,{scope:e.__scopeMenu,children:i.jsx(z0,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:xe(e.onFocusOutside,d=>{d.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:xe(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:xe(e.onKeyDown,d=>{var p;const h=d.currentTarget.contains(d.target),f=IX[o.dir].includes(d.key);h&&f&&(a.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});SO.displayName=kO;function _O(e){return e?"open":"closed"}function Yf(e){return e==="indeterminate"}function q0(e){return Yf(e)?"indeterminate":e?"checked":"unchecked"}function nQ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function sQ(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=rQ(e,Math.max(a,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function iQ(e,t){const{x:n,y:r}=e;let s=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],u=l.x,d=l.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function aQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return iQ(n,t)}function Mu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var oQ=oO,lQ=L0,cQ=cO,uQ=uO,dQ=B0,hQ=dO,fQ=am,pQ=fO,mQ=mO,gQ=xO,xQ=vO,yQ=bO,vQ=wO,bQ=NO,wQ=SO,om="DropdownMenu",[jQ,ele]=zn(om,[iO]),fn=iO(),[NQ,EO]=jQ(om),CO=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=fn(t),u=N.useRef(null),[d,h]=Ai({prop:s,defaultProp:a??!1,onChange:o,caller:om});return i.jsx(NQ,{scope:t,triggerId:da(),triggerRef:u,contentId:da(),open:d,onOpenChange:h,onOpenToggle:N.useCallback(()=>h(f=>!f),[h]),modal:l,children:i.jsx(oQ,{...c,open:d,onOpenChange:h,dir:r,modal:l,children:n})})};CO.displayName=om;var TO="DropdownMenuTrigger",AO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,a=EO(TO,n),o=fn(n);return i.jsx(lQ,{asChild:!0,...o,children:i.jsx(Oe.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:Ep(t,a.triggerRef),onPointerDown:xe(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:xe(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});AO.displayName=TO;var kQ="DropdownMenuPortal",PO=e=>{const{__scopeDropdownMenu:t,...n}=e,r=fn(t);return i.jsx(cQ,{...r,...n})};PO.displayName=kQ;var OO="DropdownMenuContent",RO=N.forwardRef((e,t)=>
920{const{__scopeDropdownMenu:n,...r}=e,s=EO(OO,n),a=fn(n),o=N.useRef(!1);return i.jsx(uQ,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...r,ref:t,onCloseAutoFocus:xe(e.onCloseAutoFocus,l=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:xe(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});RO.displayName=OO;var SQ="DropdownMenuGroup",_Q=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(dQ,{...s,...r,ref:t})});_Q.displayName=SQ;var EQ="DropdownMenuLabel",MO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(hQ,{...s,...r,ref:t})});MO.displayName=EQ;var CQ="DropdownMenuItem",DO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(fQ,{...s,...r,ref:t})});DO.displayName=CQ;var TQ="DropdownMenuCheckboxItem",IO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(pQ,{...s,...r,ref:t})});IO.displayName=TQ;var AQ="DropdownMenuRadioGroup",PQ=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(mQ,{...s,...r,ref:t})});PQ.displayName=AQ;var OQ="DropdownMenuRadioItem",LO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(gQ,{...s,...r,ref:t})});LO.displayName=OQ;var RQ="DropdownMenuItemIndicator",FO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(xQ,{...s,...r,ref:t})});FO.displayName=RQ;var MQ="DropdownMenuSeparator",$O=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(yQ,{...s,...r,ref:t})});$O.displayName=MQ;var DQ="DropdownMenuArrow",IQ=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(vQ,{...s,...r,ref:t})});IQ.displayName=DQ;var LQ="DropdownMenuSubTrigger",zO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(bQ,{...s,...r,ref:t})});zO.displayName=LQ;var FQ="DropdownMenuSubContent",BO=N.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=fn(n);return i.jsx(wQ,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});BO.displayName=FQ;var $Q=CO,zQ=AO,BQ=PO,UO=RO,qO=MO,VO=DO,WO=IO,HO=LO,KO=FO,GO=$O,YO=zO,XO=BO;const UQ=$Q,qQ=zQ,VQ=N.forwardRef(({className:e,inset:t,children:n,...r},s)=>i.jsxs(YO,{ref:s,className:Pe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,i.jsx(vl,{className:"ml-auto h-4 w-4"})]}));VQ.displayName=YO.displayName;const WQ=N.forwardRef(({className:e,...t},n)=>i.jsx(XO,{ref:n,className:Pe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));WQ.displayName=XO.displayName;const QO=N.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(BQ,{children:i.jsx(UO,{ref:r,sideOffset:t,className:Pe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
920de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));QO.displayName=UO.displayName;const kc=N.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(VO,{ref:r,className:Pe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));kc.displayName=VO.displayName;const HQ=N.forwardRef(({className:e,children:t,checked:n,...r},s)=>i.jsxs(WO,{ref:s,className:Pe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(KO,{children:i.jsx(Xu,{className:"h-4 w-4"})})}),t]}));HQ.displayName=WO.displayName;const KQ=N.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(HO,{ref:r,className:Pe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(KO,{children:i.jsx(ME,{className:"h-2 w-2 fill-current"})})}),t]}));KQ.displayName=HO.displayName;const GQ=N.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(qO,{ref:r,className:Pe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));GQ.displayName=qO.displayName;const YQ=N.forwardRef(({className:e,...t},n)=>i.jsx(GO,{ref:n,className:Pe("-mx-1 my-1 h-px bg-muted",e),...t}));YQ.displayName=GO.displayName;const gd=async e=>{if(e&&e.includes("/uploads/"))try{const t=e.substring(e.lastIndexOf("/")+1);if(!t)return;const{data:{session:n}}=await ue.auth.getSession();if(!(n!=null&&n.access_token)){console.warn("Cannot delete image: not authenticated");return}await fetch("/delete.php",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n.access_token}`},body:JSON.stringify({filename:t})})}catch(t){console.error("Failed to delete image from IONOS:",t)}},XQ=()=>{const{data:e,isLoading:t,refetch:n}=dd(),[r,s]=N.useState(""),a=e==null?void 0:e.filter(c=>c.title.toLowerCase().includes(r.toLowerCase())||c.category.toLowerCase().includes(r.toLowerCase())),o=async(c,u)=>{if(!window.confirm("Are you sure you want to delete this post?"))return;const{error:d}=await ue.from("posts").delete().eq("id",c);d?ie.error("Failed to delete post"):(u&&await gd(u),ie.success("Post deleted successfully"),n())},l=async(c,u="published")=>{const d=u==="draft"?"published":"draft",{error:h}=await ue.from("posts").update({status:d}).eq("id",c);h?ie.error("Failed to update post status"):(ie.success(`Post marked as ${d}`),n())};return t?i.jsx("div",{className:"h-[60vh] flex items-center justify-center",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:"News Posts"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage all your hawks news articles here."})]}),i.jsx(he,{to:"/admin/posts/new",children:i.jsxs(le,{className:"font-heading uppercase tracking-widest text-xs gap-2",children:[i.jsx(vs,{size:16})," New Post"]})})]}),i.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm",children:[i.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-2",children:[i.jsx(cl,{className:"text-muted-foreground",size:18}),i.jsx(_e,{placeholder:"Search posts...",value:r,onChange:c=>s(c.target.value),className:"border-none shadow-none focus-visible:ring-0 text-sm h-auto py-1"})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/30",children:[i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Title"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Category"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Date"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Status"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Feature"}),i.jsx("th",{className:"px-6 py-3 text-right"})]})}),i.jsxs("tbody",{className:"divide-y divide-border",children:[a==null?void 0:a.map(c=>i.jsxs("tr",{className:"hover:bg-muted/30 transition-colors group",children:[i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:c.image_url?i.jsx("img",{src:c.image_url,alt:"",className:"w-full h-full object-cover"}):i.jsx(Ao,{size:18,className:"text-muted-foreground"})}),i.jsx("span",{className:"text-sm font-medium line-clamp-1",children:c.title})]})}),i.jsx("td",{className:"px-6 py-4 text-xs font-heading uppercase text-muted-foreground",children:c.category}),i.jsx("td",{className:"px-6 py-4 text-xs text-muted-foreground",children:Ft(new Date(c.published_at),"MMM d, yyyy")}),i.jsx("td",{className:"px-6 py-4",children:i.jsx("span",{className:c.status==="draft"?"bg-red-500/10 text-red-600 px-2 py-0.5 rounded text-[10px] font-heading uppercase font-bold":"bg-green-500/10 text-green-600 px-2 py-0.5 rounded text-[10px] font-heading uppercase font-bold",children:c.status==="draft"?"Draft":"Published"})}),i.jsx("td",{className:"px-6 py-4",children:i.jsx("span",{className:c.featured?"bg-club-gold/10 text-club-gold px-2 py-0.5 rounded text-[10px] font-heading uppercase font-bold":"bg-muted text-muted-foreground px-2 py-0.5 rounded text-[10px] font-heading uppercase",children:c.featured?"Featured":"Standard"})}),i.jsx("td",{className:"px-6 py-4 text-right",children:i.jsxs(UQ,{
vendor: 215,092 bytes, lines 920-960
920children:[i.jsx(qQ,{asChild:!0,children:i.jsx(le,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:i.jsx(O3,{size:16})})}),i.jsxs(QO,{align:"end",className:"w-40 font-heading uppercase text-[10px]",children:[i.jsx(kc,{asChild:!0,children:i.jsxs(he,{to:"/news",target:"_blank",className:"flex items-center gap-2",children:[i.jsx(ol,{size:14})," View Live"]})}),i.jsx(kc,{asChild:!0,children:i.jsxs(he,{to:`/admin/posts/edit/${c.id}`,className:"flex items-center gap-2",children:[i.jsx(Aa,{size:14})," Edit Post"]})}),i.jsxs(kc,{className:"flex items-center gap-2 cursor-pointer",onClick:()=>l(c.id,c.status||"published"),children:[i.jsx(Ao,{size:14})," ",c.status==="draft"?"Publish Post":"Set to Draft"]}),i.jsxs(kc,{className:"text-red-600 focus:text-red-600 flex items-center gap-2",onClick:()=>o(c.id,c.image_url),children:[i.jsx(Pi,{size:14})," Delete"]})]})]})})]},c.id)),(a==null?void 0:a.length)===0&&i.jsx("tr",{children:i.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-muted-foreground text-sm",children:"No posts found matching your search."})})]})]})})]})]})};function QQ(){this.__data__=[],this.size=0}var JQ=QQ;function ZQ(e,t){return e===t||e!==e&&t!==t}var JO=ZQ,eJ=JO;function tJ(e,t){for(var n=e.length;n--;)if(eJ(e[n][0],t))return n;return-1}var lm=tJ,nJ=lm,rJ=Array.prototype,sJ=rJ.splice;function iJ(e){var t=this.__data__,n=nJ(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():sJ.call(t,n,1),--this.size,!0}var aJ=iJ,oJ=lm;function lJ(e){var t=this.__data__,n=oJ(t,e);return n<0?void 0:t[n][1]}var cJ=lJ,uJ=lm;function dJ(e){return uJ(this.__data__,e)>-1}var hJ=dJ,fJ=lm;function pJ(e,t){var n=this.__data__,r=fJ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var mJ=pJ,gJ=JQ,xJ=aJ,yJ=cJ,vJ=hJ,bJ=mJ;function Ml(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ml.prototype.clear=gJ;Ml.prototype.delete=xJ;Ml.prototype.get=yJ;Ml.prototype.has=vJ;Ml.prototype.set=bJ;var cm=Ml,wJ=cm;function jJ(){this.__data__=new wJ,this.size=0}var NJ=jJ;function kJ(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var SJ=kJ;function _J(e){return this.__data__.get(e)}var EJ=_J;function CJ(e){return this.__data__.has(e)}var TJ=CJ,AJ=typeof On=="object"&&On&&On.Object===Object&&On,ZO=AJ,PJ=ZO,OJ=typeof self=="object"&&self&&self.Object===Object&&self,RJ=PJ||OJ||Function("return this")(),Cs=RJ,MJ=Cs,DJ=MJ.Symbol,V0=DJ,Dk=V0,eR=Object.prototype,IJ=eR.hasOwnProperty,LJ=eR.toString,cc=Dk?Dk.toStringTag:void 0;function FJ(e){var t=IJ.call(e,cc),n=e[cc];try{e[cc]=void 0;var r=!0}catch{}var s=LJ.call(e);return r&&(t?e[cc]=n:delete e[cc]),s}var $J=FJ,zJ=Object.prototype,BJ=zJ.toString;function UJ(e){return BJ.call(e)}var qJ=UJ,Ik=V0,VJ=$J,WJ=qJ,HJ="[object Null]",KJ="[object Undefined]",Lk=Ik?Ik.toStringTag:void 0;function GJ(e){return e==null?e===void 0?KJ:HJ:Lk&&Lk in Object(e)?VJ(e):WJ(e)}var um=GJ;function YJ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tR=YJ,XJ=um,QJ=tR,JJ="[object AsyncFunction]",ZJ="[object Function]",eZ="[object GeneratorFunction]",tZ="[object Proxy]";function nZ(e){if(!QJ(e))return!1;var t=XJ(e);return t==ZJ||t==eZ||t==JJ||t==tZ}var nR=nZ,rZ=Cs,sZ=rZ["__core-js_shared__"],iZ=sZ,qg=iZ,Fk=function(){var e=/[^.]+$/.exec(qg&&qg.keys&&qg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function aZ(e){return!!Fk&&Fk in e}var oZ=aZ,lZ=Function.prototype,cZ=lZ.toString;function uZ(e){if(e!=null){try{return cZ.call(e)}catch{}try{return e+""}catch{}}return""}var rR=uZ,dZ=nR,hZ=oZ,fZ=tR,pZ=rR,mZ=/[\\^$.*+?()[\]{}|]/g,gZ=/^\[object .+?Constructor\]$/,xZ=Function.prototype,yZ=Object.prototype,vZ=xZ.toString,bZ=yZ.hasOwnProperty,wZ=RegExp("^"+vZ.call(bZ).replace(mZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jZ(e){if(!fZ(e)||hZ(e))return!1;var t=dZ(e)?wZ:gZ;return t.test(pZ(e))}var NZ=jZ;function kZ(e,t){return e==null?void 0:e[t]}var SZ=kZ,_Z=NZ,EZ=SZ;function CZ(e,t){var n=EZ(e,t);return _Z(n)?n:void 0}var Dl=CZ,TZ=Dl,AZ=Cs,PZ=TZ(AZ,"Map"),W0=PZ,OZ=Dl,RZ=OZ(Object,"create"),dm=RZ,$k=dm;function MZ(){this.__data__=$k?$k(null):{},this.size=0}var DZ=MZ;function IZ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var LZ=IZ,FZ=dm,$Z="__lodash_hash_undefined__",zZ=Object.prototype,BZ=zZ.hasOwnProperty;function UZ(e){var t=this.__data__;if(FZ){var n=t[e];return n===$Z?void 0:n}return BZ.call(t,e)?t[e]:void 0}var qZ=UZ,VZ=dm,WZ=Object.prototype,HZ=WZ.hasOwnProperty;function KZ(e){var t=this.__data__;return VZ?t[e]!==void 0:HZ.call(t,e)}var GZ=KZ,YZ=dm,XZ="__lodash_hash_undefined__";function QZ(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=YZ&&t===void 0?XZ:t,this}var JZ=QZ,ZZ=DZ,eee=LZ,tee=qZ,nee=GZ,ree=JZ;function Il(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Il.prototype.clear=ZZ;Il.prototype.delete=eee;Il.prototype.get=tee;Il.prototype.has=nee;Il.prototype.set=ree;var see=Il,zk=see,iee=cm,aee=W0;function oee(){this.size=0,this.__data__={hash:new zk,map:new(aee||iee),string:new zk}}var lee=oee;function cee(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var uee=cee,dee=uee;function hee(e,t){var n=e.__data__;return dee(t)?n[typeof t=="string"?"string":"hash"]:n.map}var hm=hee,fee=hm;function pee(e){var t=fee(this,e).delete(e);return this.size-=t?1:0,t}var mee=pee,gee=hm;function xee(e){return gee(this,e).get(e)}var yee=xee,vee=hm;function bee(e){return vee(this,e).has(e)}var wee=bee,jee=hm;function Nee(e,t){var n=jee(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var kee=Nee,See=lee,_ee=mee,Eee=yee,Cee=wee,Tee=kee;function Ll(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ll.prototype.clear=See;Ll.prototype.delete=_ee;Ll.prototype.get=Eee;Ll.prototype.has=Cee;Ll.prototype.set=Tee;var sR=Ll,Aee=cm,Pee=W0,Oee=sR,Ree=200;function Mee(e,t){var n=this.__data__;if(n instanceof Aee){var r=n.__data__;if(!Pee||r.length<Ree-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oee(r)}return n.set(e,t),this.size=n.size,this}var Dee=Mee,Iee=cm,Lee=NJ,Fee=SJ,$ee=EJ,zee=TJ,Bee=Dee;function Fl(e){var t=this.__data__=new Iee(e);this.size=t.size}Fl.prototype.clear=Lee;Fl.prototype.delete=Fee;Fl.prototype.get=$ee;Fl.prototype.has=zee;Fl.prototype.set=Bee;var Uee=Fl,qee="__lodash_hash_undefined__";function Vee(e){return this.__data__.set(e,qee),this}var Wee=Vee;function Hee(e){return this.__data__.has(e)}var Kee=Hee,Gee=sR,Yee=Wee,Xee=Kee;function Xf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Gee;++t<n;)this.add(e[t])}Xf.prototype.add=Xf.prototype.push=Yee;Xf.prototype.has=Xee;var Qee=Xf;function Jee(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Zee=Jee;function ete(e,t){return e.has(t)}var tte=ete,nte=Qee,rte=Zee,ste=tte,ite=1,ate=2;function ote(e,t,n,r,s,a){var o=n&ite,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=n&ate?new nte:void 0;for(a.set(e,t),a.set(t,e);++h<l;){var x=e[h],m=t[h];if(r)var y=o?r(m,x,h,t,e,a):r(x,m,h,e,t,a);if(y!==void 0){if(y)continue;f=!1;break}if(p){if(!rte(t,function(g,v){if(!ste(p,v)&&(x===g||s(x,g,n,r,a)))return p.push(v)})){f=!1;break}}else if(!(x===m||s(x,m,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var iR=ote,lte=Cs,cte=lte.Uint8Array,ute=cte;function dte(e){var t=-1,n=Array(e.size);return e.forEach(function(r,s){n[++t]=[s,r]}),n}var hte=dte;function fte(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var pte=fte,Bk=V0,Uk=ute,mte=JO,gte=iR,xte=hte,yte=pte,vte=1,bte=2,wte="[object Boolean]",jte="[object Date]",Nte="[object Error]",kte="[object Map]",Ste="[object Number]",_te="[object RegExp]",Ete="[object Set]",Cte="[object String]",Tte="[object Symbol]",Ate="[object ArrayBuffer]",Pte="[object DataView]",qk=Bk?Bk.prototype:void 0,Vg=qk?qk.valueOf:void 0;function Ote(e,t,n,r,s,a,o){switch(n){case Pte:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ate:return!(e.byteLength!=t.byteLength||!a(new Uk(e),new Uk(t)));case wte:case jte:case Ste:return mte(+e,+t);case Nte:return e.name==t.name&&e.message==t.message;case _te:case Cte:return e==t+"";case kte:var l=xte;case Ete:var c=r&vte;if(l||(l=yte),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;r|=bte,o.set(e,t);var d=gte(l(e),l(t),r,s,a,o);return o.delete(e),d;case Tte:if(Vg)return Vg.call(e)==Vg.call(t)}return!1}var Rte=Ote;function Mte(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}var Dte=Mte,Ite=Array.isArray,H0=Ite,Lte=Dte,Fte=H0;function $te(e,t,n){var r=t(e);return Fte(e)?r:Lte(r,n(e))}var zte=$te;function Bte(e,t){for(var n=-1,r=e==null?0:e.length,s=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[s++]=o)}return a}var Ute=Bte;function qte(){return[]}var Vte=qte,Wte=Ute,Hte=Vte,Kte=Object.prototype,Gte=Kte.propertyIsEnumerable,Vk=Object.getOwnPropertySymbols,Yte=Vk?function(e){return e==null?[]:(e=Object(e),Wte(Vk(e),function(t){return Gte.call(e,t)}))}:Hte,Xte=Yte;function Qte(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Jte=Qte;function Zte(e){return e!=null&&typeof e=="object"}var fm=Zte,ene=um,tne=fm,nne="[object Arguments]";function rne(e){return tne(e)&&ene(e)==nne}var sne=rne,Wk=sne,ine=fm,aR=Object.prototype,ane=aR.hasOwnProperty,one=aR.propertyIsEnumerable,lne=Wk(function(){return arguments}())?Wk:function(e){return ine(e)&&ane.call(e,"callee")&&!one.call(e,"callee")},cne=lne,Qf={exports:{}};function une(){return!1}var dne=une;Qf.exports;(function(e,t){var n=Cs,r=dne,s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===s,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r;e.exports=u})(Qf,Qf.exports);var oR=Qf.exports,hne=9007199254740991,fne=/^(?:0|[1-9]\d*)$/;function pne(e,t){var n=typeof e;return t=t??hne,!!t&&(n=="number"||n!="symbol"&&fne.test(e))&&e>-1&&e%1==0&&e<t}var mne=pne,gne=9007199254740991;function xne(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gne}var lR=xne,yne=um,vne=lR,bne=fm,wne="[object Arguments]",jne="[object Array]",Nne="[object Boolean]",kne="[object Date]",Sne="[object Error]",_ne="[object Function]",Ene="[object Map]",Cne="[object Number]",Tne="[object Object]",Ane="[object RegExp]",Pne="[object Set]",One="[object String]",Rne="[object WeakMap]",Mne="[object ArrayBuffer]",Dne="[object DataView]",Ine="[object Float32Array]",Lne="[object Float64Array]",Fne="[object Int8Array]",$ne="[object Int16Array]",zne="[object Int32Array]",Bne="[object Uint8Array]",Une="[object Uint8ClampedArray]",qne="[object Uint16Array]",Vne="[object Uint32Array]",rt={};rt[Ine]=rt[Lne]=rt[Fne]=rt[$ne]=rt[zne]=rt[Bne]=rt[Une]=rt[qne]=rt[Vne]=!0;rt[wne]=rt[jne]=rt[Mne]=rt[Nne]=rt[Dne]=rt[kne]=rt[Sne]=rt[_ne]=rt[Ene]=rt[Cne]=rt[Tne]=rt[Ane]=rt[Pne]=rt[One]=rt[Rne]=!1;function Wne(e){return bne(e)&&vne(e.length)&&!!rt[yne(e)]}var Hne=Wne;function Kne(e){return function(t){return e(t)}}var Gne=Kne,Jf={exports:{}};Jf.exports;(function(e,t){var n=ZO,r=t&&!t.nodeType&&t,s=r&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===r,o=a&&n.process,l=function(){try{var c=s&&s.require&&s.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(Jf,Jf.exports);var Yne=Jf.exports,Xne=Hne,Qne=Gne,Hk=Yne,Kk=Hk&&Hk.isTypedArray,Jne=Kk?Qne(Kk):Xne,cR=Jne,Zne=Jte,ere=cne,tre=H0,nre=oR,rre=mne,sre=cR,ire=Object.prototype,are=ire.hasOwnProperty;function ore(e,t){var n=tre(e),r=!n&&ere(e),s=!n&&!r&&nre(e),a=!n&&!r&&!s&&sre(e),o=n||r||s||a,l=o?Zne(e.length,String):[],c=l.length;for(var u in e)(t||are.call(e,u))&&!(o&&(u=="length"||s&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||rre(u,c)))&&l.push(u);return l}var lre=ore,cre=Object.prototype;function ure(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cre;return e===n}var dre=ure;function hre(e,t){return function(n){return e(t(n))}}var fre=hre,pre=fre,mre=pre(Object.keys,Object),gre=mre,xre=dre,yre=gre,vre=Object.prototype,bre=vre.hasOwnProperty;function wre(e){if(!xre(e))return yre(e);var t=[];for(var n in Object(e))bre.call(e,n)&&n!="constructor"&&t.push(n);return t}var jre=wre,Nre=nR,kre=lR;function Sre(e){return e!=null&&kre(e.length)&&!Nre(e)}var _re=Sre,Ere=lre,Cre=jre,Tre=_re;function Are(e){return Tre(e)?Ere(e):Cre(e)}var Pre=Are,Ore=zte,Rre=Xte,Mre=Pre;function Dre(e){return Ore(e,Mre,Rre)}var Ire=Dre,Gk=Ire,Lre=1,Fre=Object.prototype,$re=Fre.hasOwnProperty;function zre(e,t,n,r,s,a){var o=n&Lre,l=Gk(e),c=l.length,u=Gk(t),d=u.length;if(c!=d&&!o)return!1;for(var h=c;h--;){var f=l[h];if(!(o?f in t:$re.call(t,f)))return!1}var p=a.get(e),x=a.get(t);if(p&&x)return p==t&&x==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=o;++h<c;){f=l[h];var g=e[f],v=t[f];if(r)var b=o?r(v,g,f,t,e,a):r(g,v,f,e,t,a);if(!(b===void 0?g===v||s(g,v,n,r,a):b)){m=!1;break}y||(y=f=="constructor")}if(m&&!y){var w=e.constructor,j=t.constructor;w!=j&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof j=="function"&&j instanceof j)&&(m=!1)}return a.delete(e),a.delete(t),m}var Bre=zre,Ure=Dl,qre=Cs,Vre=Ure(qre,"DataView"),Wre=Vre,Hre=Dl,Kre=Cs,Gre=Hre(Kre,"Promise"),Yre=Gre,Xre=Dl,Qre=Cs,Jre=Xre(Qre,"Set"),Zre=Jre,ese=Dl,tse=Cs,nse=ese(tse,"WeakMap"),rse=nse,cv=Wre,uv=W0,dv=Yre,hv=Zre,fv=rse,uR=um,$l=rR,Yk="[object Map]",sse="[object Object]",Xk="[object Promise]",Qk="[object Set]",Jk="[object WeakMap]",Zk="[object DataView]",ise=$l(cv),ase=$l(uv),ose=$l(dv),lse=$l(hv),cse=$l(fv),qi=uR;(cv&&qi(new cv(new ArrayBuffer(1)))!=Zk||uv&&qi(new uv)!=Yk||dv&&qi(dv.resolve())!=Xk||hv&&qi(new hv)!=Qk||fv&&qi(new fv)!=Jk)&&(qi=function(e){var t=uR(e),n=t==sse?e.constructor:void 0,r=n?$l(n):"";if(r)switch(r){case ise:return Zk;case ase:return Yk;case ose:return Xk;case lse:return Qk;case cse:return Jk}return t});var use=qi,Wg=Uee,dse=iR,hse=Rte,fse=Bre,e2=use,t2=H0,n2=oR,pse=cR,mse=1,r2="[object Arguments]",s2="[object Array]",hh="[object Object]",gse=Object.prototype,i2=gse.hasOwnProperty;function xse(e,t,n,r,s,a){var o=t2(e),l=t2(t),c=o?s2:e2(e),u=l?s2:e2(t);c=c==r2?hh:c,u=u==r2?hh:u;var d=c==hh,h=u==hh,f=c==u;if(f&&n2(e)){if(!n2(t))return!1;o=!0,d=!1}if(f&&!d)return a||(a=new Wg),o||pse(e)?dse(e,t,n,r,s,a):hse(e,t,c,n,r,s,a);if(!(n&mse)){var p=d&&i2.call(e,"__wrapped__"),x=h&&i2.call(t,"__wrapped__");if(p||x){var m=p?e.value():e,y=x?t.value():t;return a||(a=new Wg),s(m,y,n,r,a)}}return f?(a||(a=new Wg),fse(e,t,n,r,s,a)):!1}var yse=xse,vse=yse,a2=fm;function dR(e,t,n,r,s){return e===t?!0:e==null||t==null||!a2(e)&&!a2(t)?e!==e&&t!==t:vse(e,t,n,r,dR,s)}var bse=dR,wse=bse;function jse(e,t){return wse(e,t)}var Nse=jse,hR={exports:{}};/*! 921 * Quill Editor v1.3.7 922 * https://quilljs.com/ 923 * Copyright (c) 2014, Jason Chen 924 * Copyright (c) 2013, salesforce.com 925 */(function(e,t){(function(r,s){e.exports=s()})(typeof self<"u"?self:On,function(){return function(n){var r={};function s(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return n[a].call(o.exports,o,o.exports,s),o.l=!0,o.exports}return s.m=n,s.c=r,s.d=function(a,o,l){s.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:l})},s.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(o,"a",o),o},s.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},s.p="",s(s.s=109)}([function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(17),o=s(18),l=s(19),c=s(45),u=s(46),d=s(47),h=s(48),f=s(49),p=s(12),x=s(32),m=s(33),y=s(31),g=s(1),v={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:a.default,Format:o.default,Leaf:l.default,Embed:h.default,Scroll:c.default,Block:d.default,Inline:u.default,Text:f.default,Attributor:{Attribute:p.default,Class:x.default,Style:m.default,Store:y.default}};r.default=v},function(n,r,s){var a=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var b in v)v.hasOwnProperty(b)&&(g[b]=v[b])};return function(g,v){y(g,v);function b(){this.constructor=g}g.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(y){a(g,y);function g(v){var b=this;return v="[Parchment] "+v,b=y.call(this,v)||this,b.message=v,b.name=b.constructor.name,b}return g}(Error);r.ParchmentError=o;var l={},c={},u={},d={};r.DATA_KEY="__blot";var h;(function(y){y[y.TYPE=3]="TYPE",y[y.LEVEL=12]="LEVEL",y[y.ATTRIBUTE=13]="ATTRIBUTE",y[y.BLOT=14]="BLOT",y[y.INLINE=7]="INLINE",y[y.BLOCK=11]="BLOCK",y[y.BLOCK_BLOT=10]="BLOCK_BLOT",y[y.INLINE_BLOT=6]="INLINE_BLOT",y[y.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",y[y.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",y[y.ANY=15]="ANY"})(h=r.Scope||(r.Scope={}));function f(y,g){var v=x(y);if(v==null)throw new o("Unable to create "+y+" blot");var b=v,w=y instanceof Node||y.nodeType===Node.TEXT_NODE?y:b.create(g);return new b(w,g)}r.create=f;function p(y,g){return g===void 0&&(g=!1),y==null?null:y[r.DATA_KEY]!=null?y[r.DATA_KEY].blot:g?p(y.parentNode,g):null}r.find=p;function x(y,g){g===void 0&&(g=h.ANY);var v;if(typeof y=="string")v=d[y]||l[y];else if(y instanceof Text||y.nodeType===Node.TEXT_NODE)v=d.text;else if(typeof y=="number")y&h.LEVEL&h.BLOCK?v=d.block:y&h.LEVEL&h.INLINE&&(v=d.inline);else if(y instanceof HTMLElement){var b=(y.getAttribute("class")||"").split(/\s+/);for(var w in b)if(v=c[b[w]],v)break;v=v||u[y.tagName]}return v==null?null:g&h.LEVEL&v.scope&&g&h.TYPE&v.scope?v:null}r.query=x;function m(){for(var y=[],g=0;g<arguments.length;g++)y[g]=arguments[g];if(y.length>1)return y.map(function(w){return m(w)});var v=y[0];if(typeof v.blotName!="string"&&typeof v.attrName!="string")throw new o("Invalid definition");if(v.blotName==="abstract")throw new o("Cannot register abstract class");if(d[v.blotName||v.attrName]=v,typeof v.keyName=="string")l[v.keyName]=v;else if(v.className!=null&&(c[v.className]=v),v.tagName!=null){Array.isArray(v.tagName)?v.tagName=v.tagName.map(function(w){return w.toUpperCase()}):v.tagName=v.tagName.toUpperCase();var b=Array.isArray(v.tagName)?v.tagName:[v.tagName];b.forEach(function(w){(u[w]==null||v.className==null)&&(u[w]=v)})}return v}r.register=m},function(n,r,s){var a=s(51),o=s(11),l=s(3),c=s(20),u="\0",d=function(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]};d.prototype.insert=function(h,f){var p={};return h.length===0?this:(p.insert=h,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p))},d.prototype.delete=function(h){return h<=0?this:this.push({delete:h})},d.prototype.retain=function(h,f){if(h<=0)return this;var p={retain:h};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p)},d.prototype.push=function(h){var f=this.ops.length,p=this.ops[f-1];if(h=l(!0,{},h),typeof p=="object"){if(typeof h.delete=="number"&&typeof p.delete=="number")return this.ops[f-1]={delete:p.delete+h.delete},this;if(typeof p.delete=="number"&&h.insert!=null&&(f-=1,p=this.ops[f-1],typeof p!="object"))return this.ops.unshift(h),this;if(o(h.attributes,p.attributes)){if(typeof h.insert=="string"&&typeof p.insert=="string")return this.ops[f-1]={insert:p.insert+h.insert},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof p.retain=="number")return this.ops[f-1]={retain:p.retain+h.retain},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this}}return f===this.ops.length?this.ops.push(h):this.ops.splice(f,0,h),this},d.prototype.chop=function(){var h=this.ops[this.ops.length-1];return h&&h.retain&&!h.attributes&&this.ops.pop(),this},d.prototype.filter=function(h){return this.ops.filter(h)},d.prototype.forEach=function(h){this.ops.forEach(h)},d.prototype.map=function(h){return this.ops.map(h)},d.prototype.partition=function(h){var f=[],p=[];return this.forEach(function(x){var m=h(x)?f:p;m.push(x)}),[f,p]},d.prototype.reduce=function(h,f){return this.ops.reduce(h,f)},d.prototype.changeLength=function(){return this.reduce(function(h,f){return f.insert?h+c.length(f):f.delete?h-f.delete:h},0)},d.prototype.length=function(){return this.reduce(function(h,f){return h+c.length(f)},0)},d.prototype.slice=function(h,f){h=h||0,typeof f!="number"&&(f=1/0);for(var p=[],x=c.iterator(this.ops),m=0;m<f&&x.hasNext();){var y;m<h?y=x.next(h-m):(y=x.next(f-m),p.push(y)),m+=c.length(y)}return new d(p)},d.prototype.compose=function(h){var f=c.iterator(this.ops),p=c.iterator(h.ops),x=[],m=p.peek();if(m!=null&&typeof m.retain=="number"&&m.attributes==null){for(var y=m.retain;f.peekType()==="insert"&&f.peekLength()<=y;)y-=f.peekLength(),x.push(f.next());m.retain-y>0&&p.next(m.retain-y)}for(var g=new d(x);f.hasNext()||p.hasNext();)if(p.peekType()==="insert")g.push(p.next());else if(f.peekType()==="delete")g.push(f.next());else{var v=Math.min(f.peekLength(),p.peekLength()),b=f.next(v),w=p.next(v);if(typeof w.retain=="number"){var j={};typeof b.retain=="number"?j.retain=v:j.insert=b.insert;var E=c.attributes.compose(b.attributes,w.attributes,typeof b.retain=="number");if(E&&(j.attributes=E),g.push(j),!p.hasNext()&&o(g.ops[g.ops.length-1],j)){var k=new d(f.rest());return g.concat(k).chop()}}else typeof w.delete=="number"&&typeof b.retain=="number"&&g.push(w)}return g.chop()},d.prototype.concat=function(h){var f=new d(this.ops.slice());return h.ops.length>0&&(f.push(h.ops[0]),f.ops=f.ops.concat(h.ops.slice(1))),f},d.prototype.diff=function(h,f){if(this.ops===h.ops)return new d;var p=[this,h].map(function(v){return v.map(function(b){if(b.insert!=null)return typeof b.insert=="string"?b.insert:u;var w=v===h?"on":"with";throw new Error("diff() called "+w+" non-document")}).join("")}),x=new d,m=a(p[0],p[1],f),y=c.iterator(this.ops),g=c.iterator(h.ops);return m.forEach(function(v){for(var b=v[1].length;b>0;){var w=0;switch(v[0]){case a.INSERT:w=Math.min(g.peekLength(),b),x.push(g.next(w));break;case a.DELETE:w=Math.min(b,y.peekLength()),y.next(w),x.delete(w);break;case a.EQUAL:w=Math.min(y.peekLength(),g.peekLength(),b);var j=y.next(w),E=g.next(w);o(j.insert,E.insert)?x.retain(w,c.attributes.diff(j.attributes,E.attributes)):x.push(E).delete(w);break}b-=w}}),x.chop()},d.prototype.eachLine=function(h,f){f=f||` 926`;for(var p=c.iterator(this.ops),x=new d,m=0;p.hasNext();){if(p.peekType()!=="insert")return;var y=p.peek(),g=c.length(y)-p.peekLength(),v=typeof y.insert=="string"?y.insert.indexOf(f,g)-g:-1;if(v<0)x.push(p.next());else if(v>0)x.push(p.next(v));else{if(h(x,p.next(1).attributes||{},m)===!1)return;m+=1,x=new d}}x.length()>0&&h(x,{},m)},d.prototype.transform=function(h,f){if(f=!!f,typeof h=="number")return this.transformPosition(h,f);for(var p=c.iterator(this.ops),x=c.iterator(h.ops),m=new d;p.hasNext()||x.hasNext();)if(p.peekType()==="insert"&&(f||x.peekType()!=="insert"))m.retain(c.length(p.next()));else if(x.peekType()==="insert")m.push(x.next());else{var y=Math.min(p.peekLength(),x.peekLength()),g=p.next(y),v=x.next(y);if(g.delete)continue;v.delete?m.push(v):m.retain(y,c.attributes.transform(g.attributes,v.attributes,f))}return m.chop()},d.prototype.transformPosition=function(h,f){f=!!f;for(var p=c.iterator(this.ops),x=0;p.hasNext()&&x<=h;){var m=p.peekLength(),y=p.peekType();if(p.next(),y==="delete"){h-=Math.min(m,h-x);continue}else y==="insert"&&(x<h||!f)&&(h+=m);x+=m}return h},n.exports=d},function(n,r){var s=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(p){return typeof Array.isArray=="function"?Array.isArray(p):a.call(p)==="[object Array]"},u=function(p){if(!p||a.call(p)!=="[object Object]")return!1;var x=s.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&s.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!x&&!m)return!1;var y;for(y in p);return typeof y>"u"||s.call(p,y)},d=function(p,x){o&&x.name==="__proto__"?o(p,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):p[x.name]=x.newValue},h=function(p,x){if(x==="__proto__")if(s.call(p,x)){if(l)return l(p,x).value}else return;return p[x]};n.exports=function f(){var p,x,m,y,g,v,b=arguments[0],w=1,j=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},w=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});w<j;++w)if(p=arguments[w],p!=null)for(x in p)m=h(b,x),y=h(p,x),b!==y&&(E&&y&&(u(y)||(g=c(y)))?(g?(g=!1,v=m&&c(m)?m:[]):v=m&&u(m)?m:{},d(b,{name:x,newValue:f(E,v,y)})):typeof y<"u"&&d(b,{name:x,newValue:y}));return b}},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var a=function(){function T(_,P){for(var O=0;O<P.length;O++){var I=P[O];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,I.key,I)}}return function(_,P,O){return P&&T(_.prototype,P),O&&T(_,O),_}}(),o=function T(_,P,O){_===null&&(_=Function.prototype);var I=Object.getOwnPropertyDescriptor(_,P);if(I===void 0){var B=Object.getPrototypeOf(_);return B===null?void 0:T(B,P,O)}else{if("value"in I)return I.value;var $=I.get;return $===void 0?void 0:$.call(O)}},l=s(3),c=b(l),u=s(2),d=b(u),h=s(0),f=b(h),p=s(16),x=b(p),m=s(6),y=b(m),g=s(7),v=b(g);function b(T){return T&&T.__esModule?T:{default:T}}function w(T,_){if(!(T instanceof _))throw new TypeError("Cannot call a class as a function")}function j(T,_){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:T}function E(T,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);T.prototype=Object.create(_&&_.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(T,_):T.__proto__=_)}var k=1,S=function(T){E(_,T);function _(){return w(this,_),j(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"attach",value:function(){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"attach",this).call(this),this.attributes=new f.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(O,I){var B=f.default.query(O,f.default.Scope.BLOCK_ATTRIBUTE);B!=null&&this.attributes.attribute(B,I)}},{key:"formatAt",value:function(O,I,B,$){this.format(B,$)}},{key:"insertAt",value:function(O,I,B){if(typeof I=="string"&&I.endsWith(` 927`)){var $=f.default.create(A.blotName);this.parent.insertBefore($,O===0?this:this.next),$.insertAt(0,I.slice(0,-1))}else o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertAt",this).call(this,O,I,B)}}]),_}(f.default.Embed);S.scope=f.default.Scope.BLOCK_BLOT;var A=function(T){E(_,T);function _(P){w(this,_);var O=j(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,P));return O.cache={},O}return a(_,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(f.default.Leaf).reduce(function(O,I){return I.length()===0?O:O.insert(I.value(),C(I))},new d.default).insert(` 928`,C(this))),this.cache.delta}},{key:"deleteAt",value:function(O,I){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"deleteAt",this).call(this,O,I),this.cache={}}},{key:"formatAt",value:function(O,I,B,$){I<=0||(f.default.query(B,f.default.Scope.BLOCK)?O+I===this.length()&&this.format(B,$):o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"formatAt",this).call(this,O,Math.min(I,this.length()-O-1),B,$),this.cache={})}},{key:"insertAt",value:function(O,I,B){if(B!=null)return o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertAt",this).call(this,O,I,B);if(I.length!==0){var $=I.split(` 929`),q=$.shift();q.length>0&&(O<this.length()-1||this.children.tail==null?o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertAt",this).call(this,Math.min(O,this.length()-1),q):this.children.tail.insertAt(this.children.tail.length(),q),this.cache={});var L=this;$.reduce(function(D,R){return L=L.split(D,!0),L.insertAt(0,R),R.length},O+q.length)}}},{key:"insertBefore",value:function(O,I){var B=this.children.head;o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertBefore",this).call(this,O,I),B instanceof x.default&&B.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"length",this).call(this)+k),this.cache.length}},{key:"moveChildren",value:function(O,I){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"moveChildren",this).call(this,O,I),this.cache={}}},{key:"optimize",value:function(O){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,O),this.cache={}}},{key:"path",value:function(O){return o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"path",this).call(this,O,!0)}},{key:"removeChild",value:function(O){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"removeChild",this).call(this,O),this.cache={}}},{key:"split",value:function(O){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(I&&(O===0||O>=this.length()-k)){var B=this.clone();return O===0?(this.parent.insertBefore(B,this),this):(this.parent.insertBefore(B,this.next),B)}else{var $=o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"split",this).call(this,O,I);return this.cache={},$}}}]),_}(f.default.Block);A.blotName="block",A.tagName="P",A.defaultChild="break",A.allowedChildren=[y.default,f.default.Embed,v.default];function C(T){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T==null||(typeof T.formats=="function"&&(_=(0,c.default)(_,T.formats())),T.parent==null||T.parent.blotName=="scroll"||T.parent.statics.scope!==T.statics.scope)?_:C(T.parent,_)}r.bubbleFormats=C,r.BlockEmbed=S,r.default=A},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},o=function(){function L(D,R){var F=[],U=!0,V=!1,W=void 0;try{for(var M=D[Symbol.iterator](),z;!(U=(z=M.next()).done)&&(F.push(z.value),!(R&&F.length===R));U=!0);}catch(H){V=!0,W=H}finally{try{!U&&M.return&&M.return()}finally{if(V)throw W}}return F}return function(D,R){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return L(D,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function L(D,R){for(var F=0;F<R.length;F++){var U=R[F];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(D,U.key,U)}}return function(D,R,F){return R&&L(D.prototype,R),F&&L(D,F),D}}();s(50);var c=s(2),u=C(c),d=s(14),h=C(d),f=s(8),p=C(f),x=s(9),m=C(x),y=s(0),g=C(y),v=s(15),b=C(v),w=s(3),j=C(w),E=s(10),k=C(E),S=s(34),A=C(S);function C(L){return L&&L.__esModule?L:{default:L}}function T(L,D,R){return D in L?Object.defineProperty(L,D,{value:R,enumerable:!0,configurable:!0,writable:!0}):L[D]=R,L}function _(L,D){if(!(L instanceof D))throw new TypeError("Cannot call a class as a function")}var P=(0,k.default)("quill"),O=function(){l(L,null,[{key:"debug",value:function(R){R===!0&&(R="log"),k.default.level(R)}},{key:"find",value:function(R){return R.__quill||g.default.find(R)}},{key:"import",value:function(R){return this.imports[R]==null&&P.error("Cannot import "+R+". Are you sure it was registered?"),this.imports[R]}},{key:"register",value:function(R,F){var U=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof R!="string"){var W=R.attrName||R.blotName;typeof W=="string"?this.register("formats/"+W,R,F):Object.keys(R).forEach(function(M){U.register(M,R[M],F)})}else this.imports[R]!=null&&!V&&P.warn("Overwriting "+R+" with",F),this.imports[R]=F,(R.startsWith("blots/")||R.startsWith("formats/"))&&F.blotName!=="abstract"?g.default.register(F):R.startsWith("modules")&&typeof F.register=="function"&&F.register()}}]);function L(D){var R=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_(this,L),this.options=I(D,F),this.container=this.options.container,this.container==null)return P.error("Invalid Quill container",D);this.options.debug&&L.debug(this.options.debug);var U=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new p.default,this.scroll=g.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new h.default(this.scroll),this.selection=new b.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(p.default.events.EDITOR_CHANGE,function(W){W===p.default.events.TEXT_CHANGE&&R.root.classList.toggle("ql-blank",R.editor.isBlank())}),this.emitter.on(p.default.events.SCROLL_UPDATE,function(W,M){var z=R.selection.lastRange,H=z&&z.length===0?z.index:void 0;B.call(R,function(){return R.editor.update(null,M,H)},W)});var V=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+U+"<p><br></p></div>");this.setContents(V),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(L,[{key:"addContainer",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof R=="string"){var U=R;R=document.createElement("div"),R.classList.add(U)}return this.container.insertBefore(R,F),R}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(R,F,U){var V=this,W=$(R,F,U),M=o(W,4);return R=M[0],F=M[1],U=M[3],B.call(this,function(){return V.editor.deleteText(R,F)},U,R,-1*F)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(R),this.container.classList.toggle("ql-disabled",!R)}},{key:"focus",value:function(){var R=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=R,this.scrollIntoView()}},{key:"format",value:function(R,F){var U=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;return B.call(this,function(){var W=U.getSelection(!0),M=new u.default;if(W==null)return M;if(g.default.query(R,g.default.Scope.BLOCK))M=U.editor.formatLine(W.index,W.length,T({},R,F));else{if(W.length===0)return U.selection.format(R,F),M;M=U.editor.formatText(W.index,W.length,T({},R,F))}return U.setSelection(W,p.default.sources.SILENT),M},V)}},{key:"formatLine",value:function(R,F,U,V,W){var M=this,z=void 0,H=$(R,F,U,V,W),G=o(H,4);return R=G[0],F=G[1],z=G[2],W=G[3],B.call(this,function(){return M.editor.formatLine(R,F,z)},W,R,0)}},{key:"formatText",value:function(R,F,U,V,W){var M=this,z=void 0,H=$(R,F,U,V,W),G=o(H,4);return R=G[0],F=G[1],z=G[2],W=G[3],B.call(this,function(){return M.editor.formatText(R,F,z)},W,R,0)}},{key:"getBounds",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,U=void 0;typeof R=="number"?U=this.selection.getBounds(R,F):U=this.selection.getBounds(R.index,R.length);var V=this.container.getBoundingClientRect();return{bottom:U.bottom-V.top,height:U.height,left:U.left-V.left,right:U.right-V.left,top:U.top-V.top,width:U.width}}},{key:"getContents",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,U=$(R,F),V=o(U,2);return R=V[0],F=V[1],this.editor.getContents(R,F)}},{key:"getFormat",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof R=="number"?this.editor.getFormat(R,F):this.editor.getFormat(R.index,R.length)}},{key:"getIndex",value:function(R){return R.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(R){return this.scroll.leaf(R)}},{key:"getLine",value:function(R){return this.scroll.line(R)}},{key:"getLines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof R!="number"?this.scroll.lines(R.index,R.length):this.scroll.lines(R,F)}},{key:"getModule",value:function(R){return this.theme.modules[R]}},{key:"getSelection",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return R&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,U=$(R,F),V=o(U,2);return R=V[0],F=V[1],this.editor.getText(R,F)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(R,F,U){var V=this,W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:L.sources.API;return B.call(this,function(){return V.editor.insertEmbed(R,F,U)},W,R)}},{key:"insertText",value:function(R,F,U,V,W){var M=this,z=void 0,H=$(R,0,U,V,W),G=o(H,4);return R=G[0],z=G[2],W=G[3],B.call(this,function(){return M.editor.insertText(R,F,z)},W,R,F.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(R,F,U){this.clipboard.dangerouslyPasteHTML(R,F,U)}},{key:"removeFormat",value:function(R,F,U){var V=this,W=$(R,F,U),M=o(W,4);return R=M[0],F=M[1],U=M[3],B.call(this,function(){return V.editor.removeFormat(R,F)},U,R)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(R){var F=this,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return B.call(this,function(){R=new u.default(R);var V=F.getLength(),W=F.editor.deleteText(0,V),M=F.editor.applyDelta(R),z=M.ops[M.ops.length-1];z!=null&&typeof z.insert=="string"&&z.insert[z.insert.length-1]===` 930`&&(F.editor.deleteText(F.getLength()-1,1),M.delete(1));var H=W.compose(M);return H},U)}},{key:"setSelection",value:function(R,F,U){if(R==null)this.selection.setRange(null,F||L.sources.API);else{var V=$(R,F,U),W=o(V,4);R=W[0],F=W[1],U=W[3],this.selection.setRange(new v.Range(R,F),U),U!==p.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API,U=new u.default().insert(R);return this.setContents(U,F)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.default.sources.USER,F=this.scroll.update(R);return this.selection.update(R),F}},{key:"updateContents",value:function(R){var F=this,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.default.sources.API;return B.call(this,function(){return R=new u.default(R),F.editor.applyDelta(R,U)},U,!0)}}]),L}();O.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},O.events=p.default.events,O.sources=p.default.sources,O.version="1.3.7",O.imports={delta:u.default,parchment:g.default,"core/module":m.default,"core/theme":A.default};function I(L,D){if(D=(0,j.default)(!0,{container:L,modules:{clipboard:!0,keyboard:!0,history:!0}},D),!D.theme||D.theme===O.DEFAULTS.theme)D.theme=A.default;else if(D.theme=O.import("themes/"+D.theme),D.theme==null)throw new Error("Invalid theme "+D.theme+". Did you register it?");var R=(0,j.default)(!0,{},D.theme.DEFAULTS);[R,D].forEach(function(V){V.modules=V.modules||{},Object.keys(V.modules).forEach(function(W){V.modules[W]===!0&&(V.modules[W]={})})});var F=Object.keys(R.modules).concat(Object.keys(D.modules)),U=F.reduce(function(V,W){var M=O.import("modules/"+W);return M==null?P.error("Cannot load "+W+" module. Are you sure you registered it?"):V[W]=M.DEFAULTS||{},V},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,j.default)(!0,{},O.DEFAULTS,{modules:U},R,D),["bounds","container","scrollingContainer"].forEach(function(V){typeof D[V]=="string"&&(D[V]=document.querySelector(D[V]))}),D.modules=Object.keys(D.modules).reduce(function(V,W){return D.modules[W]&&(V[W]=D.modules[W]),V},{}),D}function B(L,D,R,F){if(this.options.strict&&!this.isEnabled()&&D===p.default.sources.USER)return new u.default;var U=R==null?null:this.getSelection(),V=this.editor.delta,W=L();if(U!=null&&(R===!0&&(R=U.index),F==null?U=q(U,W,D):F!==0&&(U=q(U,R,F,D)),this.setSelection(U,p.default.sources.SILENT)),W.length()>0){var M,z=[p.default.events.TEXT_CHANGE,W,V,D];if((M=this.emitter).emit.apply(M,[p.default.events.EDITOR_CHANGE].concat(z)),D!==p.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,z)}}return W}function $(L,D,R,F,U){var V={};return typeof L.index=="number"&&typeof L.length=="number"?typeof D!="number"?(U=F,F=R,R=D,D=L.length,L=L.index):(D=L.length,L=L.index):typeof D!="number"&&(U=F,F=R,R=D,D=0),(typeof R>"u"?"undefined":a(R))==="object"?(V=R,U=F):typeof R=="string"&&(F!=null?V[R]=F:U=R),U=U||p.default.sources.API,[L,D,V,U]}function q(L,D,R,F){if(L==null)return null;var U=void 0,V=void 0;if(D instanceof u.default){var W=[L.index,L.index+L.length].map(function(G){return D.transformPosition(G,F!==p.default.sources.USER)}),M=o(W,2);U=M[0],V=M[1]}else{var z=[L.index,L.index+L.length].map(function(G){return G<D||G===D&&F===p.default.sources.USER?G:R>=0?G+R:Math.max(D,G+R)}),H=o(z,2);U=H[0],V=H[1]}return new v.Range(U,V-U)}r.expandConfig=I,r.overload=$,r.default=O},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:y(j,v,b)}else{if("value"in w)return w.value;var E=w.get;return E===void 0?void 0:E.call(b)}},l=s(7),c=h(l),u=s(0),d=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function f(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function p(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function x(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var m=function(y){x(g,y);function g(){return f(this,g),p(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,[{key:"formatAt",value:function(b,w,j,E){if(g.compare(this.statics.blotName,j)<0&&d.default.query(j,d.default.Scope.BLOT)){var k=this.isolate(b,w);E&&k.wrap(j,E)}else o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"formatAt",this).call(this,b,w,j,E)}},{key:"optimize",value:function(b){if(o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,b),this.parent instanceof g&&g.compare(this.statics.blotName,this.parent.statics.blotName)>0){var w=this.parent.isolate(this.offset(),this.length());this.moveChildren(w),w.wrap(this)}}}],[{key:"compare",value:function(b,w){var j=g.order.indexOf(b),E=g.order.indexOf(w);return j>=0||E>=0?j-E:b===w?0:b<w?-1:1}}]),g}(d.default.Inline);m.allowedChildren=[m,d.default.Embed,c.default],m.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=m},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(0),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function u(f,p){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:f}function d(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);f.prototype=Object.create(p&&p.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(f,p):f.__proto__=p)}var h=function(f){d(p,f);function p(){return c(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(o.default.Text);r.default=h},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function v(b,w){for(var j=0;j<w.length;j++){var E=w[j];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,w,j){return w&&v(b.prototype,w),j&&v(b,j),b}}(),o=function v(b,w,j){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,w);if(E===void 0){var k=Object.getPrototypeOf(b);return k===null?void 0:v(k,w,j)}else{if("value"in E)return E.value;var S=E.get;return S===void 0?void 0:S.call(j)}},l=s(54),c=h(l),u=s(10),d=h(u);function h(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function p(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function x(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var m=(0,d.default)("quill:events"),y=["selectionchange","mousedown","mouseup","click"];y.forEach(function(v){document.addEventListener(v,function(){for(var b=arguments.length,w=Array(b),j=0;j<b;j++)w[j]=arguments[j];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(E){if(E.__quill&&E.__quill.emitter){var k;(k=E.__quill.emitter).handleDOM.apply(k,w)}})})});var g=function(v){x(b,v);function b(){f(this,b);var w=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return w.listeners={},w.on("error",m.error),w}return a(b,[{key:"emit",value:function(){m.log.apply(m,arguments),o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(j){for(var E=arguments.length,k=Array(E>1?E-1:0),S=1;S<E;S++)k[S-1]=arguments[S];(this.listeners[j.type]||[]).forEach(function(A){var C=A.node,T=A.handler;(j.target===C||C.contains(j.target))&&T.apply(void 0,[j].concat(k))})}},{key:"listenDOM",value:function(j,E,k){this.listeners[j]||(this.listeners[j]=[]),this.listeners[j].push({node:E,handler:k})}}]),b}(c.default);g.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},g.sources={API:"api",SILENT:"silent",USER:"user"},r.default=g},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});function a(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var o=function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(this,l),this.quill=c,this.options=u};o.DEFAULTS={},r.default=o},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=["error","warn","log","info"],o="warn";function l(u){if(a.indexOf(u)<=a.indexOf(o)){for(var d,h=arguments.length,f=Array(h>1?h-1:0),p=1;p<h;p++)f[p-1]=arguments[p];(d=console)[u].apply(d,f)}}function c(u){return a.reduce(function(d,h){return d[h]=l.bind(console,h,u),d},{})}l.level=c.level=function(u){o=u},r.default=c},function(n,r,s){var a=Array.prototype.slice,o=s(52),l=s(53),c=n.exports=function(f,p,x){return x||(x={}),f===p?!0:f instanceof Date&&p instanceof Date?f.getTime()===p.getTime():!f||!p||typeof f!="object"&&typeof p!="object"?x.strict?f===p:f==p:h(f,p,x)};function u(f){return f==null}function d(f){return!(!f||typeof f!="object"||typeof f.length!="number"||typeof f.copy!="function"||typeof f.slice!="function"||f.length>0&&typeof f[0]!="number")}function h(f,p,x){var m,y;if(u(f)||u(p)||f.prototype!==p.prototype)return!1;if(l(f))return l(p)?(f=a.call(f),p=a.call(p),c(f,p,x)):!1;if(d(f)){if(!d(p)||f.length!==p.length)return!1;for(m=0;m<f.length;m++)if(f[m]!==p[m])return!1;return!0}try{var g=o(f),v=o(p)}catch{return!1}if(g.length!=v.length)return!1;for(g.sort(),v.sort(),m=g.length-1;m>=0;m--)if(g[m]!=v[m])return!1;for(m=g.length-1;m>=0;m--)if(y=g[m],!c(f[y],p[y],x))return!1;return typeof f==typeof p}},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(1),o=function(){function l(c,u,d){d===void 0&&(d={}),this.attrName=c,this.keyName=u;var h=a.Scope.TYPE&a.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&a.Scope.LEVEL|h:this.scope=a.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return l.keys=function(c){return[].map.call(c.attributes,function(u){return u.name})},l.prototype.add=function(c,u){return this.canAdd(c,u)?(c.setAttribute(this.keyName,u),!0):!1},l.prototype.canAdd=function(c,u){var d=a.query(c,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof u=="string"?this.whitelist.indexOf(u.replace(/["']/g,""))>-1:this.whitelist.indexOf(u)>-1},l.prototype.remove=function(c){c.removeAttribute(this.keyName)},l.prototype.value=function(c){var u=c.getAttribute(this.keyName);return this.canAdd(c,u)&&u?u:""},l}();r.default=o},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var a=function(){function S(A,C){var T=[],_=!0,P=!1,O=void 0;try{for(var I=A[Symbol.iterator](),B;!(_=(B=I.next()).done)&&(T.push(B.value),!(C&&T.length===C));_=!0);}catch($){P=!0,O=$}finally{try{!_&&I.return&&I.return()}finally{if(P)throw O}}return T}return function(A,C){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return S(A,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function S(A,C){for(var T=0;T<C.length;T++){var _=C[T];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(A,_.key,_)}}return function(A,C,T){return C&&S(A.prototype,C),T&&S(A,T),A}}(),l=function S(A,C,T){A===null&&(A=Function.prototype);var _=Object.getOwnPropertyDescriptor(A,C);if(_===void 0){var P=Object.getPrototypeOf(A);return P===null?void 0:S(P,C,T)}else{if("value"in _)return _.value;var O=_.get;return O===void 0?void 0:O.call(T)}},c=s(2),u=v(c),d=s(0),h=v(d),f=s(4),p=v(f),x=s(6),m=v(x),y=s(7),g=v(y);function v(S){return S&&S.__esModule?S:{default:S}}function b(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function w(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function j(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}var E=function(S){j(A,S);function A(){return b(this,A),w(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return A}(m.default);E.blotName="code",E.tagName="CODE";var k=function(S){j(A,S);function A(){return b(this,A),w(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"delta",value:function(){var T=this,_=this.domNode.textContent;return _.endsWith(` 931`)&&(_=_.slice(0,-1)),_.split(` 932`).reduce(function(P,O){return P.insert(O).insert(` 933`,T.formats())},new u.default)}},{key:"format",value:function(T,_){if(!(T===this.statics.blotName&&_)){var P=this.descendant(g.default,this.length()-1),O=a(P,1),I=O[0];I!=null&&I.deleteAt(I.length()-1,1),l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"format",this).call(this,T,_)}}},{key:"formatAt",value:function(T,_,P,O){if(_!==0&&!(h.default.query(P,h.default.Scope.BLOCK)==null||P===this.statics.blotName&&O===this.statics.formats(this.domNode))){var I=this.newlineIndex(T);if(!(I<0||I>=T+_)){var B=this.newlineIndex(T,!0)+1,$=I-B+1,q=this.isolate(B,$),L=q.next;q.format(P,O),L instanceof A&&L.formatAt(0,T-B+_-$,P,O)}}}},{key:"insertAt",value:function(T,_,P){if(P==null){var O=this.descendant(g.default,T),I=a(O,2),B=I[0],$=I[1];B.insertAt($,_)}}},{key:"length",value:function(){var T=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` 934`)?T:T+1}},{key:"newlineIndex",value:function(T){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_)return this.domNode.textContent.slice(0,T).lastIndexOf(` 935`);var P=this.domNode.textContent.slice(T).indexOf(` 936`);return P>-1?T+P:-1}},{key:"optimize",value:function(T){this.domNode.textContent.endsWith(` 937`)||this.appendChild(h.default.create("text",` 938`)),l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,T);var _=this.next;_!=null&&_.prev===this&&_.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===_.statics.formats(_.domNode)&&(_.optimize(T),_.moveChildren(this),_.remove())}},{key:"replace",value:function(T){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replace",this).call(this,T),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(_){var P=h.default.find(_);P==null?_.parentNode.removeChild(_):P instanceof h.default.Embed?P.remove():P.unwrap()})}}],[{key:"create",value:function(T){var _=l(A.__proto__||Object.getPrototypeOf(A),"create",this).call(this,T);return _.setAttribute("spellcheck",!1),_}},{key:"formats",value:function(){return!0}}]),A}(p.default);k.blotName="code-block",k.tagName="PRE",k.TAB=" ",r.Code=E,r.default=k},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},o=function(){function L(D,R){var F=[],U=!0,V=!1,W=void 0;try{for(var M=D[Symbol.iterator](),z;!(U=(z=M.next()).done)&&(F.push(z.value),!(R&&F.length===R));U=!0);}catch(H){V=!0,W=H}finally{try{!U&&M.return&&M.return()}finally{if(V)throw W}}return F}return function(D,R){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return L(D,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function L(D,R){for(var F=0;F<R.length;F++){var U=R[F];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(D,U.key,U)}}return function(D,R,F){return R&&L(D.prototype,R),F&&L(D,F),D}}(),c=s(2),u=_(c),d=s(20),h=_(d),f=s(0),p=_(f),x=s(13),m=_(x),y=s(24),g=_(y),v=s(4),b=_(v),w=s(16),j=_(w),E=s(21),k=_(E),S=s(11),A=_(S),C=s(3),T=_(C);function _(L){return L&&L.__esModule?L:{default:L}}function P(L,D,R){return D in L?Object.defineProperty(L,D,{value:R,enumerable:!0,configurable:!0,writable:!0}):L[D]=R,L}function O(L,D){if(!(L instanceof D))throw new TypeError("Cannot call a class as a function")}var I=/^[ -~]*$/,B=function(){function L(D){O(this,L),this.scroll=D,this.delta=this.getDelta()}return l(L,[{key:"applyDelta",value:function(R){var F=this,U=!1;this.scroll.update();var V=this.scroll.length();return this.scroll.batchStart(),R=q(R),R.reduce(function(W,M){var z=M.retain||M.delete||M.insert.length||1,H=M.attributes||{};if(M.insert!=null){if(typeof M.insert=="string"){var G=M.insert;G.endsWith(` 939`)&&U&&(U=!1,G=G.slice(0,-1)),W>=V&&!G.endsWith(` 940`)&&(U=!0),F.scroll.insertAt(W,G);var Y=F.scroll.line(W),Z=o(Y,2),J=Z[0],oe=Z[1],de=(0,T.default)({},(0,v.bubbleFormats)(J));if(J instanceof b.default){var ye=J.descendant(p.default.Leaf,oe),ve=o(ye,1),Ee=ve[0];de=(0,T.default)(de,(0,v.bubbleFormats)(Ee))}H=h.default.attributes.diff(de,H)||{}}else if(a(M.insert)==="object"){var X=Object.keys(M.insert)[0];if(X==null)return W;F.scroll.insertAt(W,X,M.insert[X])}V+=z}return Object.keys(H).forEach(function(Q){F.scroll.formatAt(W,z,Q,H[Q])}),W+z},0),R.reduce(function(W,M){return typeof M.delete=="number"?(F.scroll.deleteAt(W,M.delete),W):W+(M.retain||M.insert.length||1)},0),this.scroll.batchEnd(),this.update(R)}},{key:"deleteText",value:function(R,F){return this.scroll.deleteAt(R,F),this.update(new u.default().retain(R).delete(F))}},{key:"formatLine",value:function(R,F){var U=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(V).forEach(function(W){if(!(U.scroll.whitelist!=null&&!U.scroll.whitelist[W])){var M=U.scroll.lines(R,Math.max(F,1)),z=F;M.forEach(function(H){var G=H.length();if(!(H instanceof m.default))H.format(W,V[W]);else{var Y=R-H.offset(U.scroll),Z=H.newlineIndex(Y+z)-Y+1;H.formatAt(Y,Z,W,V[W])}z-=G})}}),this.scroll.optimize(),this.update(new u.default().retain(R).retain(F,(0,k.default)(V)))}},{key:"formatText",value:function(R,F){var U=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(V).forEach(function(W){U.scroll.formatAt(R,F,W,V[W])}),this.update(new u.default().retain(R).retain(F,(0,k.default)(V)))}},{key:"getContents",value:function(R,F){return this.delta.slice(R,R+F)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(R,F){return R.concat(F.delta())},new u.default)}},{key:"getFormat",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,U=[],V=[];F===0?this.scroll.path(R).forEach(function(M){var z=o(M,1),H=z[0];H instanceof b.default?U.push(H):H instanceof p.default.Leaf&&V.push(H)}):(U=this.scroll.lines(R,F),V=this.scroll.descendants(p.default.Leaf,R,F));var W=[U,V].map(function(M){if(M.length===0)return{};for(var z=(0,v.bubbleFormats)(M.shift());Object.keys(z).length>0;){var H=M.shift();if(H==null)return z;z=$((0,v.bubbleFormats)(H),z)}return z});return T.default.apply(T.default,W)}},{key:"getText",value:function(R,F){return this.getContents(R,F).filter(function(U){return typeof U.insert=="string"}).map(function(U){return U.insert}).join("")}},{key:"insertEmbed",value:function(R,F,U){return this.scroll.insertAt(R,F,U),this.update(new u.default().retain(R).insert(P({},F,U)))}},{key:"insertText",value:function(R,F){var U=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return F=F.replace(/\r\n/g,` 941`).replace(/\r/g,` 942`),this.scroll.insertAt(R,F),Object.keys(V).forEach(function(W){U.scroll.formatAt(R,F.length,W,V[W])}),this.update(new u.default().retain(R).insert(F,(0,k.default)(V)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var R=this.scroll.children.head;return R.statics.blotName!==b.default.blotName||R.children.length>1?!1:R.children.head instanceof j.default}},{key:"removeFormat",value:function(R,F){var U=this.getText(R,F),V=this.scroll.line(R+F),W=o(V,2),M=W[0],z=W[1],H=0,G=new u.default;M!=null&&(M instanceof m.default?H=M.newlineIndex(z)-z+1:H=M.length()-z,G=M.delta().slice(z,z+H-1).insert(` 943`));var Y=this.getContents(R,F+H),Z=Y.diff(new u.default().insert(U).concat(G)),J=new u.default().retain(R).concat(Z);return this.applyDelta(J)}},{key:"update",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,V=this.delta;if(F.length===1&&F[0].type==="characterData"&&F[0].target.data.match(I)&&p.default.find(F[0].target)){var W=p.default.find(F[0].target),M=(0,v.bubbleFormats)(W),z=W.offset(this.scroll),H=F[0].oldValue.replace(g.default.CONTENTS,""),G=new u.default().insert(H),Y=new u.default().insert(W.value()),Z=new u.default().retain(z).concat(G.diff(Y,U));R=Z.reduce(function(J,oe){return oe.insert?J.insert(oe.insert,M):J.push(oe)},new u.default),this.delta=V.compose(R)}else this.delta=this.getDelta(),(!R||!(0,A.default)(V.compose(R),this.delta))&&(R=V.diff(this.delta,U));return R}}]),L}();function $(L,D){return Object.keys(D).reduce(function(R,F){return L[F]==null||(D[F]===L[F]?R[F]=D[F]:Array.isArray(D[F])?D[F].indexOf(L[F])<0&&(R[F]=D[F].concat([L[F]])):R[F]=[D[F],L[F]]),R},{})}function q(L){return L.reduce(function(D,R){if(R.insert===1){var F=(0,k.default)(R.attributes);return delete F.image,D.insert({image:R.attributes.image},F)}if(R.attributes!=null&&(R.attributes.list===!0||R.attributes.bullet===!0)&&(R=(0,k.default)(R),R.attributes.list?R.attributes.list="ordered":(R.attributes.list="bullet",delete R.attributes.bullet)),typeof R.insert=="string"){var U=R.insert.replace(/\r\n/g,` 944`).replace(/\r/g,` 945`);return D.insert(U,R.attributes)}return D.push(R)},new u.default)}r.default=B},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var a=function(){function S(A,C){var T=[],_=!0,P=!1,O=void 0;try{for(var I=A[Symbol.iterator](),B;!(_=(B=I.next()).done)&&(T.push(B.value),!(C&&T.length===C));_=!0);}catch($){P=!0,O=$}finally{try{!_&&I.return&&I.return()}finally{if(P)throw O}}return T}return function(A,C){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return S(A,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function S(A,C){for(var T=0;T<C.length;T++){var _=C[T];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(A,_.key,_)}}return function(A,C,T){return C&&S(A.prototype,C),T&&S(A,T),A}}(),l=s(0),c=g(l),u=s(21),d=g(u),h=s(11),f=g(h),p=s(8),x=g(p),m=s(10),y=g(m);function g(S){return S&&S.__esModule?S:{default:S}}function v(S){if(Array.isArray(S)){for(var A=0,C=Array(S.length);A<S.length;A++)C[A]=S[A];return C}else return Array.from(S)}function b(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}var w=(0,y.default)("quill:selection"),j=function S(A){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;b(this,S),this.index=A,this.length=C},E=function(){function S(A,C){var T=this;b(this,S),this.emitter=C,this.scroll=A,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new j(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){T.mouseDown||setTimeout(T.update.bind(T,x.default.sources.USER),1)}),this.emitter.on(x.default.events.EDITOR_CHANGE,function(_,P){_===x.default.events.TEXT_CHANGE&&P.length()>0&&T.update(x.default.sources.SILENT)}),this.emitter.on(x.default.events.SCROLL_BEFORE_UPDATE,function(){if(T.hasFocus()){var _=T.getNativeRange();_!=null&&_.start.node!==T.cursor.textNode&&T.emitter.once(x.default.events.SCROLL_UPDATE,function(){try{T.setNativeRange(_.start.node,_.start.offset,_.end.node,_.end.offset)}catch{}})}}),this.emitter.on(x.default.events.SCROLL_OPTIMIZE,function(_,P){if(P.range){var O=P.range,I=O.startNode,B=O.startOffset,$=O.endNode,q=O.endOffset;T.setNativeRange(I,B,$,q)}}),this.update(x.default.sources.SILENT)}return o(S,[{key:"handleComposition",value:function(){var C=this;this.root.addEventListener("compositionstart",function(){C.composing=!0}),this.root.addEventListener("compositionend",function(){if(C.composing=!1,C.cursor.parent){var T=C.cursor.restore();if(!T)return;setTimeout(function(){C.setNativeRange(T.startNode,T.startOffset,T.endNode,T.endOffset)},1)}})}},{key:"handleDragging",value:function(){var C=this;this.emitter.listenDOM("mousedown",document.body,function(){C.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){C.mouseDown=!1,C.update(x.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(C,T){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[C])){this.scroll.update();var _=this.getNativeRange();if(!(_==null||!_.native.collapsed||c.default.query(C,c.default.Scope.BLOCK))){if(_.start.node!==this.cursor.textNode){var P=c.default.find(_.start.node,!1);if(P==null)return;if(P instanceof c.default.Leaf){var O=P.split(_.start.offset);P.parent.insertBefore(this.cursor,O)}else P.insertBefore(this.cursor,_.start.node);this.cursor.attach()}this.cursor.format(C,T),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(C){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=this.scroll.length();C=Math.min(C,_-1),T=Math.min(C+T,_-1)-C;var P=void 0,O=this.scroll.leaf(C),I=a(O,2),B=I[0],$=I[1];if(B==null)return null;var q=B.position($,!0),L=a(q,2);P=L[0],$=L[1];var D=document.createRange();if(T>0){D.setStart(P,$);var R=this.scroll.leaf(C+T),F=a(R,2);if(B=F[0],$=F[1],B==null)return null;var U=B.position($,!0),V=a(U,2);return P=V[0],$=V[1],D.setEnd(P,$),D.getBoundingClientRect()}else{var W="left",M=void 0;return P instanceof Text?($<P.data.length?(D.setStart(P,$),D.setEnd(P,$+1)):(D.setStart(P,$-1),D.setEnd(P,$),W="right"),M=D.getBoundingClientRect()):(M=B.domNode.getBoundingClientRect(),$>0&&(W="right")),{bottom:M.top+M.height,height:M.height,left:M[W],right:M[W],top:M.top,width:0}}}},{key:"getNativeRange",value:function(){var C=document.getSelection();if(C==null||C.rangeCount<=0)return null;var T=C.getRangeAt(0);if(T==null)return null;var _=this.normalizeNative(T);return w.info("getNativeRange",_),_}},{key:"getRange",value:function(){var C=this.getNativeRange();if(C==null)return[null,null];var T=this.normalizedToRange(C);return[T,C]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(C){var T=this,_=[[C.start.node,C.start.offset]];C.native.collapsed||_.push([C.end.node,C.end.offset]);var P=_.map(function(B){var $=a(B,2),q=$[0],L=$[1],D=c.default.find(q,!0),R=D.offset(T.scroll);return L===0?R:D instanceof c.default.Container?R+D.length():R+D.index(q,L)}),O=Math.min(Math.max.apply(Math,v(P)),this.scroll.length()-1),I=Math.min.apply(Math,[O].concat(v(P)));return new j(I,O-I)}},{key:"normalizeNative",value:function(C){if(!k(this.root,C.startContainer)||!C.collapsed&&!k(this.root,C.endContainer))return null;var T={start:{node:C.startContainer,offset:C.startOffset},end:{node:C.endContainer,offset:C.endOffset},native:C};return[T.start,T.end].forEach(function(_){for(var P=_.node,O=_.offset;!(P instanceof Text)&&P.childNodes.length>0;)if(P.childNodes.length>O)P=P.childNodes[O],O=0;else if(P.childNodes.length===O)P=P.lastChild,O=P instanceof Text?P.data.length:P.childNodes.length+1;else break;_.node=P,_.offset=O}),T}},{key:"rangeToNative",value:function(C){var T=this,_=C.collapsed?[C.index]:[C.index,C.index+C.length],P=[],O=this.scroll.length();return _.forEach(function(I,B){I=Math.min(O-1,I);var $=void 0,q=T.scroll.leaf(I),L=a(q,2),D=L[0],R=L[1],F=D.position(R,B!==0),U=a(F,2);$=U[0],R=U[1],P.push($,R)}),P.length<2&&(P=P.concat(P)),P}},{key:"scrollIntoView",value:function(C){var T=this.lastRange;if(T!=null){var _=this.getBounds(T.index,T.length);if(_!=null){var P=this.scroll.length()-1,O=this.scroll.line(Math.min(T.index,P)),I=a(O,1),B=I[0],$=B;if(T.length>0){var q=this.scroll.line(Math.min(T.index+T.length,P)),L=a(q,1);$=L[0]}if(!(B==null||$==null)){var D=C.getBoundingClientRect();_.top<D.top?C.scrollTop-=D.top-_.top:_.bottom>D.bottom&&(C.scrollTop+=_.bottom-D.bottom)}}}}},{key:"setNativeRange",value:function(C,T){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C,P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:T,O=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(w.info("setNativeRange",C,T,_,P),!(C!=null&&(this.root.parentNode==null||C.parentNode==null||_.parentNode==null))){var I=document.getSelection();if(I!=null)if(C!=null){this.hasFocus()||this.root.focus();var B=(this.getNativeRange()||{}).native;if(B==null||O||C!==B.startContainer||T!==B.startOffset||_!==B.endContainer||P!==B.endOffset){C.tagName=="BR"&&(T=[].indexOf.call(C.parentNode.childNodes,C),C=C.parentNode),_.tagName=="BR"&&(P=[].indexOf.call(_.parentNode.childNodes,_),_=_.parentNode);var $=document.createRange();$.setStart(C,T),$.setEnd(_,P),I.removeAllRanges(),I.addRange($)}}else I.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(C){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.default.sources.API;if(typeof T=="string"&&(_=T,T=!1),w.info("setRange",C),C!=null){var P=this.rangeToNative(C);this.setNativeRange.apply(this,v(P).concat([T]))}else this.setNativeRange(null);this.update(_)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.default.sources.USER,T=this.lastRange,_=this.getRange(),P=a(_,2),O=P[0],I=P[1];if(this.lastRange=O,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,f.default)(T,this.lastRange)){var B;!this.composing&&I!=null&&I.native.collapsed&&I.start.node!==this.cursor.textNode&&this.cursor.restore();var $=[x.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(T),C];if((B=this.emitter).emit.apply(B,[x.default.events.EDITOR_CHANGE].concat($)),C!==x.default.sources.SILENT){var q;(q=this.emitter).emit.apply(q,$)}}}}]),S}();function k(S,A){try{A.parentNode}catch{return!1}return A instanceof Text&&(A=A.parentNode),S.contains(A)}r.Range=j,r.default=E},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function x(m,y){for(var g=0;g<y.length;g++){var v=y[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,y,g){return y&&x(m.prototype,y),g&&x(m,g),m}}(),o=function x(m,y,g){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,y);if(v===void 0){var b=Object.getPrototypeOf(m);return b===null?void 0:x(b,y,g)}else{if("value"in v)return v.value;var w=v.get;return w===void 0?void 0:w.call(g)}},l=s(0),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,m){if(!(x instanceof m))throw new TypeError("Cannot call a class as a function")}function h(x,m){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:x}function f(x,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);x.prototype=Object.create(m&&m.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(x,m):x.__proto__=m)}var p=function(x){f(m,x);function m(){return d(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"insertInto",value:function(g,v){g.children.length===0?o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"insertInto",this).call(this,g,v):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),m}(c.default.Embed);p.blotName="break",p.tagName="BR",r.default=p},function(n,r,s){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var x in p)p.hasOwnProperty(x)&&(f[x]=p[x])};return function(f,p){h(f,p);function x(){this.constructor=f}f.prototype=p===null?Object.create(p):(x.prototype=p.prototype,new x)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(44),l=s(30),c=s(1),u=function(h){a(f,h);function f(p){var x=h.call(this,p)||this;return x.build(),x}return f.prototype.appendChild=function(p){this.insertBefore(p)},f.prototype.attach=function(){h.prototype.attach.call(this),this.children.forEach(function(p){p.attach()})},f.prototype.build=function(){var p=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(x){try{var m=d(x);p.insertBefore(m,p.children.head||void 0)}catch(y){if(y instanceof c.ParchmentError)return;throw y}})},f.prototype.deleteAt=function(p,x){if(p===0&&x===this.length())return this.remove();this.children.forEachAt(p,x,function(m,y,g){m.deleteAt(y,g)})},f.prototype.descendant=function(p,x){var m=this.children.find(x),y=m[0],g=m[1];return p.blotName==null&&p(y)||p.blotName!=null&&y instanceof p?[y,g]:y instanceof f?y.descendant(p,g):[null,-1]},f.prototype.descendants=function(p,x,m){x===void 0&&(x=0),m===void 0&&(m=Number.MAX_VALUE);var y=[],g=m;return this.children.forEachAt(x,m,function(v,b,w){(p.blotName==null&&p(v)||p.blotName!=null&&v instanceof p)&&y.push(v),v instanceof f&&(y=y.concat(v.descendants(p,b,g))),g-=w}),y},f.prototype.detach=function(){this.children.forEach(function(p){p.detach()}),h.prototype.detach.call(this)},f.prototype.formatAt=function(p,x,m,y){this.children.forEachAt(p,x,function(g,v,b){g.formatAt(v,b,m,y)})},f.prototype.insertAt=function(p,x,m){var y=this.children.find(p),g=y[0],v=y[1];if(g)g.insertAt(v,x,m);else{var b=m==null?c.create("text",x):c.create(x,m);this.appendChild(b)}},f.prototype.insertBefore=function(p,x){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(m){return p instanceof m}))throw new c.ParchmentError("Cannot insert "+p.statics.blotName+" into "+this.statics.blotName);p.insertInto(this,x)},f.prototype.length=function(){return this.children.reduce(function(p,x){return p+x.length()},0)},f.prototype.moveChildren=function(p,x){this.children.forEach(function(m){p.insertBefore(m,x)})},f.prototype.optimize=function(p){if(h.prototype.optimize.call(this,p),this.children.length===0)if(this.statics.defaultChild!=null){var x=c.create(this.statics.defaultChild);this.appendChild(x),x.optimize(p)}else this.remove()},f.prototype.path=function(p,x){x===void 0&&(x=!1);var m=this.children.find(p,x),y=m[0],g=m[1],v=[[this,p]];return y instanceof f?v.concat(y.path(g,x)):(y!=null&&v.push([y,g]),v)},f.prototype.removeChild=function(p){this.children.remove(p)},f.prototype.replace=function(p){p instanceof f&&p.moveChildren(this),h.prototype.replace.call(this,p)},f.prototype.split=function(p,x){if(x===void 0&&(x=!1),!x){if(p===0)return this;if(p===this.length())return this.next}var m=this.clone();return this.parent.insertBefore(m,this.next),this.children.forEachAt(p,this.length(),function(y,g,v){y=y.split(g,x),m.appendChild(y)}),m},f.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},f.prototype.update=function(p,x){var m=this,y=[],g=[];p.forEach(function(v){v.target===m.domNode&&v.type==="childList"&&(y.push.apply(y,v.addedNodes),g.push.apply(g,v.removedNodes))}),g.forEach(function(v){if(!(v.parentNode!=null&&v.tagName!=="IFRAME"&&document.body.compareDocumentPosition(v)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var b=c.find(v);b!=null&&(b.domNode.parentNode==null||b.domNode.parentNode===m.domNode)&&b.detach()}}),y.filter(function(v){return v.parentNode==m.domNode}).sort(function(v,b){return v===b?0:v.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(v){var b=null;v.nextSibling!=null&&(b=c.find(v.nextSibling));var w=d(v);(w.next!=b||w.next==null)&&(w.parent!=null&&w.parent.removeChild(m),m.insertBefore(w,b||void 0))})},f}(l.default);function d(h){var f=c.find(h);if(f==null)try{f=c.create(h)}catch{f=c.create(c.Scope.INLINE),[].slice.call(h.childNodes).forEach(function(x){f.domNode.appendChild(x)}),h.parentNode&&h.parentNode.replaceChild(f.domNode,h),f.attach()}return f}r.default=u},function(n,r,s){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var x in p)p.hasOwnProperty(x)&&(f[x]=p[x])};return function(f,p){h(f,p);function x(){this.constructor=f}f.prototype=p===null?Object.create(p):(x.prototype=p.prototype,new x)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(12),l=s(31),c=s(17),u=s(1),d=function(h){a(f,h);function f(p){var x=h.call(this,p)||this;return x.attributes=new l.default(x.domNode),x}return f.formats=function(p){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return p.tagName.toLowerCase()},f.prototype.format=function(p,x){var m=u.query(p);m instanceof o.default?this.attributes.attribute(m,x):x&&m!=null&&(p!==this.statics.blotName||this.formats()[p]!==x)&&this.replaceWith(p,x)},f.prototype.formats=function(){var p=this.attributes.values(),x=this.statics.formats(this.domNode);return x!=null&&(p[this.statics.blotName]=x),p},f.prototype.replaceWith=function(p,x){var m=h.prototype.replaceWith.call(this,p,x);return this.attributes.copy(m),m},f.prototype.update=function(p,x){var m=this;h.prototype.update.call(this,p,x),p.some(function(y){return y.target===m.domNode&&y.type==="attributes"})&&this.attributes.build()},f.prototype.wrap=function(p,x){var m=h.prototype.wrap.call(this,p,x);return m instanceof f&&m.statics.scope===this.statics.scope&&this.attributes.move(m),m},f}(c.default);r.default=d},function(n,r,s){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var f in h)h.hasOwnProperty(f)&&(d[f]=h[f])};return function(d,h){u(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(30),l=s(1),c=function(u){a(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.value=function(h){return!0},d.prototype.index=function(h,f){return this.domNode===h||this.domNode.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(f,1):-1},d.prototype.position=function(h,f){var p=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return h>0&&(p+=1),[this.parent.domNode,p]},d.prototype.value=function(){var h;return h={},h[this.statics.blotName]=this.statics.value(this.domNode)||!0,h},d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=c},function(n,r,s){var a=s(11),o=s(3),l={attributes:{compose:function(u,d,h){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});var f=o(!0,{},d);h||(f=Object.keys(f).reduce(function(x,m){return f[m]!=null&&(x[m]=f[m]),x},{}));for(var p in u)u[p]!==void 0&&d[p]===void 0&&(f[p]=u[p]);return Object.keys(f).length>0?f:void 0},diff:function(u,d){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});var h=Object.keys(u).concat(Object.keys(d)).reduce(function(f,p){return a(u[p],d[p])||(f[p]=d[p]===void 0?null:d[p]),f},{});return Object.keys(h).length>0?h:void 0},transform:function(u,d,h){if(typeof u!="object")return d;if(typeof d=="object"){if(!h)return d;var f=Object.keys(d).reduce(function(p,x){return u[x]===void 0&&(p[x]=d[x]),p},{});return Object.keys(f).length>0?f:void 0}}},iterator:function(u){return new c(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function c(u){this.ops=u,this.index=0,this.offset=0}c.prototype.hasNext=function(){return this.peekLength()<1/0},c.prototype.next=function(u){u||(u=1/0);var d=this.ops[this.index];if(d){var h=this.offset,f=l.length(d);if(u>=f-h?(u=f-h,this.index+=1,this.offset=0):this.offset+=u,typeof d.delete=="number")return{delete:u};var p={};return d.attributes&&(p.attributes=d.attributes),typeof d.retain=="number"?p.retain=u:typeof d.insert=="string"?p.insert=d.insert.substr(h,u):p.insert=d.insert,p}else return{retain:1/0}},c.prototype.peek=function(){return this.ops[this.index]},c.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},c.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},c.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,d=this.index,h=this.next(),f=this.ops.slice(this.index);return this.offset=u,this.index=d,[h].concat(f)}else return[]},n.exports=l},function(n,r){var s=function(){function a(m,y){return y!=null&&m instanceof y}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var c;try{c=Promise}catch{c=function(){}}function u(m,y,g,v,b){typeof y=="object"&&(g=y.depth,v=y.prototype,b=y.includeNonEnumerable,y=y.circular);var w=[],j=[],E=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof g>"u"&&(g=1/0);function k(S,A){if(S===null)return null;if(A===0)return S;var C,T;if(typeof S!="object")return S;if(a(S,o))C=new o;else if(a(S,l))C=new l;else if(a(S,c))C=new c(function(D,R){S.then(function(F){D(k(F,A-1))},function(F){R(k(F,A-1))})});else if(u.__isArray(S))C=[];else if(u.__isRegExp(S))C=new RegExp(S.source,x(S)),S.lastIndex&&(C.lastIndex=S.lastIndex);else if(u.__isDate(S))C=new Date(S.getTime());else{if(E&&Buffer.isBuffer(S))return Buffer.allocUnsafe?C=Buffer.allocUnsafe(S.length):C=new Buffer(S.length),S.copy(C),C;a(S,Error)?C=Object.create(S):typeof v>"u"?(T=Object.getPrototypeOf(S),C=Object.create(T)):(C=Object.create(v),T=v)}if(y){var _=w.indexOf(S);if(_!=-1)return j[_];w.push(S),j.push(C)}a(S,o)&&S.forEach(function(D,R){var F=k(R,A-1),U=k(D,A-1);C.set(F,U)}),a(S,l)&&S.forEach(function(D){var R=k(D,A-1);C.add(R)});for(var P in S){var O;T&&(O=Object.getOwnPropertyDescriptor(T,P)),!(O&&O.set==null)&&(C[P]=k(S[P],A-1))}if(Object.getOwnPropertySymbols)for(var I=Object.getOwnPropertySymbols(S),P=0;P<I.length;P++){var B=I[P],$=Object.getOwnPropertyDescriptor(S,B);$&&!$.enumerable&&!b||(C[B]=k(S[B],A-1),$.enumerable||Object.defineProperty(C,B,{enumerable:!1}))}if(b)for(var q=Object.getOwnPropertyNames(S),P=0;P<q.length;P++){var L=q[P],$=Object.getOwnPropertyDescriptor(S,L);$&&$.enumerable||(C[L]=k(S[L],A-1),Object.defineProperty(C,L,{enumerable:!1}))}return C}return k(m,g)}u.clonePrototype=function(y){if(y===null)return null;var g=function(){};return g.prototype=y,new g};function d(m){return Object.prototype.toString.call(m)}u.__objToStr=d;function h(m){return typeof m=="object"&&d(m)==="[object Date]"}u.__isDate=h;function f(m){return typeof m=="object"&&d(m)==="[object Array]"}u.__isArray=f;function p(m){return typeof m=="object"&&d(m)==="[object RegExp]"}u.__isRegExp=p;function x(m){var y="";return m.global&&(y+="g"),m.ignoreCase&&(y+="i"),m.multiline&&(y+="m"),y}return u.__getRegExpFlags=x,u}();typeof n=="object"&&n.exports&&(n.exports=s)},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function C(T,_){var P=[],O=!0,I=!1,B=void 0;try{for(var $=T[Symbol.iterator](),q;!(O=(q=$.next()).done)&&(P.push(q.value),!(_&&P.length===_));O=!0);}catch(L){I=!0,B=L}finally{try{!O&&$.return&&$.return()}finally{if(I)throw B}}return P}return function(T,_){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return C(T,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function C(T,_){for(var P=0;P<_.length;P++){var O=_[P];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(T,O.key,O)}}return function(T,_,P){return _&&C(T.prototype,_),P&&C(T,P),T}}(),l=function C(T,_,P){T===null&&(T=Function.prototype);var O=Object.getOwnPropertyDescriptor(T,_);if(O===void 0){var I=Object.getPrototypeOf(T);return I===null?void 0:C(I,_,P)}else{if("value"in O)return O.value;var B=O.get;return B===void 0?void 0:B.call(P)}},c=s(0),u=w(c),d=s(8),h=w(d),f=s(4),p=w(f),x=s(16),m=w(x),y=s(13),g=w(y),v=s(25),b=w(v);function w(C){return C&&C.__esModule?C:{default:C}}function j(C,T){if(!(C instanceof T))throw new TypeError("Cannot call a class as a function")}function E(C,T){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:C}function k(C,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);C.prototype=Object.create(T&&T.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(C,T):C.__proto__=T)}function S(C){return C instanceof p.default||C instanceof f.BlockEmbed}var A=function(C){k(T,C);function T(_,P){j(this,T);var O=E(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,_));return O.emitter=P.emitter,Array.isArray(P.whitelist)&&(O.whitelist=P.whitelist.reduce(function(I,B){return I[B]=!0,I},{})),O.domNode.addEventListener("DOMNodeInserted",function(){}),O.optimize(),O.enable(),O}return o(T,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(P,O){var I=this.line(P),B=a(I,2),$=B[0],q=B[1],L=this.line(P+O),D=a(L,1),R=D[0];if(l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"deleteAt",this).call(this,P,O),R!=null&&$!==R&&q>0){if($ instanceof f.BlockEmbed||R instanceof f.BlockEmbed){this.optimize();return}if($ instanceof g.default){var F=$.newlineIndex($.length(),!0);if(F>-1&&($=$.split(F+1),$===R)){this.optimize();return}}else if(R instanceof g.default){var U=R.newlineIndex(0);U>-1&&R.split(U+1)}var V=R.children.head instanceof m.default?null:R.children.head;$.moveChildren(R,V),$.remove()}this.optimize()}},{key:"enable",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",P)}},{key:"formatAt",value:function(P,O,I,B){this.whitelist!=null&&!this.whitelist[I]||(l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"formatAt",this).call(this,P,O,I,B),this.optimize())}},{key:"insertAt",value:function(P,O,I){if(!(I!=null&&this.whitelist!=null&&!this.whitelist[O])){if(P>=this.length())if(I==null||u.default.query(O,u.default.Scope.BLOCK)==null){var B=u.default.create(this.statics.defaultChild);this.appendChild(B),I==null&&O.endsWith(` 946`)&&(O=O.slice(0,-1)),B.insertAt(0,O,I)}else{var $=u.default.create(O,I);this.appendChild($)}else l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertAt",this).call(this,P,O,I);this.optimize()}}},{key:"insertBefore",value:function(P,O){if(P.statics.scope===u.default.Scope.INLINE_BLOT){var I=u.default.create(this.statics.defaultChild);I.appendChild(P),P=I}l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertBefore",this).call(this,P,O)}},{key:"leaf",value:function(P){return this.path(P).pop()||[null,-1]}},{key:"line",value:function(P){return P===this.length()?this.line(P-1):this.descendant(S,P)}},{key:"lines",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,I=function B($,q,L){var D=[],R=L;return $.children.forEachAt(q,L,function(F,U,V){S(F)?D.push(F):F instanceof u.default.Container&&(D=D.concat(B(F,U,R))),R-=V}),D};return I(this,P,O)}},{key:"optimize",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,P,O),P.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,P,O))}},{key:"path",value:function(P){return l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"path",this).call(this,P).slice(1)}},{key:"update",value:function(P){if(this.batch!==!0){var O=h.default.sources.USER;typeof P=="string"&&(O=P),Array.isArray(P)||(P=this.observer.takeRecords()),P.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,O,P),l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"update",this).call(this,P.concat([])),P.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,O,P)}}}]),T}(u.default.Scroll);A.blotName="scroll",A.className="ql-editor",A.tagName="DIV",A.defaultChild="block",A.allowedChildren=[p.default,f.BlockEmbed,b.default],r.default=A},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},o=function(){function M(z,H){var G=[],Y=!0,Z=!1,J=void 0;try{for(var oe=z[Symbol.iterator](),de;!(Y=(de=oe.next()).done)&&(G.push(de.value),!(H&&G.length===H));Y=!0);}catch(ye){Z=!0,J=ye}finally{try{!Y&&oe.return&&oe.return()}finally{if(Z)throw J}}return G}return function(z,H){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return M(z,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function M(z,H){for(var G=0;G<H.length;G++){var Y=H[G];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(z,Y.key,Y)}}return function(z,H,G){return H&&M(z.prototype,H),G&&M(z,G),z}}(),c=s(21),u=C(c),d=s(11),h=C(d),f=s(3),p=C(f),x=s(2),m=C(x),y=s(20),g=C(y),v=s(0),b=C(v),w=s(5),j=C(w),E=s(10),k=C(E),S=s(9),A=C(S);function C(M){return M&&M.__esModule?M:{default:M}}function T(M,z,H){return z in M?Object.defineProperty(M,z,{value:H,enumerable:!0,configurable:!0,writable:!0}):M[z]=H,M}function _(M,z){if(!(M instanceof z))throw new TypeError("Cannot call a class as a function")}function P(M,z){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z&&(typeof z=="object"||typeof z=="function")?z:M}function O(M,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof z);M.prototype=Object.create(z&&z.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),z&&(Object.setPrototypeOf?Object.setPrototypeOf(M,z):M.__proto__=z)}var I=(0,k.default)("quill:keyboard"),B=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",$=function(M){O(z,M),l(z,null,[{key:"match",value:function(G,Y){return Y=W(Y),["altKey","ctrlKey","metaKey","shiftKey"].some(function(Z){return!!Y[Z]!==G[Z]&&Y[Z]!==null})?!1:Y.key===(G.which||G.keyCode)}}]);function z(H,G){_(this,z);var Y=P(this,(z.__proto__||Object.getPrototypeOf(z)).call(this,H,G));return Y.bindings={},Object.keys(Y.options.bindings).forEach(function(Z){Z==="list autofill"&&H.scroll.whitelist!=null&&!H.scroll.whitelist.list||Y.options.bindings[Z]&&Y.addBinding(Y.options.bindings[Z])}),Y.addBinding({key:z.keys.ENTER,shiftKey:null},F),Y.addBinding({key:z.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(Y.addBinding({key:z.keys.BACKSPACE},{collapsed:!0},L),Y.addBinding({key:z.keys.DELETE},{collapsed:!0},D)):(Y.addBinding({key:z.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},L),Y.addBinding({key:z.keys.DELETE},{collapsed:!0,suffix:/^.?$/},D)),Y.addBinding({key:z.keys.BACKSPACE},{collapsed:!1},R),Y.addBinding({key:z.keys.DELETE},{collapsed:!1},R),Y.addBinding({key:z.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},L),Y.listen(),Y}return l(z,[{key:"addBinding",value:function(G){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=W(G);if(J==null||J.key==null)return I.warn("Attempted to add invalid keyboard binding",J);typeof Y=="function"&&(Y={handler:Y}),typeof Z=="function"&&(Z={handler:Z}),J=(0,p.default)(J,Y,Z),this.bindings[J.key]=this.bindings[J.key]||[],this.bindings[J.key].push(J)}},{key:"listen",value:function(){var G=this;this.quill.root.addEventListener("keydown",function(Y){if(!Y.defaultPrevented){var Z=Y.which||Y.keyCode,J=(G.bindings[Z]||[]).filter(function(Fe){return z.match(Y,Fe)});if(J.length!==0){var oe=G.quill.getSelection();if(!(oe==null||!G.quill.hasFocus())){var de=G.quill.getLine(oe.index),ye=o(de,2),ve=ye[0],Ee=ye[1],X=G.quill.getLeaf(oe.index),Q=o(X,2),ee=Q[0],ce=Q[1],te=oe.length===0?[ee,ce]:G.quill.getLeaf(oe.index+oe.length),Ne=o(te,2),Ce=Ne[0],Te=Ne[1],Ve=ee instanceof b.default.Text?ee.value().slice(0,ce):"",Xe=Ce instanceof b.default.Text?Ce.value().slice(Te):"",Be={collapsed:oe.length===0,empty:oe.length===0&&ve.length()<=1,format:G.quill.getFormat(oe),offset:Ee,prefix:Ve,suffix:Xe},_n=J.some(function(Fe){if(Fe.collapsed!=null&&Fe.collapsed!==Be.collapsed||Fe.empty!=null&&Fe.empty!==Be.empty||Fe.offset!=null&&Fe.offset!==Be.offset)return!1;if(Array.isArray(Fe.format)){if(Fe.format.every(function(ot){return Be.format[ot]==null}))return!1}else if(a(Fe.format)==="object"&&!Object.keys(Fe.format).every(function(ot){return Fe.format[ot]===!0?Be.format[ot]!=null:Fe.format[ot]===!1?Be.format[ot]==null:(0,h.default)(Fe.format[ot],Be.format[ot])}))return!1;return Fe.prefix!=null&&!Fe.prefix.test(Be.prefix)||Fe.suffix!=null&&!Fe.suffix.test(Be.suffix)?!1:Fe.handler.call(G,oe,Be)!==!0});_n&&Y.preventDefault()}}}})}}]),z}(A.default);$.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},$.DEFAULTS={bindings:{bold:V("bold"),italic:V("italic"),underline:V("underline"),indent:{key:$.keys.TAB,format:["blockquote","indent","list"],handler:function(z,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","+1",j.default.sources.USER)}},outdent:{key:$.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(z,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","-1",j.default.sources.USER)}},"outdent backspace":{key:$.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(z,H){H.format.indent!=null?this.quill.format("indent","-1",j.default.sources.USER):H.format.list!=null&&this.quill.format("list",!1,j.default.sources.USER)}},"indent code-block":U(!0),"outdent code-block":U(!1),"remove tab":{key:$.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(z){this.quill.deleteText(z.index-1,1,j.default.sources.USER)}},tab:{key:$.keys.TAB,handler:function(z){this.quill.history.cutoff();var H=new m.default().retain(z.index).delete(z.length).insert(" ");this.quill.updateContents(H,j.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(z.index+1,j.default.sources.SILENT)}},"list empty enter":{key:$.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(z,H){this.quill.format("list",!1,j.default.sources.USER),H.format.indent&&this.quill.format("indent",!1,j.default.sources.USER)}},"checklist enter":{key:$.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(z){var H=this.quill.getLine(z.index),G=o(H,2),Y=G[0],Z=G[1],J=(0,p.default)({},Y.formats(),{list:"checked"}),oe=new m.default().retain(z.index).insert(` 947`,J).retain(Y.length()-Z-1).retain(1,{list:"unchecked"});this.quill.updateContents(oe,j.default.sources.USER),this.quill.setSelection(z.index+1,j.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:$.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(z,H){var G=this.quill.getLine(z.index),Y=o(G,2),Z=Y[0],J=Y[1],oe=new m.default().retain(z.index).insert(` 948`,H.format).retain(Z.length()-J-1).retain(1,{header:null});this.quill.updateContents(oe,j.default.sources.USER),this.quill.setSelection(z.index+1,j.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(z,H){var G=H.prefix.length,Y=this.quill.getLine(z.index),Z=o(Y,2),J=Z[0],oe=Z[1];if(oe>G)return!0;var de=void 0;switch(H.prefix.trim()){case"[]":case"[ ]":de="unchecked";break;case"[x]":de="checked";break;case"-":case"*":de="bullet";break;default:de="ordered"}this.quill.insertText(z.index," ",j.default.sources.USER),this.quill.history.cutoff();var ye=new m.default().retain(z.index-oe).delete(G+1).retain(J.length()-2-oe).retain(1,{list:de});this.quill.updateContents(ye,j.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(z.index-G,j.default.sources.SILENT)}},"code exit":{key:$.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(z){var H=this.quill.getLine(z.index),G=o(H,2),Y=G[0],Z=G[1],J=new m.default().retain(z.index+Y.length()-Z-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(J,j.default.sources.USER)}},"embed left":q($.keys.LEFT,!1),"embed left shift":q($.keys.LEFT,!0),"embed right":q($.keys.RIGHT,!1),"embed right shift":q($.keys.RIGHT,!0)}};function q(M,z){var H,G=M===$.keys.LEFT?"prefix":"suffix";return H={key:M,shiftKey:z,altKey:null},T(H,G,/^$/),T(H,"handler",function(Z){var J=Z.index;M===$.keys.RIGHT&&(J+=Z.length+1);var oe=this.quill.getLeaf(J),de=o(oe,1),ye=de[0];return ye instanceof b.default.Embed?(M===$.keys.LEFT?z?this.quill.setSelection(Z.index-1,Z.length+1,j.default.sources.USER):this.quill.setSelection(Z.index-1,j.default.sources.USER):z?this.quill.setSelection(Z.index,Z.length+1,j.default.sources.USER):this.quill.setSelection(Z.index+Z.length+1,j.default.sources.USER),!1):!0}),H}function L(M,z){if(!(M.index===0||this.quill.getLength()<=1)){var H=this.quill.getLine(M.index),G=o(H,1),Y=G[0],Z={};if(z.offset===0){var J=this.quill.getLine(M.index-1),oe=o(J,1),de=oe[0];if(de!=null&&de.length()>1){var ye=Y.formats(),ve=this.quill.getFormat(M.index-1,1);Z=g.default.attributes.diff(ye,ve)||{}}}var Ee=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(z.prefix)?2:1;this.quill.deleteText(M.index-Ee,Ee,j.default.sources.USER),Object.keys(Z).length>0&&this.quill.formatLine(M.index-Ee,Ee,Z,j.default.sources.USER),this.quill.focus()}}function D(M,z){var H=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(z.suffix)?2:1;if(!(M.index>=this.quill.getLength()-H)){var G={},Y=0,Z=this.quill.getLine(M.index),J=o(Z,1),oe=J[0];if(z.offset>=oe.length()-1){var de=this.quill.getLine(M.index+1),ye=o(de,1),ve=ye[0];if(ve){var Ee=oe.formats(),X=this.quill.getFormat(M.index,1);G=g.default.attributes.diff(Ee,X)||{},Y=ve.length()}}this.quill.deleteText(M.index,H,j.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(M.index+Y-1,H,G,j.default.sources.USER)}}function R(M){var z=this.quill.getLines(M),H={};if(z.length>1){var G=z[0].formats(),Y=z[z.length-1].formats();H=g.default.attributes.diff(Y,G)||{}}this.quill.deleteText(M,j.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(M.index,1,H,j.default.sources.USER),this.quill.setSelection(M.index,j.default.sources.SILENT),this.quill.focus()}function F(M,z){var H=this;M.length>0&&this.quill.scroll.deleteAt(M.index,M.length);var G=Object.keys(z.format).reduce(function(Y,Z){return b.default.query(Z,b.default.Scope.BLOCK)&&!Array.isArray(z.format[Z])&&(Y[Z]=z.format[Z]),Y},{});this.quill.insertText(M.index,` 949`,G,j.default.sources.USER),this.quill.setSelection(M.index+1,j.default.sources.SILENT),this.quill.focus(),Object.keys(z.format).forEach(function(Y){G[Y]==null&&(Array.isArray(z.format[Y])||Y!=="link"&&H.quill.format(Y,z.format[Y],j.default.sources.USER))})}function U(M){return{key:$.keys.TAB,shiftKey:!M,format:{"code-block":!0},handler:function(H){var G=b.default.query("code-block"),Y=H.index,Z=H.length,J=this.quill.scroll.descendant(G,Y),oe=o(J,2),de=oe[0],ye=oe[1];if(de!=null){var ve=this.quill.getIndex(de),Ee=de.newlineIndex(ye,!0)+1,X=de.newlineIndex(ve+ye+Z),Q=de.domNode.textContent.slice(Ee,X).split(` 950`);ye=0,Q.forEach(function(ee,ce){M?(de.insertAt(Ee+ye,G.TAB),ye+=G.TAB.length,ce===0?Y+=G.TAB.length:Z+=G.TAB.length):ee.startsWith(G.TAB)&&(de.deleteAt(Ee+ye,G.TAB.length),ye-=G.TAB.length,ce===0?Y-=G.TAB.length:Z-=G.TAB.length),ye+=ee.length+1}),this.quill.update(j.default.sources.USER),this.quill.setSelection(Y,Z,j.default.sources.SILENT)}}}}function V(M){return{key:M[0].toUpperCase(),shortKey:!0,handler:function(H,G){this.quill.format(M,!G.format[M],j.default.sources.USER)}}}function W(M){if(typeof M=="string"||typeof M=="number")return W({key:M});if((typeof M>"u"?"undefined":a(M))==="object"&&(M=(0,u.default)(M,!1)),typeof M.key=="string")if($.keys[M.key.toUpperCase()]!=null)M.key=$.keys[M.key.toUpperCase()];else if(M.key.length===1)M.key=M.key.toUpperCase().charCodeAt(0);else return null;return M.shortKey&&(M[B]=M.shortKey,delete M.shortKey),M}r.default=$,r.SHORTKEY=B},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(v,b){var w=[],j=!0,E=!1,k=void 0;try{for(var S=v[Symbol.iterator](),A;!(j=(A=S.next()).done)&&(w.push(A.value),!(b&&w.length===b));j=!0);}catch(C){E=!0,k=C}finally{try{!j&&S.return&&S.return()}finally{if(E)throw k}}return w}return function(v,b){if(Array.isArray(v))return v;if(Symbol.iterator in Object(v))return g(v,b);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function g(v,b,w){v===null&&(v=Function.prototype);var j=Object.getOwnPropertyDescriptor(v,b);if(j===void 0){var E=Object.getPrototypeOf(v);return E===null?void 0:g(E,b,w)}else{if("value"in j)return j.value;var k=j.get;return k===void 0?void 0:k.call(w)}},l=function(){function g(v,b){for(var w=0;w<b.length;w++){var j=b[w];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(v,j.key,j)}}return function(v,b,w){return b&&g(v.prototype,b),w&&g(v,w),v}}(),c=s(0),u=f(c),d=s(7),h=f(d);function f(g){return g&&g.__esModule?g:{default:g}}function p(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function x(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function m(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var y=function(g){m(v,g),l(v,null,[{key:"value",value:function(){}}]);function v(b,w){p(this,v);var j=x(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,b));return j.selection=w,j.textNode=document.createTextNode(v.CONTENTS),j.domNode.appendChild(j.textNode),j._length=0,j}return l(v,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(w,j){if(this._length!==0)return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,w,j);for(var E=this,k=0;E!=null&&E.statics.scope!==u.default.Scope.BLOCK_BLOT;)k+=E.offset(E.parent),E=E.parent;E!=null&&(this._length=v.CONTENTS.length,E.optimize(),E.formatAt(k,v.CONTENTS.length,w,j),this._length=0)}},{key:"index",value:function(w,j){return w===this.textNode?0:o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"index",this).call(this,w,j)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var w=this.textNode,j=this.selection.getNativeRange(),E=void 0,k=void 0,S=void 0;if(j!=null&&j.start.node===w&&j.end.node===w){var A=[w,j.start.offset,j.end.offset];E=A[0],k=A[1],S=A[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==v.CONTENTS){var C=this.textNode.data.split(v.CONTENTS).join("");this.next instanceof h.default?(E=this.next.domNode,this.next.insertAt(0,C),this.textNode.data=v.CONTENTS):(this.textNode.data=C,this.parent.insertBefore(u.default.create(this.textNode),this),this.textNode=document.createTextNode(v.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),k!=null){var T=[k,S].map(function(P){return Math.max(0,Math.min(E.data.length,P-1))}),_=a(T,2);return k=_[0],S=_[1],{startNode:E,startOffset:k,endNode:E,endOffset:S}}}}},{key:"update",value:function(w,j){var E=this;if(w.some(function(S){return S.type==="characterData"&&S.target===E.textNode})){var k=this.restore();k&&(j.range=k)}}},{key:"value",value:function(){return""}}]),v}(u.default.Embed);y.blotName="cursor",y.className="ql-cursor",y.tagName="span",y.CONTENTS="\uFEFF",r.default=y},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(0),o=u(a),l=s(4),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,m){if(!(x instanceof m))throw new TypeError("Cannot call a class as a function")}function h(x,m){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:x}function f(x,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);x.prototype=Object.create(m&&m.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(x,m):x.__proto__=m)}var p=function(x){f(m,x);function m(){return d(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m}(o.default.Container);p.allowedChildren=[c.default,l.BlockEmbed,p],r.default=p},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var a=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:y(j,v,b)}else{if("value"in w)return w.value;var E=w.get;return E===void 0?void 0:E.call(b)}},l=s(0),c=u(l);function u(y){return y&&y.__esModule?y:{default:y}}function d(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function h(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function f(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var p=function(y){f(g,y);function g(){return d(this,g),h(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,[{key:"value",value:function(b){var w=o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,b);return w.startsWith("rgb(")?(w=w.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+w.split(",").map(function(j){return("00"+parseInt(j).toString(16)).slice(-2)}).join("")):w}}]),g}(c.default.Attributor.Style),x=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),m=new p("color","color",{scope:c.default.Scope.INLINE});r.ColorAttributor=p,r.ColorClass=x,r.ColorStyle=m},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var a=function(){function m(y,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(y,b.key,b)}}return function(y,g,v){return g&&m(y.prototype,g),v&&m(y,v),y}}(),o=function m(y,g,v){y===null&&(y=Function.prototype);var b=Object.getOwnPropertyDescriptor(y,g);if(b===void 0){var w=Object.getPrototypeOf(y);return w===null?void 0:m(w,g,v)}else{if("value"in b)return b.value;var j=b.get;return j===void 0?void 0:j.call(v)}},l=s(6),c=u(l);function u(m){return m&&m.__esModule?m:{default:m}}function d(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function h(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function f(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var p=function(m){f(y,m);function y(){return d(this,y),h(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"format",value:function(v,b){if(v!==this.statics.blotName||!b)return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,v,b);b=this.constructor.sanitize(b),this.domNode.setAttribute("href",b)}}],[{key:"create",value:function(v){var b=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,v);return v=this.sanitize(v),b.setAttribute("href",v),b.setAttribute("rel","noopener noreferrer"),b.setAttribute("target","_blank"),b}},{key:"formats",value:function(v){return v.getAttribute("href")}},{key:"sanitize",value:function(v){return x(v,this.PROTOCOL_WHITELIST)?v:this.SANITIZED_URL}}]),y}(c.default);p.blotName="link",p.tagName="A",p.SANITIZED_URL="about:blank",p.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function x(m,y){var g=document.createElement("a");g.href=m;var v=g.href.slice(0,g.href.indexOf(":"));return y.indexOf(v)>-1}r.default=p,r.sanitize=x},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},o=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),l=s(23),c=h(l),u=s(107),d=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function f(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}var p=0;function x(y,g){y.setAttribute(g,y.getAttribute(g)!=="true")}var m=function(){function y(g){var v=this;f(this,y),this.select=g,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){v.togglePicker()}),this.label.addEventListener("keydown",function(b){switch(b.keyCode){case c.default.keys.ENTER:v.togglePicker();break;case c.default.keys.ESCAPE:v.escape(),b.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(y,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),x(this.label,"aria-expanded"),x(this.options,"aria-hidden")}},{key:"buildItem",value:function(v){var b=this,w=document.createElement("span");return w.tabIndex="0",w.setAttribute("role","button"),w.classList.add("ql-picker-item"),v.hasAttribute("value")&&w.setAttribute("data-value",v.getAttribute("value")),v.textContent&&w.setAttribute("data-label",v.textContent),w.addEventListener("click",function(){b.selectItem(w,!0)}),w.addEventListener("keydown",function(j){switch(j.keyCode){case c.default.keys.ENTER:b.selectItem(w,!0),j.preventDefault();break;case c.default.keys.ESCAPE:b.escape(),j.preventDefault();break}}),w}},{key:"buildLabel",value:function(){var v=document.createElement("span");return v.classList.add("ql-picker-label"),v.innerHTML=d.default,v.tabIndex="0",v.setAttribute("role","button"),v.setAttribute("aria-expanded","false"),this.container.appendChild(v),v}},{key:"buildOptions",value:function(){var v=this,b=document.createElement("span");b.classList.add("ql-picker-options"),b.setAttribute("aria-hidden","true"),b.tabIndex="-1",b.id="ql-picker-options-"+p,p+=1,this.label.setAttribute("aria-controls",b.id),this.options=b,[].slice.call(this.select.options).forEach(function(w){var j=v.buildItem(w);b.appendChild(j),w.selected===!0&&v.selectItem(j)}),this.container.appendChild(b)}},{key:"buildPicker",value:function(){var v=this;[].slice.call(this.select.attributes).forEach(function(b){v.container.setAttribute(b.name,b.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var v=this;this.close(),setTimeout(function(){return v.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(v){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=this.container.querySelector(".ql-selected");if(v!==w&&(w!=null&&w.classList.remove("ql-selected"),v!=null&&(v.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(v.parentNode.children,v),v.hasAttribute("data-value")?this.label.setAttribute("data-value",v.getAttribute("data-value")):this.label.removeAttribute("data-value"),v.hasAttribute("data-label")?this.label.setAttribute("data-label",v.getAttribute("data-label")):this.label.removeAttribute("data-label"),b))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var j=document.createEvent("Event");j.initEvent("change",!0,!0),this.select.dispatchEvent(j)}this.close()}}},{key:"update",value:function(){var v=void 0;if(this.select.selectedIndex>-1){var b=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];v=this.select.options[this.select.selectedIndex],this.selectItem(b)}else this.selectItem(null);var w=v!=null&&v!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",w)}}]),y}();r.default=m},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(0),o=I(a),l=s(5),c=I(l),u=s(4),d=I(u),h=s(16),f=I(h),p=s(25),x=I(p),m=s(24),y=I(m),g=s(35),v=I(g),b=s(6),w=I(b),j=s(22),E=I(j),k=s(7),S=I(k),A=s(55),C=I(A),T=s(42),_=I(T),P=s(23),O=I(P);function I(B){return B&&B.__esModule?B:{default:B}}c.default.register({"blots/block":d.default,"blots/block/embed":u.BlockEmbed,"blots/break":f.default,"blots/container":x.default,"blots/cursor":y.default,"blots/embed":v.default,"blots/inline":w.default,"blots/scroll":E.default,"blots/text":S.default,"modules/clipboard":C.default,"modules/history":_.default,"modules/keyboard":O.default}),o.default.register(d.default,f.default,y.default,w.default,E.default,S.default),r.default=c.default},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(1),o=function(){function l(c){this.domNode=c,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(c){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof c=="string"&&(c=c.toUpperCase(),parseInt(c).toString()===c&&(c=parseInt(c))),typeof c=="number"?u=document.createElement(this.tagName[c-1]):this.tagName.indexOf(c)>-1?u=document.createElement(c):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var c=this.domNode.cloneNode(!1);return a.create(c)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},l.prototype.deleteAt=function(c,u){var d=this.isolate(c,u);d.remove()},l.prototype.formatAt=function(c,u,d,h){var f=this.isolate(c,u);if(a.query(d,a.Scope.BLOT)!=null&&h)f.wrap(d,h);else if(a.query(d,a.Scope.ATTRIBUTE)!=null){var p=a.create(this.statics.scope);f.wrap(p),p.format(d,h)}},l.prototype.insertAt=function(c,u,d){var h=d==null?a.create("text",u):a.create(u,d),f=this.split(c);this.parent.insertBefore(h,f)},l.prototype.insertInto=function(c,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var d=null;c.children.insertBefore(this,u),u!=null&&(d=u.domNode),(this.domNode.parentNode!=c.domNode||this.domNode.nextSibling!=d)&&c.domNode.insertBefore(this.domNode,d),this.parent=c,this.attach()},l.prototype.isolate=function(c,u){var d=this.split(c);return d.split(u),d},l.prototype.length=function(){return 1},l.prototype.offset=function(c){return c===void 0&&(c=this.parent),this.parent==null||this==c?0:this.parent.children.offset(this)+this.parent.offset(c)},l.prototype.optimize=function(c){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(c){c.parent!=null&&(c.parent.insertBefore(this,c.next),c.remove())},l.prototype.replaceWith=function(c,u){var d=typeof c=="string"?a.create(c,u):c;return d.replace(this),d},l.prototype.split=function(c,u){return c===0?this:this.next},l.prototype.update=function(c,u){},l.prototype.wrap=function(c,u){var d=typeof c=="string"?a.create(c,u):c;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},l.blotName="abstract",l}();r.default=o},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(12),o=s(32),l=s(33),c=s(1),u=function(){function d(h){this.attributes={},this.domNode=h,this.build()}return d.prototype.attribute=function(h,f){f?h.add(this.domNode,f)&&(h.value(this.domNode)!=null?this.attributes[h.attrName]=h:delete this.attributes[h.attrName]):(h.remove(this.domNode),delete this.attributes[h.attrName])},d.prototype.build=function(){var h=this;this.attributes={};var f=a.default.keys(this.domNode),p=o.default.keys(this.domNode),x=l.default.keys(this.domNode);f.concat(p).concat(x).forEach(function(m){var y=c.query(m,c.Scope.ATTRIBUTE);y instanceof a.default&&(h.attributes[y.attrName]=y)})},d.prototype.copy=function(h){var f=this;Object.keys(this.attributes).forEach(function(p){var x=f.attributes[p].value(f.domNode);h.format(p,x)})},d.prototype.move=function(h){var f=this;this.copy(h),Object.keys(this.attributes).forEach(function(p){f.attributes[p].remove(f.domNode)}),this.attributes={}},d.prototype.values=function(){var h=this;return Object.keys(this.attributes).reduce(function(f,p){return f[p]=h.attributes[p].value(h.domNode),f},{})},d}();r.default=u},function(n,r,s){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var f in h)h.hasOwnProperty(f)&&(d[f]=h[f])};return function(d,h){u(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(12);function l(u,d){var h=u.getAttribute("class")||"";return h.split(/\s+/).filter(function(f){return f.indexOf(d+"-")===0})}var c=function(u){a(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.keys=function(h){return(h.getAttribute("class")||"").split(/\s+/).map(function(f){return f.split("-").slice(0,-1).join("-")})},d.prototype.add=function(h,f){return this.canAdd(h,f)?(this.remove(h),h.classList.add(this.keyName+"-"+f),!0):!1},d.prototype.remove=function(h){var f=l(h,this.keyName);f.forEach(function(p){h.classList.remove(p)}),h.classList.length===0&&h.removeAttribute("class")},d.prototype.value=function(h){var f=l(h,this.keyName)[0]||"",p=f.slice(this.keyName.length+1);return this.canAdd(h,p)?p:""},d}(o.default);r.default=c},function(n,r,s){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var f in h)h.hasOwnProperty(f)&&(d[f]=h[f])};return function(d,h){u(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(12);function l(u){var d=u.split("-"),h=d.slice(1).map(function(f){return f[0].toUpperCase()+f.slice(1)}).join("");return d[0]+h}var c=function(u){a(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.keys=function(h){return(h.getAttribute("style")||"").split(";").map(function(f){var p=f.split(":");return p[0].trim()})},d.prototype.add=function(h,f){return this.canAdd(h,f)?(h.style[l(this.keyName)]=f,!0):!1},d.prototype.remove=function(h){h.style[l(this.keyName)]="",h.getAttribute("style")||h.removeAttribute("style")},d.prototype.value=function(h){var f=h.style[l(this.keyName)];return this.canAdd(h,f)?f:""},d}(o.default);r.default=c},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function c(u,d){for(var h=0;h<d.length;h++){var f=d[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,h){return d&&c(u.prototype,d),h&&c(u,h),u}}();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var l=function(){function c(u,d){o(this,c),this.quill=u,this.options=d,this.modules={}}return a(c,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(h){d.modules[h]==null&&d.addModule(h)})}},{key:"addModule",value:function(d){var h=this.quill.constructor.import("modules/"+d);return this.modules[d]=new h(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),c}();l.DEFAULTS={modules:{}},l.themes={default:l},r.default=l},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(v,b){for(var w=0;w<b.length;w++){var j=b[w];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(v,j.key,j)}}return function(v,b,w){return b&&g(v.prototype,b),w&&g(v,w),v}}(),o=function g(v,b,w){v===null&&(v=Function.prototype);var j=Object.getOwnPropertyDescriptor(v,b);if(j===void 0){var E=Object.getPrototypeOf(v);return E===null?void 0:g(E,b,w)}else{if("value"in j)return j.value;var k=j.get;return k===void 0?void 0:k.call(w)}},l=s(0),c=h(l),u=s(7),d=h(u);function h(g){return g&&g.__esModule?g:{default:g}}function f(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function p(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function x(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var m="\uFEFF",y=function(g){x(v,g);function v(b){f(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,b));return w.contentNode=document.createElement("span"),w.contentNode.setAttribute("contenteditable",!1),[].slice.call(w.domNode.childNodes).forEach(function(j){w.contentNode.appendChild(j)}),w.leftGuard=document.createTextNode(m),w.rightGuard=document.createTextNode(m),w.domNode.appendChild(w.leftGuard),w.domNode.appendChild(w.contentNode),w.domNode.appendChild(w.rightGuard),w}return a(v,[{key:"index",value:function(w,j){return w===this.leftGuard?0:w===this.rightGuard?1:o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"index",this).call(this,w,j)}},{key:"restore",value:function(w){var j=void 0,E=void 0,k=w.data.split(m).join("");if(w===this.leftGuard)if(this.prev instanceof d.default){var S=this.prev.length();this.prev.insertAt(S,k),j={startNode:this.prev.domNode,startOffset:S+k.length}}else E=document.createTextNode(k),this.parent.insertBefore(c.default.create(E),this),j={startNode:E,startOffset:k.length};else w===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,k),j={startNode:this.next.domNode,startOffset:k.length}):(E=document.createTextNode(k),this.parent.insertBefore(c.default.create(E),this.next),j={startNode:E,startOffset:k.length}));return w.data=m,j}},{key:"update",value:function(w,j){var E=this;w.forEach(function(k){if(k.type==="characterData"&&(k.target===E.leftGuard||k.target===E.rightGuard)){var S=E.restore(k.target);S&&(j.range=S)}})}}]),v}(c.default.Embed);r.default=y},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var a=s(0),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}var c={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},u=new o.default.Attributor.Attribute("align","align",c),d=new o.default.Attributor.Class("align","ql-align",c),h=new o.default.Attributor.Style("align","text-align",c);r.AlignAttribute=u,r.AlignClass=d,r.AlignStyle=h},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var a=s(0),o=c(a),l=s(26);function c(h){return h&&h.__esModule?h:{default:h}}var u=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),d=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});r.BackgroundClass=u,r.BackgroundStyle=d},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var a=s(0),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}var c={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},u=new o.default.Attributor.Attribute("direction","dir",c),d=new o.default.Attributor.Class("direction","ql-direction",c),h=new o.default.Attributor.Style("direction","direction",c);r.DirectionAttribute=u,r.DirectionClass=d,r.DirectionStyle=h},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var a=function(){function g(v,b){for(var w=0;w<b.length;w++){var j=b[w];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(v,j.key,j)}}return function(v,b,w){return b&&g(v.prototype,b),w&&g(v,w),v}}(),o=function g(v,b,w){v===null&&(v=Function.prototype);var j=Object.getOwnPropertyDescriptor(v,b);if(j===void 0){var E=Object.getPrototypeOf(v);return E===null?void 0:g(E,b,w)}else{if("value"in j)return j.value;var k=j.get;return k===void 0?void 0:k.call(w)}},l=s(0),c=u(l);function u(g){return g&&g.__esModule?g:{default:g}}function d(g,v){if(!(g instanceof v))throw new TypeError("Cannot call a class as a function")}function h(g,v){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:g}function f(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);g.prototype=Object.create(v&&v.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(g,v):g.__proto__=v)}var p={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},x=new c.default.Attributor.Class("font","ql-font",p),m=function(g){f(v,g);function v(){return d(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return a(v,[{key:"value",value:function(w){return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"value",this).call(this,w).replace(/["']/g,"")}}]),v}(c.default.Attributor.Style),y=new m("font","font-family",p);r.FontStyle=y,r.FontClass=x},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var a=s(0),o=l(a);function l(d){return d&&d.__esModule?d:{default:d}}var c=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),u=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=c,r.SizeStyle=u},function(n,r,s){n.exports={align:{"":s(76),center:s(77),right:s(78),justify:s(79)},background:s(80),blockquote:s(81),bold:s(82),clean:s(83),code:s(58),"code-block":s(58),color:s(84),direction:{"":s(85),rtl:s(86)},float:{center:s(87),full:s(88),left:s(89),right:s(90)},formula:s(91),header:{1:s(92),2:s(93)},italic:s(94),image:s(95),indent:{"+1":s(96),"-1":s(97)},link:s(98),list:{ordered:s(99),bullet:s(100),check:s(101)},script:{sub:s(102),super:s(103)},strike:s(104),underline:s(105),video:s(106)}},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var a=function(){function b(w,j){for(var E=0;E<j.length;E++){var k=j[E];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(w,k.key,k)}}return function(w,j,E){return j&&b(w.prototype,j),E&&b(w,E),w}}(),o=s(0),l=f(o),c=s(5),u=f(c),d=s(9),h=f(d);function f(b){return b&&b.__esModule?b:{default:b}}function p(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function x(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function m(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var y=function(b){m(w,b);function w(j,E){p(this,w);var k=x(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,j,E));return k.lastRecorded=0,k.ignoreChange=!1,k.clear(),k.quill.on(u.default.events.EDITOR_CHANGE,function(S,A,C,T){S!==u.default.events.TEXT_CHANGE||k.ignoreChange||(!k.options.userOnly||T===u.default.sources.USER?k.record(A,C):k.transform(A))}),k.quill.keyboard.addBinding({key:"Z",shortKey:!0},k.undo.bind(k)),k.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},k.redo.bind(k)),/Win/i.test(navigator.platform)&&k.quill.keyboard.addBinding({key:"Y",shortKey:!0},k.redo.bind(k)),k}return a(w,[{key:"change",value:function(E,k){if(this.stack[E].length!==0){var S=this.stack[E].pop();this.stack[k].push(S),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(S[E],u.default.sources.USER),this.ignoreChange=!1;var A=v(S[E]);this.quill.setSelection(A)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(E,k){if(E.ops.length!==0){this.stack.redo=[];var S=this.quill.getContents().diff(k),A=Date.now();if(this.lastRecorded+this.options.delay>A&&this.stack.undo.length>0){var C=this.stack.undo.pop();S=S.compose(C.undo),E=C.redo.compose(E)}else this.lastRecorded=A;this.stack.undo.push({redo:E,undo:S}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(E){this.stack.undo.forEach(function(k){k.undo=E.transform(k.undo,!0),k.redo=E.transform(k.redo,!0)}),this.stack.redo.forEach(function(k){k.undo=E.transform(k.undo,!0),k.redo=E.transform(k.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),w}(h.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function g(b){var w=b.ops[b.ops.length-1];return w==null?!1:w.insert!=null?typeof w.insert=="string"&&w.insert.endsWith(` 951`):w.attributes!=null?Object.keys(w.attributes).some(function(j){return l.default.query(j,l.default.Scope.BLOCK)!=null}):!1}function v(b){var w=b.reduce(function(E,k){return E+=k.delete||0,E},0),j=b.length()-w;return g(b)&&(j-=1),j}r.default=y,r.getLastChangeIndex=v},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var a=function(){function F(U,V){for(var W=0;W<V.length;W++){var M=V[W];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(U,M.key,M)}}return function(U,V,W){return V&&F(U.prototype,V),W&&F(U,W),U}}(),o=function F(U,V,W){U===null&&(U=Function.prototype);var M=Object.getOwnPropertyDescriptor(U,V);if(M===void 0){var z=Object.getPrototypeOf(U);return z===null?void 0:F(z,V,W)}else{if("value"in M)return M.value;var H=M.get;return H===void 0?void 0:H.call(W)}},l=s(3),c=A(l),u=s(2),d=A(u),h=s(8),f=A(h),p=s(23),x=A(p),m=s(34),y=A(m),g=s(59),v=A(g),b=s(60),w=A(b),j=s(28),E=A(j),k=s(61),S=A(k);function A(F){return F&&F.__esModule?F:{default:F}}function C(F,U){if(!(F instanceof U))throw new TypeError("Cannot call a class as a function")}function T(F,U){if(!F)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:F}function _(F,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);F.prototype=Object.create(U&&U.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(F,U):F.__proto__=U)}var P=[!1,"center","right","justify"],O=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],I=[!1,"serif","monospace"],B=["1","2","3",!1],$=["small",!1,"large","huge"],q=function(F){_(U,F);function U(V,W){C(this,U);var M=T(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,V,W)),z=function H(G){if(!document.body.contains(V.root))return document.body.removeEventListener("click",H);M.tooltip!=null&&!M.tooltip.root.contains(G.target)&&document.activeElement!==M.tooltip.textbox&&!M.quill.hasFocus()&&M.tooltip.hide(),M.pickers!=null&&M.pickers.forEach(function(Y){Y.container.contains(G.target)||Y.close()})};return V.emitter.listenDOM("click",document.body,z),M}return a(U,[{key:"addModule",value:function(W){var M=o(U.prototype.__proto__||Object.getPrototypeOf(U.prototype),"addModule",this).call(this,W);return W==="toolbar"&&this.extendToolbar(M),M}},{key:"buildButtons",value:function(W,M){W.forEach(function(z){var H=z.getAttribute("class")||"";H.split(/\s+/).forEach(function(G){if(G.startsWith("ql-")&&(G=G.slice(3),M[G]!=null))if(G==="direction")z.innerHTML=M[G][""]+M[G].rtl;else if(typeof M[G]=="string")z.innerHTML=M[G];else{var Y=z.value||"";Y!=null&&M[G][Y]&&(z.innerHTML=M[G][Y])}})})}},{key:"buildPickers",value:function(W,M){var z=this;this.pickers=W.map(function(G){if(G.classList.contains("ql-align"))return G.querySelector("option")==null&&R(G,P),new w.default(G,M.align);if(G.classList.contains("ql-background")||G.classList.contains("ql-color")){var Y=G.classList.contains("ql-background")?"background":"color";return G.querySelector("option")==null&&R(G,O,Y==="background"?"#ffffff":"#000000"),new v.default(G,M[Y])}else return G.querySelector("option")==null&&(G.classList.contains("ql-font")?R(G,I):G.classList.contains("ql-header")?R(G,B):G.classList.contains("ql-size")&&R(G,$)),new E.default(G)});var H=function(){z.pickers.forEach(function(Y){Y.update()})};this.quill.on(f.default.events.EDITOR_CHANGE,H)}}]),U}(y.default);q.DEFAULTS=(0,c.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var U=this,V=this.container.querySelector("input.ql-image[type=file]");V==null&&(V=document.createElement("input"),V.setAttribute("type","file"),V.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),V.classList.add("ql-image"),V.addEventListener("change",function(){if(V.files!=null&&V.files[0]!=null){var W=new FileReader;W.onload=function(M){var z=U.quill.getSelection(!0);U.quill.updateContents(new d.default().retain(z.index).delete(z.length).insert({image:M.target.result}),f.default.sources.USER),U.quill.setSelection(z.index+1,f.default.sources.SILENT),V.value=""},W.readAsDataURL(V.files[0])}}),this.container.appendChild(V)),V.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var L=function(F){_(U,F);function U(V,W){C(this,U);var M=T(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,V,W));return M.textbox=M.root.querySelector('input[type="text"]'),M.listen(),M}return a(U,[{key:"listen",value:function(){var W=this;this.textbox.addEventListener("keydown",function(M){x.default.match(M,"enter")?(W.save(),M.preventDefault()):x.default.match(M,"escape")&&(W.cancel(),M.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),M!=null?this.textbox.value=M:W!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+W)||""),this.root.setAttribute("data-mode",W)}},{key:"restoreFocus",value:function(){var W=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=W}},{key:"save",value:function(){var W=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var M=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",W,f.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",W,f.default.sources.USER)),this.quill.root.scrollTop=M;break}case"video":W=D(W);case"formula":{if(!W)break;var z=this.quill.getSelection(!0);if(z!=null){var H=z.index+z.length;this.quill.insertEmbed(H,this.root.getAttribute("data-mode"),W,f.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(H+1," ",f.default.sources.USER),this.quill.setSelection(H+2,f.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),U}(S.default);function D(F){var U=F.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||F.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return U?(U[1]||"https")+"://www.youtube.com/embed/"+U[2]+"?showinfo=0":(U=F.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(U[1]||"https")+"://player.vimeo.com/video/"+U[2]+"/":F}function R(F,U){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;U.forEach(function(W){var M=document.createElement("option");W===V?M.setAttribute("selected","selected"):M.setAttribute("value",W),F.appendChild(M)})}r.BaseTooltip=L,r.default=q},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var c,u=this.iterator();c=u();)if(c===l)return!0;return!1},o.prototype.insertBefore=function(l,c){l&&(l.next=c,c!=null?(l.prev=c.prev,c.prev!=null&&(c.prev.next=l),c.prev=l,c===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var c=0,u=this.head;u!=null;){if(u===l)return c;c+=u.length(),u=u.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var c=l;return l!=null&&(l=l.next),c}},o.prototype.find=function(l,c){c===void 0&&(c=!1);for(var u,d=this.iterator();u=d();){var h=u.length();if(l<h||c&&l===h&&(u.next==null||u.next.length()!==0))return[u,l];l-=h}return[null,0]},o.prototype.forEach=function(l){for(var c,u=this.iterator();c=u();)l(c)},o.prototype.forEachAt=function(l,c,u){if(!(c<=0))for(var d=this.find(l),h=d[0],f=d[1],p,x=l-f,m=this.iterator(h);(p=m())&&x<l+c;){var y=p.length();l>x?u(p,l-x,Math.min(c,x+y-l)):u(p,0,Math.min(y,l+c-x)),x+=y}},o.prototype.map=function(l){return this.reduce(function(c,u){return c.push(l(u)),c},[])},o.prototype.reduce=function(l,c){for(var u,d=this.iterator();u=d();)c=l(c,u);return c},o}();r.default=a},function(n,r,s){var a=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var x in p)p.hasOwnProperty(x)&&(f[x]=p[x])};return function(f,p){h(f,p);function x(){this.constructor=f}f.prototype=p===null?Object.create(p):(x.prototype=p.prototype,new x)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(17),l=s(1),c={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,d=function(h){a(f,h);function f(p){var x=h.call(this,p)||this;return x.scroll=x,x.observer=new MutationObserver(function(m){x.update(m)}),x.observer.observe(x.domNode,c),x.attach(),x}return f.prototype.detach=function(){h.prototype.detach.call(this),this.observer.disconnect()},f.prototype.deleteAt=function(p,x){this.update(),p===0&&x===this.length()?this.children.forEach(function(m){m.remove()}):h.prototype.deleteAt.call(this,p,x)},f.prototype.formatAt=function(p,x,m,y){this.update(),h.prototype.formatAt.call(this,p,x,m,y)},f.prototype.insertAt=function(p,x,m){this.update(),h.prototype.insertAt.call(this,p,x,m)},f.prototype.optimize=function(p,x){var m=this;p===void 0&&(p=[]),x===void 0&&(x={}),h.prototype.optimize.call(this,x);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)p.push(y.pop());for(var g=function(j,E){E===void 0&&(E=!0),!(j==null||j===m)&&j.domNode.parentNode!=null&&(j.domNode[l.DATA_KEY].mutations==null&&(j.domNode[l.DATA_KEY].mutations=[]),E&&g(j.parent))},v=function(j){j.domNode[l.DATA_KEY]==null||j.domNode[l.DATA_KEY].mutations==null||(j instanceof o.default&&j.children.forEach(v),j.optimize(x))},b=p,w=0;b.length>0;w+=1){if(w>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(b.forEach(function(j){var E=l.find(j.target,!0);E!=null&&(E.domNode===j.target&&(j.type==="childList"?(g(l.find(j.previousSibling,!1)),[].forEach.call(j.addedNodes,function(k){var S=l.find(k,!1);g(S,!1),S instanceof o.default&&S.children.forEach(function(A){g(A,!1)})})):j.type==="attributes"&&g(E.prev)),g(E))}),this.children.forEach(v),b=[].slice.call(this.observer.takeRecords()),y=b.slice();y.length>0;)p.push(y.pop())}},f.prototype.update=function(p,x){var m=this;x===void 0&&(x={}),p=p||this.observer.takeRecords(),p.map(function(y){var g=l.find(y.target,!0);return g==null?null:g.domNode[l.DATA_KEY].mutations==null?(g.domNode[l.DATA_KEY].mutations=[y],g):(g.domNode[l.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===m||y.domNode[l.DATA_KEY]==null||y.update(y.domNode[l.DATA_KEY].mutations||[],x)}),this.domNode[l.DATA_KEY].mutations!=null&&h.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,x),this.optimize(p,x)},f.blotName="scroll",f.defaultChild="block",f.scope=l.Scope.BLOCK_BLOT,f.tagName="DIV",f}(o.default);r.default=d},function(n,r,s){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var p in f)f.hasOwnProperty(p)&&(h[p]=f[p])};return function(h,f){d(h,f);function p(){this.constructor=h}h.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(18),l=s(1);function c(d,h){if(Object.keys(d).length!==Object.keys(h).length)return!1;for(var f in d)if(d[f]!==h[f])return!1;return!0}var u=function(d){a(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.formats=function(f){if(f.tagName!==h.tagName)return d.formats.call(this,f)},h.prototype.format=function(f,p){var x=this;f===this.statics.blotName&&!p?(this.children.forEach(function(m){m instanceof o.default||(m=m.wrap(h.blotName,!0)),x.attributes.copy(m)}),this.unwrap()):d.prototype.format.call(this,f,p)},h.prototype.formatAt=function(f,p,x,m){if(this.formats()[x]!=null||l.query(x,l.Scope.ATTRIBUTE)){var y=this.isolate(f,p);y.format(x,m)}else d.prototype.formatAt.call(this,f,p,x,m)},h.prototype.optimize=function(f){d.prototype.optimize.call(this,f);var p=this.formats();if(Object.keys(p).length===0)return this.unwrap();var x=this.next;x instanceof h&&x.prev===this&&c(p,x.formats())&&(x.moveChildren(this),x.remove())},h.blotName="inline",h.scope=l.Scope.INLINE_BLOT,h.tagName="SPAN",h}(o.default);r.default=u},function(n,r,s){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var f in h)h.hasOwnProperty(f)&&(d[f]=h[f])};return function(d,h){u(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(18),l=s(1),c=function(u){a(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.formats=function(h){var f=l.query(d.blotName).tagName;if(h.tagName!==f)return u.formats.call(this,h)},d.prototype.format=function(h,f){l.query(h,l.Scope.BLOCK)!=null&&(h===this.statics.blotName&&!f?this.replaceWith(d.blotName):u.prototype.format.call(this,h,f))},d.prototype.formatAt=function(h,f,p,x){l.query(p,l.Scope.BLOCK)!=null?this.format(p,x):u.prototype.formatAt.call(this,h,f,p,x)},d.prototype.insertAt=function(h,f,p){if(p==null||l.query(f,l.Scope.INLINE)!=null)u.prototype.insertAt.call(this,h,f,p);else{var x=this.split(h),m=l.create(f,p);x.parent.insertBefore(m,x)}},d.prototype.update=function(h,f){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,h,f)},d.blotName="block",d.scope=l.Scope.BLOCK_BLOT,d.tagName="P",d}(o.default);r.default=c},function(n,r,s){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var h in d)d.hasOwnProperty(h)&&(u[h]=d[h])};return function(u,d){c(u,d);function h(){this.constructor=u}u.prototype=d===null?Object.create(d):(h.prototype=d.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(19),l=function(c){a(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.formats=function(d){},u.prototype.format=function(d,h){c.prototype.formatAt.call(this,0,this.length(),d,h)},u.prototype.formatAt=function(d,h,f,p){d===0&&h===this.length()?this.format(f,p):c.prototype.formatAt.call(this,d,h,f,p)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u}(o.default);r.default=l},function(n,r,s){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var f in h)h.hasOwnProperty(f)&&(d[f]=h[f])};return function(d,h){u(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=s(19),l=s(1),c=function(u){a(d,u);function d(h){var f=u.call(this,h)||this;return f.text=f.statics.value(f.domNode),f}return d.create=function(h){return document.createTextNode(h)},d.value=function(h){var f=h.data;return f.normalize&&(f=f.normalize()),f},d.prototype.deleteAt=function(h,f){this.domNode.data=this.text=this.text.slice(0,h)+this.text.slice(h+f)},d.prototype.index=function(h,f){return this.domNode===h?f:-1},d.prototype.insertAt=function(h,f,p){p==null?(this.text=this.text.slice(0,h)+f+this.text.slice(h),this.domNode.data=this.text):u.prototype.insertAt.call(this,h,f,p)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(h){u.prototype.optimize.call(this,h),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(h,f){return[this.domNode,h]},d.prototype.split=function(h,f){if(f===void 0&&(f=!1),!f){if(h===0)return this;if(h===this.length())return this.next}var p=l.create(this.domNode.splitText(h));return this.parent.insertBefore(p,this.next),this.text=this.statics.value(this.domNode),p},d.prototype.update=function(h,f){var p=this;h.some(function(x){return x.type==="characterData"&&x.target===p.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=c},function(n,r,s){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,c){return arguments.length>1&&!this.contains(l)==!c?c:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,c){return c=c||0,this.substr(c,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,c){var u=this.toString();(typeof c!="number"||!isFinite(c)||Math.floor(c)!==c||c>u.length)&&(c=u.length),c-=l.length;var d=u.indexOf(l,c);return d!==-1&&d===c}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(c){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof c!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),d=u.length>>>0,h=arguments[1],f,p=0;p<d;p++)if(f=u[p],c.call(h,f,p,u))return f}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(n,r){var s=-1,a=1,o=0;function l(w,j,E){if(w==j)return w?[[o,w]]:[];(E<0||w.length<E)&&(E=null);var k=h(w,j),S=w.substring(0,k);w=w.substring(k),j=j.substring(k),k=f(w,j);var A=w.substring(w.length-k);w=w.substring(0,w.length-k),j=j.substring(0,j.length-k);var C=c(w,j);return S&&C.unshift([o,S]),A&&C.push([o,A]),x(C),E!=null&&(C=g(C,E)),C=v(C),C}function c(w,j){var E;if(!w)return[[a,j]];if(!j)return[[s,w]];var k=w.length>j.length?w:j,S=w.length>j.length?j:w,A=k.indexOf(S);if(A!=-1)return E=[[a,k.substring(0,A)],[o,S],[a,k.substring(A+S.length)]],w.length>j.length&&(E[0][0]=E[2][0]=s),E;if(S.length==1)return[[s,w],[a,j]];var C=p(w,j);if(C){var T=C[0],_=C[1],P=C[2],O=C[3],I=C[4],B=l(T,P),$=l(_,O);return B.concat([[o,I]],$)}return u(w,j)}function u(w,j){for(var E=w.length,k=j.length,S=Math.ceil((E+k)/2),A=S,C=2*S,T=new Array(C),_=new Array(C),P=0;P<C;P++)T[P]=-1,_[P]=-1;T[A+1]=0,_[A+1]=0;for(var O=E-k,I=O%2!=0,B=0,$=0,q=0,L=0,D=0;D<S;D++){for(var R=-D+B;R<=D-$;R+=2){var F=A+R,U;R==-D||R!=D&&T[F-1]<T[F+1]?U=T[F+1]:U=T[F-1]+1;for(var V=U-R;U<E&&V<k&&w.charAt(U)==j.charAt(V);)U++,V++;if(T[F]=U,U>E)$+=2;else if(V>k)B+=2;else if(I){var W=A+O-R;if(W>=0&&W<C&&_[W]!=-1){var M=E-_[W];if(U>=M)return d(w,j,U,V)}}}for(var z=-D+q;z<=D-L;z+=2){var W=A+z,M;z==-D||z!=D&&_[W-1]<_[W+1]?M=_[W+1]:M=_[W-1]+1;for(var H=M-z;M<E&&H<k&&w.charAt(E-M-1)==j.charAt(k-H-1);)M++,H++;if(_[W]=M,M>E)L+=2;else if(H>k)q+=2;else if(!I){var F=A+O-z;if(F>=0&&F<C&&T[F]!=-1){var U=T[F],V=A+U-F;if(M=E-M,U>=M)return d(w,j,U,V)}}}}return[[s,w],[a,j]]}function d(w,j,E,k){var S=w.substring(0,E),A=j.substring(0,k),C=w.substring(E),T=j.substring(k),_=l(S,A),P=l(C,T);return _.concat(P)}function h(w,j){if(!w||!j||w.charAt(0)!=j.charAt(0))return 0;for(var E=0,k=Math.min(w.length,j.length),S=k,A=0;E<S;)w.substring(A,S)==j.substring(A,S)?(E=S,A=E):k=S,S=Math.floor((k-E)/2+E);return S}function f(w,j){if(!w||!j||w.charAt(w.length-1)!=j.charAt(j.length-1))return 0;for(var E=0,k=Math.min(w.length,j.length),S=k,A=0;E<S;)w.substring(w.length-S,w.length-A)==j.substring(j.length-S,j.length-A)?(E=S,A=E):k=S,S=Math.floor((k-E)/2+E);return S}function p(w,j){var E=w.length>j.length?w:j,k=w.length>j.length?j:w;if(E.length<4||k.length*2<E.length)return null;function S($,q,L){for(var D=$.substring(L,L+Math.floor($.length/4)),R=-1,F="",U,V,W,M;(R=q.indexOf(D,R+1))!=-1;){var z=h($.substring(L),q.substring(R)),H=f($.substring(0,L),q.substring(0,R));F.length<H+z&&(F=q.substring(R-H,R)+q.substring(R,R+z),U=$.substring(0,L-H),V=$.substring(L+z),W=q.substring(0,R-H),M=q.substring(R+z))}return F.length*2>=$.length?[U,V,W,M,F]:null}var A=S(E,k,Math.ceil(E.length/4)),C=S(E,k,Math.ceil(E.length/2)),T;if(!A&&!C)return null;C?A?T=A[4].length>C[4].length?A:C:T=C:T=A;var _,P,O,I;w.length>j.length?(_=T[0],P=T[1],O=T[2],I=T[3]):(O=T[0],I=T[1],_=T[2],P=T[3]);var B=T[4];return[_,P,O,I,B]}function x(w){w.push([o,""]);for(var j=0,E=0,k=0,S="",A="",C;j<w.length;)switch(w[j][0]){case a:k++,A+=w[j][1],j++;break;case s:E++,S+=w[j][1],j++;break;case o:E+k>1?(E!==0&&k!==0&&(C=h(A,S),C!==0&&(j-E-k>0&&w[j-E-k-1][0]==o?w[j-E-k-1][1]+=A.substring(0,C):(w.splice(0,0,[o,A.substring(0,C)]),j++),A=A.substring(C),S=S.substring(C)),C=f(A,S),C!==0&&(w[j][1]=A.substring(A.length-C)+w[j][1],A=A.substring(0,A.length-C),S=S.substring(0,S.length-C))),E===0?w.splice(j-k,E+k,[a,A]):k===0?w.splice(j-E,E+k,[s,S]):w.splice(j-E-k,E+k,[s,S],[a,A]),j=j-E-k+(E?1:0)+(k?1:0)+1):j!==0&&w[j-1][0]==o?(w[j-1][1]+=w[j][1],w.splice(j,1)):j++,k=0,E=0,S="",A="";break}w[w.length-1][1]===""&&w.pop();var T=!1;for(j=1;j<w.length-1;)w[j-1][0]==o&&w[j+1][0]==o&&(w[j][1].substring(w[j][1].length-w[j-1][1].length)==w[j-1][1]?(w[j][1]=w[j-1][1]+w[j][1].substring(0,w[j][1].length-w[j-1][1].length),w[j+1][1]=w[j-1][1]+w[j+1][1],w.splice(j-1,1),T=!0):w[j][1].substring(0,w[j+1][1].length)==w[j+1][1]&&(w[j-1][1]+=w[j+1][1],w[j][1]=w[j][1].substring(w[j+1][1].length)+w[j+1][1],w.splice(j+1,1),T=!0)),j++;T&&x(w)}var m=l;m.INSERT=a,m.DELETE=s,m.EQUAL=o,n.exports=m;function y(w,j){if(j===0)return[o,w];for(var E=0,k=0;k<w.length;k++){var S=w[k];if(S[0]===s||S[0]===o){var A=E+S[1].length;if(j===A)return[k+1,w];if(j<A){w=w.slice();var C=j-E,T=[S[0],S[1].slice(0,C)],_=[S[0],S[1].slice(C)];return w.splice(k,1,T,_),[k+1,w]}else E=A}}throw new Error("cursor_pos is out of bounds!")}function g(w,j){var E=y(w,j),k=E[1],S=E[0],A=k[S],C=k[S+1];if(A==null)return w;if(A[0]!==o)return w;if(C!=null&&A[1]+C[1]===C[1]+A[1])return k.splice(S,2,C,A),b(k,S,2);if(C!=null&&C[1].indexOf(A[1])===0){k.splice(S,2,[C[0],A[1]],[0,A[1]]);var T=C[1].slice(A[1].length);return T.length>0&&k.splice(S+2,0,[C[0],T]),b(k,S,3)}else return w}function v(w){for(var j=!1,E=function(C){return C.charCodeAt(0)>=56320&&C.charCodeAt(0)<=57343},k=function(C){return C.charCodeAt(C.length-1)>=55296&&C.charCodeAt(C.length-1)<=56319},S=2;S<w.length;S+=1)w[S-2][0]===o&&k(w[S-2][1])&&w[S-1][0]===s&&E(w[S-1][1])&&w[S][0]===a&&E(w[S][1])&&(j=!0,w[S-1][1]=w[S-2][1].slice(-1)+w[S-1][1],w[S][1]=w[S-2][1].slice(-1)+w[S][1],w[S-2][1]=w[S-2][1].slice(0,-1));if(!j)return w;for(var A=[],S=0;S<w.length;S+=1)w[S][1].length>0&&A.push(w[S]);return A}function b(w,j,E){for(var k=j+E-1;k>=0&&k>=j-1;k--)if(k+1<w.length){var S=w[k],A=w[k+1];S[0]===A[1]&&w.splice(k,2,[S[0],S[1]+A[1]])}return w}},function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:s,r.shim=s;function s(a){var o=[];for(var l in a)o.push(l);return o}},function(n,r){var s=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=n.exports=s?a:o,r.supported=a;function a(l){return Object.prototype.toString.call(l)=="[object Arguments]"}r.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}},function(n,r){var s=Object.prototype.hasOwnProperty,a="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(a=!1));function l(u,d,h){this.fn=u,this.context=d,this.once=h||!1}function c(){this._events=new o,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],h,f;if(this._eventsCount===0)return d;for(f in h=this._events)s.call(h,f)&&d.push(a?f.slice(1):f);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},c.prototype.listeners=function(d,h){var f=a?a+d:d,p=this._events[f];if(h)return!!p;if(!p)return[];if(p.fn)return[p.fn];for(var x=0,m=p.length,y=new Array(m);x<m;x++)y[x]=p[x].fn;return y},c.prototype.emit=function(d,h,f,p,x,m){var y=a?a+d:d;if(!this._events[y])return!1;var g=this._events[y],v=arguments.length,b,w;if(g.fn){switch(g.once&&this.removeListener(d,g.fn,void 0,!0),v){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,h),!0;case 3:return g.fn.call(g.context,h,f),!0;case 4:return g.fn.call(g.context,h,f,p),!0;case 5:return g.fn.call(g.context,h,f,p,x),!0;case 6:return g.fn.call(g.context,h,f,p,x,m),!0}for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];g.fn.apply(g.context,b)}else{var j=g.length,E;for(w=0;w<j;w++)switch(g[w].once&&this.removeListener(d,g[w].fn,void 0,!0),v){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,h);break;case 3:g[w].fn.call(g[w].context,h,f);break;case 4:g[w].fn.call(g[w].context,h,f,p);break;default:if(!b)for(E=1,b=new Array(v-1);E<v;E++)b[E-1]=arguments[E];g[w].fn.apply(g[w].context,b)}}return!0},c.prototype.on=function(d,h,f){var p=new l(h,f||this),x=a?a+d:d;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],p]:this._events[x].push(p):(this._events[x]=p,this._eventsCount++),this},c.prototype.once=function(d,h,f){var p=new l(h,f||this,!0),x=a?a+d:d;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],p]:this._events[x].push(p):(this._events[x]=p,this._eventsCount++),this},c.prototype.removeListener=function(d,h,f,p){var x=a?a+d:d;if(!this._events[x])return this;if(!h)return--this._eventsCount===0?this._events=new o:delete this._events[x],this;var m=this._events[x];if(m.fn)m.fn===h&&(!p||m.once)&&(!f||m.context===f)&&(--this._eventsCount===0?this._events=new o:delete this._events[x]);else{for(var y=0,g=[],v=m.length;y<v;y++)(m[y].fn!==h||p&&!m[y].once||f&&m[y].context!==f)&&g.push(m[y]);g.length?this._events[x]=g.length===1?g[0]:g:--this._eventsCount===0?this._events=new o:delete this._events[x]}return this},c.prototype.removeAllListeners=function(d){var h;return d?(h=a?a+d:d,this._events[h]&&(--this._eventsCount===0?this._events=new o:delete this._events[h])):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prototype.setMaxListeners=function(){return this},c.prefixed=a,c.EventEmitter=c,typeof n<"u"&&(n.exports=c)},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},o=function(){function X(Q,ee){var ce=[],te=!0,Ne=!1,Ce=void 0;try{for(var Te=Q[Symbol.iterator](),Ve;!(te=(Ve=Te.next()).done)&&(ce.push(Ve.value),!(ee&&ce.length===ee));te=!0);}catch(Xe){Ne=!0,Ce=Xe}finally{try{!te&&Te.return&&Te.return()}finally{if(Ne)throw Ce}}return ce}return function(Q,ee){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return X(Q,ee);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function X(Q,ee){for(var ce=0;ce<ee.length;ce++){var te=ee[ce];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(Q,te.key,te)}}return function(Q,ee,ce){return ee&&X(Q.prototype,ee),ce&&X(Q,ce),Q}}(),c=s(3),u=_(c),d=s(2),h=_(d),f=s(0),p=_(f),x=s(5),m=_(x),y=s(10),g=_(y),v=s(9),b=_(v),w=s(36),j=s(37),E=s(13),k=_(E),S=s(26),A=s(38),C=s(39),T=s(40);function _(X){return X&&X.__esModule?X:{default:X}}function P(X,Q,ee){return Q in X?Object.defineProperty(X,Q,{value:ee,enumerable:!0,configurable:!0,writable:!0}):X[Q]=ee,X}function O(X,Q){if(!(X instanceof Q))throw new TypeError("Cannot call a class as a function")}function I(X,Q){if(!X)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q&&(typeof Q=="object"||typeof Q=="function")?Q:X}function B(X,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Q);X.prototype=Object.create(Q&&Q.prototype,{constructor:{value:X,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf(X,Q):X.__proto__=Q)}var $=(0,g.default)("quill:clipboard"),q="__ql-matcher",L=[[Node.TEXT_NODE,Ee],[Node.TEXT_NODE,de],["br",Z],[Node.ELEMENT_NODE,de],[Node.ELEMENT_NODE,Y],[Node.ELEMENT_NODE,ye],[Node.ELEMENT_NODE,G],[Node.ELEMENT_NODE,ve],["li",oe],["b",H.bind(H,"bold")],["i",H.bind(H,"italic")],["style",J]],D=[w.AlignAttribute,A.DirectionAttribute].reduce(function(X,Q){return X[Q.keyName]=Q,X},{}),R=[w.AlignStyle,j.BackgroundStyle,S.ColorStyle,A.DirectionStyle,C.FontStyle,T.SizeStyle].reduce(function(X,Q){return X[Q.keyName]=Q,X},{}),F=function(X){B(Q,X);function Q(ee,ce){O(this,Q);var te=I(this,(Q.__proto__||Object.getPrototypeOf(Q)).call(this,ee,ce));return te.quill.root.addEventListener("paste",te.onPaste.bind(te)),te.container=te.quill.addContainer("ql-clipboard"),te.container.setAttribute("contenteditable",!0),te.container.setAttribute("tabindex",-1),te.matchers=[],L.concat(te.options.matchers).forEach(function(Ne){var Ce=o(Ne,2),Te=Ce[0],Ve=Ce[1];!ce.matchVisual&&Ve===ye||te.addMatcher(Te,Ve)}),te}return l(Q,[{key:"addMatcher",value:function(ce,te){this.matchers.push([ce,te])}},{key:"convert",value:function(ce){if(typeof ce=="string")return this.container.innerHTML=ce.replace(/\>\r?\n +\</g,"><"),this.convert();var te=this.quill.getFormat(this.quill.selection.savedRange.index);if(te[k.default.blotName]){var Ne=this.container.innerText;return this.container.innerHTML="",new h.default().insert(Ne,P({},k.default.blotName,te[k.default.blotName]))}var Ce=this.prepareMatching(),Te=o(Ce,2),Ve=Te[0],Xe=Te[1],Be=z(this.container,Ve,Xe);return W(Be,` 952`)&&Be.ops[Be.ops.length-1].attributes==null&&(Be=Be.compose(new h.default().retain(Be.length()-1).delete(1))),$.log("convert",this.container.innerHTML,Be),this.container.innerHTML="",Be}},{key:"dangerouslyPasteHTML",value:function(ce,te){var Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.default.sources.API;if(typeof ce=="string")this.quill.setContents(this.convert(ce),te),this.quill.setSelection(0,m.default.sources.SILENT);else{var Ce=this.convert(te);this.quill.updateContents(new h.default().retain(ce).concat(Ce),Ne),this.quill.setSelection(ce+Ce.length(),m.default.sources.SILENT)}}},{key:"onPaste",value:function(ce){var te=this;if(!(ce.defaultPrevented||!this.quill.isEnabled())){var Ne=this.quill.getSelection(),Ce=new h.default().retain(Ne.index),Te=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(m.default.sources.SILENT),setTimeout(function(){Ce=Ce.concat(te.convert()).delete(Ne.length),te.quill.updateContents(Ce,m.default.sources.USER),te.quill.setSelection(Ce.length()-Ne.length,m.default.sources.SILENT),te.quill.scrollingContainer.scrollTop=Te,te.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var ce=this,te=[],Ne=[];return this.matchers.forEach(function(Ce){var Te=o(Ce,2),Ve=Te[0],Xe=Te[1];switch(Ve){case Node.TEXT_NODE:Ne.push(Xe);break;case Node.ELEMENT_NODE:te.push(Xe);break;default:[].forEach.call(ce.container.querySelectorAll(Ve),function(Be){Be[q]=Be[q]||[],Be[q].push(Xe)});break}}),[te,Ne]}}]),Q}(b.default);F.DEFAULTS={matchers:[],matchVisual:!0};function U(X,Q,ee){return(typeof Q>"u"?"undefined":a(Q))==="object"?Object.keys(Q).reduce(function(ce,te){return U(ce,te,Q[te])},X):X.reduce(function(ce,te){return te.attributes&&te.attributes[Q]?ce.push(te):ce.insert(te.insert,(0,u.default)({},P({},Q,ee),te.attributes))},new h.default)}function V(X){if(X.nodeType!==Node.ELEMENT_NODE)return{};var Q="__ql-computed-style";return X[Q]||(X[Q]=window.getComputedStyle(X))}function W(X,Q){for(var ee="",ce=X.ops.length-1;ce>=0&&ee.length<Q.length;--ce){var te=X.ops[ce];if(typeof te.insert!="string")break;ee=te.insert+ee}return ee.slice(-1*Q.length)===Q}function M(X){if(X.childNodes.length===0)return!1;var Q=V(X);return["block","list-item"].indexOf(Q.display)>-1}function z(X,Q,ee){return X.nodeType===X.TEXT_NODE?ee.reduce(function(ce,te){return te(X,ce)},new h.default):X.nodeType===X.ELEMENT_NODE?[].reduce.call(X.childNodes||[],function(ce,te){var Ne=z(te,Q,ee);return te.nodeType===X.ELEMENT_NODE&&(Ne=Q.reduce(function(Ce,Te){return Te(te,Ce)},Ne),Ne=(te[q]||[]).reduce(function(Ce,Te){return Te(te,Ce)},Ne)),ce.concat(Ne)},new h.default):new h.default}function H(X,Q,ee){return U(ee,X,!0)}function G(X,Q){var ee=p.default.Attributor.Attribute.keys(X),ce=p.default.Attributor.Class.keys(X),te=p.default.Attributor.Style.keys(X),Ne={};return ee.concat(ce).concat(te).forEach(function(Ce){var Te=p.default.query(Ce,p.default.Scope.ATTRIBUTE);Te!=null&&(Ne[Te.attrName]=Te.value(X),Ne[Te.attrName])||(Te=D[Ce],Te!=null&&(Te.attrName===Ce||Te.keyName===Ce)&&(Ne[Te.attrName]=Te.value(X)||void 0),Te=R[Ce],Te!=null&&(Te.attrName===Ce||Te.keyName===Ce)&&(Te=R[Ce],Ne[Te.attrName]=Te.value(X)||void 0))}),Object.keys(Ne).length>0&&(Q=U(Q,Ne)),Q}function Y(X,Q){var ee=p.default.query(X);if(ee==null)return Q;if(ee.prototype instanceof p.default.Embed){var ce={},te=ee.value(X);te!=null&&(ce[ee.blotName]=te,Q=new h.default().insert(ce,ee.formats(X)))}else typeof ee.formats=="function"&&(Q=U(Q,ee.blotName,ee.formats(X)));return Q}function Z(X,Q){return W(Q,` 953`)||Q.insert(` 954`),Q}function J(){return new h.default}function oe(X,Q){var ee=p.default.query(X);if(ee==null||ee.blotName!=="list-item"||!W(Q,` 955`))return Q;for(var ce=-1,te=X.parentNode;!te.classList.contains("ql-clipboard");)(p.default.query(te)||{}).blotName==="list"&&(ce+=1),te=te.parentNode;return ce<=0?Q:Q.compose(new h.default().retain(Q.length()-1).retain(1,{indent:ce}))}function de(X,Q){return W(Q,` 956`)||(M(X)||Q.length()>0&&X.nextSibling&&M(X.nextSibling))&&Q.insert(` 957`),Q}function ye(X,Q){if(M(X)&&X.nextElementSibling!=null&&!W(Q,` 958 959`)){var ee=X.offsetHeight+parseFloat(V(X).marginTop)+parseFloat(V(X).marginBottom);X.nextElementSibling.offsetTop>X.offsetTop+ee*1.5&&Q.insert(` 960`)}return Q}function ve(X,Q){var ee={},ce=X.style||{};return ce.fontStyle&&V(X).fontStyle==="italic"&&(ee.italic=!0),ce.fontWeight&&(V(X).fontWeight.startsWith("bold")||parseInt(V(X).fontWeight)>=700)&&(ee.bold=!0),Object.keys(ee).length>0&&(Q=U(Q,ee)),parseFloat(ce.textIndent||0)>0&&(Q=new h.default().insert(" ").concat(Q)),Q}function Ee(X,Q){var ee=X.data;if(X.parentNode.tagName==="O:P")return Q.insert(ee.trim());if(ee.trim().length===0&&X.parentNode.classList.contains("ql-clipboard"))return Q;if(!V(X.parentNode).whiteSpace.startsWith("pre")){var ce=function(Ne,Ce){return Ce=Ce.replace(/[^\u00a0]/g,""),Ce.length<1&&Ne?" ":Ce};ee=ee.replace(/\r\n/g," ").replace(/\n/g," "),ee=ee.replace(/\s\s+/g,ce.bind(ce,!0)),(X.previousSibling==null&&M(X.parentNode)||X.previousSibling!=null&&M(X.previousSibling))&&(ee=ee.replace(/^\s+/,ce.bind(ce,!1))),(X.nextSibling==null&&M(X.parentNode)||X.nextSibling!=null&&M(X.nextSibling))&&(ee=ee.replace(/\s+$/,ce.bind(ce,!1)))}return Q.insert(ee)}r.default=F,r.matchAttributor=G,r.matchBlot=Y,r.matchNewline=de,r.matchSpacing=ye,r.matchText=Ee},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function x(m,y){for(var g=0;g<y.length;g++){var v=y[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,y,g){return y&&x(m.prototype,y),g&&x(m,g),m}}(),o=function x(m,y,g){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,y);if(v===void 0){var b=Object.getPrototypeOf(m);return b===null?void 0:x(b,y,g)}else{if("value"in v)return v.value;var w=v.get;return w===void 0?void 0:w.call(g)}},l=s(6),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,m){if(!(x instanceof m))throw new TypeError("Cannot call a class as a function")}function h(x,m){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:x}function f(x,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);x.prototype=Object.create(m&&m.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(x,m):x.__proto__=m)}var p=function(x){f(m,x);function m(){return d(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"optimize",value:function(g){o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,g),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),m}(c.default);p.blotName="bold",p.tagName=["STRONG","B"],r.default=p},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var a=function(){function T(_,P){var O=[],I=!0,B=!1,$=void 0;try{for(var q=_[Symbol.iterator](),L;!(I=(L=q.next()).done)&&(O.push(L.value),!(P&&O.length===P));I=!0);}catch(D){B=!0,$=D}finally{try{!I&&q.return&&q.return()}finally{if(B)throw $}}return O}return function(_,P){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return T(_,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(_,P){for(var O=0;O<P.length;O++){var I=P[O];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,I.key,I)}}return function(_,P,O){return P&&T(_.prototype,P),O&&T(_,O),_}}(),l=s(2),c=g(l),u=s(0),d=g(u),h=s(5),f=g(h),p=s(10),x=g(p),m=s(9),y=g(m);function g(T){return T&&T.__esModule?T:{default:T}}function v(T,_,P){return _ in T?Object.defineProperty(T,_,{value:P,enumerable:!0,configurable:!0,writable:!0}):T[_]=P,T}function b(T,_){if(!(T instanceof _))throw new TypeError("Cannot call a class as a function")}function w(T,_){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:T}function j(T,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);T.prototype=Object.create(_&&_.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(T,_):T.__proto__=_)}var E=(0,x.default)("quill:toolbar"),k=function(T){j(_,T);function _(P,O){b(this,_);var I=w(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,P,O));if(Array.isArray(I.options.container)){var B=document.createElement("div");A(B,I.options.container),P.container.parentNode.insertBefore(B,P.container),I.container=B}else typeof I.options.container=="string"?I.container=document.querySelector(I.options.container):I.container=I.options.container;if(!(I.container instanceof HTMLElement)){var $;return $=E.error("Container required for toolbar",I.options),w(I,$)}return I.container.classList.add("ql-toolbar"),I.controls=[],I.handlers={},Object.keys(I.options.handlers).forEach(function(q){I.addHandler(q,I.options.handlers[q])}),[].forEach.call(I.container.querySelectorAll("button, select"),function(q){I.attach(q)}),I.quill.on(f.default.events.EDITOR_CHANGE,function(q,L){q===f.default.events.SELECTION_CHANGE&&I.update(L)}),I.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){var q=I.quill.selection.getRange(),L=a(q,1),D=L[0];I.update(D)}),I}return o(_,[{key:"addHandler",value:function(O,I){this.handlers[O]=I}},{key:"attach",value:function(O){var I=this,B=[].find.call(O.classList,function(q){return q.indexOf("ql-")===0});if(B){if(B=B.slice(3),O.tagName==="BUTTON"&&O.setAttribute("type","button"),this.handlers[B]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[B]==null){E.warn("ignoring attaching to disabled format",B,O);return}if(d.default.query(B)==null){E.warn("ignoring attaching to nonexistent format",B,O);return}}var $=O.tagName==="SELECT"?"change":"click";O.addEventListener($,function(q){var L=void 0;if(O.tagName==="SELECT"){if(O.selectedIndex<0)return;var D=O.options[O.selectedIndex];D.hasAttribute("selected")?L=!1:L=D.value||!1}else O.classList.contains("ql-active")?L=!1:L=O.value||!O.hasAttribute("value"),q.preventDefault();I.quill.focus();var R=I.quill.selection.getRange(),F=a(R,1),U=F[0];if(I.handlers[B]!=null)I.handlers[B].call(I,L);else if(d.default.query(B).prototype instanceof d.default.Embed){if(L=prompt("Enter "+B),!L)return;I.quill.updateContents(new c.default().retain(U.index).delete(U.length).insert(v({},B,L)),f.default.sources.USER)}else I.quill.format(B,L,f.default.sources.USER);I.update(U)}),this.controls.push([B,O])}}},{key:"update",value:function(O){var I=O==null?{}:this.quill.getFormat(O);this.controls.forEach(function(B){var $=a(B,2),q=$[0],L=$[1];if(L.tagName==="SELECT"){var D=void 0;if(O==null)D=null;else if(I[q]==null)D=L.querySelector("option[selected]");else if(!Array.isArray(I[q])){var R=I[q];typeof R=="string"&&(R=R.replace(/\"/g,'\\"')),D=L.querySelector('option[value="'+R+'"]')}D==null?(L.value="",L.selectedIndex=-1):D.selected=!0}else if(O==null)L.classList.remove("ql-active");else if(L.hasAttribute("value")){var F=I[q]===L.getAttribute("value")||I[q]!=null&&I[q].toString()===L.getAttribute("value")||I[q]==null&&!L.getAttribute("value");L.classList.toggle("ql-active",F)}else L.classList.toggle("ql-active",I[q]!=null)})}}]),_}(y.default);k.DEFAULTS={};function S(T,_,P){var O=document.createElement("button");O.setAttribute("type","button"),O.classList.add("ql-"+_),P!=null&&(O.value=P),T.appendChild(O)}function A(T,_){Array.isArray(_[0])||(_=[_]),_.forEach(function(P){var O=document.createElement("span");O.classList.add("ql-formats"),P.forEach(function(I){if(typeof I=="string")S(O,I);else{var B=Object.keys(I)[0],$=I[B];Array.isArray($)?C(O,B,$):S(O,B,$)}}),T.appendChild(O)})}function C(T,_,P){var O=document.createElement("select");O.classList.add("ql-"+_),P.forEach(function(I){var B=document.createElement("option");I!==!1?B.setAttribute("value",I):B.setAttribute("selected","selected"),O.appendChild(B)}),T.appendChild(O)}k.DEFAULTS={container:null,handlers:{clean:function(){var _=this,P=this.quill.getSelection();if(P!=null)if(P.length==0){var O=this.quill.getFormat();Object.keys(O).forEach(function(I){d.default.query(I,d.default.Scope.INLINE)!=null&&_.quill.format(I,!1)})}else this.quill.removeFormat(P,f.default.sources.USER)},direction:function(_){var P=this.quill.getFormat().align;_==="rtl"&&P==null?this.quill.format("align","right",f.default.sources.USER):!_&&P==="right"&&this.quill.format("align",!1,f.default.sources.USER),this.quill.format("direction",_,f.default.sources.USER)},indent:function(_){var P=this.quill.getSelection(),O=this.quill.getFormat(P),I=parseInt(O.indent||0);if(_==="+1"||_==="-1"){var B=_==="+1"?1:-1;O.direction==="rtl"&&(B*=-1),this.quill.format("indent",I+B,f.default.sources.USER)}},link:function(_){_===!0&&(_=prompt("Enter link URL:")),this.quill.format("link",_,f.default.sources.USER)},list:function(_){var P=this.quill.getSelection(),O=this.quill.getFormat(P);_==="check"?O.list==="checked"||O.list==="unchecked"?this.quill.format("list",!1,f.default.sources.USER):this.quill.format("list","unchecked",f.default.sources.USER):this.quill.format("list",_,f.default.sources.USER)}}},r.default=k,r.addControls=A},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function x(m,y){for(var g=0;g<y.length;g++){var v=y[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,y,g){return y&&x(m.prototype,y),g&&x(m,g),m}}(),o=function x(m,y,g){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,y);if(v===void 0){var b=Object.getPrototypeOf(m);return b===null?void 0:x(b,y,g)}else{if("value"in v)return v.value;var w=v.get;return w===void 0?void 0:w.call(g)}},l=s(28),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,m){if(!(x instanceof m))throw new TypeError("Cannot call a class as a function")}function h(x,m){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:x}function f(x,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);x.prototype=Object.create(m&&m.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(x,m):x.__proto__=m)}var p=function(x){f(m,x);function m(y,g){d(this,m);var v=h(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,y));return v.label.innerHTML=g,v.container.classList.add("ql-color-picker"),[].slice.call(v.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(b){b.classList.add("ql-primary")}),v}return a(m,[{key:"buildItem",value:function(g){var v=o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"buildItem",this).call(this,g);return v.style.backgroundColor=g.getAttribute("value")||"",v}},{key:"selectItem",value:function(g,v){o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,g,v);var b=this.label.querySelector(".ql-color-label"),w=g&&g.getAttribute("data-value")||"";b&&(b.tagName==="line"?b.style.stroke=w:b.style.fill=w)}}]),m}(c.default);r.default=p},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function x(m,y){for(var g=0;g<y.length;g++){var v=y[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,y,g){return y&&x(m.prototype,y),g&&x(m,g),m}}(),o=function x(m,y,g){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,y);if(v===void 0){var b=Object.getPrototypeOf(m);return b===null?void 0:x(b,y,g)}else{if("value"in v)return v.value;var w=v.get;return w===void 0?void 0:w.call(g)}},l=s(28),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,m){if(!(x instanceof m))throw new TypeError("Cannot call a class as a function")}function h(x,m){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:x}function f(x,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);x.prototype=Object.create(m&&m.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(x,m):x.__proto__=m)}var p=function(x){f(m,x);function m(y,g){d(this,m);var v=h(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,y));return v.container.classList.add("ql-icon-picker"),[].forEach.call(v.container.querySelectorAll(".ql-picker-item"),function(b){b.innerHTML=g[b.getAttribute("data-value")||""]}),v.defaultItem=v.container.querySelector(".ql-selected"),v.selectItem(v.defaultItem),v}return a(m,[{key:"selectItem",value:function(g,v){o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,g,v),g=g||this.defaultItem,this.label.innerHTML=g.innerHTML}}]),m}(c.default);r.default=p},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function c(u,d){for(var h=0;h<d.length;h++){var f=d[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}return function(u,d,h){return d&&c(u.prototype,d),h&&c(u,h),u}}();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var l=function(){function c(u,d){var h=this;o(this,c),this.quill=u,this.boundsContainer=d||document.body,this.root=u.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){h.root.style.marginTop=-1*h.quill.root.scrollTop+"px"}),this.hide()}return a(c,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var h=d.left+d.width/2-this.root.offsetWidth/2,f=d.bottom+this.quill.root.scrollTop;this.root.style.left=h+"px",this.root.style.top=f+"px",this.root.classList.remove("ql-flip");var p=this.boundsContainer.getBoundingClientRect(),x=this.root.getBoundingClientRect(),m=0;if(x.right>p.right&&(m=p.right-x.right,this.root.style.left=h+m+"px"),x.left<p.left&&(m=p.left-x.left,this.root.style.left=h+m+"px"),x.bottom>p.bottom){var y=x.bottom-x.top,g=d.bottom-d.top+y;this.root.style.top=f-g+"px",this.root.classList.add("ql-flip")}return m}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),c}();r.default=l},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function C(T,_){var P=[],O=!0,I=!1,B=void 0;try{for(var $=T[Symbol.iterator](),q;!(O=(q=$.next()).done)&&(P.push(q.value),!(_&&P.length===_));O=!0);}catch(L){I=!0,B=L}finally{try{!O&&$.return&&$.return()}finally{if(I)throw B}}return P}return function(T,_){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return C(T,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function C(T,_,P){T===null&&(T=Function.prototype);var O=Object.getOwnPropertyDescriptor(T,_);if(O===void 0){var I=Object.getPrototypeOf(T);return I===null?void 0:C(I,_,P)}else{if("value"in O)return O.value;var B=O.get;return B===void 0?void 0:B.call(P)}},l=function(){function C(T,_){for(var P=0;P<_.length;P++){var O=_[P];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(T,O.key,O)}}return function(T,_,P){return _&&C(T.prototype,_),P&&C(T,P),T}}(),c=s(3),u=b(c),d=s(8),h=b(d),f=s(43),p=b(f),x=s(27),m=b(x),y=s(15),g=s(41),v=b(g);function b(C){return C&&C.__esModule?C:{default:C}}function w(C,T){if(!(C instanceof T))throw new TypeError("Cannot call a class as a function")}function j(C,T){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:C}function E(C,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);C.prototype=Object.create(T&&T.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(C,T):C.__proto__=T)}var k=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],S=function(C){E(T,C);function T(_,P){w(this,T),P.modules.toolbar!=null&&P.modules.toolbar.container==null&&(P.modules.toolbar.container=k);var O=j(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,_,P));return O.quill.container.classList.add("ql-snow"),O}return l(T,[{key:"extendToolbar",value:function(P){P.container.classList.add("ql-snow"),this.buildButtons([].slice.call(P.container.querySelectorAll("button")),v.default),this.buildPickers([].slice.call(P.container.querySelectorAll("select")),v.default),this.tooltip=new A(this.quill,this.options.bounds),P.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(O,I){P.handlers.link.call(P,!I.format.link)})}}]),T}(p.default);S.DEFAULTS=(0,u.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){if(T){var _=this.quill.getSelection();if(_==null||_.length==0)return;var P=this.quill.getText(_);/^\S+@\S+\.\S+$/.test(P)&&P.indexOf("mailto:")!==0&&(P="mailto:"+P);var O=this.quill.theme.tooltip;O.edit("link",P)}else this.quill.format("link",!1)}}}}});var A=function(C){E(T,C);function T(_,P){w(this,T);var O=j(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,_,P));return O.preview=O.root.querySelector("a.ql-preview"),O}return l(T,[{key:"listen",value:function(){var P=this;o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(O){P.root.classList.contains("ql-editing")?P.save():P.edit("link",P.preview.textContent),O.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(O){if(P.linkRange!=null){var I=P.linkRange;P.restoreFocus(),P.quill.formatText(I,"link",!1,h.default.sources.USER),delete P.linkRange}O.preventDefault(),P.hide()}),this.quill.on(h.default.events.SELECTION_CHANGE,function(O,I,B){if(O!=null){if(O.length===0&&B===h.default.sources.USER){var $=P.quill.scroll.descendant(m.default,O.index),q=a($,2),L=q[0],D=q[1];if(L!=null){P.linkRange=new y.Range(O.index-D,L.length());var R=m.default.formats(L.domNode);P.preview.textContent=R,P.preview.setAttribute("href",R),P.show(),P.position(P.quill.getBounds(P.linkRange));return}}else delete P.linkRange;P.hide()}})}},{key:"show",value:function(){o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),T}(f.BaseTooltip);A.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=S},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(29),o=te(a),l=s(36),c=s(38),u=s(64),d=s(65),h=te(d),f=s(66),p=te(f),x=s(67),m=te(x),y=s(37),g=s(26),v=s(39),b=s(40),w=s(56),j=te(w),E=s(68),k=te(E),S=s(27),A=te(S),C=s(69),T=te(C),_=s(70),P=te(_),O=s(71),I=te(O),B=s(72),$=te(B),q=s(73),L=te(q),D=s(13),R=te(D),F=s(74),U=te(F),V=s(75),W=te(V),M=s(57),z=te(M),H=s(41),G=te(H),Y=s(28),Z=te(Y),J=s(59),oe=te(J),de=s(60),ye=te(de),ve=s(61),Ee=te(ve),X=s(108),Q=te(X),ee=s(62),ce=te(ee);function te(Ne){return Ne&&Ne.__esModule?Ne:{default:Ne}}o.default.register({"attributors/attribute/direction":c.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":g.ColorClass,"attributors/class/direction":c.DirectionClass,"attributors/class/font":v.FontClass,"attributors/class/size":b.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":g.ColorStyle,"attributors/style/direction":c.DirectionStyle,"attributors/style/font":v.FontStyle,"attributors/style/size":b.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":c.DirectionClass,"formats/indent":u.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":g.ColorStyle,"formats/font":v.FontClass,"formats/size":b.SizeClass,"formats/blockquote":h.default,"formats/code-block":R.default,"formats/header":p.default,"formats/list":m.default,"formats/bold":j.default,"formats/code":D.Code,"formats/italic":k.default,"formats/link":A.default,"formats/script":T.default,"formats/strike":P.default,"formats/underline":I.default,"formats/image":$.default,"formats/video":L.default,"formats/list/item":x.ListItem,"modules/formula":U.default,"modules/syntax":W.default,"modules/toolbar":z.default,"themes/bubble":Q.default,"themes/snow":ce.default,"ui/icons":G.default,"ui/picker":Z.default,"ui/icon-picker":ye.default,"ui/color-picker":oe.default,"ui/tooltip":Ee.default},!0),r.default=o.default},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var a=function(){function m(y,g){for(var v=0;v<g.length;v++){var b=g[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(y,b.key,b)}}return function(y,g,v){return g&&m(y.prototype,g),v&&m(y,v),y}}(),o=function m(y,g,v){y===null&&(y=Function.prototype);var b=Object.getOwnPropertyDescriptor(y,g);if(b===void 0){var w=Object.getPrototypeOf(y);return w===null?void 0:m(w,g,v)}else{if("value"in b)return b.value;var j=b.get;return j===void 0?void 0:j.call(v)}},l=s(0),c=u(l);function u(m){return m&&m.__esModule?m:{default:m}}function d(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function h(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function f(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var p=function(m){f(y,m);function y(){return d(this,y),h(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"add",value:function(v,b){if(b==="+1"||b==="-1"){var w=this.value(v)||0;b=b==="+1"?w+1:w-1}return b===0?(this.remove(v),!0):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"add",this).call(this,v,b)}},{key:"canAdd",value:function(v,b){return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,v,b)||o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,v,parseInt(b))}},{key:"value",value:function(v){return parseInt(o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,v))||void 0}}]),y}(c.default.Attributor.Class),x=new p("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=x},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(4),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function u(f,p){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:f}function d(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);f.prototype=Object.create(p&&p.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(f,p):f.__proto__=p)}var h=function(f){d(p,f);function p(){return c(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(o.default);h.blotName="blockquote",h.tagName="blockquote",r.default=h},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function p(x,m){for(var y=0;y<m.length;y++){var g=m[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(x,g.key,g)}}return function(x,m,y){return m&&p(x.prototype,m),y&&p(x,y),x}}(),o=s(4),l=c(o);function c(p){return p&&p.__esModule?p:{default:p}}function u(p,x){if(!(p instanceof x))throw new TypeError("Cannot call a class as a function")}function d(p,x){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:p}function h(p,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);p.prototype=Object.create(x&&x.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(p,x):p.__proto__=x)}var f=function(p){h(x,p);function x(){return u(this,x),d(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,null,[{key:"formats",value:function(y){return this.tagName.indexOf(y.tagName)+1}}]),x}(l.default);f.blotName="header",f.tagName=["H1","H2","H3","H4","H5","H6"],r.default=f},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var a=function(){function w(j,E){for(var k=0;k<E.length;k++){var S=E[k];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(j,S.key,S)}}return function(j,E,k){return E&&w(j.prototype,E),k&&w(j,k),j}}(),o=function w(j,E,k){j===null&&(j=Function.prototype);var S=Object.getOwnPropertyDescriptor(j,E);if(S===void 0){var A=Object.getPrototypeOf(j);return A===null?void 0:w(A,E,k)}else{if("value"in S)return S.value;var C=S.get;return C===void 0?void 0:C.call(k)}},l=s(0),c=p(l),u=s(4),d=p(u),h=s(25),f=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function x(w,j,E){return j in w?Object.defineProperty(w,j,{value:E,enumerable:!0,configurable:!0,writable:!0}):w[j]=E,w}function m(w,j){if(!(w instanceof j))throw new TypeError("Cannot call a class as a function")}function y(w,j){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:w}function g(w,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);w.prototype=Object.create(j&&j.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(w,j):w.__proto__=j)}var v=function(w){g(j,w);function j(){return m(this,j),y(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return a(j,[{key:"format",value:function(k,S){k===b.blotName&&!S?this.replaceWith(c.default.create(this.statics.scope)):o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"format",this).call(this,k,S)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(k,S){return this.parent.isolate(this.offset(this.parent),this.length()),k===this.parent.statics.blotName?(this.parent.replaceWith(k,S),this):(this.parent.unwrap(),o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"replaceWith",this).call(this,k,S))}}],[{key:"formats",value:function(k){return k.tagName===this.tagName?void 0:o(j.__proto__||Object.getPrototypeOf(j),"formats",this).call(this,k)}}]),j}(d.default);v.blotName="list-item",v.tagName="LI";var b=function(w){g(j,w),a(j,null,[{key:"create",value:function(k){var S=k==="ordered"?"OL":"UL",A=o(j.__proto__||Object.getPrototypeOf(j),"create",this).call(this,S);return(k==="checked"||k==="unchecked")&&A.setAttribute("data-checked",k==="checked"),A}},{key:"formats",value:function(k){if(k.tagName==="OL")return"ordered";if(k.tagName==="UL")return k.hasAttribute("data-checked")?k.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function j(E){m(this,j);var k=y(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,E)),S=function(C){if(C.target.parentNode===E){var T=k.statics.formats(E),_=c.default.find(C.target);T==="checked"?_.format("list","unchecked"):T==="unchecked"&&_.format("list","checked")}};return E.addEventListener("touchstart",S),E.addEventListener("mousedown",S),k}return a(j,[{key:"format",value:function(k,S){this.children.length>0&&this.children.tail.format(k,S)}},{key:"formats",value:function(){return x({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(k,S){if(k instanceof v)o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"insertBefore",this).call(this,k,S);else{var A=S==null?this.length():S.offset(this),C=this.split(A);C.parent.insertBefore(k,C)}}},{key:"optimize",value:function(k){o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"optimize",this).call(this,k);var S=this.next;S!=null&&S.prev===this&&S.statics.blotName===this.statics.blotName&&S.domNode.tagName===this.domNode.tagName&&S.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(S.moveChildren(this),S.remove())}},{key:"replace",value:function(k){if(k.statics.blotName!==this.statics.blotName){var S=c.default.create(this.statics.defaultChild);k.moveChildren(S),this.appendChild(S)}o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"replace",this).call(this,k)}}]),j}(f.default);b.blotName="list",b.scope=c.default.Scope.BLOCK_BLOT,b.tagName=["OL","UL"],b.defaultChild="list-item",b.allowedChildren=[v],r.ListItem=v,r.default=b},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(56),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function u(f,p){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:f}function d(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);f.prototype=Object.create(p&&p.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(f,p):f.__proto__=p)}var h=function(f){d(p,f);function p(){return c(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(o.default);h.blotName="italic",h.tagName=["EM","I"],r.default=h},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function x(m,y){for(var g=0;g<y.length;g++){var v=y[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,y,g){return y&&x(m.prototype,y),g&&x(m,g),m}}(),o=function x(m,y,g){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,y);if(v===void 0){var b=Object.getPrototypeOf(m);return b===null?void 0:x(b,y,g)}else{if("value"in v)return v.value;var w=v.get;return w===void 0?void 0:w.call(g)}},l=s(6),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,m){if(!(x instanceof m))throw new TypeError("Cannot call a class as a function")}function h(x,m){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:x}function f(x,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);x.prototype=Object.create(m&&m.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(x,m):x.__proto__=m)}var p=function(x){f(m,x);function m(){return d(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,null,[{key:"create",value:function(g){return g==="super"?document.createElement("sup"):g==="sub"?document.createElement("sub"):o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,g)}},{key:"formats",value:function(g){if(g.tagName==="SUB")return"sub";if(g.tagName==="SUP")return"super"}}]),m}(c.default);p.blotName="script",p.tagName=["SUB","SUP"],r.default=p},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(6),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function u(f,p){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:f}function d(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);f.prototype=Object.create(p&&p.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(f,p):f.__proto__=p)}var h=function(f){d(p,f);function p(){return c(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(o.default);h.blotName="strike",h.tagName="S",r.default=h},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=s(6),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}function u(f,p){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:f}function d(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);f.prototype=Object.create(p&&p.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(f,p):f.__proto__=p)}var h=function(f){d(p,f);function p(){return c(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(o.default);h.blotName="underline",h.tagName="U",r.default=h},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:y(j,v,b)}else{if("value"in w)return w.value;var E=w.get;return E===void 0?void 0:E.call(b)}},l=s(0),c=d(l),u=s(27);function d(y){return y&&y.__esModule?y:{default:y}}function h(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var x=["alt","height","width"],m=function(y){p(g,y);function g(){return h(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,[{key:"format",value:function(b,w){x.indexOf(b)>-1?w?this.domNode.setAttribute(b,w):this.domNode.removeAttribute(b):o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,w)}}],[{key:"create",value:function(b){var w=o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return typeof b=="string"&&w.setAttribute("src",this.sanitize(b)),w}},{key:"formats",value:function(b){return x.reduce(function(w,j){return b.hasAttribute(j)&&(w[j]=b.getAttribute(j)),w},{})}},{key:"match",value:function(b){return/\.(jpe?g|gif|png)$/.test(b)||/^data:image\/.+;base64/.test(b)}},{key:"sanitize",value:function(b){return(0,u.sanitize)(b,["http","https","data"])?b:"//:0"}},{key:"value",value:function(b){return b.getAttribute("src")}}]),g}(c.default.Embed);m.blotName="image",m.tagName="IMG",r.default=m},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function y(g,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,v,b){return v&&y(g.prototype,v),b&&y(g,b),g}}(),o=function y(g,v,b){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,v);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:y(j,v,b)}else{if("value"in w)return w.value;var E=w.get;return E===void 0?void 0:E.call(b)}},l=s(4),c=s(27),u=d(c);function d(y){return y&&y.__esModule?y:{default:y}}function h(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function f(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function p(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var x=["height","width"],m=function(y){p(g,y);function g(){return h(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,[{key:"format",value:function(b,w){x.indexOf(b)>-1?w?this.domNode.setAttribute(b,w):this.domNode.removeAttribute(b):o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,w)}}],[{key:"create",value:function(b){var w=o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,b);return w.setAttribute("frameborder","0"),w.setAttribute("allowfullscreen",!0),w.setAttribute("src",this.sanitize(b)),w}},{key:"formats",value:function(b){return x.reduce(function(w,j){return b.hasAttribute(j)&&(w[j]=b.getAttribute(j)),w},{})}},{key:"sanitize",value:function(b){return u.default.sanitize(b)}},{key:"value",value:function(b){return b.getAttribute("src")}}]),g}(l.BlockEmbed);m.blotName="video",m.className="ql-video",m.tagName="IFRAME",r.default=m},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var a=function(){function b(w,j){for(var E=0;E<j.length;E++){var k=j[E];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(w,k.key,k)}}return function(w,j,E){return j&&b(w.prototype,j),E&&b(w,E),w}}(),o=function b(w,j,E){w===null&&(w=Function.prototype);var k=Object.getOwnPropertyDescriptor(w,j);if(k===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:b(S,j,E)}else{if("value"in k)return k.value;var A=k.get;return A===void 0?void 0:A.call(E)}},l=s(35),c=p(l),u=s(5),d=p(u),h=s(9),f=p(h);function p(b){return b&&b.__esModule?b:{default:b}}function x(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function m(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function y(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var g=function(b){y(w,b);function w(){return x(this,w),m(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return a(w,null,[{key:"create",value:function(E){var k=o(w.__proto__||Object.getPrototypeOf(w),"create",this).call(this,E);return typeof E=="string"&&(window.katex.render(E,k,{throwOnError:!1,errorColor:"#f00"}),k.setAttribute("data-value",E)),k}},{key:"value",value:function(E){return E.getAttribute("data-value")}}]),w}(c.default);g.blotName="formula",g.className="ql-formula",g.tagName="SPAN";var v=function(b){y(w,b),a(w,null,[{key:"register",value:function(){d.default.register(g,!0)}}]);function w(){x(this,w);var j=m(this,(w.__proto__||Object.getPrototypeOf(w)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return j}return w}(f.default);r.FormulaBlot=g,r.default=v},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var a=function(){function E(k,S){for(var A=0;A<S.length;A++){var C=S[A];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(k,C.key,C)}}return function(k,S,A){return S&&E(k.prototype,S),A&&E(k,A),k}}(),o=function E(k,S,A){k===null&&(k=Function.prototype);var C=Object.getOwnPropertyDescriptor(k,S);if(C===void 0){var T=Object.getPrototypeOf(k);return T===null?void 0:E(T,S,A)}else{if("value"in C)return C.value;var _=C.get;return _===void 0?void 0:_.call(A)}},l=s(0),c=m(l),u=s(5),d=m(u),h=s(9),f=m(h),p=s(13),x=m(p);function m(E){return E&&E.__esModule?E:{default:E}}function y(E,k){if(!(E instanceof k))throw new TypeError("Cannot call a class as a function")}function g(E,k){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:E}function v(E,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);E.prototype=Object.create(k&&k.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(E,k):E.__proto__=k)}var b=function(E){v(k,E);function k(){return y(this,k),g(this,(k.__proto__||Object.getPrototypeOf(k)).apply(this,arguments))}return a(k,[{key:"replaceWith",value:function(A){this.domNode.textContent=this.domNode.textContent,this.attach(),o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"replaceWith",this).call(this,A)}},{key:"highlight",value:function(A){var C=this.domNode.textContent;this.cachedText!==C&&((C.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=A(C),this.domNode.normalize(),this.attach()),this.cachedText=C)}}]),k}(x.default);b.className="ql-syntax";var w=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),j=function(E){v(k,E),a(k,null,[{key:"register",value:function(){d.default.register(w,!0),d.default.register(b,!0)}}]);function k(S,A){y(this,k);var C=g(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,S,A));if(typeof C.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var T=null;return C.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(T),T=setTimeout(function(){C.highlight(),T=null},C.options.interval)}),C.highlight(),C}return a(k,[{key:"highlight",value:function(){var A=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var C=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(T){T.highlight(A.options.highlight)}),this.quill.update(d.default.sources.SILENT),C!=null&&this.quill.setSelection(C,d.default.sources.SILENT)}}}]),k}(f.default);j.DEFAULTS={highlight:function(){return window.hljs==null?null:function(E){var k=window.hljs.highlightAuto(E);return k.value}}(),interval:1e3},r.CodeBlock=b,r.CodeToken=w,r.default=j},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect>
960 <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}
vendor: 11,345 bytes, line 960
960,function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var a=function k(S,A,C){S===null&&(S=Function.prototype);var T=Object.getOwnPropertyDescriptor(S,A);if(T===void 0){var _=Object.getPrototypeOf(S);return _===null?void 0:k(_,A,C)}else{if("value"in T)return T.value;var P=T.get;return P===void 0?void 0:P.call(C)}},o=function(){function k(S,A){for(var C=0;C<A.length;C++){var T=A[C];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}return function(S,A,C){return A&&k(S.prototype,A),C&&k(S,C),S}}(),l=s(3),c=y(l),u=s(8),d=y(u),h=s(43),f=y(h),p=s(15),x=s(41),m=y(x);function y(k){return k&&k.__esModule?k:{default:k}}function g(k,S){if(!(k instanceof S))throw new TypeError("Cannot call a class as a function")}function v(k,S){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:k}function b(k,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);k.prototype=Object.create(S&&S.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(k,S):k.__proto__=S)}var w=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],j=function(k){b(S,k);function S(A,C){g(this,S),C.modules.toolbar!=null&&C.modules.toolbar.container==null&&(C.modules.toolbar.container=w);var T=v(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,A,C));return T.quill.container.classList.add("ql-bubble"),T}return o(S,[{key:"extendToolbar",value:function(C){this.tooltip=new E(this.quill,this.options.bounds),this.tooltip.root.appendChild(C.container),this.buildButtons([].slice.call(C.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(C.container.querySelectorAll("select")),m.default)}}]),S}(f.default);j.DEFAULTS=(0,c.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(S){S?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var E=function(k){b(S,k);function S(A,C){g(this,S);var T=v(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,A,C));return T.quill.on(d.default.events.EDITOR_CHANGE,function(_,P,O,I){if(_===d.default.events.SELECTION_CHANGE)if(P!=null&&P.length>0&&I===d.default.sources.USER){T.show(),T.root.style.left="0px",T.root.style.width="",T.root.style.width=T.root.offsetWidth+"px";var B=T.quill.getLines(P.index,P.length);if(B.length===1)T.position(T.quill.getBounds(P));else{var $=B[B.length-1],q=T.quill.getIndex($),L=Math.min($.length()-1,P.index+P.length-q),D=T.quill.getBounds(new p.Range(q,L));T.position(D)}}else document.activeElement!==T.textbox&&T.quill.hasFocus()&&T.hide()}),T}return o(S,[{key:"listen",value:function(){var C=this;a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){C.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!C.root.classList.contains("ql-hidden")){var T=C.quill.getSelection();T!=null&&C.position(C.quill.getBounds(T))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(C){var T=a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"position",this).call(this,C),_=this.root.querySelector(".ql-tooltip-arrow");if(_.style.marginLeft="",T===0)return T;_.style.marginLeft=-1*T-_.offsetWidth/2+"px"}}]),S}(h.BaseTooltip);E.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=E,r.default=j},function(n,r,s){n.exports=s(63)}]).default})})(hR);var kse=hR.exports,Sse=On&&On.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zf=On&&On.__assign||function(){return Zf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Zf.apply(this,arguments)},_se=On&&On.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),s=0,t=0;t<n;t++)for(var a=arguments[t],o=0,l=a.length;o<l;o++,s++)r[s]=a[o];return r},pm=On&&On.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Tr=pm(N),Ese=pm(mr),uc=pm(Nse),o2=pm(kse),Cse=function(e){Sse(t,e);function t(n){var r=e.call(this,n)||this;r.dirtyProps=["modules","formats","bounds","theme","children"],r.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],r.state={generation:0},r.selection=null,r.onEditorChange=function(a,o,l,c){var u,d,h,f;a==="text-change"?(d=(u=r).onEditorChangeText)===null||d===void 0||d.call(u,r.editor.root.innerHTML,o,c,r.unprivilegedEditor):a==="selection-change"&&((f=(h=r).onEditorChangeSelection)===null||f===void 0||f.call(h,o,c,r.unprivilegedEditor))};var s=r.isControlled()?n.value:n.defaultValue;return r.value=s??"",r}return t.prototype.validateProps=function(n){var r;if(Tr.default.Children.count(n.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(Tr.default.Children.count(n.children)){var s=Tr.default.Children.only(n.children);if(((r=s)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&n.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},t.prototype.shouldComponentUpdate=function(n,r){var s=this,a;if(this.validateProps(n),!this.editor||this.state.generation!==r.generation)return!0;if("value"in n){var o=this.getEditorContents(),l=(a=n.value,a??"");this.isEqualValue(l,o)||this.setEditorContents(this.editor,l)}return n.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,n.readOnly),_se(this.cleanProps,this.dirtyProps).some(function(c){return!uc.default(n[c],s.props[c])})},t.prototype.shouldComponentRegenerate=function(n){var r=this;return this.dirtyProps.some(function(s){return!uc.default(n[s],r.props[s])})},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(n,r){var s=this;if(this.editor&&this.shouldComponentRegenerate(n)){var a=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:a,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==r.generation){var l=this.regenerationSnapshot,a=l.delta,c=l.selection;delete this.regenerationSnapshot,this.instantiateEditor();var u=this.editor;u.setContents(a),l2(function(){return s.setEditorSelection(u,c)})}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(n,r){var s=new o2.default(n,r);return r.tabIndex!=null&&this.setEditorTabIndex(s,r.tabIndex),this.hookEditor(s),s},t.prototype.hookEditor=function(n){this.unprivilegedEditor=this.makeUnprivilegedEditor(n),n.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(n){n.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(n){return n&&n.ops},t.prototype.isEqualValue=function(n,r){return this.isDelta(n)&&this.isDelta(r)?uc.default(n.ops,r.ops):uc.default(n,r)},t.prototype.setEditorContents=function(n,r){var s=this;this.value=r;var a=this.getEditorSelection();typeof r=="string"?n.setContents(n.clipboard.convert(r)):n.setContents(r),l2(function(){return s.setEditorSelection(n,a)})},t.prototype.setEditorSelection=function(n,r){if(this.selection=r,r){var s=n.getLength();r.index=Math.max(0,Math.min(r.index,s-1)),r.length=Math.max(0,Math.min(r.length,s-1-r.index)),n.setSelection(r)}},t.prototype.setEditorTabIndex=function(n,r){var s,a;!((a=(s=n)===null||s===void 0?void 0:s.scroll)===null||a===void 0)&&a.domNode&&(n.scroll.domNode.tabIndex=r)},t.prototype.setEditorReadOnly=function(n,r){r?n.disable():n.enable()},t.prototype.makeUnprivilegedEditor=function(n){var r=n;return{getHTML:function(){return r.root.innerHTML},getLength:r.getLength.bind(r),getText:r.getText.bind(r),getContents:r.getContents.bind(r),getSelection:r.getSelection.bind(r),getBounds:r.getBounds.bind(r)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var n=Ese.default.findDOMNode(this.editingArea);if(!n)throw new Error("Cannot find element for editing area");if(n.nodeType===3)throw new Error("Editing area cannot be a text node");return n},t.prototype.renderEditingArea=function(){var n=this,r=this.props,s=r.children,a=r.preserveWhitespace,o=this.state.generation,l={key:o,ref:function(c){n.editingArea=c}};return Tr.default.Children.count(s)?Tr.default.cloneElement(Tr.default.Children.only(s),l):a?Tr.default.createElement("pre",Zf({},l)):Tr.default.createElement("div",Zf({},l))},t.prototype.render=function(){var n;return Tr.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(n=this.props.className,n??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(n,r,s,a){var o,l;if(this.editor){var c=this.isDelta(this.value)?a.getContents():a.getHTML();c!==this.getEditorContents()&&(this.lastDeltaChangeSet=r,this.value=c,(l=(o=this.props).onChange)===null||l===void 0||l.call(o,n,r,s,a))}},t.prototype.onEditorChangeSelection=function(n,r,s){var a,o,l,c,u,d;if(this.editor){var h=this.getEditorSelection(),f=!h&&n,p=h&&!n;uc.default(n,h)||(this.selection=n,(o=(a=this.props).onChangeSelection)===null||o===void 0||o.call(a,n,r,s),f?(c=(l=this.props).onFocus)===null||c===void 0||c.c
vendor: 4,376 bytes, line 960
960all(l,n,r,s):p&&((d=(u=this.props).onBlur)===null||d===void 0||d.call(u,h,r,s)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=o2.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(Tr.default.Component);function l2(e){Promise.resolve().then(e)}var Tse=Cse;const fR=up(Tse);function K0(e){const t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var mm="Checkbox",[Ase,tle]=zn(mm),[Pse,G0]=Ase(mm);function Ose(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:a,form:o,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[f,p]=Ai({prop:n,defaultProp:s??!1,onChange:c,caller:mm}),[x,m]=N.useState(null),[y,g]=N.useState(null),v=N.useRef(!1),b=x?!!o||!!x.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:x,setControl:m,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:xi(s)?!1:s,isFormControl:b,bubbleInput:y,setBubbleInput:g};return i.jsx(Pse,{scope:t,...w,children:Rse(h)?h(w):r})}var pR="CheckboxTrigger",mR=N.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:a,value:o,disabled:l,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:x}=G0(pR,e),m=Ge(s,d),y=N.useRef(c);return N.useEffect(()=>{const g=a==null?void 0:a.form;if(g){const v=()=>h(y.current);return g.addEventListener("reset",v),()=>g.removeEventListener("reset",v)}},[a,h]),i.jsx(Oe.button,{type:"button",role:"checkbox","aria-checked":xi(c)?"mixed":c,"aria-required":u,"data-state":bR(c),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:m,onKeyDown:xe(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:xe(n,g=>{h(v=>xi(v)?!0:!v),x&&p&&(f.current=g.isPropagationStopped(),f.current||g.stopPropagation())})})});mR.displayName=pR;var Y0=N.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:a,required:o,disabled:l,value:c,onCheckedChange:u,form:d,...h}=e;return i.jsx(Ose,{__scopeCheckbox:n,checked:s,defaultChecked:a,disabled:l,required:o,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>i.jsxs(i.Fragment,{children:[i.jsx(mR,{...h,ref:t,__scopeCheckbox:n}),f&&i.jsx(vR,{__scopeCheckbox:n})]})})});Y0.displayName=mm;var gR="CheckboxIndicator",xR=N.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,a=G0(gR,n);return i.jsx(Bn,{present:r||xi(a.checked)||a.checked===!0,children:i.jsx(Oe.span,{"data-state":bR(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});xR.displayName=gR;var yR="CheckboxBubbleInput",vR=N.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:a,defaultChecked:o,required:l,disabled:c,name:u,value:d,form:h,bubbleInput:f,setBubbleInput:p}=G0(yR,e),x=Ge(n,p),m=K0(a),y=Ip(r);N.useEffect(()=>{const v=f;if(!v)return;const b=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(b,"checked").set,E=!s.current;if(m!==a&&j){const k=new Event("click",{bubbles:E});v.indeterminate=xi(a),j.call(v,xi(a)?!1:a),v.dispatchEvent(k)}},[f,m,a,s]);const g=N.useRef(xi(a)?!1:a);return i.jsx(Oe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??g.current,required:l,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:x,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});vR.displayName=yR;function Rse(e){return typeof e=="function"}function xi(e){return e==="indeterminate"}function bR(e){return xi(e)?"indeterminate":e?"checked":"unchecked"}const X0=N.forwardRef(({className:e,...t},n)=>i.jsx(Y0,{ref:n,className:Pe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(xR,{className:Pe("flex items-center justify-center text-current"),children:i.jsx(Xu,{className:"h-4 w-4"})})}));X0.displayName=Y0.displayName;
vendor: 4,453 bytes, lines 960-973
960var c2=!1,Hi,pv,mv,Vh,Wh,wR,Hh,gv,xv,yv,jR,vv,bv,NR,kR;function gn(){if(!c2){c2=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(vv=/\b(iPhone|iP[ao]d)/.exec(e),bv=/\b(iP[ao]d)/.exec(e),yv=/Android/i.exec(e),NR=/FBAN\/\w+;/i.exec(e),kR=/Mobile/i.exec(e),jR=!!/Win64/.exec(e),t){Hi=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Hi&&document&&document.documentMode&&(Hi=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);wR=r?parseFloat(r[1])+4:Hi,pv=t[2]?parseFloat(t[2]):NaN,mv=t[3]?parseFloat(t[3]):NaN,Vh=t[4]?parseFloat(t[4]):NaN,Vh?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Wh=t&&t[1]?parseFloat(t[1]):NaN):Wh=NaN}else Hi=pv=mv=Wh=Vh=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Hh=s?parseFloat(s[1].replace("_",".")):!0}else Hh=!1;gv=!!n[2],xv=!!n[3]}else Hh=gv=xv=!1}}var wv={ie:function(){return gn()||Hi},ieCompatibilityMode:function(){return gn()||wR>Hi},ie64:function(){return wv.ie()&&jR},firefox:function(){return gn()||pv},opera:function(){return gn()||mv},webkit:function(){return gn()||Vh},safari:function(){return wv.webkit()},chrome:function(){return gn()||Wh},windows:function(){return gn()||gv},osx:function(){return gn()||Hh},linux:function(){return gn()||xv},iphone:function(){return gn()||vv},mobile:function(){return gn()||vv||bv||yv||kR},nativeApp:function(){return gn()||NR},android:function(){return gn()||yv},ipad:function(){return gn()||bv}},Mse=wv,fh=!!(typeof window<"u"&&window.document&&window.document.createElement),Dse={canUseDOM:fh,canUseWorkers:typeof Worker<"u",canUseEventListeners:fh&&!!(window.addEventListener||window.attachEvent),canUseViewport:fh&&!!window.screen,isInWorker:!fh},Ise=Dse,SR=Ise,_R;SR.canUseDOM&&(_R=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/** 961 * Checks if an event is supported in the current execution environment. 962 * 963 * NOTE: This will not work correctly for non-generic events such as `change`, 964 * `reset`, `load`, `error`, and `select`. 965 * 966 * Borrows from Modernizr. 967 * 968 * @param {string} eventNameSuffix Event name, e.g. "click". 969 * @param {?boolean} capture Check if the capture phase is supported. 970 * @return {boolean} True if the event is supported. 971 * @internal 972 * @license Modernizr 3.0.0pre (Custom Build) | MIT 973 */function Lse(e,t){if(!SR.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var s=document.createElement("div");s.setAttribute(n,"return;"),r=typeof s[n]=="function"}return!r&&_R&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var Fse=Lse,$se=Mse,zse=Fse,u2=10,d2=40,h2=800;function ER(e){var t=0,n=0,r=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*u2,s=n*u2,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||s)&&e.deltaMode&&(e.deltaMode==1?(r*=d2,s*=d2):(r*=h2,s*=h2)),r&&!t&&(t=r<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:s}}ER.getEventType=function(){return $se.firefox()?"DOMMouseScroll":zse("wheel")?"wheel":"mousewheel"};var Bse=ER,Use=Bse;const qse=up(Use);function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function Vse(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wse(e){var t=Vse(e,"string");return Du(t)=="symbol"?t:t+""}function Hse(e,t,n){return(t=Wse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
973t%2?f2(Object(n),!0).forEach(function(r){Hse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kse(e,t,n,r,s,a=0){const{width:o,height:l}=pl(e,t,a),c=Math.min(o,n),u=Math.min(l,r);return c>u*s?{width:u*s,height:u}:{width:c,height:c/s}}function Gse(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function dc(e,t,n,r,s=0){const{width:a,height:o}=pl(t.width,t.height,s);return{x:p2(e.x,a,n.width,r),y:p2(e.y,o,n.height,r)}}function p2(e,t,n,r){const s=Math.abs(t*r/2-n/2);return gm(e,-s,s)}function m2(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function g2(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function Yse(e,t,n,r,s,a=0,o=!0){const l=o?Xse:Qse,c=pl(t.width,t.height,a),u=pl(t.naturalWidth,t.naturalHeight,a),d={x:l(100,((c.width-n.width/s)/2-e.x/s)/c.width*100),y:l(100,((c.height-n.height/s)/2-e.y/s)/c.height*100),width:l(100,n.width/c.width*100/s),height:l(100,n.height/c.height*100/s)},h=Math.round(l(u.width,d.width*u.width/100)),f=Math.round(l(u.height,d.height*u.height/100)),p=u.width>=u.height*r?{width:Math.round(f*r),height:f}:{width:h,height:Math.round(h/r)};return{croppedAreaPercentages:d,croppedAreaPixels:Ot(Ot({},p),{},{x:Math.round(l(u.width-p.width,d.x*u.width/100)),y:Math.round(l(u.height-p.height,d.y*u.height/100))})}}function Xse(e,t){return Math.min(e,Math.max(0,t))}function Qse(e,t){return t}function Jse(e,t,n,r,s,a){const o=pl(t.width,t.height,n),l=gm(r.width/o.width*(100/e.width),s,a);return{crop:{x:l*o.width/2-r.width/2-o.width*l*(e.x/100),y:l*o.height/2-r.height/2-o.height*l*(e.y/100)},zoom:l}}function Zse(e,t,n){const r=Gse(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function eie(e,t,n=0,r,s,a){const o=pl(t.naturalWidth,t.naturalHeight,n),l=gm(Zse(e,t,r),s,a),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((o.width-e.width)/2-e.x)*c,y:((o.height-e.height)/2-e.y)*c},zoom:l}}function x2(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function tie(e){return e*Math.PI/180}function pl(e,t,n){const r=tie(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function gm(e,t,n){return Math.min(Math.max(e,t),n)}function ph(...e){return e.filter(t=>typeof t=="string"&&t.length>0).join(" ").trim()}var nie=`.reactEasyCrop_Container { 974 position: absolute; 975 top: 0; 976 left: 0; 977 right: 0; 978 bottom: 0; 979 overflow: hidden; 980 user-select: none; 981 touch-action: none; 982 cursor: move; 983 display: flex; 984 justify-content: center; 985 align-items: center; 986} 987 988.reactEasyCrop_Image, 989.reactEasyCrop_Video { 990 will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ 991 max-width: unset; /* prevent global img/video reset rules from constraining the cropper media */ 992} 993 994.reactEasyCrop_Contain { 995 max-width: 100%; 996 max-height: 100%; 997 margin: auto; 998 position: absolute; 999 top: 0; 1000 bottom: 0; 1001 left: 0; 1002 right: 0; 1003} 1004.reactEasyCrop_Cover_Horizontal { 1005 width: 100%; 1006 height: auto; 1007} 1008.reactEasyCrop_Cover_Vertical { 1009 width: auto; 1010 height: 100%; 1011} 1012 1013.reactEasyCrop_CropArea { 1014 position: absolute; 1015 left: 50%; 1016 top: 50%; 1017 transform: translate(-50%, -50%); 1018 border: 1px solid rgba(255, 255, 255, 0.5); 1019 box-sizing: border-box; 1020 box-shadow: 0 0 0 9999em; 1021 color: rgba(0, 0, 0, 0.5); 1022 overflow: hidden; 1023} 1024 1025.reactEasyCrop_CropAreaRound { 1026 border-radius: 50%; 1027} 1028 1029.reactEasyCrop_CropAreaGrid::before { 1030 content: ' '; 1031 box-sizing: border-box; 1032 position: absolute; 1033 border: 1px solid rgba(255, 255, 255, 0.5); 1034 top: 0; 1035 bottom: 0; 1036 left: 33.33%; 1037 right: 33.33%; 1038 border-top: 0; 1039 border-bottom: 0; 1040} 1041 1042.reactEasyCrop_CropAreaGrid::after { 1043 content: ' '; 1044 box-sizing: border-box; 1045 position: absolute; 1046 border: 1px solid rgba(255, 255, 255, 0.5); 1047 top: 33.33%; 1048 bottom: 33.33%; 1049 left: 0; 1050 right: 0; 1051 border-left: 0; 1052 border-right: 0; 1053} 1054`;const rie=250,sie=1,iie=3,aie=1;var xm=class or extends N.Component{constructor(...t){super(...t),this.cropperRef=N.createRef(),this.imageRef=N.createRef(),this.videoRef=N.createRef(),this.containerPosition={x:0,y:0}
1054,this.containerRef=null,this.styleRef=null,this.containerRect=null,this.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},this.dragStartPosition={x:0,y:0},this.dragStartCrop={x:0,y:0},this.gestureZoomStart=0,this.gestureRotationStart=0,this.isTouching=!1,this.lastPinchDistance=0,this.lastPinchRotation=0,this.rafDragTimeout=null,this.rafPinchTimeout=null,this.wheelTimer=null,this.resizeEmitTimer=null,this.currentDoc=typeof document<"u"?document:null,this.currentWindow=typeof window<"u"?window:null,this.resizeObserver=null,this.previousCropSize=null,this.isInitialized=!1,this.dragInteractionSource=null,this.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},this.initResizeObserver=()=>{if(typeof window.ResizeObserver>"u"||!this.containerRef)return;let n=!0;this.resizeObserver=new window.ResizeObserver(r=>{if(n){n=!1;return}this.computeSizes({isResizeTriggered:!0})}),this.resizeObserver.observe(this.containerRef)},this.onWindowResize=()=>{this.computeSizes({isResizeTriggered:!0})},this.preventZoomSafari=n=>n.preventDefault(),this.cleanEvents=()=>{this.currentDoc&&(this.currentDoc.removeEventListener("mousemove",this.onMouseMove),this.currentDoc.removeEventListener("mouseup",this.onDragStopped),this.currentDoc.removeEventListener("touchmove",this.onTouchMove),this.currentDoc.removeEventListener("touchend",this.onDragStopped),this.currentDoc.removeEventListener("gesturechange",this.onGestureChange),this.currentDoc.removeEventListener("gestureend",this.onGestureEnd),this.currentDoc.removeEventListener("scroll",this.onScroll))},this.clearScrollEvent=()=>{this.containerRef&&this.containerRef.removeEventListener("wheel",this.onWheel),this.wheelTimer&&clearTimeout(this.wheelTimer)},this.onMediaLoad=()=>{const n=this.computeSizes();n&&(this.previousCropSize=n,this.emitCropData(),this.setInitialCrop(n),this.isInitialized=!0),this.props.onMediaLoaded&&this.props.onMediaLoaded(this.mediaSize)},this.setInitialCrop=n=>{if(this.props.initialCroppedAreaPercentages){const{crop:r,zoom:s}=Jse(this.props.initialCroppedAreaPercentages,this.mediaSize,this.props.rotation,n,this.props.minZoom,this.props.maxZoom);this.props.onCropChange(r),this.props.onZoomChange&&this.props.onZoomChange(s)}else if(this.props.initialCroppedAreaPixels){const{crop:r,zoom:s}=eie(this.props.initialCroppedAreaPixels,this.mediaSize,this.props.rotation,n,this.props.minZoom,this.props.maxZoom);this.props.onCropChange(r),this.props.onZoomChange&&this.props.onZoomChange(s)}},this.computeSizes=({isResizeTriggered:n=!1}={})=>{const r=this.imageRef.current||this.videoRef.current;if(r&&this.containerRef){var s,a,o,l,c,u;this.containerRect=this.containerRef.getBoundingClientRect(),this.saveContainerPosition();const d=this.containerRect.width/this.containerRect.height,h=((s=this.imageRef.current)===null||s===void 0?void 0:s.naturalWidth)||((a=this.videoRef.current)===null||a===void 0?void 0:a.videoWidth)||0,f=((o=this.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((l=this.videoRef.current)===null||l===void 0?void 0:l.videoHeight)||0,p=r.offsetWidth<h||r.offsetHeight<f,x=h/f;let m;if(p)switch(this.state.mediaObjectFit){default:case"contain":m=d>x?{width:this.containerRect.height*x,height:this.containerRect.height}:{width:this.containerRect.width,height:this.containerRect.width/x};break;case"horizontal-cover":m={width:this.containerRect.width,height:this.containerRect.width/x};break;case"vertical-cover":m={width:this.containerRect.height*x,height:this.containerRect.height};break}else m={width:r.offsetWidth,height:r.offsetHeight};this.mediaSize=Ot(Ot({},m),{},{naturalWidth:h,naturalHeight:f}),this.props.setMediaSize&&this.props.setMediaSize(this.mediaSize);const y=this.props.cropSize?this.props.cropSize:Kse(this.mediaSize.width,this.mediaSize.height,this.containerRect.width,this.containerRect.height,this.props.aspect,this.props.rotation);return(((c=this.state.cropSize)===null||c===void 0?void 0:c.height)!==y.height||((u=this.state.cropSize)===null||u===void 0?void 0:u.width)!==y.width)&&this.props.onCropSizeChange&&this.props.onCropSizeChange(y),this.setState({cropSize:y},()=>this.recomputeCropPosition({isResizeTriggered:n})),this.props.setCropSize&&this.props.setCropSize(y),y}},this.saveContainerPosition=()=>
1054{if(this.containerRef){const n=this.containerRef.getBoundingClientRect();this.containerPosition={x:n.left,y:n.top}}},this.onMouseDown=n=>{this.currentDoc&&(n.preventDefault(),this.currentDoc.addEventListener("mousemove",this.onMouseMove),this.currentDoc.addEventListener("mouseup",this.onDragStopped),this.saveContainerPosition(),this.onDragStart(or.getMousePoint(n),"mouse"))},this.onMouseMove=n=>this.onDrag(or.getMousePoint(n)),this.onScroll=n=>{this.currentDoc&&(n.preventDefault(),this.saveContainerPosition())},this.onTouchStart=n=>{this.currentDoc&&(this.isTouching=!0,!(this.props.onTouchRequest&&!this.props.onTouchRequest(n))&&(this.currentDoc.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.currentDoc.addEventListener("touchend",this.onDragStopped),this.saveContainerPosition(),n.touches.length===2?this.onPinchStart(n):n.touches.length===1&&this.onDragStart(or.getTouchPoint(n.touches[0]),"touch")))},this.onTouchMove=n=>{n.preventDefault(),n.touches.length===2?this.onPinchMove(n):n.touches.length===1&&this.onDrag(or.getTouchPoint(n.touches[0]))},this.onGestureStart=n=>{this.currentDoc&&(n.preventDefault(),this.currentDoc.addEventListener("gesturechange",this.onGestureChange),this.currentDoc.addEventListener("gestureend",this.onGestureEnd),this.gestureZoomStart=this.props.zoom,this.gestureRotationStart=this.props.rotation)},this.onGestureChange=n=>{if(n.preventDefault(),this.isTouching)return;const r=or.getMousePoint(n),s=this.gestureZoomStart-1+n.scale;if(this.setNewZoom(s,r,{shouldUpdatePosition:!0}),this.props.onRotationChange){const a=this.gestureRotationStart+n.rotation;this.props.onRotationChange(a)}},this.onGestureEnd=n=>{this.cleanEvents()},this.onDragStart=({x:n,y:r},s)=>{var a,o;this.dragStartPosition={x:n,y:r},this.dragStartCrop=Ot({},this.props.crop),this.dragInteractionSource=s,(a=(o=this.props).onInteractionStart)===null||a===void 0||a.call(o,{source:s})},this.onDrag=({x:n,y:r})=>{this.currentWindow&&(this.rafDragTimeout&&this.currentWindow.cancelAnimationFrame(this.rafDragTimeout),this.rafDragTimeout=this.currentWindow.requestAnimationFrame(()=>{if(!this.state.cropSize||n===void 0||r===void 0)return;const s=n-this.dragStartPosition.x,a=r-this.dragStartPosition.y,o={x:this.dragStartCrop.x+s,y:this.dragStartCrop.y+a},l=this.props.restrictPosition?dc(o,this.mediaSize,this.state.cropSize,this.props.zoom,this.props.rotation):o;this.props.onCropChange(l)}))},this.onDragStopped=()=>{var n,r,s;this.isTouching=!1,this.cleanEvents(),this.emitCropData(),(n=(r=this.props).onInteractionEnd)===null||n===void 0||n.call(r,{source:(s=this.dragInteractionSource)!==null&&s!==void 0?s:"mouse"}),this.dragInteractionSource=null},this.onWheel=n=>{if(!this.currentWindow||this.props.onWheelRequest&&!this.props.onWheelRequest(n))return;n.preventDefault();const r=or.getMousePoint(n),{pixelY:s}=qse(n),a=this.props.zoom-s*this.props.zoomSpeed/200;this.setNewZoom(a,r,{shouldUpdatePosition:!0}),this.state.hasWheelJustStarted||this.setState({hasWheelJustStarted:!0},()=>{var o,l;return(o=(l=this.props).onInteractionStart)===null||o===void 0?void 0:o.call(l,{source:"wheel"})}),this.wheelTimer&&clearTimeout(this.wheelTimer),this.wheelTimer=this.currentWindow.setTimeout(()=>this.setState({hasWheelJustStarted:!1},()=>{var o,l;return(o=(l=this.props).onInteractionEnd)===null||o===void 0?void 0:o.call(l,{source:"wheel"})}),250)},this.getPointOnContainer=({x:n,y:r},s)=>{if(!this.containerRect)throw new Error("The Cropper is not mounted");return{x:this.containerRect.width/2-(n-s.x),y:this.containerRect.height/2-(r-s.y)}},this.getPointOnMedia=({x:n,y:r})=>{const{crop:s,zoom:a}=this.props;return{x:(n+s.x)/a,y:(r+s.y)/a}},this.setNewZoom=(n,r,{shouldUpdatePosition:s=!0}={})=>{if(!this.state.cropSize||!this.props.onZoomChange)return;const a=gm(n,this.props.minZoom,this.props.maxZoom);if(s){const o=this.getPointOnContainer(r,this.containerPosition),l=this.getPointOnMedia(o),c={x:l.x*a-o.x,y:l.y*a-o.y},u=this.props.restrictPosition?dc(c,this.mediaSize,this.state.cropSize,a,this.props.rotation):c;this.props.onCropChange(u)}this.props.onZoomChange(a)},this.getCropData=()=>this.state.cropSize?Yse(this.props.restrictPosition?dc(this.props.crop,this.mediaSize,this.state.cropSize,this.props.zoom,this.props.rotation):this.props.crop,this.mediaSize,this.state.cropSize,this.getAspect(),this.props.zoom,this.props.rotation,this.props.restrictPosition):null,this.emitCropData=()=>{this.resizeEmitTimer&&(clearTimeout(this.resizeEmitTimer),this.resizeEmitTimer=null);const n=this.getCropData();if(!n)return;const{croppedAreaPercentages:r,croppedAreaPixels:s}=n;this.props.onCropComplete&&this.props.onCropComplete(r,s),this.props.onCropAreaChange&&this.props.onCropAreaChange(r,s)},this.emitCropAreaChange=()=>{const n=this.getCropData();if(!n)return;const{croppedAreaPercentages:r,croppedAreaPixels:s}=n;this.props.onCropAreaChange&&this.props.onCropAreaChange(r,s)},this.recomputeCropPosition=({isResizeTriggered:n=!1}={})=>{var r,s;if(!this.state.cropSize)return;let a=this.props.crop;if(this.isInitialized&&(!((r=this.previousCropSize)===null||r===void 0)&&r.width)&&(!((s=this.previousCropSize)===null||s===void 0)&&s.height)&&(Math.abs(this.previousCropSize.width-this.state.cropSize.width)>1e-6||Math.abs(this.previousCropSize.height-this.state.cropSize.height)>1e-6)){const l=this.state.cropSize.width/this.previousCropSize.width,c=this.state.cropSize.height/this.previousCropSize.height;a={x:this.props.crop.x*l,y:this.props.crop.y*c}}const o=this.props.restrictPosition?dc(a,this.mediaSize,this.state.cropSize,this.props.zoom,this.props.rotation):a;this.previousCropSize=this.state.cropSize,this.props.onCropChange(o),n?this.debouncedEmitCropData():this.emitCropData()},this.debouncedEmitCropData=()=>{this.currentWindow&&(this.resizeEmitTimer&&clearTimeout(this.resizeEmitTimer),this.resizeEmitTimer=this.currentWindow.setTimeout(()=>{this.emitCropData()},rie))},this.onKeyDown=n=>{const{crop:r,onCropChange:s,keyboardStep:a,zoom:o,rotation:l}=this.props;let c=a;if(!this.state.cropSize)return;
1054n.shiftKey&&(c*=.2);let u=Ot({},r);switch(n.key){case"ArrowUp":u.y-=c,n.preventDefault();break;case"ArrowDown":u.y+=c,n.preventDefault();break;case"ArrowLeft":u.x-=c,n.preventDefault();break;case"ArrowRight":u.x+=c,n.preventDefault();break;default:return}if(this.props.restrictPosition&&(u=dc(u,this.mediaSize,this.state.cropSize,o,l)),!n.repeat){var d,h;(d=(h=this.props).onInteractionStart)===null||d===void 0||d.call(h,{source:"keyboard"})}s(u)},this.onKeyUp=n=>{var r,s;switch(n.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":n.preventDefault();break;default:return}this.emitCropData(),(r=(s=this.props).onInteractionEnd)===null||r===void 0||r.call(s,{source:"keyboard"})}}componentDidMount(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.onWindowResize),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=nie,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))}componentWillUnmount(){var t;if(!(!this.currentDoc||!this.currentWindow)){if(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.onWindowResize),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),this.resizeEmitTimer&&clearTimeout(this.resizeEmitTimer),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef){var n;(n=this.styleRef.parentNode)===null||n===void 0||n.removeChild(this.styleRef)}this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()}}componentDidUpdate(t){var n,r,s,a,o,l,c,u;if(t.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):t.aspect!==this.props.aspect?this.computeSizes():t.objectFit!==this.props.objectFit?this.computeSizes():t.zoom!==this.props.zoom?this.recomputeCropPosition():((n=t.cropSize)===null||n===void 0?void 0:n.height)!==((r=this.props.cropSize)===null||r===void 0?void 0:r.height)||((s=t.cropSize)===null||s===void 0?void 0:s.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((o=t.crop)===null||o===void 0?void 0:o.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=t.crop)===null||c===void 0?void 0:c.y)!==((u=this.props.crop)===null||u===void 0?void 0:u.y))&&this.emitCropAreaChange(),t.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),t.video!==this.props.video){var d;(d=this.videoRef.current)===null||d===void 0||d.load()}const h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)}getAspect(){const{cropSize:t,aspect:n}=this.props;return t?t.width/t.height:n}getObjectFit(){if(this.props.objectFit==="cover"){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){var t,n,r,s;this.containerRect=this.containerRef.getBoundingClientRect();const a=this.containerRect.width/this.containerRect.height;return(((t=this.imageRef.current)===null||t===void 0?void 0:t.naturalWidth)||((n=this.videoRef.current)===null||n===void 0?void 0:n.videoWidth)||0)/(((r=this.imageRef.current)===null||r===void 0?void 0:r.naturalHeight)||((s=this.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0)<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit}
1054onPinchStart(t){const n=or.getTouchPoint(t.touches[0]),r=or.getTouchPoint(t.touches[1]);this.lastPinchDistance=m2(n,r),this.lastPinchRotation=g2(n,r),this.onDragStart(x2(n,r),"touch")}onPinchMove(t){if(!this.currentDoc||!this.currentWindow)return;const n=or.getTouchPoint(t.touches[0]),r=or.getTouchPoint(t.touches[1]),s=x2(n,r);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(()=>{const a=m2(n,r),o=this.props.zoom*(a/this.lastPinchDistance);this.setNewZoom(o,s,{shouldUpdatePosition:!1}),this.lastPinchDistance=a;const l=g2(n,r),c=this.props.rotation+(l-this.lastPinchRotation);this.props.onRotationChange&&this.props.onRotationChange(c),this.lastPinchRotation=l})}render(){var t;const{image:n,video:r,mediaProps:s,cropperProps:a,transform:o,crop:{x:l,y:c},rotation:u,zoom:d,cropShape:h,showGrid:f,roundCropAreaPixels:p,style:{containerStyle:x,cropAreaStyle:m,mediaStyle:y},classes:{containerClassName:g,cropAreaClassName:v,mediaClassName:b}}=this.props,w=(t=this.state.mediaObjectFit)!==null&&t!==void 0?t:this.getObjectFit();return N.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:j=>this.containerRef=j,"data-testid":"container",style:x,className:ph("reactEasyCrop_Container",g)},n?N.createElement("img",Ot(Ot({alt:"",className:ph("reactEasyCrop_Image",w==="contain"&&"reactEasyCrop_Contain",w==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",w==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",b)},s),{},{src:n,ref:this.imageRef,style:Ot(Ot({},y),{},{transform:o||`translate(${l}px, ${c}px) rotate(${u}deg) scale(${d})`}),onLoad:this.onMediaLoad})):r&&N.createElement("video",Ot(Ot({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ph("reactEasyCrop_Video",w==="contain"&&"reactEasyCrop_Contain",w==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",w==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",b)},s),{},{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Ot(Ot({},y),{},{transform:o||`translate(${l}px, ${c}px) rotate(${u}deg) scale(${d})`}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map(j=>N.createElement("source",Ot({key:j.src},j)))),this.state.cropSize&&N.createElement("div",Ot({ref:this.cropperRef,style:Ot(Ot({},m),{},{width:p?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:p?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:ph("reactEasyCrop_CropArea",h==="round"&&"reactEasyCrop_CropAreaRound",f&&"reactEasyCrop_CropAreaGrid",v)},a)))}};xm.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:iie,minZoom:sie,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:aie};xm.getMousePoint=e=>({x:Number(e.clientX),y:Number(e.clientY)});xm.getTouchPoint=e=>({x:Number(e.clientX),y:Number(e.clientY)});var oie=xm;const lie=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",s=>n(s)),r.setAttribute("crossOrigin","anonymous"),r.src=e});async function cie(e,t){const n=await lie(e),r=document.createElement("canvas"),s=r.getContext("2d");if(!s)throw new Error("No 2d context");return r.width=t.width,r.height=t.height,s.drawImage(n,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise((a,o)=>{r.toBlob(l=>{l?a(l):o(new Error("Canvas is empty"))},"image/webp",.9)})}var ym="Dialog",[CR,nle]=zn(ym),[uie,kr]=CR(ym),TR=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:o=!0}=e,l=N.useRef(null),c=N.useRef(null),[u,d]=Ai({prop:r,defaultProp:s??!1,onChange:a,caller:ym});return i.jsx(uie,{scope:t,triggerRef:l,contentRef:c,contentId:da(),titleId:da(),descriptionId:da(),open:u,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};TR.displayName=ym;var AR="DialogTrigger",die=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kr(AR,n),a=Ge(t,s.triggerRef);return i.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Z0(s.open),...r,ref:a,onClick:xe(e.onClick,s.onOpenToggle)})});die.displayName=AR;var Q0="DialogPortal",[hie,PR]=CR(Q0,{forceMount:void 0}),OR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,a=kr(Q0,t);return i.jsx(hie,{scope:t,forceMount:n,children:N.Children.map(r,o=>i.jsx(Bn,{present:n||a.open,children:i.jsx(Cp,{asChild:!0,container:s,children:o})}))})};OR.displayName=Q0;var ep="DialogOverlay",RR=N.forwardRef((e,t)=>
vendor: 4,907 bytes, lines 1054-1058
1054{const n=PR(ep,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,a=kr(ep,e.__scopeDialog);return a.modal?i.jsx(Bn,{present:r||a.open,children:i.jsx(pie,{...s,ref:t})}):null});RR.displayName=ep;var fie=rl("DialogOverlay.RemoveScroll"),pie=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kr(ep,n);return i.jsx(I0,{as:fie,allowPinchZoom:!0,shards:[s.contentRef],children:i.jsx(Oe.div,{"data-state":Z0(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Sa="DialogContent",MR=N.forwardRef((e,t)=>{const n=PR(Sa,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,a=kr(Sa,e.__scopeDialog);return i.jsx(Bn,{present:r||a.open,children:a.modal?i.jsx(mie,{...s,ref:t}):i.jsx(gie,{...s,ref:t})})});MR.displayName=Sa;var mie=N.forwardRef((e,t)=>{const n=kr(Sa,e.__scopeDialog),r=N.useRef(null),s=Ge(t,n.contentRef,r);return N.useEffect(()=>{const a=r.current;if(a)return QP(a)},[]),i.jsx(DR,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:xe(e.onFocusOutside,a=>a.preventDefault())})}),gie=N.forwardRef((e,t)=>{const n=kr(Sa,e.__scopeDialog),r=N.useRef(!1),s=N.useRef(!1);return i.jsx(DR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),DR=N.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,...o}=e,l=kr(Sa,n),c=N.useRef(null),u=Ge(t,c);return qP(),i.jsxs(i.Fragment,{children:[i.jsx(R0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:i.jsx(Gu,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Z0(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(xie,{titleId:l.titleId}),i.jsx(vie,{contentRef:c,descriptionId:l.descriptionId})]})]})}),J0="DialogTitle",IR=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kr(J0,n);return i.jsx(Oe.h2,{id:s.titleId,...r,ref:t})});IR.displayName=J0;var LR="DialogDescription",FR=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kr(LR,n);return i.jsx(Oe.p,{id:s.descriptionId,...r,ref:t})});FR.displayName=LR;var $R="DialogClose",zR=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=kr($R,n);return i.jsx(Oe.button,{type:"button",...r,ref:t,onClick:xe(e.onClick,()=>s.onOpenChange(!1))})});zR.displayName=$R;function Z0(e){return e?"open":"closed"}var BR="DialogTitleWarning",[rle,UR]=TD(BR,{contentName:Sa,titleName:J0,docsSlug:"dialog"}),xie=({titleId:e})=>{const t=UR(BR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 1055 1056If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 1057 1058For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return N.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},yie="DialogDescriptionWarning",vie=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${UR(yie).contentName}}.`;return N.useEffect(()=>{var a;const s=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},bie=TR,wie=OR,qR=RR,VR=MR,WR=IR,HR=FR,jie=zR;const zl=bie,Nie=wie,KR=N.forwardRef(({className:e,...t},n)=>i.jsx(qR,{ref:n,className:Pe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));KR.displayName=qR.displayName;const Da=N.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Nie,{children:[i.jsx(KR,{}),i.jsxs(VR,{ref:r,className:Pe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
1058nded-lg",e),...n,children:[t,i.jsxs(jie,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[i.jsx(ul,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Da.displayName=VR.displayName;const Ia=({className:e,...t})=>i.jsx("div",{className:Pe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ia.displayName="DialogHeader";const La=({className:e,...t})=>i.jsx("div",{className:Pe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});La.displayName="DialogFooter";const Fa=N.forwardRef(({className:e,...t},n)=>i.jsx(WR,{ref:n,className:Pe("text-lg font-semibold leading-none tracking-tight",e),...t}));Fa.displayName=WR.displayName;const kie=N.forwardRef(({className:e,...t},n)=>i.jsx(HR,{ref:n,className:Pe("text-sm text-muted-foreground",e),...t}));kie.displayName=HR.displayName;const Si=({value:e,onChange:t,label:n="Upload Image",className:r="",enableCrop:s=!0,defaultAspect:a=3/2})=>{const[o,l]=N.useState(!1),[c,u]=N.useState(!1),[d,h]=N.useState(null),[f,p]=N.useState({x:0,y:0}),[x,m]=N.useState(1),[y,g]=N.useState(a),[v,b]=N.useState(16),[w,j]=N.useState(9),[E,k]=N.useState(null),[S,A]=N.useState("image.jpg"),C=N.useRef(null),T=async I=>{var q;const B=(q=I.target.files)==null?void 0:q[0];if(!B)return;if(!B.type.startsWith("image/")){ie.error("Please select an image file.");return}if(B.size>5*1024*1024){ie.error("File is too large (max 5MB).");return}A(B.name);const $=new FileReader;$.addEventListener("load",()=>{h($.result),s?u(!0):O(B)}),$.readAsDataURL(B)},_=(I,B)=>{k(B)},P=async()=>{if(!(!d||!E)){l(!0),u(!1);try{const I=await cie(d,E),B=S.replace(/\.[^/.]+$/,"")+".webp",$=new File([I],B,{type:"image/webp",lastModified:Date.now()});await O($)}catch(I){console.error("Failed to crop image:",I),ie.error("Failed to crop image."),l(!1)}}},O=async I=>{l(!0);const B=new FormData;B.append("image",I);try{const{data:{session:$}}=await ue.auth.getSession();if(!($!=null&&$.access_token))throw new Error("Not authenticated. Please log in again.");const q=await fetch("/upload.php",{method:"POST",headers:{Authorization:`Bearer ${$.access_token}`},body:B}),L=await q.text();let D;try{D=JSON.parse(L)}catch{throw new Error("PHP upload endpoint returned invalid JSON")}if(!q.ok)throw new Error(D.error||"Upload failed");if(D.success&&D.url)t(D.url),ie.success("Image uploaded successfully");else throw new Error("Invalid server response")}catch($){console.error("Upload failed:",$),ie.error($.message||"Failed to upload image.")}finally{l(!1),C.current&&(C.current.value="")}};return i.jsxs("div",{className:`space-y-2 ${r}`,children:[n&&i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground block",children:n}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"relative flex-1 group",children:[i.jsx(_e,{value:e,onChange:I=>t(I.target.value),placeholder:"URL or Upload...",className:"text-xs h-10 pr-10"}),i.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:e?i.jsx(Xu,{className:"w-4 h-4 text-green-500"}):i.jsx(PE,{className:"w-4 h-4 text-muted-foreground/30"})})]}),i.jsx("input",{type:"file",ref:C,className:"hidden",accept:"image/*",onChange:T}),i.jsx(le,{type:"button",variant:"outline",size:"icon",className:"h-10 w-10 shrink-0 border-primary/20 hover:border-primary/50",onClick:()=>{var I;return(I=C.current)==null?void 0:I.click()},disabled:o,title:"Upload new image",children:o?i.jsx(Ie,{className:"w-4 h-4 animate-spin text-primary"}):i.jsx(aI,{className:"w-4 h-4"})}),e&&s&&i.jsx(le,{type:"button",variant:"outline",size:"icon",className:"h-10 w-10 shrink-0 border-primary/20 hover:border-primary/50",onClick:()=>{h(e),u(!0)},disabled:o,title:"Crop current image",children:i.jsx(C1,{className:"w-4 h-4"})})]}),i.jsx(zl,{open:c,onOpenChange:u,children:i.jsxs(Da,{className:"sm:max-w-[550
1058px] font-body bg-white text-slate-900",children:[i.jsx(Ia,{children:i.jsxs(Fa,{className:"font-heading uppercase tracking-tight flex items-center gap-2",children:[i.jsx(C1,{size:18,className:"text-primary"})," Crop Partner Logo"]})}),d&&i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"relative w-full h-[320px] bg-slate-100 rounded-lg overflow-hidden border border-border",children:i.jsx(oie,{image:d,crop:f,zoom:x,aspect:y,onCropChange:p,onCropComplete:_,onZoomChange:m,restrictPosition:!1,minZoom:.1})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("span",{className:"text-xs font-heading uppercase text-muted-foreground shrink-0",children:"Zoom"}),i.jsx("input",{type:"range",value:x,min:.1,max:3,step:.05,"aria-label":"Zoom",onChange:I=>m(Number(I.target.value)),className:"w-full accent-primary h-1 bg-slate-100 rounded-lg appearance-none cursor-pointer"})]}),i.jsxs("div",{className:"flex flex-col gap-3 border-t border-slate-100 pt-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-xs font-heading uppercase text-muted-foreground",children:"Aspect Ratio"}),i.jsx("div",{className:"flex gap-2",children:[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"3:2",value:3/2},{label:"16:9",value:16/9}].map(I=>i.jsx(le,{type:"button",variant:y===I.value?"default":"outline",className:"h-8 text-[10px] font-heading uppercase tracking-wider px-3",onClick:()=>g(I.value),children:I.label},I.label))})]}),i.jsxs("div",{className:"flex items-center justify-between bg-slate-50 p-2 rounded-md",children:[i.jsx("span",{className:"text-[10px] font-heading uppercase text-muted-foreground",children:"Custom Ratio"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(_e,{type:"number",min:1,value:v,onChange:I=>{const B=Number(I.target.value)||1;b(B),g(B/w)},className:"w-16 h-7 text-xs bg-white text-center"}),i.jsx("span",{className:"text-muted-foreground text-xs font-bold",children:":"}),i.jsx(_e,{type:"number",min:1,value:w,onChange:I=>{const B=Number(I.target.value)||1;j(B),g(v/B)},className:"w-16 h-7 text-xs bg-white text-center"}),i.jsx(le,{type:"button",variant:y===v/w?"default":"outline",className:"h-7 text-[10px] font-heading uppercase px-3 ml-2",onClick:()=>g(v/w),children:"Apply"})]})]})]})]})]}),i.jsxs(La,{className:"border-t border-slate-100 pt-4",children:[i.jsx(le,{type:"button",variant:"outline",onClick:()=>{u(!1),C.current&&(C.current.value="")},className:"font-heading uppercase tracking-widest text-xs h-10",children:"Cancel"}),i.jsx(le,{type:"button",onClick:P,className:"font-heading uppercase tracking-widest text-xs h-10 gap-2",children:"Crop & Upload"})]})]})})]})},y2=()=>{const{id:e}=_l(),t=Bp(),[n,r]=N.useState(!1),[s,a]=N.useState(!!e),[o,l]=N.useState(["News","Match Report","Men's Team","Women's Team","Youth","Club"]),[c,u]=N.useState(!1),[d,h]=N.useState(50),f=N.useRef(null),p=N.useRef(null),x=N.useCallback(async E=>{var S;const k=new FormData;k.append("image",E);try{const{data:{session:A}}=await ue.auth.getSession();if(!(A!=null&&A.access_token))throw new Error("Not authenticated.");const C=await fetch("/upload.php",{method:"POST",headers:{Authorization:`Bearer ${A.access_token}`},body:k}),T=await C.json();if(!C.ok||!T.url)throw new Error(T.error||"Upload failed");const _=(S=f.current)==null?void 0:S.getEditor();if(_){const P=_.getSelection(!0);_.insertEmbed(P.index,"image",T.url),_.setSelection(P.index+1,0)}}catch(A){ie.error(A.message||"Failed to upload image.")}},[]),m=N.useCallback(()=>{var E;(E=p.current)==null||E.click()},[]),[y,g]=N.useState({title:"",slug:"",excerpt:"",body:"",category:"News",featured:!1,image_url:"",image_offset:50,published_at:new Date().toISOString(),status:"published"});N.useEffect(()=>{e&&(async()=>{const{data:k,error:S}=await ue.from("posts").select("*").eq("id",e).single();S?(ie.error("Failed to load post"),t("/admin/posts")):(g({title:k.title,slug:k.slug,excerpt:k.excerpt||"",body:k.body||"",category:k.category||"News",featured:k.featured||!1,image_url:k.image_url||"",image_offset:k.image_offset!==void 0&&k.image_offset!==null?k.image_offset:50,published_at:k.published_at||k.created_at,
1058status:k.status||"published"}),h(k.image_offset!==void 0&&k.image_offset!==null?k.image_offset:50)),a(!1)})()},[e,t]),N.useEffect(()=>{(async()=>{const{data:k,error:S}=await ue.from("posts").select("category");if(!S&&k){const A=Array.from(new Set(k.map(C=>C.category))).filter(Boolean);l(C=>Array.from(new Set([...C,...A])))}})()},[]);const v=E=>E.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)+/g,""),b=E=>{const k=E.target.value;g(S=>({...S,title:k,slug:e?S.slug:v(k)}))},w=async E=>{E.preventDefault(),r(!0);try{let k={...y,image_offset:d};if(!e){let S=!1,A=0,C=y.slug;for(;!S;){const T=A===0?C:`${C}-${A}`,{data:_}=await ue.from("posts").select("id").eq("slug",T).maybeSingle();if(!_)k.slug=T,S=!0;else if(A++,A>100)throw new Error("Too many duplicate titles/slugs.")}}if(e){const{error:S}=await ue.from("posts").update(k).eq("id",e);if(S)throw S;ie.success("Post updated successfully")}else{const{error:S}=await ue.from("posts").insert([k]);if(S)throw S;ie.success("Post created successfully")}t("/admin/posts")}catch(k){ie.error(k.message||"Failed to save post")}finally{r(!1)}},j={toolbar:{container:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],["link","image","blockquote","code-block"],["clean"]],handlers:{image:m}}};return s?i.jsx("div",{className:"h-[60vh] flex items-center justify-center",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})}):i.jsxs("div",{className:"max-w-5xl mx-auto pb-20",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[i.jsx(le,{variant:"outline",size:"sm",onClick:()=>t("/admin/posts"),className:"rounded-full w-10 h-10 p-0",children:i.jsx(bi,{size:18})}),i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:e?"Edit Post":"Create New Post"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:e?"Modify your existing hawks news article.":"Draft a new announcement for the hawks family."})]})]}),i.jsxs("form",{onSubmit:w,className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[i.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[i.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 shadow-sm space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(He,{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Article Title"}),i.jsx(_e,{value:y.title,onChange:b,placeholder:"Enter title...",required:!0,className:"text-lg font-bold font-heading h-12"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(He,{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Permalink / Slug"}),i.jsxs("div",{className:"flex items-center gap-2 bg-muted/30 px-3 py-2 rounded-md text-xs font-mono text-muted-foreground overflow-hidden",children:[i.jsx(M3,{size:14,className:"shrink-0"}),i.jsxs("span",{className:"truncate",children:["whitehawkfc.com/news/",y.slug||"..."]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(He,{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Excerpt (Short Summary)"}),i.jsx("textarea",{value:y.excerpt,onChange:E=>g(k=>({...k,excerpt:E.target.value})),placeholder:"Briefly describe what this article is about...",className:"w-full bg-background border border-input rounded-md px-3 py-2 text-sm min-h-[80px] focus:ring-1 focus:ring-primary focus:outline-none"})]})]}),i.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm",children:[i.jsx("div",{className:"p-4 border-b border-border bg-muted/10 font-heading text-[10px] uppercase tracking-widest font-bold",children:"Article Body"}),i.jsxs("div",{className:"p-0 post-editor",children:[i.jsx("input",{type:"file",ref:p,className:"hidden",accept:"image/*",onChange:E=>{var S;const k=(S=E.target.files)==null?void 0:S[0];k&&x(k),E.target.value=""}}),i.jsx(fR,{ref:f,theme:"snow",value:y.body,onChange:E=>g(k=>({...k,body:E})),modules:j,placeholder:"Start writing your story...",className:"border-none min-h-[400px]"})]})]})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 shadow-sm space-y-4",children:[i.jsx("h3",{className:"font-heading text-xs font-bold uppercase tracking-widest pb-3 border-b border-border mb-4",children:"Publishing"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx(X0,{id:"featured",checked:y.featured,onCheckedChange:E=>g(k=>({...k,featured:!!E})),className:"border-primary data-[state=checked]:bg-primary"}),i.jsx(He,{htmlFor:"featured",className:"text-sm font-medium cursor-pointer",children:"Post to Featured Section"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(He,{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Status"}),i.jsxs("select",{value:y.status,onChange:E=>g(k=>({...k,status:E.target.value})),className:"w-full bg-background border border-input rounded-md px-3 py-2 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading uppercase",children:[i.jsx("option",{value:"published",children:"Published"}),i.jsx("option",{value:"draft",children:"Draft"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(He,{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Category"}),c?i.jsxs("div",{className:"flex gap-2",children:[i.jsx(_e,{value:y.category,onChange:E=>g(k=>({...k,category:E.target.value})),placeholder:"Enter new category...",className:"text-xs uppercase font-heading h-9",autoFocus:!0}),i.jsx(le,{type:"button",variant:"outline",size:"sm",onClick:()=>u(!1),className:"h-9 px-3 text-[10px] uppercase tracking-widest font-heading",children:"List"})]}):i.jsxs("select",{value:y.category,onChange:E=>{E.target.value==="ADD_NEW"?(u(!0),g(k=>({...k,category:""}))):g(k=>({...k,category:E.target.value}))},className:"w-full bg-background border border-input rounded-md px-3 py-2 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading uppercase",children:[o.map(E=>i.jsx("option",{value:E,children:E},E)),i.jsx("option",{value:"ADD_NEW",className:"text-primary font-bold",children:"+ ADD NEW..."})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(He,{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Published Publication Date"}),i.jsx(_e,{type:"datetime-local",value:y.published_at?Ft(nn(y.published_at),"yyyy-MM-dd'T'HH:mm"):"",onCh
1058ange:E=>{const k=E.target.value?new Date(E.target.value).toISOString():new Date().toISOString();g(S=>({...S,published_at:k}))},className:"w-full bg-background border border-input rounded-md px-3 py-2 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading"}),i.jsx("p",{className:"text-[9px] text-muted-foreground italic",children:"Update this to backdate or schedule a post."})]})]}),i.jsxs(le,{type:"submit",disabled:n,className:"w-full font-heading uppercase tracking-widest text-xs h-11 gap-2",children:[n?i.jsx(Ie,{className:"w-4 h-4 animate-spin"}):i.jsx(wi,{size:16}),e?"Update Post":y.status==="draft"?"Save Draft":"Publish Post"]})]}),i.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 shadow-sm space-y-4",children:[i.jsx("h3",{className:"font-heading text-xs font-bold uppercase tracking-widest pb-3 border-b border-border mb-4",children:"Featured Image"}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(Si,{label:"Article Header (Saved to IONOS)",value:y.image_url,onChange:E=>{g(k=>({...k,image_url:E,image_offset:50})),h(50)}}),y.image_url&&i.jsxs("div",{className:"mt-2 space-y-3",children:[i.jsx("div",{className:"relative h-32 w-full overflow-hidden rounded-md border border-border",children:i.jsx("img",{src:y.image_url,alt:"Preview",className:"absolute inset-0 w-full h-full object-cover",style:{objectPosition:`center ${d}%`}})}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground uppercase tracking-wider font-heading font-medium",children:[i.jsx("span",{children:"Top of image"}),i.jsxs("span",{children:["Center (",d,"%)"]}),i.jsx("span",{children:"Bottom of image"})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(le,{type:"button",variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",onClick:()=>{const E=Math.max(d-5,0);h(E),g(k=>({...k,image_offset:E}))},children:i.jsx(E3,{size:14})}),i.jsx("input",{type:"range",min:"0",max:"100",value:d,onChange:E=>{const k=parseInt(E.target.value);h(k),g(S=>({...S,image_offset:k}))},className:"w-full accent-primary h-1.5 bg-secondary rounded-lg appearance-none cursor-pointer"}),i.jsx(le,{type:"button",variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",onClick:()=>{const E=Math.min(d+5,100);h(E),g(k=>({...k,image_offset:E}))},children:i.jsx(il,{size:14})})]})]})]})]}),i.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed italic",children:"Images will be automatically hosted on your IONOS server. Recommended size: 1200x600."})]})]})]}),i.jsx("style",{children:` 1059 .post-editor .ql-container { 1060 font-family: var(--font-body); 1061 font-size: 16px; 1062 } 1063 .post-editor .ql-editor { 1064 min-height: 400px; 1065 } 1066 .post-editor .ql-toolbar.ql-snow { 1067 border: none; 1068 background: #f8f9fa; 1069 padding: 8px 12px; 1070 border-bottom: 1px solid #e2e8f0; 1071 } 1072 .post-editor .ql-container.ql-snow { 1073 border: none; 1074 } 1075 .post-editor .ql-editor img { 1076 max-width: 100%; 1077 height: auto; 1078 border-radius: 6px; 1079 margin: 8px 0; 1080 } 1081 `})]})};var vm="Switch",[Sie,sle]=zn(vm),[_ie,Eie]=Sie(vm),GR=N.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:a,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,p]=N.useState(null),x=Ge(t,b=>p(b)),m=N.useRef(!1),y=f?d||!!f.closest("form"):!0,[g,v]=Ai({prop:s,defaultProp:a??!1,onChange:u,caller:vm});return i.jsxs(_ie,{scope:n,checked:g,disabled:l,children:[i.jsx(Oe.button,{type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":JR(g),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:x,onClick:xe(e.onClick,b=>{v(w=>!w),y&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),y&&i.jsx(QR,{control:f,bubbles:!m.current,name:r,value:c,checked:g,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});GR.displayName=vm;var YR="SwitchThumb",XR=N.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=Eie(YR,n);return i.jsx(Oe.span,{"data-state":JR(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});XR.displayName=YR;var Cie="SwitchBubbleInput",QR=N.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},a)=>{const o=N.useRef(null),l=Ge(o,a),c=K0(n),u=Ip(t);return N.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&p){const x=new Event("click",{bubbles:r});
1081p.call(d,n),d.dispatchEvent(x)}},[c,n,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});QR.displayName=Cie;function JR(e){return e?"checked":"unchecked"}var ZR=GR,Tie=XR;const cs=N.forwardRef(({className:e,...t},n)=>i.jsx(ZR,{className:Pe("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:i.jsx(Tie,{className:Pe("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));cs.displayName=ZR.displayName;function Aie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const bm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Bl(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ew(e){return"nodeType"in e}function Sn(e){var t,n;return e?Bl(e)?e:ew(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function tw(e){const{Document:t}=Sn(e);return e instanceof t}function xd(e){return Bl(e)?!1:e instanceof Sn(e).HTMLElement}function e4(e){return e instanceof Sn(e).SVGElement}function Ul(e){return e?Bl(e)?e.document:ew(e)?tw(e)?e:xd(e)||e4(e)?e.ownerDocument:document:document:document}const Hr=bm?N.useLayoutEffect:N.useEffect;function nw(e){const t=N.useRef(e);return Hr(()=>{t.current=e}),N.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function Pie(){const e=N.useRef(null),t=N.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=N.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Iu(e,t){t===void 0&&(t=[e]);const n=N.useRef(e);return Hr(()=>{n.current!==e&&(n.current=e)},t),n}function yd(e,t){const n=N.useRef();return N.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function tp(e){const t=nw(e),n=N.useRef(null),r=N.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function jv(e){const t=N.useRef();return N.useEffect(()=>{t.current=e},[e]),t.current}let Hg={};function vd(e,t){return N.useMemo(()=>{if(t)return t;const n=Hg[e]==null?0:Hg[e]+1;return Hg[e]=n,e+"-"+n},[e,t])}function t4(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((a,o)=>{const l=Object.entries(o);for(const[c,u]of l){const d=a[c];d!=null&&(a[c]=d+e*u)}return a},{...t})}}const Lo=t4(1),Lu=t4(-1);function Oie(e){return"clientX"in e&&"clientY"in e}function rw(e){if(!e)return!1;const{KeyboardEvent:t}=Sn(e.target);return t&&e instanceof t}function Rie(e){if(!e)return!1;const{TouchEvent:t}=Sn(e.target);return t&&e instanceof t}function Nv(e){if(Rie(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Oie(e)?{x:e.clientX,y:e.clientY}:null}const _i=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_i.Translate.toString(e),_i.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),v2="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Mie(e){return e.matches(v2)?e:e.querySelector(v2)}const Die={display:"none"};function Iie(e){let{id:t,value:n}=e;return ne.createElement("div",{id:t,style:Die},n)}function Lie(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ne.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function Fie(){const[e,t]=N.useState("");return{announce:N.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const n4=N.createContext(null);function $ie(e){const t=N.useContext(n4);N.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function zie(){const[e]=N.useState(()=>new Set),t=N.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[N.useCallback(r=>{let{type:s,event:a}=r;e.forEach(o=>{var l;return(l=o[s])==null?void 0:l.call(o,a)})},[e]),t]}const Bie={draggable:` 1082 To pick up a draggable item, press the space bar. 1083 While dragging, use the arrow keys to move the item. 1084 Press space again to drop the item in its new position, or press escape to cancel. 1085 `},Uie={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function qie(e){let{announcements:t=Uie,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=Bie}=e;const{announce:a,announcement:o}=Fie(),l=vd("DndLiveRegion"),[c,u]=N.useState(!1);if(N.useEffect(()=>{u(!0)},[]),$ie(N.useMemo(()=>({onDragStart(h){let{active:f}=h;a(t.onDragStart({active:f}))},onDragMove(h){let{active:f,over:p}=h;t.onDragMove&&a(t.onDragMove({active:f,over:p}))},onDragOver(h){let{active:f,over:p}=h;a(t.onDragOver({active:f,over:p}))},onDragEnd(h){let{active:f,over:p}=h;a(t.onDragEnd({active:f,over:p}))},onDragCancel(h){let{active:f,over:p}=h;
1085a(t.onDragCancel({active:f,over:p}))}}),[a,t])),!c)return null;const d=ne.createElement(ne.Fragment,null,ne.createElement(Iie,{id:r,value:s.draggable}),ne.createElement(Lie,{id:l,announcement:o}));return n?mr.createPortal(d,n):d}var Et;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Et||(Et={}));function np(){}function ml(e,t){return N.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function sw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Nr=Object.freeze({x:0,y:0});function r4(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function s4(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Vie(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function b2(e){let{left:t,top:n,height:r,width:s}=e;return[{x:t,y:n},{x:t+s,y:n},{x:t,y:n+r},{x:t+s,y:n+r}]}function i4(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function w2(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const rp=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=w2(t,t.left,t.top),a=[];for(const o of r){const{id:l}=o,c=n.get(l);if(c){const u=r4(w2(c),s);a.push({id:l,data:{droppableContainer:o,value:u}})}}return a.sort(s4)},Wie=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=b2(t),a=[];for(const o of r){const{id:l}=o,c=n.get(l);if(c){const u=b2(c),d=s.reduce((f,p,x)=>f+r4(u[x],p),0),h=Number((d/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:h}})}}return a.sort(s4)};function Hie(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),s=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=s-r,l=a-n;if(r<s&&n<a){const c=t.width*t.height,u=e.width*e.height,d=o*l,h=d/(c+u-d);return Number(h.toFixed(4))}return 0}const Kie=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=[];for(const a of r){const{id:o}=a,l=n.get(o);if(l){const c=Hie(l,t);c>0&&s.push({id:o,data:{droppableContainer:a,value:c}})}}return s.sort(Vie)};function Gie(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function a4(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Nr}function Yie(e){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];return s.reduce((o,l)=>({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...n})}}const Xie=Yie(1);function Qie(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Jie(e,t,n){const r=Qie(t);if(!r)return e;const{scaleX:s,scaleY:a,x:o,y:l}=r,c=e.left-o-(1-s)*parseFloat(n),u=e.top-l-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?e.width/s:e.width,h=a?e.height/a:e.height;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c}}const Zie={ignoreTransform:!1};function ql(e,t){t===void 0&&(t=Zie);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Sn(e).getComputedStyle(e);u&&(n=Jie(n,u,d))}const{top:r,left:s,width:a,height:o,bottom:l,right:c}=n;return{top:r,left:s,width:a,height:o,bottom:l,right:c}}function j2(e){return ql(e,{ignoreTransform:!0})}function eae(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function tae(e,t){return t===void 0&&(t=Sn(e).getComputedStyle(e)),t.position==="fixed"}function nae(e,t){t===void 0&&(t=Sn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const a=t[s];return typeof a=="string"?n.test(a):!1})}function wm(e,t){const n=[];function r(s){if(t!=null&&n.length>=t||!s)return n;if(tw(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!xd(s)||e4(s)||n.includes(s))return n;const a=Sn(e).getComputedStyle(s);return s!==e&&nae(s,a)&&n.push(s),tae(s,a)?n:r(s.parentNode)}return e?r(e):n}function o4(e){const[t]=wm(e,1);return t??null}function Kg(e){return!bm||!e?null:Bl(e)?e:ew(e)?tw(e)||e===Ul(e).scrollingElement?window:xd(e)?e:null:null}function l4(e){return Bl(e)?e.scrollX:e.scrollLeft}function c4(e){return Bl(e)?e.scrollY:e.scrollTop}function kv(e){return{x:l4(e),y:c4(e)}}var Dt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Dt||(Dt={}));function u4(e){return!bm||!e?!1:e===document.scrollingElement}function d4(e){const t={x:0,y:0},n=u4(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},s=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:s,isLeft:a,isBottom:o,isRight:l,maxScroll:r,minScroll:t}}const rae={x:.2,y:.2};
1085function sae(e,t,n,r,s){let{top:a,left:o,right:l,bottom:c}=n;r===void 0&&(r=10),s===void 0&&(s=rae);const{isTop:u,isBottom:d,isLeft:h,isRight:f}=d4(e),p={x:0,y:0},x={x:0,y:0},m={height:t.height*s.y,width:t.width*s.x};return!u&&a<=t.top+m.height?(p.y=Dt.Backward,x.y=r*Math.abs((t.top+m.height-a)/m.height)):!d&&c>=t.bottom-m.height&&(p.y=Dt.Forward,x.y=r*Math.abs((t.bottom-m.height-c)/m.height)),!f&&l>=t.right-m.width?(p.x=Dt.Forward,x.x=r*Math.abs((t.right-m.width-l)/m.width)):!h&&o<=t.left+m.width&&(p.x=Dt.Backward,x.x=r*Math.abs((t.left+m.width-o)/m.width)),{direction:p,speed:x}}function iae(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:t,left:n,right:r,bottom:s}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:s,width:e.clientWidth,height:e.clientHeight}}function h4(e){return e.reduce((t,n)=>Lo(t,kv(n)),Nr)}function aae(e){return e.reduce((t,n)=>t+l4(n),0)}function oae(e){return e.reduce((t,n)=>t+c4(n),0)}function lae(e,t){if(t===void 0&&(t=ql),!e)return;const{top:n,left:r,bottom:s,right:a}=t(e);o4(e)&&(s<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const cae=[["x",["left","right"],aae],["y",["top","bottom"],oae]];class iw{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=wm(n),s=h4(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,o,l]of cae)for(const c of o)Object.defineProperty(this,c,{get:()=>{const u=l(r),d=s[a]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Hc{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var s;(s=this.target)==null||s.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function uae(e){const{EventTarget:t}=Sn(e);return e instanceof t?e:Ul(e)}function Gg(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Vn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Vn||(Vn={}));function N2(e){e.preventDefault()}function dae(e){e.stopPropagation()}var ze;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ze||(ze={}));const f4={start:[ze.Space,ze.Enter],cancel:[ze.Esc],end:[ze.Space,ze.Enter,ze.Tab]},hae=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ze.Right:return{...n,x:n.x+25};case ze.Left:return{...n,x:n.x-25};case ze.Down:return{...n,y:n.y+25};case ze.Up:return{...n,y:n.y-25}}};class bd{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Hc(Ul(n)),this.windowListeners=new Hc(Sn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Vn.Resize,this.handleCancel),this.windowListeners.add(Vn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Vn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&lae(r),n(Nr)}handleKeyDown(t){if(rw(t)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:a=f4,coordinateGetter:o=hae,scrollBehavior:l="smooth"}=s,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:Nr;this.referenceCoordinates||(this.referenceCoordinates=d);const h=o(t,{active:n,context:r.current,currentCoordinates:d});if(h){const f=Lu(h,d),p={x:0,y:0},{scrollableAncestors:x}=r.current;for(const m of x){const y=t.code,{isTop:g,isRight:v,isLeft:b,isBottom:w,maxScroll:j,minScroll:E}=d4(m),k=iae(m),S={x:Math.min(y===ze.Right?k.right-k.width/2:k.right,Math.max(y===ze.Right?k.left:k.left+k.width/2,h.x)),y:Math.min(y===ze.Down?k.bottom-k.height/2:k.bottom,Math.max(y===ze.Down?k.top:k.top+k.height/2,h.y))},A=y===ze.Right&&!v||y===ze.Left&&!b,C=y===ze.Down&&!w||y===ze.Up&&!g;if(A&&S.x!==h.x){const T=m.scrollLeft+f.x,_=y===ze.Right&&T<=j.x||y===ze.Left&&T>=E.x;if(_&&!f.y){m.scrollTo({left:T,behavior:l});return}_?p.x=m.scrollLeft-T:p.x=y===ze.Right?m.scrollLeft-j.x:m.scrollLeft-E.x,p.x&&m.scrollBy({left:-p.x,behavior:l});break}else if(C&&S.y!==h.y){const T=m.scrollTop+f.y,_=y===ze.Down&&T<=j.y||y===ze.Up&&T>=E.y;if(_&&!f.x){m.scrollTo({top:T,behavior:l});return}_?p.y=m.scrollTop-T:p.y=y===ze.Down?m.scrollTop-j.y:m.scrollTop-E.y,p.y&&m.scrollBy({top:-p.y,behavior:l});break}}this.handleMove(t,Lo(Lu(h,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}bd.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=f4,onActivation:s}=t,{active:a}=n;const{code:o}=e.nativeEvent;if(r.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),s==null||s({event:e.nativeEvent}),!0)}return!1}}];function k2(e){return!!(e&&"distance"in e)}function S2(e){return!!(e&&"delay"in e)}class aw{constructor(t,n,r){var s;r===void 0&&(r=uae(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:o}=a;this.props=t,this.events=n,this.document=Ul(o),this.documentListeners=new Hc(this.document),this.listeners=new Hc(r),this.windowListeners=new Hc(Sn(o)),this.initialCoordinates=(s=Nv(a))!=null?s:Nr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Vn.Resize,this.handleCancel),this.windowListeners.add(Vn.DragStart,N2),this.windowListeners.add(Vn.VisibilityChange,this.handleCancel),this.windowListeners.add(Vn.ContextMenu,N2),this.documentListeners.add(Vn.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(S2(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(k2(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:s}=this.props;s(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Vn.Click,dae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Vn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:s,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!s)return;const c=(n=Nv(t))!=null?n:Nr,u=Lu(s,c);if(!r&&l){if(k2(l)){if(l.tolerance!=null&&Gg(u,l.tolerance))return this.handleCancel();if(Gg(u,l.distance))return this.handleStart()}if(S2(l)&&Gg(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),o(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ze.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const fae={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wd extends aw{constructor(t){const{event:n}=t,r=Ul(n.target);super(t,fae,r)}}wd.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const pae={move:{name:"mousemove"},end:{name:"mouseup"}};var Sv;(function(e){e[e.RightClick=2]="RightClick"})(Sv||(Sv={}));class mae extends aw{constructor(t){super(t,pae,Ul(t.event.target))}}mae.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Sv.RightClick?!1:(r==null||r({event:n}),!0)}}];const Yg={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class gae extends aw{constructor(t){super(t,Yg)}static setup(){return window.addEventListener(Yg.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Yg.move.name,t)};function t(){}}}gae.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:s}=n;return s.length>1?!1:(r==null||r({event:n}),!0)}}];var Kc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Kc||(Kc={}));var sp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
1085sedTreeOrder"})(sp||(sp={}));function xae(e){let{acceleration:t,activator:n=Kc.Pointer,canScroll:r,draggingRect:s,enabled:a,interval:o=5,order:l=sp.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:h,threshold:f}=e;const p=vae({delta:h,disabled:!a}),[x,m]=Pie(),y=N.useRef({x:0,y:0}),g=N.useRef({x:0,y:0}),v=N.useMemo(()=>{switch(n){case Kc.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Kc.DraggableRect:return s}},[n,s,c]),b=N.useRef(null),w=N.useCallback(()=>{const E=b.current;if(!E)return;const k=y.current.x*g.current.x,S=y.current.y*g.current.y;E.scrollBy(k,S)},[]),j=N.useMemo(()=>l===sp.TreeOrder?[...u].reverse():u,[l,u]);N.useEffect(()=>{if(!a||!u.length||!v){m();return}for(const E of j){if((r==null?void 0:r(E))===!1)continue;const k=u.indexOf(E),S=d[k];if(!S)continue;const{direction:A,speed:C}=sae(E,S,v,t,f);for(const T of["x","y"])p[T][A[T]]||(C[T]=0,A[T]=0);if(C.x>0||C.y>0){m(),b.current=E,x(w,o),y.current=C,g.current=A;return}}y.current={x:0,y:0},g.current={x:0,y:0},m()},[t,w,r,m,a,o,JSON.stringify(v),JSON.stringify(p),x,u,j,d,JSON.stringify(f)])}const yae={x:{[Dt.Backward]:!1,[Dt.Forward]:!1},y:{[Dt.Backward]:!1,[Dt.Forward]:!1}};function vae(e){let{delta:t,disabled:n}=e;const r=jv(t);return yd(s=>{if(n||!r||!s)return yae;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Dt.Backward]:s.x[Dt.Backward]||a.x===-1,[Dt.Forward]:s.x[Dt.Forward]||a.x===1},y:{[Dt.Backward]:s.y[Dt.Backward]||a.y===-1,[Dt.Forward]:s.y[Dt.Forward]||a.y===1}}},[n,t,r])}function bae(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return yd(s=>{var a;return t==null?null:(a=r??s)!=null?a:null},[r,t])}function wae(e,t){return N.useMemo(()=>e.reduce((n,r)=>{const{sensor:s}=r,a=s.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,r)}));return[...n,...a]},[]),[e,t])}var Fu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Fu||(Fu={}));var _v;(function(e){e.Optimized="optimized"})(_v||(_v={}));const _2=new Map;function jae(e,t){let{dragging:n,dependencies:r,config:s}=t;const[a,o]=N.useState(null),{frequency:l,measure:c,strategy:u}=s,d=N.useRef(e),h=y(),f=Iu(h),p=N.useCallback(function(g){g===void 0&&(g=[]),!f.current&&o(v=>v===null?g:v.concat(g.filter(b=>!v.includes(b))))},[f]),x=N.useRef(null),m=yd(g=>{if(h&&!n)return _2;if(!g||g===_2||d.current!==e||a!=null){const v=new Map;for(let b of e){if(!b)continue;if(a&&a.length>0&&!a.includes(b.id)&&b.rect.current){v.set(b.id,b.rect.current);continue}const w=b.node.current,j=w?new iw(c(w),w):null;b.rect.current=j,j&&v.set(b.id,j)}return v}return g},[e,a,n,h,c]);return N.useEffect(()=>{d.current=e},[e]),N.useEffect(()=>{h||p()},[n,h]),N.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),N.useEffect(()=>{h||typeof l!="number"||x.current!==null||(x.current=setTimeout(()=>{p(),x.current=null},l))},[l,h,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:a!=null};function y(){switch(u){case Fu.Always:return!1;case Fu.BeforeDragging:return n;default:return!n}}}function p4(e,t){return yd(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nae(e,t){return p4(e,t)}function kae(e){let{callback:t,disabled:n}=e;const r=nw(t),s=N.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return N.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function jm(e){let{callback:t,disabled:n}=e;const r=nw(t),s=N.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return N.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Sae(e){return new iw(ql(e),e)}function E2(e,t,n){t===void 0&&(t=Sae);const[r,s]=N.useState(null);function a(){s(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const o=kae({callback(c){if(e)for(const u of c){const{type:d,target:h}=u;if(d==="childList"&&h instanceof HTMLElement&&h.contains(e)){a();break}}}}),l=jm({callback:a});return Hr(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),r}function _ae(e){const t=p4(e);return a4(e,t)}const C2=[];function Eae(e){const t=N.useRef(e),n=yd(r=>e?r&&r!==C2&&e&&t.current&&e.parentNode===t.current.parentNode?r:wm(e):C2,[e]);return N.useEffect(()=>{t.current=e},[e]),n}function Cae(e){const[t,n]=N.useState(null),r=N.useRef(e),s=N.useCallback(a=>{const o=Kg(a.target);o&&n(l=>l?(l.set(o,kv(o)),new Map(l)):null)},[]);return N.useEffect(()=>{const a=r.current;if(e!==a){o(a);const l=e.map(c=>{const u=Kg(c);return u?(u.addEventListener("scroll",s,{passive:!0}),[u,kv(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(c=>{const u=Kg(c);u==null||u.removeEventListener("scroll",s)})}},[s,e]),N.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>Lo(a,o),Nr):h4(e):Nr,[e,t])}function T2(e,t){t===void 0&&(t=[]);const n=N.useRef(null);return N.useEffect(()=>{n.current=null},t),N.useEffect(()=>{const r=e!==Nr;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Lu(e,n.current):Nr}function Tae(e){N.useEffect(()=>{if(!bm)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Aae(e,t){return N.useMemo(()=>e.reduce((n,r)=>{let{eventName:s,handler:a}=r;return n[s]=o=>{a(o,t)},n},{}),[e,t])}function m4(e){return N.useMemo(()=>e?eae(e):null,[e])}const A2=[];function Pae(e,t){t===void 0&&(t=ql);const[n]=e,r=m4(n?Sn(n):null),[s,a]=N.useState(A2);function o(){a(()=>e.length?e.map(c=>u4(c)?r:new iw(t(c),c)):A2)}const l=jm({callback:o});return Hr(()=>{l==null||l.disconnect(),o(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),s}function Oae(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return xd(t)?t:e}function Rae(e){let{measure:t}=e;const[n,r]=N.useState(null),s=N.useCallback(u=>{for(const{target:d}of u)if(xd(d)){r(h=>{const f=t(d);return h?{...h,width:f.width,height:f.height}:f});break}},[t]),a=jm({callback:s}),o=N.useCallback(u=>{const d=Oae(u);a==null||a.disconnect(),d&&(a==null||a.observe(d)),r(d?t(d):null)},[t,a]),[l,c]=tp(o);return N.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const Mae=[{sensor:wd,options:{}},{sensor:bd,options:{}}],Dae={current:{}},Kh={draggable:{measure:j2},droppable:{measure:j2,strategy:Fu.WhileDragging,frequency:_v.Optimized},dragOverlay:{measure:ql}};class Gc extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;
1085return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Iae={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Gc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:np},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Kh,measureDroppableContainers:np,windowRect:null,measuringScheduled:!1},Lae={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:np,draggableNodes:new Map,over:null,measureDroppableContainers:np},Nm=N.createContext(Lae),g4=N.createContext(Iae);function Fae(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Gc}}}function $ae(e,t){switch(t.type){case Et.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Et.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Et.DragEnd:case Et.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Et.RegisterDroppable:{const{element:n}=t,{id:r}=n,s=new Gc(e.droppable.containers);return s.set(r,n),{...e,droppable:{...e.droppable,containers:s}}}case Et.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const o=new Gc(e.droppable.containers);return o.set(n,{...a,disabled:s}),{...e,droppable:{...e.droppable,containers:o}}}case Et.UnregisterDroppable:{const{id:n,key:r}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const a=new Gc(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function zae(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:s}=N.useContext(Nm),a=jv(r),o=jv(n==null?void 0:n.id);return N.useEffect(()=>{if(!t&&!r&&a&&o!=null){if(!rw(a)||document.activeElement===a.target)return;const l=s.get(o);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const h=Mie(d);if(h){h.focus();break}}})}},[r,t,s,o,a]),null}function Bae(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((s,a)=>a({transform:s,...r}),n):n}function Uae(e){return N.useMemo(()=>({draggable:{...Kh.draggable,...e==null?void 0:e.draggable},droppable:{...Kh.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Kh.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function qae(e){let{activeNode:t,measure:n,initialRect:r,config:s=!0}=e;const a=N.useRef(!1),{x:o,y:l}=typeof s=="boolean"?{x:s,y:s}:s;Hr(()=>{if(!o&&!l||!t){a.current=!1;return}if(a.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),h=a4(d,r);if(o||(h.x=0),l||(h.y=0),a.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const f=o4(u);f&&f.scrollBy({top:h.y,left:h.x})}},[t,o,l,r,n])}const x4=N.createContext({...Nr,scaleX:1,scaleY:1});var Bs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Bs||(Bs={}));const ip=N.memo(function(t){var n,r,s,a;let{id:o,accessibility:l,autoScroll:c=!0,children:u,sensors:d=Mae,collisionDetection:h=Kie,measuring:f,modifiers:p,...x}=t;const m=N.useReducer($ae,void 0,Fae),[y,g]=m,[v,b]=zie(),[w,j]=N.useState(Bs.Uninitialized),E=w===Bs.Initialized,{draggable:{active:k,nodes:S,translate:A},droppable:{containers:C}}=y,T=k!=null?S.get(k):null,_=N.useRef({initial:null,translated:null}),P=N.useMemo(()=>{var lt;return k!=null?{id:k,data:(lt=T==null?void 0:T.data)!=null?lt:Dae,rect:_}:null},[k,T]),O=N.useRef(null),[I,B]=N.useState(null),[$,q]=N.useState(null),L=Iu(x,Object.values(x)),D=vd("DndDescribedBy",o),R=N.useMemo(()=>C.getEnabled(),[C]),F=Uae(f),{droppableRects:U,measureDroppableContainers:V,measuringScheduled:W}=jae(R,{dragging:E,dependencies:[A.x,A.y],config:F.droppable}),M=bae(S,k),z=N.useMemo(()=>$?Nv($):null,[$]),H=Ba(),G=Nae(M,F.draggable.measure);qae({activeNode:k!=null?S.get(k):null,config:H.layoutShiftCompensation,initialRect:G,measure:F.draggable.measure});const Y=E2(M,F.draggable.measure,G),Z=E2(M?M.parentElement:null),J=N.useRef({activatorEvent:null,active:null,activeNode:M,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:C,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=C.getNodeFor((n=J.current.over)==null?void 0:n.id),de=Rae({measure:F.dragOverlay.measure}),ye=(r=de.nodeRef.current)!=null?r:M,ve=E?(s=de.rect)!=null?s:Y:null,Ee=!!(de.nodeRef.current&&de.rect),X=_ae(Ee?null:Y),Q=m4(ye?Sn(ye):null),ee=Eae(E?oe??M:null),ce=Pae(ee),te=Bae(p,{transform:{x:A.x-X.x,y:A.y-X.y,scaleX:1,scaleY:1},activatorEvent:$,active:P,activeNodeRect:Y,containerNodeRect:Z,draggingNodeRect:ve,over:J.current.over,overlayNodeRect:de.rect,scrollableAncestors:ee,scrollableAncestorRects:ce,windowRect:Q}),Ne=z?Lo(z,A):null,Ce=Cae(ee),Te=T2(Ce),Ve=T2(Ce,[Y]),Xe=Lo(te,Te),Be=ve?Xie(ve,te):null,_n=P&&Be?h({active:P,collisionRect:Be,droppableRects:U,droppableContainers:R,pointerCoordinates:Ne}):null,Fe=i4(_n,"id"),[ot,Gr]=N.useState(null),Sr=Ee?te:Lo(te,Ve),_r=Gie(Sr,(a=ot==null?void 0:ot.rect)!=null?a:null,Y),Ts=N.useRef(null),nr=N.useCallback((lt,et)=>{let{sensor:$t,options:we}=et;if(O.current==null)return;const Ae=S.get(O.current);if(!Ae)return;const Me=lt.nativeEvent,mt=new $t({active:O.current,activeNode:Ae,event:Me,options:we,context:J,onAbort(Qe){if(!S.get(Qe))return;const{onDragAbort:gt}=L.current,Pt={id:Qe};gt==null||gt(Pt),v({type:"onDragAbort",event:Pt})},onPending(Qe,Kt,gt,Pt){if(!S.get(Qe))return;const{onDragPending:Hl}=L.current,As={id:Qe,constraint:Kt,initialCoordinates:gt,offset:Pt};Hl==null||Hl(As),v({type:"onDragPending",event:As})},onStart(Qe){const Kt=O.current;if(Kt==null)return;const gt=S.get(Kt);if(!gt)return;const{onDragStart:Pt}=L.current,Wl={activatorEvent:Me,active:{id:Kt,data:gt.data,rect:_}};mr.unstable_batchedUpdates(()=>{Pt==null||Pt(Wl),j(Bs.Initializing),g({type:Et.DragStart,initialCoordinates:Qe,active:Kt}),v({type:"onDragStart",event:Wl}),B(Ts.current),q(Me)})},onMove(Qe){g({type:Et.DragMove,coordinates:Qe})},onEnd:At(Et.DragEnd),onCancel:At(Et.DragCancel)});Ts.current=mt;function At(Qe){return async function(){const{active:gt,collisions:Pt,over:Wl,scrollAdjustedTranslate:Hl}=J.current;let As=null;if(gt&&Hl){const{cancelDrop:Kl}=L.current;As={activatorEvent:Me,active:gt,collisions:Pt,delta:Hl,over:Wl},Qe===Et.DragEnd&&typeof Kl=="function"&&await Promise.resolve(Kl(As))&&
1085(Qe=Et.DragCancel)}O.current=null,mr.unstable_batchedUpdates(()=>{g({type:Qe}),j(Bs.Uninitialized),Gr(null),B(null),q(null),Ts.current=null;const Kl=Qe===Et.DragEnd?"onDragEnd":"onDragCancel";if(As){const Em=L.current[Kl];Em==null||Em(As),v({type:Kl,event:As})}})}}},[S]),Vl=N.useCallback((lt,et)=>($t,we)=>{const Ae=$t.nativeEvent,Me=S.get(we);if(O.current!==null||!Me||Ae.dndKit||Ae.defaultPrevented)return;const mt={active:Me};lt($t,et.options,mt)===!0&&(Ae.dndKit={capturedBy:et.sensor},O.current=we,nr($t,et))},[S,nr]),$a=wae(d,Vl);Tae(d),Hr(()=>{Y&&w===Bs.Initializing&&j(Bs.Initialized)},[Y,w]),N.useEffect(()=>{const{onDragMove:lt}=L.current,{active:et,activatorEvent:$t,collisions:we,over:Ae}=J.current;if(!et||!$t)return;const Me={active:et,activatorEvent:$t,collisions:we,delta:{x:Xe.x,y:Xe.y},over:Ae};mr.unstable_batchedUpdates(()=>{lt==null||lt(Me),v({type:"onDragMove",event:Me})})},[Xe.x,Xe.y]),N.useEffect(()=>{const{active:lt,activatorEvent:et,collisions:$t,droppableContainers:we,scrollAdjustedTranslate:Ae}=J.current;if(!lt||O.current==null||!et||!Ae)return;const{onDragOver:Me}=L.current,mt=we.get(Fe),At=mt&&mt.rect.current?{id:mt.id,rect:mt.rect.current,data:mt.data,disabled:mt.disabled}:null,Qe={active:lt,activatorEvent:et,collisions:$t,delta:{x:Ae.x,y:Ae.y},over:At};mr.unstable_batchedUpdates(()=>{Gr(At),Me==null||Me(Qe),v({type:"onDragOver",event:Qe})})},[Fe]),Hr(()=>{J.current={activatorEvent:$,active:P,activeNode:M,collisionRect:Be,collisions:_n,droppableRects:U,draggableNodes:S,draggingNode:ye,draggingNodeRect:ve,droppableContainers:C,over:ot,scrollableAncestors:ee,scrollAdjustedTranslate:Xe},_.current={initial:ve,translated:Be}},[P,M,_n,Be,S,ye,ve,U,C,ot,ee,Xe]),xae({...H,delta:A,draggingRect:Be,pointerCoordinates:Ne,scrollableAncestors:ee,scrollableAncestorRects:ce});const Ri=N.useMemo(()=>({active:P,activeNode:M,activeNodeRect:Y,activatorEvent:$,collisions:_n,containerNodeRect:Z,dragOverlay:de,draggableNodes:S,droppableContainers:C,droppableRects:U,over:ot,measureDroppableContainers:V,scrollableAncestors:ee,scrollableAncestorRects:ce,measuringConfiguration:F,measuringScheduled:W,windowRect:Q}),[P,M,Y,$,_n,Z,de,S,C,U,ot,V,ee,ce,F,W,Q]),za=N.useMemo(()=>({activatorEvent:$,activators:$a,active:P,activeNodeRect:Y,ariaDescribedById:{draggable:D},dispatch:g,draggableNodes:S,over:ot,measureDroppableContainers:V}),[$,$a,P,Y,g,D,S,ot,V]);return ne.createElement(n4.Provider,{value:b},ne.createElement(Nm.Provider,{value:za},ne.createElement(g4.Provider,{value:Ri},ne.createElement(x4.Provider,{value:_r},u)),ne.createElement(zae,{disabled:(l==null?void 0:l.restoreFocus)===!1})),ne.createElement(qie,{...l,hiddenTextDescribedById:D}));function Ba(){const lt=(I==null?void 0:I.autoScrollEnabled)===!1,et=typeof c=="object"?c.enabled===!1:c===!1,$t=E&&!lt&&!et;return typeof c=="object"?{...c,enabled:$t}:{enabled:$t}}}),Vae=N.createContext(null),P2="button",Wae="Draggable";function Hae(e){let{id:t,data:n,disabled:r=!1,attributes:s}=e;const a=vd(Wae),{activators:o,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:h,over:f}=N.useContext(Nm),{role:p=P2,roleDescription:x="draggable",tabIndex:m=0}=s??{},y=(c==null?void 0:c.id)===t,g=N.useContext(y?x4:Vae),[v,b]=tp(),[w,j]=tp(),E=Aae(o,t),k=Iu(n);Hr(()=>(h.set(t,{id:t,key:a,node:v,activatorNode:w,data:k}),()=>{const A=h.get(t);A&&A.key===a&&h.delete(t)}),[h,t]);const S=N.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":y&&p===P2?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[r,p,m,y,x,d.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:S,isDragging:y,listeners:r?void 0:E,node:v,over:f,setNodeRef:b,setActivatorNodeRef:j,transform:g}}function Kae(){return N.useContext(g4)}const Gae="Droppable",Yae={timeout:25};function Xae(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:s}=e;const a=vd(Gae),{active:o,dispatch:l,over:c,measureDroppableContainers:u}=N.useContext(Nm),d=N.useRef({disabled:n}),h=N.useRef(!1),f=N.useRef(null),p=N.useRef(null),{disabled:x,updateMeasurementsFor:m,timeout:y}={...Yae,...s},g=Iu(m??r),v=N.useCallback(()=>
1085{if(!h.current){h.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(g.current)?g.current:[g.current]),p.current=null},y)},[y]),b=jm({callback:v,disabled:x||!o}),w=N.useCallback((S,A)=>{b&&(A&&(b.unobserve(A),h.current=!1),S&&b.observe(S))},[b]),[j,E]=tp(w),k=Iu(t);return N.useEffect(()=>{!b||!j.current||(b.disconnect(),h.current=!1,b.observe(j.current))},[j,b]),N.useEffect(()=>(l({type:Et.RegisterDroppable,element:{id:r,key:a,disabled:n,node:j,rect:f,data:k}}),()=>l({type:Et.UnregisterDroppable,key:a,id:r})),[r]),N.useEffect(()=>{n!==d.current.disabled&&(l({type:Et.SetDroppableDisabled,id:r,key:a,disabled:n}),d.current.disabled=n)},[r,a,n,l]),{active:o,rect:f,isOver:(c==null?void 0:c.id)===r,node:j,over:c,setNodeRef:E}}function _a(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Qae(e,t){return e.reduce((n,r,s)=>{const a=t.get(r);return a&&(n[s]=a),n},Array(e.length))}function mh(e){return e!==null&&e>=0}function Jae(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Zae(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const y4=e=>{let{rects:t,activeIndex:n,overIndex:r,index:s}=e;const a=_a(t,r,n),o=t[s],l=a[s];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},gh={scaleX:1,scaleY:1},ap=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:s,rects:a,overIndex:o}=e;const l=(t=a[n])!=null?t:r;if(!l)return null;if(s===n){const u=a[o];return u?{x:0,y:n<o?u.top+u.height-(l.top+l.height):u.top-l.top,...gh}:null}const c=eoe(a,s,n);return s>n&&s<=o?{x:0,y:-l.height-c,...gh}:s<n&&s>=o?{x:0,y:l.height+c,...gh}:{x:0,y:0,...gh}};function eoe(e,t,n){const r=e[t],s=e[t-1],a=e[t+1];return r?n<t?s?r.top-(s.top+s.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const v4="Sortable",b4=ne.createContext({activeIndex:-1,containerId:v4,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:y4,disabled:{draggable:!1,droppable:!1}});function op(e){let{children:t,id:n,items:r,strategy:s=y4,disabled:a=!1}=e;const{active:o,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:d}=Kae(),h=vd(v4,n),f=l.rect!==null,p=N.useMemo(()=>r.map(E=>typeof E=="object"&&"id"in E?E.id:E),[r]),x=o!=null,m=o?p.indexOf(o.id):-1,y=u?p.indexOf(u.id):-1,g=N.useRef(p),v=!Jae(p,g.current),b=y!==-1&&m===-1||v,w=Zae(a);Hr(()=>{v&&x&&d(p)},[v,p,x,d]),N.useEffect(()=>{g.current=p},[p]);const j=N.useMemo(()=>({activeIndex:m,containerId:h,disabled:w,disableTransforms:b,items:p,overIndex:y,useDragOverlay:f,sortedRects:Qae(p,c),strategy:s}),[m,h,w.draggable,w.droppable,b,p,y,c,f,s]);return ne.createElement(b4.Provider,{value:j},t)}const toe=e=>{let{id:t,items:n,activeIndex:r,overIndex:s}=e;return _a(n,r,s).indexOf(t)},noe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:s,items:a,newIndex:o,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!r||l!==a&&s===o?!1:n?!0:o!==s&&t===c},roe={duration:200,easing:"ease"},w4="transform",soe=_i.Transition.toString({property:w4,duration:0,easing:"linear"}),ioe={roleDescription:"sortable"};function aoe(e){let{disabled:t,index:n,node:r,rect:s}=e;const[a,o]=N.useState(null),l=N.useRef(n);return Hr(()=>{if(!t&&n!==l.current&&r.current){const c=s.current;if(c){const u=ql(r.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&o(d)}}n!==l.current&&(l.current=n)},[t,n,r,s]),N.useEffect(()=>{a&&o(null)},[a]),a}function km(e){let{animateLayoutChanges:t=noe,attributes:n,disabled:r,data:s,getNewIndex:a=toe,id:o,strategy:l,resizeObserverConfig:c,transition:u=roe}=e;const{items:d,containerId:h,activeIndex:f,disabled:p,disableTransforms:x,sortedRects:m,overIndex:y,useDragOverlay:g,strategy:v}=N.useContext(b4),b=ooe(r,p),w=d.indexOf(o),j=N.useMemo(()=>({sortable:{containerId:h,index:w,items:d},...s}),[h,s,w,d]),E=N.useMemo(()=>d.slice(d.indexOf(o)),[d,o]),{rect:k,node:S,isOver:A,setNodeRef:C}=Xae({id:o,data:j,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...c}}),{active:T,activatorEvent:_,activeNodeRect:P,attributes:O,setNodeRef:I,listeners:B,isDragging:$,over:q,setActivatorNodeRef:L,transform:D}=Hae({id:o,data:j,attributes:{...ioe,...n},disabled:b.draggable}),R=Aie(C,I),F=!!T,U=F&&!x&&mh(f)&&mh(y),V=!g&&$,W=V&&U?D:null,z=U?W??(l??v)({rects:m,activeNodeRect:P,activeIndex:f,overIndex:y,index:w}):null,H=mh(f)&&mh(y)?a({id:o,items:d,activeIndex:f,overIndex:y}):w,G=T==null?void 0:T.id,Y=N.useRef({activeId:G,items:d,newIndex:H,containerId:h}),Z=d!==Y.current.items,J=t({active:T,containerId:h,isDragging:$,
1085isSorting:F,id:o,index:w,items:d,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:u,wasDragging:Y.current.activeId!=null}),oe=aoe({disabled:!J,index:w,node:S,rect:k});return N.useEffect(()=>{F&&Y.current.newIndex!==H&&(Y.current.newIndex=H),h!==Y.current.containerId&&(Y.current.containerId=h),d!==Y.current.items&&(Y.current.items=d)},[F,H,h,d]),N.useEffect(()=>{if(G===Y.current.activeId)return;if(G!=null&&Y.current.activeId==null){Y.current.activeId=G;return}const ye=setTimeout(()=>{Y.current.activeId=G},50);return()=>clearTimeout(ye)},[G]),{active:T,activeIndex:f,attributes:O,data:j,rect:k,index:w,newIndex:H,items:d,isOver:A,isSorting:F,isDragging:$,listeners:B,node:S,overIndex:y,over:q,setNodeRef:R,setActivatorNodeRef:L,setDroppableNodeRef:C,setDraggableNodeRef:I,transform:oe??z,transition:de()};function de(){if(oe||Z&&Y.current.newIndex===w)return soe;if(!(V&&!rw(_)||!u)&&(F||J))return _i.Transition.toString({...u,property:w4})}}function ooe(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function lp(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const loe=[ze.Down,ze.Right,ze.Up,ze.Left],ow=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:a,over:o,scrollableAncestors:l}}=t;if(loe.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];a.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const f=s.get(h.id);if(f)switch(e.code){case ze.Down:r.top<f.top&&c.push(h);break;case ze.Up:r.top>f.top&&c.push(h);break;case ze.Left:r.left>f.left&&c.push(h);break;case ze.Right:r.left<f.left&&c.push(h);break}});const u=Wie({active:n,collisionRect:r,droppableRects:s,droppableContainers:c,pointerCoordinates:null});let d=i4(u,"id");if(d===(o==null?void 0:o.id)&&u.length>1&&(d=u[1].id),d!=null){const h=a.get(n.id),f=a.get(d),p=f?s.get(f.id):null,x=f==null?void 0:f.node.current;if(x&&p&&h&&f){const y=wm(x).some((E,k)=>l[k]!==E),g=j4(h,f),v=coe(h,f),b=y||!g?{x:0,y:0}:{x:v?r.width-p.width:0,y:v?r.height-p.height:0},w={x:p.left,y:p.top};return b.x&&b.y?w:Lu(w,b)}}}};function j4(e,t){return!lp(e)||!lp(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function coe(e,t){return!lp(e)||!lp(t)||!j4(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const cp=e=>{let{transform:t}=e;return{...t,x:0}},uoe=()=>{const[e,t]=N.useState(!1),{refetch:n}=tm("mens-first-team");return{syncStats:async()=>{t(!0);const s=ie.loading("Syncing statistics with FWP API...");try{const{data:a,error:o}=await ue.from("players").select("*").eq("team_slug","mens-first-team");if(o)throw o;const[l,c]=await Promise.all([z9(),B9()]),u=p=>p.trim().replace(/[ââ'']/g,"'").toLowerCase(),d={};l.forEach(p=>{var y;const x=`${p["first-name"]} ${p["last-name"]}`,m=u(x);d[m]={appearances:((y=p.appearances)==null?void 0:y.length)||0,goals:0,originalName:x}}),c.forEach(p=>{var y,g;const x=`${p["first-name"]} ${p["last-name"]}`,m=u(x);d[m]?d[m].goals=((y=p.goals)==null?void 0:y.length)||0:d[m]={appearances:0,goals:((g=p.goals)==null?void 0:g.length)||0,originalName:x}});const h=[],f=new Set;if(a.forEach(p=>{const x=u(p.name);d[x]&&(h.push({name:d[x].originalName,team_slug:p.team_slug,position:p.position,appearances:d[x].appearances,goals:d[x].goals,assists:p.assists}),f.add(x),delete d[x])}),Object.entries(d).forEach(([p,x])=>{h.push({name:p,position:"MID",appearances:x.appearances,goals:x.goals,assists:0,team_slug:"mens-first-team"})}),h.length>0){const{error:p}=await ue.from("players").upsert(h,{onConflict:"name, team_slug"});if(p)throw p}ie.success(`Sync complete! Statistics updated for ${h.length} players.`,{id:s}),n()}catch(a){console.error("Sync error:",a),ie.error(`Sync failed: ${a.message}`,{id:s})}finally{t(!1)}},isSyncing:e}},doe=({player:e,handleEdit:t,handleDelete:n,handleToggleActive:r})=>{const{attributes:s,listeners:a,setNodeRef:o,transform:l,transition:c,isDragging:u}=km({id:e.id}),d={transform:_i.Transform.toString(l),transition:c,zIndex:u?50:0,position:"relative",opacity:u?.5:1};return i.jsxs("tr",{ref:o,style:d,className:`hover:bg-muted/30 transition-colors group ${u?"bg-white shadow-lg z-50":""}`,children:[i.jsx("td",{className:"w-10 px-0 pl-4 py-4",children:i.jsx("div",{...s,...a,className:"cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded text-muted-foreground
1085/40 hover:text-muted-foreground transition-colors",children:i.jsx(Ta,{size:16})})}),i.jsx("td",{className:"px-6 py-4 font-medium",children:i.jsxs("div",{className:"flex items-center gap-2",children:[e.name,e.is_captain&&i.jsx("span",{className:"bg-[#8e160b] text-white text-[9px] font-heading font-bold px-1.5 py-0.5 rounded-sm",title:"Captain",children:"C"})]})}),i.jsx("td",{className:"px-6 py-4 text-center",children:i.jsx("span",{className:"bg-muted px-2 py-0.5 rounded text-[10px] font-heading uppercase font-bold border border-border/50",children:e.position})}),i.jsx("td",{className:"px-6 py-4 text-center",children:i.jsx("button",{onClick:()=>r(e.id,e.is_active,!0),className:`px-2 py-0.5 rounded text-[9px] font-heading uppercase font-bold border transition-colors ${e.is_active?"bg-green-50 text-green-700 border-green-200 hover:bg-green-100":"bg-red-50 text-red-700 border-red-200 hover:bg-red-100"}`,children:e.is_active?"Active":"Hidden"})}),i.jsx("td",{className:"px-6 py-4 text-center font-mono text-xs",children:e.appearances}),i.jsx("td",{className:"px-6 py-4 text-center font-mono text-xs text-primary font-bold",children:e.goals}),i.jsx("td",{className:"px-6 py-4 text-right",children:i.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[i.jsx(le,{variant:"ghost",size:"sm",onClick:()=>t(e),className:"h-8 w-8 p-0",children:i.jsx(Aa,{size:14})}),i.jsx(le,{variant:"ghost",size:"sm",onClick:()=>n(e.id,!0),className:"h-8 w-8 p-0 text-red-600 hover:text-red-700",children:i.jsx(Pi,{size:14})})]})})]})},hoe=({s:e,handleEdit:t,handleDelete:n,handleToggleActive:r})=>{const{attributes:s,listeners:a,setNodeRef:o,transform:l,transition:c,isDragging:u}=km({id:e.id}),d={transform:_i.Transform.toString(l),transition:c,zIndex:u?50:0,position:"relative",opacity:u?.5:1};return i.jsxs("tr",{ref:o,style:d,className:`hover:bg-muted/30 transition-colors group ${u?"bg-white shadow-lg z-50":""}`,children:[i.jsx("td",{className:"w-10 px-0 pl-4 py-4",children:i.jsx("div",{...s,...a,className:"cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded text-muted-foreground/40 hover:text-muted-foreground transition-colors",children:i.jsx(Ta,{size:16})})}),i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded bg-muted flex items-center justify-center overflow-hidden border border-border/50",children:e.image_url?i.jsx("img",{src:e.image_url,alt:e.name,className:"w-full h-full object-cover"}):i.jsx(Ph,{size:14,className:"text-muted-foreground/30"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-bold uppercase text-xs leading-none mb-1",children:e.name}),i.jsx("p",{className:"text-[9px] uppercase tracking-widest text-muted-foreground leading-none",children:e.role})]})]})}),i.jsx("td",{className:"px-6 py-4 text-center",children:i.jsxs("button",{onClick:()=>r(e.id,e.is_active,!1),className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[9px] font-heading uppercase font-bold border transition-colors ${e.is_active?"bg-green-50 text-green-700 border-green-200":"bg-red-50 text-red-700 border-red-200"}`,children:[i.jsx("div",{className:`w-1 h-1 rounded-full ${e.is_active?"bg-green-600":"bg-red-600"}`}),e.is_active?"Active":"Hidden"]})}),i.jsx("td",{className:"px-6 py-4 text-right",children:i.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[i.jsx(le,{variant:"ghost",size:"sm",onClick:()=>t(e),className:"h-8 w-8 p-0",children:i.jsx(Aa,{size:14})}),i.jsx(le,{variant:"ghost",size:"sm",onClick:()=>n(e.id,!1),className:"h-8 w-8 p-0 text-red-600 hover:text-red-700",children:i.jsx(Pi,{size:14})})]})})]})},foe=()=>{var V,W;const{data:e,isLoading:t,refetch:n}=tm("mens-first-team"),{data:r,isLoading:s,refetch:a}=nm("football"),{data:o,refetch:l}=dt("squad_visibility"),{syncStats:c,isSyncing:u}=uoe(),d=((V=o==null?void 0:o.value)==null?void 0:V.squad_coming_soon)??!1,h=((W=o==null?void 0:o.value)==null?void 0:W.staff_coming_soon)??!1,[f,p]=N.useState([]),[x,m]=N.useState([]),[y,g]=N.useState("players"),[v,b]=N.useState(""),[w,j]=N.useState(!1),[E,k]=N.useState(!1),[S,A]=N.useState(null),[C,T]=N.useState(!1),_=sw(ml(wd,{activationConstraint:{distance:8}}),ml(bd,{coordinateGetter:ow}));N.useEffect(()=>{e&&p(e)},[e]),N.useEffect(()=>{r&&m(r)},[r]);const P=async(M,z)=>{try{const H={squad_coming_soon:M==="squad"?!z:d,staff_coming_soon:M==="staff"?!z:h},{data:G,error:Y}=await ue.from("site_settings").update({value:H,updated_at:new Date().toISOString()}).eq("key","squad_visibility").select();if(Y)throw Y;if(!G||G.length===0){const{error:Z}=await ue.from("site_settings").insert({key:"squad_visibility",value:H});if(Z)throw Z}ie.success(`${M==="squad"?"Squad":"Staff"} visibility updated`),l()}catch(H){ie.error(H.message||"Failed to update visibility")}},O=f==null?void 0:f.filter(M=>(w||M.is_active)&&(M.name.toLowerCase().includes(v.toLowerCase())||M.position.toLowerCase().includes(v.toLowerCase()))),I=x==null?void 0:x.filter(M=>(w||M.is_active)&&(M.name.toLowerCase().includes(v.toLowerCase())||M.role.toLowerCase().includes(v.toLowerCase()))),B=async M=>{const{active:z,over:H}=M;if(!H||z.id===H.id)return;const G=f.find(ve=>ve.id===z.id);if(!G)return;const Y=G.position,Z=f.filter(ve=>ve.position===Y).sort((ve,Ee)=>(ve.order_index||0)-(Ee.order_index||0)),J=Z.findIndex(ve=>ve.id===z.id),oe=Z.findIndex(ve=>ve.id===H.id),de=_a(Z,J,oe),ye=f.map(ve=>{const Ee=de.find(X=>X.id===ve.id);return Ee?{...ve,order_index:de.indexOf(Ee)}:ve});p(ye);try{const ve=de.map((Ee,X)=>({id:Ee.id,order_index:X}));await Wf("players",ve),ie.success("Player order updated"),n()}catch{ie.error("Failed to save player order"),p(e||[])}},$=async M=>{const{active:z,over:H}=M;if(!H||z.id===H.id)return;const G=x.findIndex(J=>J.id===z.id),Y=x.findIndex(J=>J.id===H.id),Z=_a(x,G,Y);m(Z);try{const J=Z.map((oe,de)=>({id:oe.id,order_index:de}));await Wf("personnel",J),ie.success("Staff order updated"),a()}catch{ie.error("Failed to save staff order"),m(r||[])}},q=v==="",L=M=>{A(M),k(!0)},D=()=>{A(y==="players"?{name:"",position:"MID",appearances:0,goals:0,assists:0,team_slug:"mens-first-team",is_active:!0,is_captain:!1,order_index:((e==null?void 0:e.length)||0)+1}:{name:"",role:"",department:"Team Staff",type:"football",image_url:"",is_active:!0,order_index:((r==null?void 0:r.length)||0)+1}),k(!0)},R=async(M,z,H)=>{try{const G=H?"players":"personnel",{error:Y}=await ue.from(G).update({is_active:!z}).eq("id",M);if(Y)throw Y;ie.success(`${H?"Player":"Staff"} marked as ${z?"hidden":"active"}`),H?n():a()}catch(G){ie.error(G.message||"Failed to update status")}},F=async(M,z)=>{const H=z?f.find(Z=>Z.id===M):x.find(Z=>Z.id===M);if(!window.confirm(`Are you sure you want to delete this ${z?"player":"staff member"}?`))return;const G=z?"players":"personnel",{error:Y}=await ue.from(G).delete().eq("id",M);Y?ie.error(`Failed to delete ${z?"player":"staff"}`):(!z&&(H!=null&&H.image_url)&&await gd(H.image_url),ie.success(`${z?"Player":"Staff"} removed`),z?n():a())},U=async()=>{T(!0);try{const M=y==="players",z=M?"players":"personnel";if(S.id){const{error:H}=await ue.from(z).update(S).eq("id",S.id);if(H)throw H;ie.success(`${M?"Player":"Staff"} updated`)}else{const{error:H}=await ue.from(z).insert([S]);if(H)throw H;ie.success(`${M?"Player":"Staff"} added`)}k(!1),M?n():a()}catch(M){ie.error(M.message||"Failed to save changes")}
1085finally{T(!1)}};return t||s?i.jsx("div",{className:"h-[60vh] flex items-center justify-center",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:"Squad & Staff"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage the first team players and coaching staff."})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"flex items-center bg-white border border-border rounded-lg p-1 mr-2",children:[i.jsx(le,{variant:y==="players"?"default":"ghost",size:"sm",className:"font-heading text-[10px] uppercase tracking-widest h-8 px-4",onClick:()=>g("players"),children:"Players"}),i.jsx(le,{variant:y==="staff"?"default":"ghost",size:"sm",className:"font-heading text-[10px] uppercase tracking-widest h-8 px-4",onClick:()=>g("staff"),children:"Staff"})]}),y==="players"&&i.jsxs(le,{onClick:c,disabled:u,variant:"outline",className:"font-heading uppercase tracking-widest text-xs gap-2 border-primary/20 hover:border-primary/50",children:[u?i.jsx(Ie,{size:16,className:"animate-spin"}):i.jsx(Z3,{size:16}),"Sync FWP"]}),i.jsxs(le,{onClick:D,className:"font-heading uppercase tracking-widest text-xs gap-2",children:[i.jsx(vs,{size:16})," Add ",y==="players"?"Player":"Staff"]})]})]}),y==="players"?i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"bg-card border border-border rounded-xl p-5 shadow-sm flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("h3",{className:"font-heading text-lg font-bold uppercase tracking-tight",children:"Squad Status"}),i.jsx("p",{className:"text-xs text-muted-foreground font-body",children:'At the end of the season, enable "Coming Soon" mode to display a placeholder page on the website.'})]}),i.jsxs("div",{className:"flex items-center gap-3 bg-muted/40 px-4 py-2.5 rounded-lg border border-border/50 self-start sm:self-center",children:[i.jsx(He,{htmlFor:"squad-coming-soon",className:"font-heading text-xs uppercase tracking-widest cursor-pointer select-none",children:d?i.jsx("span",{className:"text-amber-600 font-bold",children:"Coming Soon Mode (Hidden)"}):i.jsx("span",{className:"text-green-600 font-bold",children:"Displaying Players (Active)"})}),i.jsx(cs,{id:"squad-coming-soon",checked:d,onCheckedChange:()=>P("squad",d)})]})]}),i.jsxs("div",{className:"bg-primary/5 border border-primary/10 rounded-lg p-4 flex items-start gap-4",children:[i.jsx(Kx,{size:20,className:"text-primary shrink-0 mt-0.5"}),i.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:[i.jsx("strong",{className:"text-primary uppercase font-heading text-[10px] tracking-widest block mb-1",children:"FWP Sync Active"}),"Appearances and Goals for players are updated automatically from the Football Web Pages API."]})]})]}):i.jsxs("div",{className:"bg-card border border-border rounded-xl p-5 shadow-sm flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("h3",{className:"font-heading text-lg font-bold uppercase tracking-tight",children:"Staff Status"}),i.jsx("p",{className:"text-xs text-muted-foreground font-body",children:'Enable "Coming Soon" mode to hide staff members on the website (e.g. before pre-season appointments).'})]}),i.jsxs("div",{className:"flex items-center gap-3 bg-muted/40 px-4 py-2.5 rounded-lg border border-border/50 self-start sm:self-center",children:[i.jsx(He,{htmlFor:"staff-coming-soon",className:"font-heading text-xs uppercase tracking-widest cursor-pointer select-none",children:h?i.jsx("span",{className:"text-amber-600 font-bold",children:"Coming Soon Mode (Hidden)"}):i.jsx("span",{className:"text-green-600 font-bold",children:"Displaying Staff (Active)"})}),i.jsx(cs,{id:"staff-coming-soon",checked:h,onCheckedChange:()=>P("staff",h)})]})]}),!q&&i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 flex items-center gap-3 text-amber-800 text-xs",children:[i.jsx(cl,{size:16}
1085),"Drag and drop reordering is disabled while searching."]}),i.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"p-4 border-b border-border flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 bg-white",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-1 w-full sm:w-auto",children:[i.jsx(cl,{className:"text-muted-foreground",size:18}),i.jsx(_e,{placeholder:`Search ${y}...`,value:v,onChange:M=>b(M.target.value),className:"border-none shadow-none focus-visible:ring-0 text-sm h-auto py-1"})]}),i.jsxs("div",{className:"flex items-center gap-2 bg-muted/30 px-3 py-1.5 rounded-md border border-border/50",children:[i.jsx(He,{htmlFor:"show-hidden",className:"text-xs text-muted-foreground cursor-pointer whitespace-nowrap",children:"Show Hidden"}),i.jsx(cs,{id:"show-hidden",checked:w,onCheckedChange:j,className:"scale-75 data-[state=checked]:bg-primary"})]})]}),i.jsx("div",{className:"overflow-x-auto",children:y==="players"?i.jsx("div",{className:"space-y-8 pb-8",children:["GK","DEF","MID","FWD"].map(M=>{const z=O.filter(H=>H.position===M).sort((H,G)=>(H.order_index||0)-(G.order_index||0));return z.length===0?null:i.jsxs("div",{children:[i.jsx("h4",{className:"font-heading font-bold uppercase px-4 py-2 bg-muted/20 text-muted-foreground text-xs",children:M==="GK"?"Goalkeepers":M==="DEF"?"Defenders":M==="MID"?"Midfielders":"Forwards"}),i.jsx(ip,{sensors:_,collisionDetection:rp,onDragEnd:B,modifiers:[cp],children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/30",children:[i.jsx("th",{className:"w-10"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Name"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold text-center",children:"Pos"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold text-center",children:"Status"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold text-center",children:"Apps"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold text-center",children:"Goals"}),i.jsx("th",{className:"px-6 py-3 text-right"})]})}),i.jsx("tbody",{className:"divide-y divide-border bg-white text-sm",children:i.jsx(op,{items:z.map(H=>H.id),strategy:ap,disabled:!q,children:z.map(H=>i.jsx(doe,{player:H,handleEdit:L,handleDelete:F,handleToggleActive:R},H.id))})})]})})]},M)})}):i.jsx(ip,{sensors:_,collisionDetection:rp,onDragEnd:$,modifiers:[cp],children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/30",children:[i.jsx("th",{className:"w-10"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Staff Member"}),i.jsx("th",{className:"px-6 py-3 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold text-center",children:"Status"}),i.jsx("th",{className:"px-6 py-3 text-right"})]})}),i.jsx("tbody",{className:"divide-y divide-border bg-white text-sm",children:i.jsx(op,{items:I.map(M=>M.id),strategy:ap,disabled:!q,children:I==null?void 0:I.map(M=>i.jsx(hoe,{s:M,handleEdit:L,handleDelete:F,handleToggleActive:R},M.id))})})]})})})]}),i.jsx(zl,{open:E,onOpenChange:k,children:i.jsxs(Da,{className:"sm:max-w-[425px] font-body bg-white max-h-[90vh] overflow-y-auto",children:[i.jsx(Ia,{children:i.jsx(Fa,{className:"font-heading uppercase tracking-tight",children:S!=null&&S.id?`Edit ${y==="players"?"Player":"Staff"}`:`Add New ${y==="players"?"Player":"Staff"}`})}),S&&y==="players"?i.jsxs("div",{className:"grid gap-4 py-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Full Name"}),i.jsx(_e,{value:S.name,onChange:M=>A({...S,name:M.target.value}),className:"font-heading uppercase text-sm"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Position"}),i.jsxs("select",{value:S.position,onChange:M=>A({...S,position:M.target.value}),className:"w-full bg-white border border-input rounded-md px-3 h-10 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading uppercase",children:[i.jsx("option",{children:"GK"}),i.jsx("option",{children:"DEF"}),i.jsx("option",{children:"MID"}),i.jsx("option",{children:"FWD"})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Appearances"}),i.jsx(_e,{type:"number",value:S.appearances,onChange:M=>A({...S,appearances:parseInt(M.target.value)||0})})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Goals"}),i.jsx(_e,{type:"number",value:S.goals,onChange:M=>A({...S,goals:parseInt(M.target.value)||0})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Assists"}),i.jsx(_e,{type:"number",value:S.assists,onChange:M=>A({...S,assists:parseInt(M.target.value)||0})})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(Si,{label:"Photo (Saved to IONOS)",value:S.photo_url,onChange:M=>A({...S,photo_url:M}),className:"mb-2"}),S.photo_url&&i.jsxs("div",{className:"flex items-center gap-2 text-[9px] text-muted-foreground bg-muted/30 p-2 rounded border border-border/50",children:[i.jsx(ll,{size:12}),i.jsx("span",{className:"truncate max-w-[200px]",children:S.photo_url})]})]}),i.jsxs("div",{className:"flex items-center gap-3 bg-muted/40 px-3 py-2.5 rounded-lg border border-border/50",children:[i.jsx(He,{htmlFor:"player-is-captain",className:"font-heading text-[10px] uppercase tracking-widest cursor-pointer select-none",children:"Is Captain?"}),i.jsx(cs,{id:"player-is-captain",checked:S.is_captain||!1,onCheckedChange:M=>A({...S,is_captain:M})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Biography"}),i.jsx("textarea",{value:S.bio||"",onChange:M=>A({...S,bio:M.target.value}),className:"w-full bg-white border border-input rounded-md px-3 py-2 text-sm focus:ring-1 focus:ring-primary focus:outline-none font-body min-h-[100px] resize-y",placeholder:"Enter player biography..."})]}),i.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-border",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Sort Order"}),i.jsx(_e,{type:"number",value:S.order_index,onChange:M=>A({...S,order_index:parseInt(M.target.value)||0}),className:"w-16 h-8 text-xs font-mono text-center"})]})]}):S&&i.jsxs("div",{className:"grid gap-4 py-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Full Name"}),i.jsx(_e,{value:S.name,onChange:M=>A({...S,name:M.target.value}),className:"font-heading uppercase text-sm"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Role"}),i.jsx(_e,{value:S.role,onChange:M=>A({...S,role:M.target.value}),placeholder:"e.g. First Team Coach",className:"font-heading uppercase text-sm"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(Si,{label:"Photo (Saved to IONOS)",value:S.image_url,onChange:M=>A({...S,image_url:M}),className:"mb-2"}),S.image_url&&i.jsxs("div",{className:"flex items-center gap-2 text-[9px] text-muted-foreground bg-muted/30 p-2 rounded border border-border/50",children:[i.jsx(ll,{size:12}),i.jsx("span",{className:"truncate max-w-[200px]",children:S.image_url})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Biography"}),i.jsx("textarea",{value:S.bio||"",onChange:M=>A({...S,bio:M.target.value}),className:"w-full bg-white border border-input rounded-md px-3 py-2 text-sm focus:ring-1 focus:ring-primary focus:outline-none font-body min-h-[100px] resize-y",placeholder:"Enter staff biography..."})]}),i.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-border",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Sort Order"}),i.jsx(_e,{type:"number",value:S.order_index,onChange:M=>A({...S,order_index:parseInt(M.target.value)||0}),className:"w-16 h-8 text-xs font-mono text-center"})]})]}),i.jsxs(La,{className:"pt-4 border-t border-border mt-2",children:[i.jsx(le,{variant:"outline",onClick:()=>k(!1),className:"font-heading uppercase tracking-widest text-[10px] flex-1 h-10",children:"Cancel"}),i.jsxs(le,{onClick:U,disabled:C,className:"font-heading uppercase tracking-widest text-[10px] flex-1 h-10 gap-2",children:[C?i.jsx(Ie,{className:"w-4 h-4 animate-spin"}):i.jsx(wi,{size:14}),"Save ",y==="players"?"Player":"Staff"]})]})]})})]})},poe=()=>{const{data:e,isLoading:t,refetch:n}=hd(),[r,s]=N.useState(""),[a,o]=N.useState(!1),[l,c]=N.useState(null),[u,d]=N.useState(!1),[h,f]=N.useState([]);N.useEffect(()=>{e&&f(e)},[e]);const p=h.filter(w=>w.name.toLowerCase().includes(r.toLowerCase())||w.tier.toLowerCase().includes(r.toLowerCase())),x=async w=>{f(w);try{const j=w.map((k,S)=>({id:k.id,name:k.name,logo_url:k.logo_url,tier:k.tier,website_url:k.website_url,
1085is_visible:k.is_visible!==!1,position:S+1})),{error:E}=await ue.from("sponsors").upsert(j);if(E)throw E}catch(j){console.error("Reorder failed:",j),ie.error("Failed to save new order"),n()}},m=w=>{c({...w,is_visible:w.is_visible!==!1}),o(!0)},y=()=>{c({name:"",tier:"Classic",logo_url:"",website_url:"",is_visible:!0,position:((e==null?void 0:e.length)||0)+1}),o(!0)},g=async w=>{const j=h.find(k=>k.id===w);if(!window.confirm("Are you sure you want to remove this sponsor?"))return;const{error:E}=await ue.from("sponsors").delete().eq("id",w);E?ie.error("Failed to delete sponsor"):(j!=null&&j.logo_url&&await gd(j.logo_url),ie.success("Sponsor removed"),n())},v=async()=>{d(!0);try{if(l.id){const{error:w}=await ue.from("sponsors").update(l).eq("id",l.id);if(w)throw w;ie.success("Sponsor details updated")}else{const{error:w}=await ue.from("sponsors").insert([l]);if(w)throw w;ie.success("New sponsor added")}o(!1),n()}catch(w){ie.error(w.message||"Failed to save sponsor")}finally{d(!1)}};if(t)return i.jsx("div",{className:"h-[60vh] flex items-center justify-center",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})});const b=async w=>{try{const j=w.is_visible===!1,{error:E}=await ue.from("sponsors").update({is_visible:j}).eq("id",w.id);if(E)throw E;ie.success(`${w.name} is now ${j?"visible":"hidden"}`),n()}catch(j){console.error(j),ie.error(j.message||"Failed to update visibility")}};return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:"Our Partners"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage the club's sponsors and their website links."})]}),i.jsxs(le,{onClick:y,className:"font-heading uppercase tracking-widest text-xs gap-2",children:[i.jsx(vs,{size:16})," Add Sponsor"]})]}),i.jsxs(B7,{axis:"y",values:h,onReorder:x,className:"grid grid-cols-1 gap-4",children:[p.map(w=>i.jsx(X7,{value:w,className:"w-full",children:i.jsx(moe,{sponsor:w,onEdit:()=>m(w),onDelete:()=>g(w.id),onToggleVisibility:()=>b(w)})},w.id)),p.length===0&&i.jsxs("div",{className:"col-span-full py-12 text-center text-muted-foreground text-sm flex flex-col items-center gap-2",children:[i.jsx(Ju,{size:40,className:"opacity-10"}),i.jsx("p",{children:"No sponsors found. Add your first partner to get started."})]})]}),i.jsx(zl,{open:a,onOpenChange:o,children:i.jsxs(Da,{className:"sm:max-w-[425px] font-body bg-white",children:[i.jsx(Ia,{children:i.jsx(Fa,{className:"font-heading uppercase tracking-tight",children:l!=null&&l.id?"Edit Sponsor":"Add Sponsor"})}),l&&i.jsxs("div",{className:"grid gap-4 py-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Sponsor Name"}),i.jsx(_e,{value:l.name,onChange:w=>c({...l,name:w.target.value}),placeholder:"e.g. TerraPura Ground"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(Si,{label:"Logo (Saved to IONOS)",value:l.logo_url,onChange:w=>c({...l,logo_url:w}),className:"mb-2"}),l.logo_url&&i.jsxs("div",{className:"flex items-center gap-2 text-[9px] text-muted-foreground bg-muted/30 p-2 rounded border border-border/50",children:[i.jsx(goe,{size:12}),i.jsx("span",{className:"truncate max-w-[200px]",children:l.logo_url})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Sponsorship Tier"}),i.jsxs("select",{value:l.tier,onChange:w=>c({...l,tier:w.target.value}),className:"w-full bg-background border border-input rounded-md px-3 h-10 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading uppercase",children:[i.jsx("option",{children:"Elite"}),i.jsx("option",{children:"Prestige"}),i.jsx("option",{children:"Signature"}),i.jsx("option",{children:"Classic"})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Website URL (Optional)"}),i.jsx(_e,{placeholder:"https://...",value:l.website_url,onChange:w=>c({...l,website_url:w.target.value})})]})]}),i.jsxs("div",{className:"flex items-center justify-between bg-slate-50 border border-slate-200/80 rounded-lg p-3 mt-2",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(He,{htmlFor:"sponsor-visible",className:"text-xs font-heading font-bold uppercase tracking-wider cursor-pointer",children:"Visible on Website"}),i.jsx("p",{className:"text-[10px] text-muted-foreground leading-none font-body",children:"Toggle if this partner shows on public pages."})]}),i.jsx(cs,{id:"sponsor-visible",checked:l.is_visible!==!1,onCheckedChange:w=>c({...l,is_visible:w})})]})]}),i.jsxs(La,{children:[i.jsx(le,{variant:"outline",onClick:()=>o(!1),className:"font-heading uppercase tracking-widest text-xs",children:"Cancel"}),i.jsxs(le,{onClick:v,disabled:u,className:"font-heading uppercase tracking-widest text-xs gap-2",children:[u?i.jsx(Ie,{className:"w-4 h-4 animate-spin"}):i.jsx(wi,{size:16}),"Save Sponsor"]})]})]})})]})},moe=({sponsor:e,onEdit:t,onDelete:n,onToggleVisibility:r})=>{const s=e.is_visible===!1;return i.jsxs("div",{className:`bg-card border border-border rounded-xl p-4 shadow-sm flex items-center gap-4 group cursor-default transition-all ${s?"bg-slate-50/50 border-dashed opacity-65":""}`,children:[i.jsx("div",{className:"cursor-grab active:cursor-grabbing text-muted-foreground
1085/30 hover:text-muted-foreground transition-colors p-1",children:i.jsx(Ta,{size:20})}),i.jsx("div",{className:"w-20 h-12 flex items-center justify-center bg-muted/20 rounded border border-border/50 shrink-0",children:e.logo_url?i.jsx("img",{src:e.logo_url,alt:e.name,className:`max-h-10 max-w-full object-contain ${s?"grayscale":""}`}):i.jsx(Ju,{className:"text-muted-foreground/10",size:20})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h3",{className:`font-heading text-sm font-bold uppercase tracking-tight truncate ${s?"text-slate-400 line-through":""}`,children:e.name}),i.jsx("span",{className:`px-2 py-0.5 rounded text-[8px] font-heading uppercase font-bold tracking-widest shrink-0 ${s?"bg-slate-200 text-slate-400":e.tier==="Elite"?"bg-club-dark text-primary-foreground":e.tier==="Prestige"?"club-gradient text-primary-foreground":e.tier==="Signature"?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:e.tier}),s&&i.jsx("span",{className:"bg-red-50 text-red-600 border border-red-200 text-[8px] font-heading uppercase px-1.5 py-0.5 rounded tracking-wide",children:"Hidden"})]}),e.website_url&&i.jsx("p",{className:"text-[10px] text-muted-foreground truncate opacity-60",children:e.website_url})]}),i.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity pr-2",children:[i.jsx(le,{variant:"ghost",size:"sm",onClick:r,className:`h-8 w-8 p-0 ${s?"text-slate-400 hover:text-slate-600":"text-slate-600 hover:text-primary"}`,title:s?"Show on website":"Hide from website",children:s?i.jsx(al,{size:14}):i.jsx(ol,{size:14})}),i.jsx(le,{variant:"ghost",size:"sm",onClick:t,className:"h-8 w-8 p-0",children:i.jsx(Aa,{size:14})}),i.jsx(le,{variant:"ghost",size:"sm",onClick:n,className:"h-8 w-8 p-0 text-red-600 hover:text-red-700",children:i.jsx(Pi,{size:14})})]})]})},goe=({className:e,size:t})=>i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[i.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),i.jsx("circle",{cx:"9",cy:"9",r:"2"}),i.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]});var lw="Radio",[xoe,N4]=zn(lw),[yoe,voe]=xoe(lw),k4=N.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:a,disabled:o,value:l="on",onCheck:c,form:u,...d}=e,[h,f]=N.useState(null),p=Ge(t,y=>f(y)),x=N.useRef(!1),m=h?u||!!h.closest("form"):!0;return i.jsxs(yoe,{scope:n,checked:s,disabled:o,children:[i.jsx(Oe.button,{type:"button",role:"radio","aria-checked":s,"data-state":C4(s),"data-disabled":o?"":void 0,disabled:o,value:l,...d,ref:p,onClick:xe(e.onClick,y=>{s||c==null||c(),m&&(x.current=y.isPropagationStopped(),x.current||y.stopPropagation())})}),m&&i.jsx(E4,{control:h,bubbles:!x.current,name:r,value:l,checked:s,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});k4.displayName=lw;var S4="RadioIndicator",_4=N.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,a=voe(S4,n);return i.jsx(Bn,{present:r||a.checked,children:i.jsx(Oe.span,{"data-state":C4(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t})})});_4.displayName=S4;var boe="RadioBubbleInput",E4=N.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...s},a)=>{const o=N.useRef(null),l=Ge(o,a),c=K0(n),u=Ip(t);return N.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&p){const x=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(x)}},[c,n,r]),i.jsx(Oe.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});E4.displayName=boe;function C4(e){return e?"checked":"unchecked"}var woe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sm="RadioGroup",[joe,ile]=zn(Sm,[Rl,N4]),T4=Rl(),A4=N4(),[Noe,koe]=joe(Sm),P4=N.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:a,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:h,...f}=e,p=T4(n),x=rm(u),[m,y]=Ai({prop:a,defaultProp:s??null,onChange:h,caller:Sm});return i.jsx(Noe,{scope:n,name:r,required:o,disabled:l,value:m,onValueChange:y,children:i.jsx(M0,{asChild:!0,...p,orientation:c,dir:x,loop:d,children:i.jsx(Oe.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:x,...f,ref:t})})})});P4.displayName=Sm;var O4="RadioGroupItem",R4=N.forwardRef((e,t)=>
vendor: 4,383 bytes, line 1085
1085{const{__scopeRadioGroup:n,disabled:r,...s}=e,a=koe(O4,n),o=a.disabled||r,l=T4(n),c=A4(n),u=N.useRef(null),d=Ge(t,u),h=a.value===s.value,f=N.useRef(!1);return N.useEffect(()=>{const p=m=>{woe.includes(m.key)&&(f.current=!0)},x=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",x)}},[]),i.jsx(D0,{asChild:!0,...l,focusable:!o,active:h,children:i.jsx(k4,{disabled:o,required:a.required,checked:h,...c,...s,name:a.name,ref:d,onCheck:()=>a.onValueChange(s.value),onKeyDown:xe(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:xe(s.onFocus,()=>{var p;f.current&&((p=u.current)==null||p.click())})})})});R4.displayName=O4;var Soe="RadioGroupIndicator",M4=N.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=A4(n);return i.jsx(_4,{...s,...r,ref:t})});M4.displayName=Soe;var D4=P4,I4=R4,_oe=M4;const Gh=N.forwardRef(({className:e,...t},n)=>i.jsx(D4,{className:Pe("grid gap-2",e),...t,ref:n}));Gh.displayName=D4.displayName;const Vi=N.forwardRef(({className:e,...t},n)=>i.jsx(I4,{ref:n,className:Pe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(_oe,{className:"flex items-center justify-center",children:i.jsx(ME,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Vi.displayName=I4.displayName;var _m="Tabs",[Eoe,ale]=zn(_m,[Rl]),L4=Rl(),[Coe,cw]=Eoe(_m),F4=N.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=rm(l),[h,f]=Ai({prop:r,onChange:s,defaultProp:a??"",caller:_m});return i.jsx(Coe,{scope:n,baseId:da(),value:h,onValueChange:f,orientation:o,dir:d,activationMode:c,children:i.jsx(Oe.div,{dir:d,"data-orientation":o,...u,ref:t})})});F4.displayName=_m;var $4="TabsList",z4=N.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,a=cw($4,n),o=L4(n);return i.jsx(M0,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:i.jsx(Oe.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:t})})});z4.displayName=$4;var B4="TabsTrigger",U4=N.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...a}=e,o=cw(B4,n),l=L4(n),c=W4(o.baseId,r),u=H4(o.baseId,r),d=r===o.value;return i.jsx(D0,{asChild:!0,...l,focusable:!s,active:d,children:i.jsx(Oe.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...a,ref:t,onMouseDown:xe(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:xe(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:xe(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!s&&h&&o.onValueChange(r)})})})});U4.displayName=B4;var q4="TabsContent",V4=N.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:a,...o}=e,l=cw(q4,n),c=W4(l.baseId,r),u=H4(l.baseId,r),d=r===l.value,h=N.useRef(d);return N.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),i.jsx(Bn,{present:s||d,children:({present:f})=>i.jsx(Oe.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:f&&a})})});V4.displayName=q4;function W4(e,t){return`${e}-trigger-${t}`}function H4(e,t){return`${e}-content-${t}`}var Toe=F4,K4=z4,G4=U4,Y4=V4;const Aoe=Toe,X4=N.forwardRef(({className:e,...t},n)=>i.jsx(K4,{ref:n,className:Pe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));X4.displayName=K4.displayName;const Ev=N.forwardRef(({className:e,...t},n)=>i.jsx(G4,{ref:n,className:Pe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));
1085Ev.displayName=G4.displayName;const Q4=N.forwardRef(({className:e,...t},n)=>i.jsx(Y4,{ref:n,className:Pe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Q4.displayName=Y4.displayName;const Poe={fixtures:"Results & Fixtures",news:"Latest News",table:"League Table",videos:"Videos Section",discover:"Discover Section",sponsors:"Sponsors Bar"},Ooe=({id:e,label:t})=>{const{attributes:n,listeners:r,setNodeRef:s,transform:a,transition:o,isDragging:l}=km({id:e}),c={transform:_i.Transform.toString(a),transition:o,zIndex:l?50:0,position:"relative",opacity:l?.8:1};return i.jsxs("div",{ref:s,style:c,className:`flex items-center gap-3 p-3 bg-white border border-border rounded-lg mb-2 ${l?"shadow-md ring-2 ring-primary/20":""}`,children:[i.jsx("div",{...n,...r,className:"cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded text-muted-foreground transition-colors",children:i.jsx(Ta,{size:18})}),i.jsx("span",{className:"font-heading uppercase tracking-widest text-sm",children:t})]})},Roe=()=>{const{data:e,isLoading:t,refetch:n}=dt("homepage_hero"),{data:r,isLoading:s,refetch:a}=dt("fixtures_ticker"),{data:o,isLoading:l,refetch:c}=dt("club_brand"),{data:u,isLoading:d,refetch:h}=dt("club_socials"),{data:f,isLoading:p,refetch:x}=dt("shop_settings"),{data:m,isLoading:y,refetch:g}=dt("homepage_layout"),v=["fixtures","news","table","videos","discover","sponsors"],[b,w]=N.useState(v),j=sw(ml(wd,{activationConstraint:{distance:8}}),ml(bd,{coordinateGetter:ow})),E=V=>{const{active:W,over:M}=V;!M||W.id===M.id||w(z=>{const H=z.indexOf(W.id),G=z.indexOf(M.id);return _a(z,H,G)})},[k,S]=N.useState("match"),[A,C]=N.useState({background_type:"image",background_color:"#8e160b",custom_image_url:"",image_position:50,hero_size:"compact"}),[T,_]=N.useState({background_type:"image",background_color:"#8e160b",custom_image_url:"",image_position:50,hero_size:"standard"}),[P,O]=N.useState(""),[I,B]=N.useState(!0),[$,q]=N.useState(!1),[L,D]=N.useState(!1),[R,F]=N.useState({facebook:"",instagram:"",twitter:"",youtube:"",tiktok:"",linkedin:""});N.useEffect(()=>{if(e!=null&&e.value){S(e.value.mode||"match");const V=W=>({background_type:W.background_type||"image",background_color:W.background_color||"#8e160b",custom_image_url:W.custom_image_url||"",image_position:W.image_position!==void 0?W.image_position:50,hero_size:W.hero_size||"standard"});e.value.mobile?C(V(e.value.mobile)):C(V(e.value)),e.value.desktop?_(V(e.value.desktop)):_(V(e.value))}},[e]),N.useEffect(()=>{(r==null?void 0:r.value)!==void 0&&B(r.value.enabled??!0)},[r]),N.useEffect(()=>{(f==null?void 0:f.value)!==void 0&&q(f.value.coming_soon??!1)},[f]),N.useEffect(()=>{o!=null&&o.value&&O(o.value.logo_url||"")},[o]),N.useEffect(()=>{u!=null&&u.value&&F({facebook:u.value.facebook||"",instagram:u.value.instagram||"",twitter:u.value.twitter||"",youtube:u.value.youtube||"",tiktok:u.value.tiktok||"",linkedin:u.value.linkedin||""})},[u]),N.useEffect(()=>{if(m!=null&&m.value&&Array.isArray(m.value)){const W=m.value.filter(z=>v.includes(z)),M=v.filter(z=>!W.includes(z));w([...W,...M])}else w(v)},[m]);const U=async()=>{D(!0);try{const V={mode:k,mobile:A,desktop:T},{data:W,error:M}=await ue.from("site_settings").update({value:V,updated_at:new Date().toISOString()}).eq("key","homepage_hero").select();if(M)throw M;if(!W||W.length===0){const{error:ee}=await ue.from("site_settings").insert({key:"homepage_hero",value:V}
1085);if(ee)throw ee}const z={enabled:I},{data:H,error:G}=await ue.from("site_settings").update({value:z,updated_at:new Date().toISOString()}).eq("key","fixtures_ticker").select();if(G)throw G;if(!H||H.length===0){const{error:ee}=await ue.from("site_settings").insert({key:"fixtures_ticker",value:z});if(ee)throw ee}const Y={coming_soon:$},{data:Z,error:J}=await ue.from("site_settings").update({value:Y,updated_at:new Date().toISOString()}).eq("key","shop_settings").select();if(J)throw J;if(!Z||Z.length===0){const{error:ee}=await ue.from("site_settings").insert({key:"shop_settings",value:Y});if(ee)throw ee}const oe={logo_url:P||null},{data:de,error:ye}=await ue.from("site_settings").update({value:oe,updated_at:new Date().toISOString()}).eq("key","club_brand").select();if(ye)throw ye;if(!de||de.length===0){const{error:ee}=await ue.from("site_settings").insert({key:"club_brand",value:oe});if(ee)throw ee}const{data:ve,error:Ee}=await ue.from("site_settings").update({value:R,updated_at:new Date().toISOString()}).eq("key","club_socials").select();if(Ee)throw Ee;if(!ve||ve.length===0){const{error:ee}=await ue.from("site_settings").insert({key:"club_socials",value:R});if(ee)throw ee}const{data:X,error:Q}=await ue.from("site_settings").update({value:b,updated_at:new Date().toISOString()}).eq("key","homepage_layout").select();if(Q)throw Q;if(!X||X.length===0){const{error:ee}=await ue.from("site_settings").insert({key:"homepage_layout",value:b});if(ee)throw ee}ie.success("Settings updated successfully"),n(),a(),g(),x(),c(),h()}catch(V){console.error("Save failed:",V),ie.error("Failed to update settings")}finally{D(!1)}};return t||s||l||d||p||y?i.jsx("div",{className:"flex h-[400px] items-center justify-center",children:i.jsx(Ie,{className:"h-8 w-8 animate-spin text-primary"})}):i.jsxs("div",{className:"space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-700",children:[i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[i.jsx(Op,{size:20}),i.jsx("span",{className:"font-heading text-sm uppercase tracking-widest font-bold",children:"System Configuration"})]}),i.jsx("h1",{className:"font-heading text-4xl font-bold uppercase tracking-tight text-foreground",children:"Site Settings"}),i.jsx("p",{className:"text-muted-foreground text-sm max-w-2xl font-body",children:"Manage your homepage appearance, hero layouts, and global branding assets."})]}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[i.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[i.jsxs(es,{className:"border-border/50 shadow-sm overflow-hidden bg-card",children:[i.jsx(ts,{className:"bg-muted/30 pb-6 border-b border-border/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:i.jsx(ll,{size:20})}),i.jsxs("div",{children:[i.jsx(ns,{className:"font-heading text-xl font-bold uppercase tracking-tight",children:"Brand Identity"}),i.jsx(Ui,{className:"text-xs",children:"Manage your club badge and branding assets."})]})]})}),i.jsx(rs,{className:"p-8",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 items-start",children:i.jsxs("div",{className:"space-y-4",children:[i.jsx(He,{className:"text-xs font-heading uppercase tracking-widest font-bold",children:"Current Club Badge"}),i.jsx("div",{className:"grid gap-2",children:i.jsx(Si,{label:"Club Logo (Saved to IONOS)",value:P,onChange:O})})]})})})]}),i.jsxs(es,{className:"border-border/50 shadow-sm overflow-hidden bg-card",children:[i.jsx(ts,{className:"bg-muted/30 pb-6",children:i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:i.jsx(gc,{size:20})}),i.jsxs("div",{children:[i.jsx(ns,{className:"font-heading text-xl font-bold uppercase tracking-tight",children:"Homepage Hero Mode"}),i.jsx(Ui,{className:"text-xs",children:"Choose what your fans see first when they land on the site."})]})]})}),i.jsx(rs,{className:"p-8",children:i.jsxs(Gh,{value:k,onValueChange:S,className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[i.jsxs("div",{children:[i.jsx(Vi,{value:"match",id:"match",className:"peer sr-only"}),i.jsxs(He,{htmlFor:"match",className:"flex flex-col items-center justify-between rounded-xl border-2 border-muted bg-popover p-6 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary transition-all cursor-pointer h-full",children:[i.jsx(gc,{className:"mb-4 h-8 w-8 text-muted-foreground"}),i.jsxs("div",{className:"text-center",children:[i.jsx("span",{className:"font-heading text-sm font-bold block mb-1 uppercase",children:"Match Only"}),i.jsx("span",{className:"text-[10px] text-muted-foreground leading-tight block",children:"Next fixture & countdown timer."})]})]})]}),i.jsxs("div",{children:[i.jsx(Vi,{value:"posts",id:"posts",className:"peer sr-only"}),i.jsxs(He,{htmlFor:"posts",className:"flex flex-col items-center justify-between rounded-xl border-2 border-muted bg-popover p-6 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary transition-all cursor-pointer h-full",children:[i.jsx(jf,{className:"mb-4 h-8 w-8 text-muted-foreground"}),i.jsxs("div",{className:"text-center",children:[i.jsx("span",{className:"font-heading text-sm font-bold block mb-1 uppercase",children:"Latest Posts"}),i.jsx("span",{className:"text-[10px] text-muted-foreground leading-tight block",children:"Auto-sliding post carousel."})]})]})]}),i.jsxs("div",{children:[i.jsx(Vi,{value:"combined",id:"combined",className:"peer sr-only"}),i.jsxs(He,{htmlFor:"combined",className:"flex flex-col items-center justify-between rounded-xl border-2 border-muted bg-popover p-6 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary [&:has([data-state=checked])]:border-primary transition-all cursor-pointer h-full",children:[i.jsxs("div",{className:"flex gap-2 mb-4",children:[i.jsx(gc,{className:"h-6 w-6 text-muted-foreground
1085/50"}),i.jsx(jf,{className:"h-6 w-6 text-muted-foreground/50"})]}),i.jsxs("div",{className:"text-center",children:[i.jsx("span",{className:"font-heading text-sm font-bold block mb-1 uppercase",children:"Combined"}),i.jsx("span",{className:"text-[10px] text-muted-foreground leading-tight block",children:"Match first, then slides to posts."})]})]})]})]})})]}),i.jsxs(es,{className:"border-border/50 shadow-sm overflow-hidden bg-white",children:[i.jsx(ts,{className:"bg-muted/30 pb-6 border-b border-border/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:i.jsx(T1,{size:20})}),i.jsxs("div",{children:[i.jsx(ns,{className:"font-heading text-xl font-bold uppercase tracking-tight",children:"Hero Customization"}),i.jsx(Ui,{className:"text-xs",children:"Adjust layout and appearance for mobile and desktop independently."})]})]})}),i.jsx(rs,{className:"p-0",children:i.jsxs(Aoe,{defaultValue:"desktop",className:"w-full",children:[i.jsx("div",{className:"bg-muted/10 border-b border-border/40 px-8 py-2",children:i.jsxs(X4,{className:"bg-transparent gap-4",children:[i.jsxs(Ev,{value:"mobile",className:"data-[state=active]:bg-primary/10 data-[state=active]:text-primary font-heading text-[10px] uppercase tracking-widest gap-2",children:[i.jsx(eI,{size:14})," Mobile"]}),i.jsxs(Ev,{value:"desktop",className:"data-[state=active]:bg-primary/10 data-[state=active]:text-primary font-heading text-[10px] uppercase tracking-widest gap-2",children:[i.jsx(Y3,{size:14})," Desktop"]})]})}),["mobile","desktop"].map(V=>{const W=V==="mobile"?A:T,M=V==="mobile"?C:_;return i.jsxs(Q4,{value:V,className:"p-8 space-y-8 animate-in fade-in duration-300",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs(He,{className:"text-xs font-heading font-bold uppercase tracking-widest flex items-center gap-2",children:["Hero Vertical Size ",i.jsxs("span",{className:"text-[10px] text-muted-foreground lowercase font-normal italic",children:["(",V," only)"]})]}),i.jsx(Gh,{value:W.hero_size,onValueChange:z=>M(H=>({...H,hero_size:z})),className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:["compact","standard","large","fullscreen"].map(z=>i.jsxs("div",{children:[i.jsx(Vi,{value:z,id:`${V}-size-${z}`,className:"peer sr-only"}),i.jsx(He,{htmlFor:`${V}-size-${z}`,className:"flex flex-col items-center justify-center rounded-xl border-2 border-muted bg-popover py-4 px-2 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary transition-all cursor-pointer h-full",children:i.jsx("span",{className:"font-heading text-sm font-bold block mb-1 uppercase",children:z})})]},z))})]}),i.jsxs("div",{className:"space-y-6 pt-4 border-t border-border/40",children:[i.jsxs(Gh,{value:W.background_type,onValueChange:z=>M(H=>({...H,background_type:z})),className:"flex gap-6 mb-2",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Vi,{value:"image",id:`${V}-bg-image`}),i.jsx(He,{htmlFor:`${V}-bg-image`,className:"font-heading uppercase tracking-widest text-sm cursor-pointer",children:"Photo Background"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Vi,{value:"color",id:`${V}-bg-color`}),i.jsx(He,{htmlFor:`${V}-bg-color`,className:"font-heading uppercase tracking-widest text-sm cursor-pointer",children:"Solid Color"})]})]}),W.background_type==="color"&&i.jsxs("div",{className:"space-y-4 animate-in fade-in slide-in-from-top-2",children:[i.jsx(He,{className:"text-xs font-heading font-bold uppercase tracking-widest",children:"Select Backgroun
1085d Color"}),i.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[i.jsxs(le,{variant:W.background_color==="#8e160b"?"default":"outline",className:"gap-2 font-heading uppercase tracking-widest text-[10px]",onClick:()=>M(z=>({...z,background_color:"#8e160b"})),children:[i.jsx("div",{className:"w-3 h-3 rounded-full bg-[#8e160b]"})," Whitehawk Red"]}),i.jsxs(le,{variant:W.background_color==="#141b2b"?"default":"outline",className:"gap-2 font-heading uppercase tracking-widest text-[10px]",onClick:()=>M(z=>({...z,background_color:"#141b2b"})),children:[i.jsx("div",{className:"w-3 h-3 rounded-full bg-[#141b2b]"})," Club Black"]}),i.jsxs("div",{className:"flex items-center gap-3 border border-border rounded-md px-3 py-1.5 h-10 bg-muted/20",children:[i.jsx("span",{className:"text-[10px] font-heading font-bold uppercase tracking-widest text-muted-foreground mt-0.5",children:"Custom Hex:"}),i.jsx("input",{type:"color",value:W.background_color,onChange:z=>M(H=>({...H,background_color:z.target.value})),className:"w-6 h-6 p-0 border-0 rounded cursor-pointer bg-transparent shadow-none appearance-none"})]})]})]}),W.background_type==="image"&&i.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-top-2",children:[i.jsx("div",{className:"grid gap-2",children:i.jsx(Si,{label:"Custom Background (Saved to IONOS)",value:W.custom_image_url||"",onChange:z=>M(H=>({...H,custom_image_url:z}))})}),i.jsxs("div",{className:"space-y-4 pt-4 border-t border-border/40",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx(He,{className:"text-xs font-heading uppercase tracking-widest font-bold",children:"Image Vertical Positioning"}),i.jsxs("span",{className:"text-xs font-body text-muted-foreground",children:[W.image_position,"%"]})]}),i.jsx("input",{type:"range",min:"0",max:"100",value:W.image_position,onChange:z=>M(H=>({...H,image_position:parseInt(z.target.value)})),className:"w-full accent-[#8e160b]"}),i.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground uppercase font-heading tracking-widest",children:[i.jsx("span",{children:"Top"}),i.jsx("span",{children:"Center"}),i.jsx("span",{children:"Bottom"})]})]})]})]})]},V)})]})})]}),i.jsxs(es,{className:"border-border/50 shadow-sm overflow-hidden bg-card",children:[i.jsx(ts,{className:"bg-muted/30 pb-6 border-b border-border/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:i.jsx(T1,{size:20})}),i.jsxs("div",{children:[i.jsx(ns,{className:"font-heading text-xl font-bold uppercase tracking-tight",children:"Homepage Section Order"}),i.jsx(Ui,{className:"text-xs",children:"Drag and drop to reorder sections on the public homepage."})]})]})}),i.jsx(rs,{className:"p-8",children:i.jsx(ip,{sensors:j,collisionDetection:rp,onDragEnd:E,modifiers:[cp],children:i.jsx(op,{items:b,strategy:ap,children:b.map(V=>i.jsx(Ooe,{id:V,label:Poe[V]||V},V))})})})]}),i.jsxs(es,{className:"border-border/50 shadow-sm overflow-hidden bg-card",children:[i.jsx(ts,{className:"bg-muted/30 pb-6 border-b border-border/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:i.jsx(gc,{size:20})}),i.jsxs("div",{children:[i.jsx(ns,{className:"font-heading text-xl font-bold uppercase tracking-tight",children:"Global Components"}),i.jsx(Ui,{className:"text-xs",children:"Toggle global design elements across the public site."})]})]})}),i.jsxs(rs,{className:"p-8 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(He,{className:"text-sm font-heading font-bold uppercase tracking-wider",children:"Fixtures Ticker Bar"}),i.jsx("p",{className:"text-xs text-muted-foreground font-body leading-tight",children:"Shows next match and club shouts scrolling at the top."})]}),i.jsx(cs,{checked:I,onCheckedChange:B})]}),i.jsxs("div",{className:"border-t border-border/40 pt-6 flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(He,{className:"text-sm font-heading font-bold uppercase tracking-wider",children:"Shop Coming Soon"}),i.jsx("p",{className:"text-xs text-muted-foreground font-body leading-tight",children:"Enables a coming soon page overlay on the public shop page."})]}),i.jsx(cs,{checked:$,onCheckedChange:q})]})]})]}),i.jsxs(es,{className:"border-border/50 shadow-sm overflow-hidden bg-card",children:[i.jsx(ts,{className:"bg-muted/30 pb-6 border-b border-border/50",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:i.jsx($E,{size:20})}),i.jsxs("div",{children:[i.jsx(ns,{className:"font-heading text-xl font-bold uppercase tracking-tight",children:"Social Media"}),i.jsx(Ui,{className:"text-xs",children:"Links appear in the footer. Leave blank to hide an icon."})]})]})}),i.jsx(rs,{className:"p-8",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[{key:"facebook",label:"Facebook",placeholder:"https://facebook.com/whitehawkfc"},{key:"instagram",label:"Instagram",placeholder:"https://instagram.com/whitehawkfc"},{key:"twitter",label:"X / Twitter",placeholder:"https://x.com/whitehawkfc"},{key:"youtube",label:"YouTube",placeholder:"https://youtube.com/@whitehawkfc"},{key:"tiktok",label:"TikTok",placeholder:"https://tiktok.com/@whitehawkfc"},{key:"linkedin",label:"LinkedIn",placeholder:"https://linkedin.com/company/whitehawk-fc"}].map(({key:V,label:W,placeholder:M})=>i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(He,{className:"text-[10px] font-heading uppercase tracking-widest font-bold",children:W}),i.jsx(_e,{placeholder:M,value:R[V],onChange:z=>F(H=>({...H,[V]:z.target.value})),className:"font-body text-sm h-10"})]},V))})})]})]}),i.jsx("div",{className:"space-y-6",children:i.jsxs(es,{className:"border-border/50 sticky top-24",children:[i.jsx(ts,{className:"bg-primary/5 border-b border-primary/10",children:i.jsxs(ns,{className:"font-heading text-sm font-bold uppercase tracking-widest text-primary flex items-center gap-2",children:[i.jsx(wi,{size:16})," Actions"]})}),i.jsxs(rs,{className:"p-6 space-y-4",children:[i.jsxs(le,{onClick:U,disabled:L,className:"w-full font-heading uppercase tracking-widest text-xs h-12 gap-2",children:[L?i.jsx(Ie,{className:"h-4 w-4 animate-spin"}):i.jsx(wi,{size:16}),"Save All Changes"]}),i.jsx("div",{className:"rounded-lg bg-muted/50 p-4 border border-border",children:i.jsxs("div",{className:"flex gap-3",children:[i.jsx(C3,{className:"text-green-600 shrink-0 mt-0.5",size:16}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-[10px] font-bold uppercase tracking-widest mb-1",children:"Live Status"}),i.jsx("p",{className:"text-[11px] text-muted-foreground font-body leading-tight",children:"These settings are applied instantly to the production website after saving."})]})]})})]})]})})]})]})},Moe=async()=>{const n=`https://api.rss2json.com/v1/api.json?rss_url=${encodeURIComponent("https://www.youtube.com/feeds/videos.xml?channel_id=UCley7B4XSy1S-bd7Sed-SEw")}`,r=await fetch(n);if(!r.ok)throw new Error("Failed to fetch videos from YouTube");return(await r.json()).items.map(a=>{var c;const o=a.link.match(/(?:v=|\/shorts\/|youtu\.be\/|embed\/)([a-zA-Z0-9_-]{11})/),l=o?o[1]:((c=a.link.split("/").pop())==null?void 0:c.replace("watch?v=",""))||"";return{id:l,title:a.title,pubDate:new Date(a.pubDate),thumbnail:`https://img.youtube.com/vi/${l}/mqdefault.jpg`}})},Doe=()=>{const e=nd(),{data:t,isLoading:n}=Lt({queryKey:["admin-youtube-feed"],queryFn:Moe}),{data:r,isLoading:s}
1085=SP(),a=B8({mutationFn:({id:o,isHidden:l})=>oK(o,l),onSuccess:()=>{e.invalidateQueries({queryKey:["hidden-videos-v2"]}),ie.success("Video visibility updated")},onError:o=>{console.error("TOGGLE_ERROR:",o),ie.error(`Error: ${o.message||"Failed to update"}`)}});return n||s?i.jsx("div",{className:"h-40 flex items-center justify-center",children:i.jsx(Ie,{className:"animate-spin text-primary",size:32})}):i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"bg-emerald-600 text-white p-2 text-xs font-bold text-center rounded animate-pulse mb-4",children:"CACHE-BUST: V4 READY (Shorts Support Added)"}),i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:"Manage Videos"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"Toggle which videos appear on the homepage."})]}),i.jsx("div",{className:"bg-card border border-border rounded-xl shadow-sm overflow-hidden",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-6",children:t==null?void 0:t.map(o=>{const l=r==null?void 0:r.includes(o.id);return i.jsxs("div",{className:`relative group bg-muted/20 border rounded-xl overflow-hidden transition-all duration-300 ${l?"opacity-50 border-dashed":"border-border shadow-sm"}`,children:[i.jsxs("div",{className:"aspect-video relative",children:[i.jsx("img",{src:o.thumbnail,alt:o.title,className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-black/40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:i.jsx("a",{href:`https://www.youtube.com/watch?v=${o.id}`,target:"_blank",rel:"noopener noreferrer",className:"p-2 bg-white/10 backdrop-blur-md rounded-full text-white hover:bg-white/20 transition-all",children:i.jsx(ua,{size:20})})}),l&&i.jsxs("div",{className:"absolute top-2 right-2 bg-red-600 text-white text-[10px] font-bold px-2 py-1 rounded-full uppercase tracking-widest flex items-center gap-1 shadow-lg",children:[i.jsx(al,{size:10})," Hidden"]})]}),i.jsxs("div",{className:"p-4",children:[i.jsx("h3",{className:"font-medium text-sm line-clamp-2 min-h-[2.5rem] mb-3",children:o.title}),i.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[i.jsx("span",{className:"text-[10px] text-muted-foreground uppercase",children:Ft(o.pubDate,"MMM d, yyyy")}),i.jsx(le,{size:"sm",variant:l?"default":"outline",className:`h-8 font-heading text-[10px] uppercase tracking-wider gap-2 ${l?"bg-club-gold hover:bg-club-gold/90 border-none":""}`,onClick:()=>a.mutate({id:o.id,isHidden:!!l}),disabled:a.isPending,children:l?i.jsxs(i.Fragment,{children:[i.jsx(ol,{size:14})," Show Video"]}):i.jsxs(i.Fragment,{children:[i.jsx(al,{size:14})," Hide Video"]})})]})]})]},o.id)})})}),i.jsxs("div",{className:"bg-muted/30 border border-dashed border-border rounded-lg p-6 flex items-center gap-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-club-dark text-white flex items-center justify-center shrink-0 shadow-lg",children:i.jsx(qE,{size:24})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"Automatic Sync"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"The list above is pulled directly from the Whitehawk FC YouTube channel. New uploads will appear here automatically."})]})]})]})},uw=N.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:Pe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
1085ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));uw.displayName="Textarea";const Ioe=({member:e,handleEdit:t,handleDelete:n,dragDisabled:r})=>{const{attributes:s,listeners:a,setNodeRef:o,transform:l,transition:c,isDragging:u}=km({id:e.id,disabled:r}),d={transform:_i.Transform.toString(l),transition:c,zIndex:u?50:0,position:"relative",opacity:u?.5:1};return i.jsxs("tr",{ref:o,style:d,className:`hover:bg-muted/30 transition-colors group ${u?"bg-white shadow-lg z-50":""}`,children:[i.jsx("td",{className:"w-10 px-0 pl-4 py-4",children:i.jsx("div",{...s,...a,className:`p-1 rounded text-muted-foreground/40 transition-colors ${r?"cursor-not-allowed opacity-20":"cursor-grab active:cursor-grabbing hover:bg-muted hover:text-muted-foreground"}`,children:i.jsx(Ta,{size:16})})}),i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-muted flex items-center justify-center overflow-hidden border border-border/50",children:e.image_url?i.jsx("img",{src:e.image_url,alt:e.name,className:"w-full h-full object-cover"}):i.jsx(Zt,{size:16,className:"text-muted-foreground/40"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-bold uppercase tracking-tight text-sm leading-none mb-1",children:e.name}),i.jsx("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground leading-none",children:e.role})]})]})}),i.jsx("td",{className:"px-6 py-4 text-xs font-medium",children:i.jsx("span",{className:"text-[10px] uppercase tracking-widest font-heading px-2 py-1 bg-muted rounded border border-border/50",children:e.department})}),i.jsx("td",{className:"px-6 py-4 text-center",children:i.jsx("span",{className:`text-[9px] uppercase tracking-widest font-heading font-bold px-2 py-0.5 rounded border ${e.type==="football"?"bg-blue-50 text-blue-700 border-blue-200":"bg-orange-50 text-orange-700 border-orange-200"}`,children:e.type})}),i.jsx("td",{className:"px-6 py-4 text-center",children:i.jsxs("div",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[9px] font-heading uppercase font-bold ${e.is_active?"text-green-600 bg-green-50":"text-red-500 bg-red-50"}`,children:[i.jsx("div",{className:`w-1 h-1 rounded-full ${e.is_active?"bg-green-600":"bg-red-500"}`}),e.is_active?"Active":"Hidden"]})}),i.jsx("td",{className:"px-6 py-4 text-right",children:i.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[i.jsx(le,{variant:"ghost",size:"sm",onClick:()=>t(e),className:"h-8 w-8 p-0",children:i.jsx(Aa,{size:14})}),i.jsx(le,{variant:"ghost",size:"sm",onClick:()=>n(e.id),className:"h-8 w-8 p-0 text-red-600 hover:text-red-700 hover:bg-red-50",children:i.jsx(Pi,{size:14})})]})})]})},Loe=()=>{const{data:e,isLoading:t,refetch:n}=nm(),[r,s]=N.useState([]),[a,o]=N.useState([]),[l,c]=N.useState(""),[u,d]=N.useState(!1),[h,f]=N.useState(null),[p,x]=N.useState(!1),[m,y]=N.useState("all"),g=sw(ml(wd,{activationConstraint:{distance:8}}),ml(bd,{coordinateGetter:ow}));N.useEffect(()=>{e&&(s(e.filter(C=>C.type==="club").sort((C,T)=>(C.order_index??0)-(T.order_index??0))),o(e.filter(C=>C.type==="football").sort((C,T)=>(C.order_index??0)-(T.order_index??0))))},[e]);const b=(m==="club"?r:m==="football"?a:[...r,...a]).filter(C=>l?C.name.toLowerCase().includes(l.toLowerCase())||C.role.toLowerCase().includes(l.toLowerCase())||C.department.toLowerCase().includes(l.toLowerCase()):!0),w=m!=="all"&&l==="",j=async C=>{const{active:T,over:_}=C;if(!(!_||T.id===_.id||!w)){if(m==="club"){const P=r.findIndex(B=>B.id===T.id),O=r.findIndex(B=>B.id===_.id);if(P===-1||O===-1)return;const I=_a(r,P,O);s(I);try{const B=I.map(($,q)=>({id:$.id,order_index:q}));await Wf("personnel",B),ie.success("Club order updated"),n()}catch{ie.error("Failed to save order"),s((e==null?void 0:e.filter(B=>B.type==="club").sort((B,$)=>(B.order_index??0)-($.order_index??0)))||[])}}else if(m==="football"){const P=a.findIndex(B=>B.id===T.id),O=a.findIndex(B=>B.id===_.id);if(P===-1||O===-1)return;const I=_a(a,P,O);o(I);try{const B=I.map(($,q)=>({id:$.id,order_index:q}));await Wf("personnel",B),ie.success("Football staff order updated"),n()}catch{ie.error("Failed to save order"),o((e==null?void 0:e.filter(B=>B.type==="football").sort((B,$)=>(B.order_index??0)-($.order_index??0)))||[])}}}},E=C=>{f(C),d(!0)},k=()=>{f({name:"",role:"",department:"Club Leadership",type:m==="football"?"football":"club",image_url:"",is_active:!0,is_honorary:!1,bi
1085o:"",order_index:((e==null?void 0:e.length)||0)+1}),d(!0)},S=async C=>{const T=e==null?void 0:e.find(P=>P.id===C);if(!window.confirm("Are you sure you want to delete this staff member?"))return;const{error:_}=await ue.from("personnel").delete().eq("id",C);_?ie.error("Failed to delete staff member"):(T!=null&&T.image_url&&await gd(T.image_url),ie.success("Staff member removed"),n())},A=async()=>{x(!0);try{if(h.id){const{error:C}=await ue.from("personnel").update(h).eq("id",h.id);if(C)throw C;ie.success("Staff member updated")}else{const{error:C}=await ue.from("personnel").insert([h]);if(C)throw C;ie.success("Staff member added")}d(!1),n()}catch(C){ie.error(C.message||"Failed to save staff member")}finally{x(!1)}};return t?i.jsx("div",{className:"h-[60vh] flex items-center justify-center",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:"Club Personnel"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage administrative and football staff members."})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"flex items-center bg-white border border-border rounded-lg p-1",children:[i.jsx(le,{variant:m==="all"?"default":"ghost",size:"sm",className:"font-heading text-[10px] uppercase tracking-widest h-8",onClick:()=>y("all"),children:"All"}),i.jsx(le,{variant:m==="club"?"default":"ghost",size:"sm",className:"font-heading text-[10px] uppercase tracking-widest h-8",onClick:()=>y("club"),children:"Club"}),i.jsx(le,{variant:m==="football"?"default":"ghost",size:"sm",className:"font-heading text-[10px] uppercase tracking-widest h-8",onClick:()=>y("football"),children:"Football"})]}),i.jsxs(le,{onClick:k,className:"font-heading uppercase tracking-widest text-xs gap-2",children:[i.jsx(vs,{size:16})," Add Member"]})]})]}),m==="all"&&i.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 flex items-center gap-3 text-blue-800 text-xs",children:[i.jsx(Kx,{size:16}),"Switch to ",i.jsx("strong",{className:"mx-1",children:"Club"})," or ",i.jsx("strong",{className:"mx-1",children:"Football"})," tab to drag & drop reorder each group independently."]}),m!=="all"&&l!==""&&i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 flex items-center gap-3 text-amber-800 text-xs",children:[i.jsx(Kx,{size:16}),"Clear the search to enable drag & drop reordering."]}),w&&i.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 flex items-center gap-3 text-green-800 text-xs",children:[i.jsx(Ta,{size:16}),"Drag the handle to reorder ",m==="club"?"club":"football"," staff. Changes save automatically."]}),i.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm overflow-hidden text-sm",children:[i.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-2 bg-white",children:[i.jsx(cl,{className:"text-muted-foreground",size:18}),i.jsx(_e,{placeholder:"Search by name, role or department...",value:l,onChange:C=>c(C.target.value),className:"border-none shadow-none focus-visible:ring-0 text-sm h-auto py-1"})]}),i.jsx("div",{className:"overflow-x-auto font-body",children:i.jsx(ip,{sensors:g,collisionDetection:rp,onDragEnd:j,modifiers:[cp],children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-border bg-muted/30",children:[i.jsx("th",{className:"w-10"}),i.jsx("th",{className:"px-6 py-4 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Staff Member"}),i.jsx("th",{className:"px-6 py-4 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold",children:"Department"}),i.jsx("th",{className:"px-6 py-4 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold text-center",children:"Type"}),i.jsx("th",{className:"px-6 py-4 font-heading text-[10px] uppercase tracking-widest text-muted-foreground font-semibold text-center",children:"Status"}),i.jsx("th",{className:"px-6 py-4 text-right"})]})}),i.jsxs("tbody",{className:"divide-y divide-border bg-white",children:[i.jsx(op,{items:b.map(C=>C.id),strategy:ap,disabled:!w,children:b==null?void 0:b.map(C=>i.jsx(Ioe,{member:C,handleEdit:E,handleDelete:S,dragDisabled:!w},C.id))}),(b==null?void 0:b.length)===0&&i.jsx("tr",{children:i.jsx("td",{colSpan:6,className:"px-6 py-12 text-center text-muted-foreground text-sm",children:"No staff members found matching your search."})})]})]})})})]}),i.jsx(zl,{open:u,onOpenChange:d,children:i.jsxs(Da,{className:"sm:max-w-[500px] font-body bg-white max-h-[90vh] overflow-y-auto",children:[i.jsx(Ia,{children:i.jsx(Fa,{className:"font-heading uppercase tracking-tight text-xl",children:h!=null&&h.id?"Edit Staff Member":"Add Staff Member"})}),h&&i.jsxs("div",{className:"grid gap-6 py-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Full Name"}),i.jsx(_e,{value:h.name,onChange:C=>f({...h,name:C.target.value}),placeholder:"Enter name",className:"font-heading uppercase text-sm"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Role"}),i.jsx(_e,{value:h.role,onChange:C=>f({...h,role:C.target.value}),placeholder:"e.g. Chairman",className:"font-heading uppercase text-sm"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Department"}),i.jsxs("select",{value:h.department,onChange:C=>f({...h,department:C.target.value}),className:"w-full bg-white border border-input rounded-md px-3 h-10 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading uppercase",children:[i.jsx("option",{children:"Club Leadership"}),i.jsx("option",{children:"Club Officers"}),i.jsx("option",{children:"Commercial, Media & Events"}),i.jsx("option",{children:"Club & Ground Operations"}),i.jsx("option",{children:"Matchday Operations"}),i.jsx("option",{children:"Club Ambassadors"}),i.jsx("option",{children:"Team Staff"})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Type"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(le,{type:"button",variant:h.type==="club"?"default":"outline",size:"sm",className:"flex-1 font-heading text-[10px] uppercase",onClick:()=>f({...h,type:"club"}),children:"Club"}),i.jsx(le,{type:"button",variant:h.type==="football"?"default":"outline",size:"sm",className:"flex-1 font-heading text-[10px] uppercase",onClick:()=>f({...h,type:"football"}),children:"Football"})]})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(Si,{label:"Staff Photo (Saved to IONOS)",value:h.image_url,onChange:C=>f({...h,image_url:C}),className:"mb-1"}),h.image_url&&i.jsxs("div",{className:"flex items-center gap-2 text-[9px] text-muted-foreground bg-muted/30 p-2 rounded border border-border/50",children:[i.jsx(ll,{size:12}),i.jsx("span",{className:"truncate max-w-[300px]",children:h.image_url})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Biography"}
1085),i.jsx(uw,{value:h.bio||"",onChange:C=>f({...h,bio:C.target.value}),placeholder:"Enter staff biography...",className:"min-h-[100px] text-sm"})]}),i.jsxs("div",{className:"flex items-center gap-4 pt-2 border-t border-border mt-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",id:"is_active_member",checked:h.is_active,onChange:C=>f({...h,is_active:C.target.checked}),className:"h-4 w-4 rounded border-border text-primary focus:ring-primary"}),i.jsx("label",{htmlFor:"is_active_member",className:"text-xs font-heading uppercase tracking-widest cursor-pointer",children:"Visible on Site"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",id:"is_honorary_member",checked:h.is_honorary||!1,onChange:C=>f({...h,is_honorary:C.target.checked}),className:"h-4 w-4 rounded border-border text-primary focus:ring-primary"}),i.jsx("label",{htmlFor:"is_honorary_member",className:"text-xs font-heading uppercase tracking-widest cursor-pointer text-amber-700",children:"Honorary Member"})]}),i.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Sort Order"}),i.jsx(_e,{type:"number",value:h.order_index,onChange:C=>f({...h,order_index:parseInt(C.target.value)||0}),className:"w-16 h-8 text-xs font-mono text-center"})]})]})]}),i.jsxs(La,{children:[i.jsx(le,{variant:"outline",onClick:()=>d(!1),className:"font-heading uppercase tracking-widest text-[10px] h-10 px-6",children:"Cancel"}),i.jsxs(le,{onClick:A,disabled:p,className:"font-heading uppercase tracking-widest text-[10px] h-10 px-6 gap-2",children:[p?i.jsx(Ie,{className:"w-4 h-4 animate-spin"}):i.jsx(wi,{size:14}),"Save Member"]})]})]})})]})},Foe=()=>{var A,C;const{data:e,isLoading:t,refetch:n}=_P(),{data:r,refetch:s}=dt("shop_settings"),[a,o]=N.useState(""),[l,c]=N.useState(!1),[u,d]=N.useState(null),[h,f]=N.useState(!1),[p,x]=N.useState(!1),m=((A=r==null?void 0:r.value)==null?void 0:A.coming_soon)??!1,y=async T=>{x(!0);try{const _={coming_soon:T},{data:P,error:O}=await ue.from("site_settings").update({value:_,updated_at:new Date().toISOString()}).eq("key","shop_settings").select();if(O)throw O;if(!P||P.length===0){const{error:I}=await ue.from("site_settings").insert({key:"shop_settings",value:_});if(I)throw I}ie.success(`Shop Coming Soon turned ${T?"ON":"OFF"}`),s()}catch(_){console.error(_),ie.error(_.message||"Failed to update shop status")}finally{x(!1)}},g=(e||[]).filter(T=>T.name.toLowerCase().includes(a.toLowerCase())||T.category.toLowerCase().includes(a.toLowerCase())),v=T=>{d(JSON.parse(JSON.stringify(T))),c(!0)},b=()=>{d({name:"",price:0,category:"shirts",image:"",description:"",badge:"",sizes:[{size:"One Size",stock:10}],stripeMockUrl:""}),c(!0)},w=(T,_,P)=>{if(!u)return;const O=[...u.sizes];O[T]={...O[T],[_]:P},d({...u,sizes:O})},j=()=>{u&&d({...u,sizes:[...u.sizes,{size:"",stock:0}]})},E=T=>{if(!u)return;const _=u.sizes.filter((P,O)=>O!==T);d({...u,sizes:_})},k=async T=>{const _=e==null?void 0:e.find(P=>P.id===T);if(window.confirm("Are you sure you want to delete this product?"))try{const{error:P}=await ue.from("products").delete().eq("id",T);if(P)throw P;_!=null&&_.image&&await gd(_.image),ie.success("Product deleted successfully"),n()}catch(P){console.error(P),ie.error(P.message||"Failed to delete product")}},S=async()=>{if(!u)return;if(!u.name){ie.error("Product name is required");return}if(u.price<=0){ie.error("Price must be greater than 0");return}if(!u.description){ie.error("Product description is required");return}if(!u.image){ie.error("Product image is required");return}const T=u.sizes.filter(_=>_.size.trim()!=="");if(T.length===0){ie.error("At least one size definition is required");return}f(!0);try{const _={name:u.name,price:parseFloat(u.price),category:u.category,image:u.image,description:u.description,badge:u.badge||null,sizes:T,stripe_mock_url:u.stripeMockUrl||null};if(u.id){const{error:P}=await ue.from("products").update(_).eq("id",u.id);if(P)throw P;ie.success("Product updated successfully")}else{const{error:P}=await ue.from("products").insert([_]);if(P)throw P;ie.success("Product created successfully")}c(!1),n()}catch(_){console.error(_),ie.error(_.message||"Failed to save product")}finally{f(!1)}};return i.jsxs("div",{className:"container mx-auto p-6 space-y-6",children:[i.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 border-b border-slate-100 pb-5",children:[i.jsxs("div",{children:[i.jsxs("h1",{className:"font-heading text-2xl font-bold uppercase tracking-wide text-slate-900 flex items-center gap-2",children:[i.jsx(ed,{className:"text-[#8e160b]",size:24})," Shop Products Admin"]}),i.jsx("p",{className:"text-xs text-muted-foreground font-body mt-1",children:"Manage merchandise catalog items, sizes, prices, and stock levels."})]}),i.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[i.jsxs("div",{className:"flex items-center space-x-2 bg-slate-50 border border-slate-200/85 rounded-lg px-3.5 py-2.5 h-11",children:[i.jsx(cs,{id:"shop-coming-soon",checked:m,onCheckedChange:y,disabled:p}),i.jsx(He,{htmlFor:"shop-coming-soon",className:"text-[10px] font-heading font-bold uppercase tracking-wider cursor-pointer text-slate-600",children:"Coming Soon"})]}),i.jsxs(le,{onClick:b,className:"bg-black hover:bg-[#8e160b] text-white font-heading text-xs uppercase tracking-wider h-11 px-6 shadow-sm flex items-center gap-2",children:[i.jsx(vs,{size:16})," Add Product"]})]})]}),i.jsxs("div",{className:"flex items-center gap-3 bg-slate-50 border border-slate-200 rounded-xl p-4",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(cl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),i.jsx(_e,{placeholder:"Search products by name or category...",value:a,onChange:T=>o(T.target.value),className:"pl-10 text-xs bg-white border-slate-200"})]}),i.jsxs("span",{className:"text-xs font-body text-slate-400",children:["Showing ",g.length," items"]})]}),t?i.jsxs("div",{className:"flex flex-col items-center justify-center py-20 bg-white border border-slate-200 rounded-xl shadow-sm",children:[i.jsx(Ie,{className:"w-8 h-8 animate-spin text-[#8e160b] mb-3"}),i.jsx("p",{className:"font-heading text-xs uppercase tracking-wider text-slate-400",children:"Loading products..."})]}):g.length===0?i.jsxs("div",{className:"text-center py-20 bg-white border border-slate-200 rounded-xl shadow-sm",children:[i.jsx("p",{className:"font-heading text-slate-400 uppercase text-sm",children:"No products found"}),i.jsx("p",{className:"font-body text-xs text-slate-400 mt-1",children:"Try refining your search or add a new product."})]}):i.jsx("div",{className:"bg-white border rounded-xl overflow-hidden shadow-sm",children:i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b bg-slate-50 text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:[i.jsx("th",{className:"px-6 py-4",children:"Product"}),i.jsx("th",{className:"px-6 py-4",children:"Category"}),i.jsx("th",{className:"px-6 py-4",children:"Price"}),i.jsx("th",{className:"px-6 py-4",children:"Stock (Sizes)"}),i.jsx("th",{className:"px-6 py-4 text-right",children:"Actions"})]})}),i.jsx("tbody",{className:"divide-y divide-slate-100",children:g.map(T=>{var _;return i.jsxs("tr",{onClick:()=>v(T),className:"hover:bg-slate-50/50 cursor-pointer transition-colors group",children:[i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-lg bg-slate-100 border border-slate-200 overflow-hidden shrink-0",children:T.image?i.jsx("img",{src:T.image,alt:T.name,className:"w-full h-full object-cover"}):i.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-300",children:i.jsx(ll,{size:20})})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-bold uppercase text-sm group-hover:text-[#8e160b] transition-colors",children:T.name}),T.badge&&i.jsx("span",{className:"inline-block mt-1 text-[9px] font-heading font-bold uppercase tracking-wider px-2 py-0.5 bg-club-gold/25 text-amber-800 rounded",children:T.badge})]})]})}),i.jsx("td",{className:"px-6 py-4 text-xs font-heading uppercase text-slate-500",children:T.category==="shirts"?"Shirts & Hoodies":T.category==="hats-scarves"?"Hats & Scarves":"Acce
1085ssories"}),i.jsxs("td",{className:"px-6 py-4 text-sm font-heading font-bold text-slate-900",children:["£",T.price.toFixed(2)]}),i.jsx("td",{className:"px-6 py-4",children:i.jsxs("div",{className:"flex flex-wrap gap-1.5 max-w-xs",children:[(_=T.sizes)==null?void 0:_.map(P=>i.jsxs("span",{className:`text-[10px] font-heading font-bold uppercase px-2 py-0.5 rounded border ${P.stock<=0?"bg-red-50 text-red-600 border-red-100 animate-pulse":P.stock<=5?"bg-amber-50 text-amber-700 border-amber-100":"bg-slate-50 text-slate-600 border-slate-200"}`,children:[P.size,": ",P.stock]},P.size)),(!T.sizes||T.sizes.length===0)&&i.jsx("span",{className:"text-[10px] text-red-500 font-bold uppercase",children:"No Sizes Defined"})]})}),i.jsx("td",{className:"px-6 py-4 text-right",onClick:P=>P.stopPropagation(),children:i.jsxs("div",{className:"flex items-center justify-end gap-2",children:[i.jsx(le,{variant:"ghost",size:"icon",onClick:()=>v(T),className:"h-8 w-8 hover:text-[#8e160b] hover:bg-slate-100",children:i.jsx(Aa,{size:14})}),i.jsx(le,{variant:"ghost",size:"icon",onClick:()=>k(T.id),className:"h-8 w-8 text-slate-300 hover:text-red-600 hover:bg-red-50",children:i.jsx(Pi,{size:14})})]})})]},T.id)})})]})})}),i.jsx(zl,{open:l,onOpenChange:c,children:i.jsxs(Da,{className:"max-w-xl max-h-[90vh] overflow-y-auto",children:[i.jsx(Ia,{children:i.jsx(Fa,{className:"font-heading font-bold uppercase tracking-wider text-slate-900",children:u!=null&&u.id?"Edit Product":"Add New Product"})}),u&&i.jsxs("div",{className:"grid gap-5 py-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Product Name"}),i.jsx(_e,{placeholder:"e.g. Home Shirt 2026/27",value:u.name,onChange:T=>d({...u,name:T.target.value}),className:"text-xs"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Price (£)"}),i.jsx(_e,{type:"number",step:"0.01",placeholder:"49.99",value:u.price,onChange:T=>d({...u,price:T.target.value}),className:"text-xs"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Category"}),i.jsxs("select",{value:u.category,onChange:T=>d({...u,category:T.target.value}),className:"w-full bg-white border border-input rounded-md px-3 h-10 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading uppercase",children:[i.jsx("option",{value:"shirts",children:"Shirts & Hoodies"}),i.jsx("option",{value:"hats-scarves",children:"Hats & Scarves"}),i.jsx("option",{value:"accessories",children:"Accessories"})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Promo Badge (optional)"}),i.jsx(_e,{placeholder:"e.g. New Arrival, Popular, Sale",value:u.badge||"",onChange:T=>d({...u,badge:T.target.value}),className:"text-xs"})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Description"}),i.jsx(uw,{placeholder:"Describe your product detail...",value:u.description,onChange:T=>d({...u,description:T.target.value}),className:"text-xs min-h-[70px]"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Stripe Payment Link (optional)"}),i.jsx(_e,{placeholder:"e.g. https://checkout.stripe.com/...",value:u.stripeMockUrl||"",onChange:T=>d({...u,stripeMockUrl:T.target.value}),className:"text-xs"})]}),i.jsxs("div",{className:"grid gap-2 border-t pt-4 border-slate-100",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground mb-1",children:"Product Image"}),i.jsx(Si,{value:u.image,onChange:T=>d({...u,image:T})}),i.jsxs("div",{className:"flex gap-2 items-center mt-2",children:[i.jsx("span",{className:"text-[9px] uppercase tracking-wide text-slate-400 font-heading shrink-0",children:"Or URL:"}),i.jsx(_e,{placeholder:"Image URL link...",value:u.image,onChange:T=>d({...u,image:T.target.value}),className:"text-[11px] h-8 bg-slate-50/50"})]})]}),i.jsxs("div",{className:"grid gap-2 border-t pt-4 border-slate-100",children:[i.jsxs("div",{className:"flex justify-between items-center mb-1",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Sizes & Stock management"}),i.jsxs(le,{type:"button",variant:"outline",size:"sm",onClick:j,className:"text-[10px] font-heading font-bold uppercase tracking-wider flex items-center gap-1 h-7 px-2.5",children:[i.jsx(vs,{size:10})," Add Size"]})]}),i.jsxs("div",{className:"space-y-2 max-h-[160px] overflow-y-auto pr-1",children:[(C=u.sizes)==null?void 0:C.map((T,_)=>i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(_e,{placeholder:"e.g. S, XL, One Size",value:T.size,onChange:P=>w(_,"size",P.target.value),className:"flex-1 text-xs uppercase"}),i.jsx(_e,{placeholder:"Stock",type:"number",min:"0",value:T.stock,onChange:P=>w(_,"stock",parseInt(P.target.value)||0),className:"w-24 text-xs text-center font-bold"}),i.jsx(le,{type:"button",variant:"ghost",size:"icon",onClick:()=>E(_),className:"h-9 w-9 text-slate-400 hover:text-red-500 shrink-0",children:i.jsx(ul,{size:14})})]},_)),(!u.sizes||u.sizes.length===0)&&i.jsx("p",{className:"text-[10px] text-center text-slate-400 font-body italic py-4",children:'No sizes defined.
1085Click "Add Size" to create size/stock details.'})]})]})]}),i.jsxs(La,{className:"border-t border-slate-100 pt-4 flex gap-2",children:[i.jsx(le,{variant:"outline",onClick:()=>c(!1),className:"font-heading text-xs uppercase tracking-wider h-11 px-5",children:"Cancel"}),i.jsx(le,{onClick:S,disabled:h,className:"bg-black hover:bg-[#8e160b] text-white font-heading text-xs uppercase tracking-wider h-11 px-6 shadow-sm flex items-center gap-2",children:h?i.jsx(Ie,{className:"w-4 h-4 animate-spin"}):"Save Changes"})]})]})})]})},$oe=()=>{const e=nd(),[t,n]=N.useState(""),[r,s]=N.useState(!1),[a,o]=N.useState(null),[l,c]=N.useState(!1),u=N.useRef(null),d=N.useRef(null),h=N.useCallback(async _=>{var O;const P=new FormData;P.append("image",_);try{const{data:{session:I}}=await ue.auth.getSession();if(!(I!=null&&I.access_token))throw new Error("Not authenticated.");const B=await fetch("/upload.php",{method:"POST",headers:{Authorization:`Bearer ${I.access_token}`},body:P}),$=await B.json();if(!B.ok||!$.url)throw new Error($.error||"Upload failed");const q=(O=u.current)==null?void 0:O.getEditor();if(q){const L=q.getSelection(!0);q.insertEmbed(L.index,"image",$.url),q.setSelection(L.index+1,0)}}catch(I){ie.error(I.message||"Failed to upload image.")}},[]),f=N.useCallback(()=>{var _;(_=d.current)==null||_.click()},[]),p={toolbar:{container:[[{header:[1,2,3,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],["link","image"],["clean"]],handlers:{image:f}}},{data:x,isLoading:m}=Lt({queryKey:["admin-fwp-fixtures"],queryFn:async()=>{try{const _=await XA();return console.log("Admin fetched FWP fixtures:",_==null?void 0:_.length),_||[]}catch(_){return console.error("Error fetching admin FWP fixtures:",_),ie.error("Failed to load FWP fixtures: "+_.message),[]}}}),{data:y,isLoading:g,refetch:v}=Lt({queryKey:["admin-custom-fixtures"],queryFn:async()=>{const{data:_,error:P}=await ue.from("custom_fixtures").select("*").order("date",{ascending:!1});if(P)throw P;return _}}),b=m||g,j=(()=>{const _=[],P=new Map((y||[]).filter(I=>I.fwp_id).map(I=>[I.fwp_id,I])),O=new Set;return x==null||x.forEach(I=>{var $,q,L,D,R,F,U;const B=P.get(String(I.id));B?(O.add(String(I.id)),_.push({...B,is_fwp:!0,has_override:!0,original_fwp_id:I.id})):_.push({id:`fwp-${I.id}`,date:I.date||"",time:I.time||"",home_team_name:(($=I["home-team"])==null?void 0:$.name)||"Unknown",home_team_score:((q=I["home-team"])==null?void 0:q.score)??null,away_team_name:((L=I["away-team"])==null?void 0:L.name)||"Unknown",away_team_score:((D=I["away-team"])==null?void 0:D.score)??null,venue:I.venue||"Unknown Venue",competition_name:((R=I.competition)==null?void 0:R.name)||"",status_short:((F=I.status)==null?void 0:F.short)||"Upcoming",status_full:((U=I.status)==null?void 0:U.full)||"Upcoming",attendance:I.attendance??null,is_hidden:!1,is_fwp:!0,has_override:!1,original_fwp_id:I.id})}),y==null||y.forEach(I=>{I.fwp_id?O.has(I.fwp_id)||_.push({...I,is_fwp:!0,has_override:!0,original_fwp_id:I.fwp_id,is_orphan:!0}):_.push({...I,is_fwp:!1,has_override:!1})}),_.sort((I,B)=>new Date(B.date).getTime()-new Date(I.date).getTime())})().filter(_=>{if(!t)return!0;const P=t.toLowerCase();return(_.home_team_name||"").toLowerCase().includes(P)||(_.away_team_name||"").toLowerCase().includes(P)||(_.competition_name||"").toLowerCase().includes(P)}),E=_=>{o({..._,home_team_score:_.home_team_score??"",away_team_score:_.away_team_score??"",attendance:_.attendance??"",fwp_id:_.is_fwp?_.original_fwp_id:_.fwp_id||null,match_report:_.match_report||""}),s(!0)},k=()=>{o({date:Ft(new Date,"yyyy-MM-dd"),time:"15:00",home_team_name:"Whitehawk",home_team_score:"",away_team_name:"",away_team_score:"",venue:"The Enclosed Ground",competition_name:"Pre-Season Friendly",status_short:"Upcoming",status_full:"Upcoming",attendance:"",fwp_id:null,is_hidden:!1,is_fwp:!1,has_override:!1,match_report:""}),s(!0)},S=async _=>{c(!0);try{if(_.has_override||!_.is_fwp){const{error:P}=await ue.from("custom_fixtures").update({is_hidden:!_.is_hidden}).eq("id",_.id);if(P)throw P}else{const P={date:_.date,time:_.time,home_team_name:_.home_team_name,home_team_score:_.home_team_score,away_team_name:_.away_team_name,away_team_score:_.away_team_score,venue:_.venue,competition_name:_.competition_name,status_short:_.status_short,status_full:_.status_full,attendance:_.attendance,fwp_id:String(_.original_fwp_id),is_hidden:!0},{error:O}=await ue.from("custom_fixtures").insert([P]);if(O)throw O}ie.success(_.is_hidden?"Fixture unhidden":"Fixture hidden"),e.invali
1085dateQueries({queryKey:["admin-custom-fixtures"]}),e.invalidateQueries({queryKey:["fwp-fixtures"]}),v()}catch(P){ie.error(P.message||"Failed to update fixture visibility")}finally{c(!1)}},A=async(_,P)=>{const O=P==="P-P"?"Postponed":"Cancelled";c(!0);try{if(_.has_override||!_.is_fwp){const{error:I}=await ue.from("custom_fixtures").update({status_short:P,status_full:O}).eq("id",_.id);if(I)throw I}else{const I={date:_.date,time:_.time,home_team_name:_.home_team_name,home_team_score:_.home_team_score,away_team_name:_.away_team_name,away_team_score:_.away_team_score,venue:_.venue,competition_name:_.competition_name,status_short:P,status_full:O,attendance:_.attendance,fwp_id:String(_.original_fwp_id),is_hidden:_.is_hidden||!1},{error:B}=await ue.from("custom_fixtures").insert([I]);if(B)throw B}ie.success(`Fixture marked as ${O}`),e.invalidateQueries({queryKey:["admin-custom-fixtures"]}),e.invalidateQueries({queryKey:["fwp-fixtures"]}),v()}catch(I){ie.error(I.message||"Failed to update fixture status")}finally{c(!1)}},C=async _=>{if(_.is_fwp&&_.has_override){if(!window.confirm("Are you sure you want to remove this override? The fixture will revert to the original FWP data."))return}else if(_.is_fwp){ie.error("Cannot delete an original FWP fixture. You can hide it instead.");return}else if(!window.confirm("Are you sure you want to delete this custom fixture?"))return;const{error:P}=await ue.from("custom_fixtures").delete().eq("id",_.id);P?ie.error("Failed to delete fixture"):(ie.success(_.is_fwp?"Override removed":"Fixture deleted successfully"),e.invalidateQueries({queryKey:["admin-custom-fixtures"]}),e.invalidateQueries({queryKey:["fwp-fixtures"]}),v())},T=async()=>{if(!a.home_team_name||!a.away_team_name){ie.error("Please enter both home and away team names");return}if(!a.date||!a.time){ie.error("Please enter match date and kickoff time");return}c(!0);try{const _={date:a.date,time:a.time,home_team_name:a.home_team_name,home_team_score:a.home_team_score===""?null:Number(a.home_team_score),away_team_name:a.away_team_name,away_team_score:a.away_team_score===""?null:Number(a.away_team_score),venue:a.venue,competition_name:a.competition_name,status_short:a.status_short,status_full:a.status_short==="FT"?"Full Time":a.status_short,attendance:a.attendance===""?null:Number(a.attendance),fwp_id:a.fwp_id?String(a.fwp_id):null,is_hidden:a.is_hidden||!1,match_report:a.match_report||null};if(a.has_override||!a.is_fwp&&a.id){const{error:P}=await ue.from("custom_fixtures").update(_).eq("id",a.id);if(P)throw P;ie.success("Fixture updated")}else{const{error:P}=await ue.from("custom_fixtures").insert([_]);if(P)throw P;ie.success(a.is_fwp?"FWP Fixture override created":"Fixture added")}s(!1),e.invalidateQueries({queryKey:["admin-custom-fixtures"]}),e.invalidateQueries({queryKey:["fwp-fixtures"]}),v()}catch(_){ie.error(_.message||"Failed to save fixture")}finally{c(!1)}};return b?i.jsx("div",{className:"h-[60vh] flex items-center justify-center",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})}):i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-2xl font-bold uppercase tracking-tight",children:"Fixtures & Results"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:"Manage all fixtures including those synced from Football Web Pages."}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Diagnostics: FWP Fixtures: ",(x==null?void 0:x.length)||0," | Custom Fixtures: ",(y==null?void 0:y.length)||0]})]}),i.jsxs(le,{onClick:k,className:"font-heading uppercase tracking-widest text-xs gap-2",children:[i.jsx(vs,{size:16})," Add Custom Match"]})]}),i.jsx("div",{className:"flex items-center gap-2 max-w-sm bg-white border border-border rounded-lg px-3 py-1.5 shadow-sm",children:i.jsx(_e,{placeholder:"Filter by opponent or competition...",value:t,onChange:_=>n(_.target.value),className:"border-none bg-transparent p-0 h-auto text-xs focus-visible:ring-0 focus-visible:ring-offset-0"})}),i.jsx("div",{className:"bg-card border border-border rounded-xl shadow-sm overflow-hidden",children:i.jsxs("div",{className:"divide-y divide-border",children:[j.map(_=>{const P=_.home_team_score!==null&&_.away_team_score!==null;return i.jsxs("div",{className:`p-4 hover:bg-muted/10 transition-colors flex flex-col md:flex-row md:items-center justify-between gap-4 ${_.is_hidden?"opacity-50 grayscale":""}`,children:[i.jsxs("div",{className:"flex items-start md:items-center gap-4",children:[i.jsx("div",{className:`${_.is_fwp?"bg-[#0f172a]":"bg-[#8e160b]/10 text-[#8e160b]"} text-white p-2.5 rounded-lg shrink-0 flex items-center justify-center`,children:_.is_fwp?i.jsx(B3,{size:20}):i.jsx(sl,{size:20,className:"text-[#8e160b]"})}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsxs("span",{className:"font-heading text-sm font-bold uppercase tracking-wide",children:[_.home_team_name," ",P?`(${_.home_team_score})`:""," vs ",_.away_team_name," ",P?`(${_.away_team_score})`:""]}),i.jsx("span",{className:`px-2 py-0.5 rounded text-[8px] font-heading uppercase font-bold tracking-widest ${_.status_short==="FT"?"bg-black text-white":"bg-muted text-muted-foreground"}`,children:_.status_short}),_.is_fwp&&!_.has_override&&i.jsx("span",{className:"px-2 py-0.5 rounded text-[8px] font-heading uppercase font-bold tracking-widest bg-blue-100 text-blue-800",children:"FWP"}),_.is_fwp&&_.has_override&&i.jsx("span",{className:"px-2 py-0.5 rounded text-[8px] font-heading uppercase font-bold tracking-widest bg-purple-100 text-purple-800",children:"OVERRIDDEN"}),_.is_hidden&&i.jsx("span",{className:"px-2 py-0.5 rounded text-[8px] font-heading uppercase font-bold tracking-widest bg-gray-200 text-gray-800",children:"HIDDEN"}),_.status_short==="P-P"&&i.jsx("span",{className:"px-2 py-0.5 rounded text-[8px] font-heading uppercase font-bold tracking-widest bg-amber-100 text-amber-800",children:"POSTPONED"}),_.status_short==="CANC"&&i.jsx("span",{className:"px-2 py-0.5 rounded text-[8px] font-heading uppercase font-bold tracking-widest bg-red-100 text-red-800",children:"CANCELLED"})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-1 text-[11px] text-muted-foreground uppercase font-medium",children:[i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Po,{size:11,className:"text-amber-500"}),_.competition_name]}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(bl,{size:11}),Ft(nn(_.date),"dd MMM yyyy")," ⢠",_.time," KO"]}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Zu,{size:11}),_.venue]}),_.attendance&&i.jsxs("span",{children:["Att: ",_.attendance]})]})]})]}
1085),i.jsxs("div",{className:"flex items-center gap-2 self-end md:self-auto",children:[i.jsx(le,{variant:"outline",size:"sm",onClick:()=>S(_),className:"h-8 w-8 p-0",title:_.is_hidden?"Show Fixture":"Hide Fixture",children:_.is_hidden?i.jsx(ol,{size:14}):i.jsx(al,{size:14})}),i.jsx(le,{variant:"outline",size:"sm",onClick:()=>A(_,"P-P"),className:`h-8 w-8 p-0 ${_.status_short==="P-P"?"bg-amber-100 border-amber-400 text-amber-700":"text-amber-600 hover:bg-amber-50 hover:border-amber-400"}`,title:"Mark as Postponed",disabled:l,children:i.jsx(OE,{size:14})}),i.jsx(le,{variant:"outline",size:"sm",onClick:()=>A(_,"CANC"),className:`h-8 w-8 p-0 ${_.status_short==="CANC"?"bg-red-100 border-red-400 text-red-700":"text-red-500 hover:bg-red-50 hover:border-red-400"}`,title:"Mark as Cancelled",disabled:l,children:i.jsx(RE,{size:14})}),i.jsxs(le,{variant:"outline",size:"sm",onClick:()=>E(_),className:"h-8 font-heading text-[10px] uppercase tracking-wider gap-1.5",children:[i.jsx(Aa,{size:12})," Edit"]}),i.jsx(le,{variant:"ghost",size:"sm",onClick:()=>C(_),className:"h-8 w-8 p-0 text-red-600 hover:text-red-700 hover:bg-red-50",disabled:_.is_fwp&&!_.has_override,children:i.jsx(Pi,{size:14})})]})]},_.id)}),j.length===0&&i.jsxs("div",{className:"py-12 text-center text-muted-foreground text-sm flex flex-col items-center gap-2",children:[i.jsx(sl,{size:40,className:"opacity-15"}),i.jsx("p",{children:"No fixtures found."})]})]})}),i.jsx(zl,{open:r,onOpenChange:s,children:i.jsxs(Da,{className:"sm:max-w-[800px] font-body bg-white max-h-[90vh] overflow-y-auto",children:[i.jsx(Ia,{children:i.jsx(Fa,{className:"font-heading uppercase tracking-tight",children:a!=null&&a.is_fwp?"Override FWP Match":a!=null&&a.id?"Edit Custom Match":"Add Custom Match"})}),a&&i.jsxs("div",{className:"grid gap-4 py-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Home Team"}),i.jsx(_e,{value:a.home_team_name,onChange:_=>o({...a,home_team_name:_.target.value}),placeholder:"e.g. Whitehawk"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Away Team"}),i.jsx(_e,{value:a.away_team_name,onChange:_=>o({...a,away_team_name:_.target.value}),placeholder:"e.g. Charlton Athletic"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4 bg-muted/20 p-3 rounded-lg border border-border/40",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Home Score (Optional)"}),i.jsx(_e,{type:"number",value:a.home_team_score,onChange:_=>o({...a,home_team_score:_.target.value}),placeholder:"e.g. 2"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Away Score (Optional)"}),i.jsx(_e,{type:"number",value:a.away_team_score,onChange:_=>o({...a,away_team_score:_.target.value}),placeholder:"e.g. 1"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Date"}),i.jsx(_e,{type:"date",value:a.date,onChange:_=>o({...a,date:_.target.value})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Kickoff Time"}),i.jsx(_e,{value:a.time,onChange:_=>o({...a,time:_.target.value}),placeholder:"e.g. 15:00 or 19:45"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Venue"}),i.jsx(_e,{value:a.venue,onChange:_=>o({...a,venue:_.target.value}),placeholder:"e.g. The Enclosed Ground"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Competition"}),i.jsx(_e,{value:a.competition_name,onChange:_=>o({...a,competition_name:_.target.value}),placeholder:"e.g. Pre-Season Friendly"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Status"}),i.jsxs("select",{value:a.status_short,onChange:_=>o({...a,status_short:_.target.value}),className:"w-full bg-background border border-input rounded-md px-3 h-10 text-xs focus:ring-1 focus:ring-primary focus:outline-none font-heading uppercase",children:[i.jsx("option",{value:"Upcoming",children:"Upcoming"}),i.jsx("option",{value:"FT",children:"FT (Full Time)"}),i.jsx("option",{value:"P-P",children:"P-P (Postponed)"}),i.jsx("option",{value:"CANC",children:"CANC (Cancelled)"}),i.jsx("option",{value:"HT",children:"HT (Half Time)"})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Attendance (Optional)"}),i.jsx(_e,{type:"number",value:a.attendance,onChange:_=>o({...a,attendance:_.target.value}),placeholder:"e.g. 142"})]})]}),a.status_short==="FT"&&i.jsxs("div",{className:"grid gap-2 mt-4",children:[i.jsx("label",{className:"text-[10px] uppercase tracking-widest font-heading text-muted-foreground",children:"Match Report"}),i.jsxs("div",{className:"bg-white [&_.ql-container]:min-h-[200px] [&_.ql-editor]:text-sm",children:[i.jsx("input",{type:"file",ref:d,className:"hidden",accept:"image/*",onChange:_=>{var O;const P=(O=_.target.files)==null?void 0:O[0];P&&h(P),_.target.value=""}}),i.jsx(fR,{ref:u,theme:"snow",value:a.match_report||"",onChange:_=>o({...a,match_report:_}),modules:p})]})]})]}),i.jsxs(La,{children:[i.jsx(le,{variant:"outline",onClick:()=>s(!1),className:"font-heading uppercase tracking-widest text-xs",children:"Cancel"}),i.jsxs(le,{onClick:T,disabled:l,className:"font-heading uppercase tracking-widest text-xs gap-2",children:[l?i.jsx(Ie,{className:"w-4 h-4 animate-spin"}):i.jsx(wi,{size:16}),"Save Match"]})]})]})})]})},zoe=[{key:"dashboard",label:"Dashboard"},{key:"posts",label:"News Posts"},{key:"squad",label:"Squad"},{key:"personnel",label:"Personnel"},{key:"videos",label:"Videos"},{key:"sponsors",label:"Sponsors"},{key:"fixtures",label:"Fixtures"},{key:"shop",label:"Shop"},{key:"settings",label:"Settings"},{key:"admin_users",label:"Manage Admin Users"}];function Boe(){const[e,t]=N.useState([]),[n,r]=N.useState(""),[s,a]=N.useState(""),[o,l]=N.useState(""),[c,u]=N.useState([]),[d,h]=N.useState(null),[f,p]=N.useState(""),[x,m]=N.useState(null),[y,g]=N.useState(""),[v,b]=N.useState(""),[w,j]=N.useState(!1),[E,k]=N.useState(!1),S=wP("https://udpsykhbbodlczzwvvhe.supabase.co","sb_publishable_xNu-1L_xkRSWxNrP43RFGw_N352xkdt",{auth:{persistSession:!1,autoRefreshToken:!1}}),A=async()=>{var D;const{data:{session:$}}=await ue.auth.getSession();if(!$)return;const{data:q,error:L}=await ue.from("admin_users").select("*").eq("email",$.user.email).single();if(!L&&q){const R=q;m(R),g(R.name||""),b(""),k(((D=R.roles)==null?void 0:D.includes("admin_users"))||!1)}else k(!0)},C=async()=>{const{data:$,error:q}=await ue.from("admin_users").select("*");q?ie.error("Failed to load admin users"):t($)};N.useEffect(()=>{A(),C()},[]);const T=async()=>
1085{if(x){if(!y)return ie.error("Name is required");j(!0);try{const $={name:y};v&&($.password=v);const{error:q}=await ue.from("admin_users").update($).eq("id",x.id);if(q){ie.error("Failed to update account");return}if(v){const{error:L}=await ue.auth.updateUser({password:v});if(L){ie.error("Name updated but failed to update login password: "+L.message);return}}ie.success("Account updated successfully"),b(""),A(),C()}finally{j(!1)}}},_=()=>{r(""),a(""),l(""),u([]),h(null),p("")},P=async()=>{if(!s||!o||!n)return ie.error("Name, email, and password are required");if(d){const{error:$}=await ue.from("admin_users").update({name:n,email:s,password:o,roles:c}).eq("id",d);if($){ie.error("Failed to update admin");return}if(o&&o!==f)try{const{data:{session:q}}=await ue.auth.getSession(),L=await fetch("https://udpsykhbbodlczzwvvhe.supabase.co/functions/v1/update-user-password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${q==null?void 0:q.access_token}`},body:JSON.stringify({email:s,password:o})});if(!L.ok){const D=await L.json().catch(()=>({}));ie.error("Admin updated but login password failed to sync: "+(D.error||"Unknown error")),_(),C();return}}catch(q){ie.error("Admin updated but login password failed to sync: "+q.message),_(),C();return}ie.success("Admin updated"),_(),C()}else{const{data:$,error:q}=await S.auth.signUp({email:s,password:o});if(q)return ie.error("Failed to create login: "+q.message);const{error:L}=await ue.from("admin_users").insert({name:n,email:s,password:o,roles:c});L?ie.error("Failed to add admin"):(ie.success("Admin added"),_(),C())}},O=$=>{r($.name||""),a($.email),l($.password||""),p($.password||""),u($.roles||[]),h($.id)},I=async $=>{if(!confirm("Are you sure you want to delete this admin?"))return;const{error:q}=await ue.from("admin_users").delete().eq("id",$);q?ie.error("Failed to delete admin"):(ie.success("Admin deleted"),C())},B=$=>{u(q=>q.includes($)?q.filter(L=>L!==$):[...q,$])};return i.jsxs("div",{className:"space-y-8 p-6",children:[i.jsxs("div",{className:"border rounded-lg p-6 bg-white",children:[i.jsx("h1",{className:"text-2xl font-bold mb-1",children:"My Account"}),i.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Update your name and password. ",(x==null?void 0:x.email)&&`Signed in as ${x.email}`]}),i.jsxs("div",{className:"space-y-4 max-w-md",children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Name"}),i.jsx(_e,{placeholder:"Your name",value:y,onChange:$=>g($.target.value)})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm font-medium mb-1 block",children:"New Password"}),i.jsx(_e,{type:"password",placeholder:"Leave blank to keep current password",value:v,onChange:$=>b($.target.value)})]}),i.jsx(le,{onClick:T,disabled:w,children:w?"Saving...":"Update My Account"})]})]}),E&&i.jsxs(i.Fragment,{children:[i.jsx("hr",{}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Manage Admin Users"}),i.jsxs("div",{className:"space-y-4 max-w-md",children:[i.jsx(_e,{placeholder:"Name",value:n,onChange:$=>r($.target.value)}),i.jsx(_e,{placeholder:"User email",value:s,onChange:$=>a($.target.value)}),i.jsx(_e,{type:"password",placeholder:"Password",value:o,onChange:$=>l($.target.value)}),i.jsx("div",{className:"grid grid-cols-2 gap-2",children:zoe.map($=>i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx(X0,{checked:c.includes($.key),onCheckedChange:()=>B($.key)}),i.jsx("span",{children:$.label})]},$.key))}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(le,{onClick:P,children:d?"Update Admin":"Add Admin"}),d&&i.jsx(le,{variant:"outline",onClick:_,children:"Cancel"})]})]}),i.jsxs("div",{className:"mt-8",children:[i.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Existing Admins"}),i.jsx("ul",{className:"space-y-2",children:e.map($=>{var q;return i.jsxs("li",{className:"border p-2 rounded flex justify-between items-center",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"font-medium",children:[$.name," (",$.email,")"]}),i.jsxs("div",{className:"text-sm text-muted-foreground",children:["Roles: ",((q=$.roles)==null?void 0:q.join(", "))||"None"]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(le,{variant:"outline",size:"sm",onClick:()=>O($),children:"Edit"}),i.jsx(le,{variant:"destructive",size:"sm",onClick:()=>I($.id),children:"Delete"})]})]},$.id)})})]})]})]})]})}const O2=[{id:"first-team",label:"First Team",path:"/teams",section:"left",children:[{id:"first-team-players",label:"Players & Staff",path:"/teams"},{id:"first-team-matches",label:"Matches",path:"/matches"},{id:"first-team-table",label:"Table",path:"/standings"}]},{id:"teams",label:"Teams",path:"/teams",section:"left",children:[{id:"teams-women",label:"Whitehawk Women",path:"/teams/women"},{id:"teams-u18",label:"Whitehawk U18",path:"/teams/u18"},{id:"teams-youth",label:"Youth",path:"/teams/academy"}]},{id:"club",label:"Club",path:"/club",section:"left",children:[{id:"club-personnel",label:"Club Personnel",path:"/pers
1085onnel"},{id:"club-photos",label:"Match Photos",path:"/match-photos"},{id:"club-pitch",label:"Hire Our Pitch",path:"/hire-pitch"},{id:"club-clubhouse",label:"Hire Our Clubhouse",path:"/hire-clubhouse"}]},{id:"fanzone",label:"Fanzone",path:"/fanzone",section:"left"},{id:"news",label:"News",path:"/news",section:"left"},{id:"tickets",label:"Tickets",path:"https://whitehawkfc.ktckts.com/",section:"right"},{id:"hospitality",label:"Hospitality",path:"/hospitality",section:"right"},{id:"sponsor",label:"Sponsor",path:"/sponsor",section:"right"},{id:"shop",label:"Shop",path:"/shop",section:"right"},{id:"contact",label:"Contact",path:"/contact",section:"right"}],Uoe=()=>{const{data:e,isLoading:t}=dt("menu_visibility"),[n,r]=N.useState([]),[s,a]=N.useState(!1),o=nd(),{toast:l}=rE();N.useEffect(()=>{var p;(p=e==null?void 0:e.value)!=null&&p.hidden&&r(e.value.hidden)},[e]);const c=p=>{r(x=>x.includes(p)?x.filter(m=>m!==p):[...x,p])},u=async()=>{a(!0);try{const{error:p}=await ue.from("site_settings").upsert({key:"menu_visibility",value:{hidden:n}},{onConflict:"key"});if(p)throw p;o.invalidateQueries({queryKey:["settings","menu_visibility"]}),l({title:"Menu updated",description:"Menu visibility settings have been saved."})}catch(p){l({title:"Error",description:p.message||"Failed to save settings.",variant:"destructive"})}finally{a(!1)}};if(t)return i.jsx("div",{className:"flex items-center justify-center p-20",children:i.jsx(Ie,{className:"w-8 h-8 animate-spin text-primary"})});const d=O2.filter(p=>p.section==="left"),h=O2.filter(p=>p.section==="right"),f=p=>{const x=n.includes(p.id);return i.jsxs("div",{children:[i.jsxs("div",{className:`flex items-center justify-between p-4 rounded-lg border transition-all ${x?"bg-red-50 border-red-200 opacity-60":"bg-white border-gray-200"}`,children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ta,{size:16,className:"text-gray-300"}),i.jsxs("div",{children:[i.jsx("span",{className:"font-heading text-sm uppercase tracking-wide font-semibold",children:p.label}),i.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:p.path})]})]}),i.jsxs("button",{onClick:()=>c(p.id),className:`flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-heading uppercase tracking-wide transition-all ${x?"bg-red-100 text-red-700 hover:bg-red-200":"bg-green-100 text-green-700 hover:bg-green-200"}`,children:[x?i.jsx(al,{size:14}):i.jsx(ol,{size:14}),x?"Hidden":"Visible"]})]}),p.children&&i.jsx("div",{className:"ml-8 mt-1 space-y-1",children:p.children.map(m=>{const y=n.includes(m.id);return i.jsxs("div",{className:`flex items-center justify-between p-3 rounded-md border transition-all ${y||x?"bg-red-50/50 border-red-100 opacity-50":"bg-gray-50 border-gray-100"}`,children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-4 h-px bg-gray-300"}),i.jsx("span",{className:"font-heading text-xs uppercase tracking-wide",children:m.label}),i.jsx("span",{className:"text-[10px] text-muted-foreground",children:m.path})]}),i.jsxs("button",{onClick:()=>c(m.id),disabled:x,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[10px] font-heading uppercase tracking-wide transition-all ${y||x?"bg-red-100 text-red-600 hover:bg-red-200":"bg-green-100 text-green-600 hover:bg-green-200"} ${x?"cursor-not-allowed":""}`,children:[y||x?i.jsx(al,{size:12}):i.jsx(ol,{size:12}),y||x?"Hidden":"Visible"]})]},m.id)})})]},p.id)};return i.jsxs("div",{className:"max-w-3xl",children:[i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"font-heading text-3xl font-bold uppercase tracking-wide",children:"Menu Pages"}),i.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Toggle which pages are visible in the site navigation menu."})]}),i.jsxs(le,{onClick:u,disabled:s,className:"font-heading uppercase tracking-wider text-xs gap-2",children:[s?i.jsx(Ie,{className:"w-4 h-4 animate-spin"}):i.jsx(wi,{size:16}),"Save Changes"]})]}),i.jsxs("div",{className:"mb-10",children:[i.jsx("h2",{className:"font-heading text-lg uppercase tracking-wider text-muted-foreground mb-4 border-b pb-2",children:"Left Navigation"}),i.jsx("div",{className:"space-y-2",children:d.map(f)})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-heading text-lg uppercase tracking-wider text-muted-foreground mb-4 border-b pb-2",children:"Right Navigation"}),i.jsx("div",{className:"space-y-2",children:h.map(f)})]})]})},qoe=new k8({defaultOptions:{queries:{staleTime:1e3*60*2,gcTime:1e3*60*10,retry:2,retryDelay:e=>Math.min(1e3*2**e,1e4),refetchOnWindowFocus:!1}}}),Voe=()=>i.jsx(T8,{client:qoe,children:i.jsxs(o8,{children:[i.jsx(VI,{}),i.jsx(jL,{}),i.jsx($F,{basename:"/",children:i.jsxs(OF,{children:[i.jsxs(be,{element:i.jsx(HG,{}),children:[i.jsx(be,{path:"/",element:i.jsx(EK,{})}),i.jsx(be,{path:"/teams",element:i.jsx(TK,{})}),i.jsx(be,{path:"/player/:id",element:i.jsx(NG,{})}),i.jsx(be,{path:"/staff/:id",element:i.jsx(kG,{})}),i.jsx(be,{path:"/matches",element:i.jsx(OK,{})}),i.jsx(be,{path:"/standings",element:i.jsx(MK,{})}),i.jsx(be,{path:"/sponsor",element:i.jsx(FK,{})}),i.jsx(be,{path:"/hospitality",element:i.jsx($K,{})}),i.jsx(be,{path:"/fanzone",element:i.jsx(zK,{})}
1085),i.jsx(be,{path:"/personnel",element:i.jsx(UK,{})}),i.jsx(be,{path:"/teams/women",element:i.jsx(GK,{})}),i.jsx(be,{path:"/teams/u18",element:i.jsx(YK,{})}),i.jsx(be,{path:"/teams/youth",element:i.jsx(XK,{})}),i.jsx(be,{path:"/teams/community",element:i.jsx(QK,{})}),i.jsx(be,{path:"/teams/academy",element:i.jsx(eG,{})}),i.jsx(be,{path:"/teams/academy/u7",element:i.jsx(tG,{})}),i.jsx(be,{path:"/teams/academy/u12",element:i.jsx(nG,{})}),i.jsx(be,{path:"/teams/academy/u13-red",element:i.jsx(rG,{})}),i.jsx(be,{path:"/teams/academy/u13-white",element:i.jsx(sG,{})}),i.jsx(be,{path:"/teams/academy/u13",element:i.jsx(iG,{})}),i.jsx(be,{path:"/teams/academy/u14",element:i.jsx(aG,{})}),i.jsx(be,{path:"/teams/academy/u15",element:i.jsx(oG,{})}),i.jsx(be,{path:"/teams/academy/u16",element:i.jsx(lG,{})}),i.jsx(be,{path:"/news",element:i.jsx(cG,{})}),i.jsx(be,{path:"/news/:slug",element:i.jsx(uG,{})}),i.jsx(be,{path:"/shop",element:i.jsx(gG,{})}),i.jsx(be,{path:"/contact",element:i.jsx(fG,{})}),i.jsx(be,{path:"/match-center/:id",element:i.jsx(wG,{})}),i.jsx(be,{path:"/match-report/:id",element:i.jsx(jG,{})}),i.jsx(be,{path:"/match-photos",element:i.jsx(MG,{})}),i.jsx(be,{path:"/terms",element:i.jsx(_G,{})}),i.jsx(be,{path:"/refund-policy",element:i.jsx(EG,{})}),i.jsx(be,{path:"/delivery-terms",element:i.jsx(CG,{})}),i.jsx(be,{path:"/privacy-policy",element:i.jsx(TG,{})}),i.jsx(be,{path:"/cookie-policy",element:i.jsx(AG,{})}),i.jsx(be,{path:"/safeguarding",element:i.jsx(PG,{})}),i.jsx(be,{path:"/hire-pitch",element:i.jsx(OG,{})}),i.jsx(be,{path:"/hire-clubhouse",element:i.jsx(RG,{})})]}),i.jsx(be,{path:"/admin/login",element:i.jsx(TY,{})}),i.jsxs(be,{path:"/admin",element:i.jsx(DG,{}),children:[i.jsx(be,{index:!0,element:i.jsx(AY,{})}),i.jsx(be,{path:"posts",element:i.jsx(XQ,{})}),i.jsx(be,{path:"posts/new",element:i.jsx(y2,{})}),i.jsx(be,{path:"posts/edit/:id",element:i.jsx(y2,{})}),i.jsx(be,{path:"squad",element:i.jsx(foe,{})}),i.jsx(be,{path:"personnel",element:i.jsx(Loe,{})}),i.jsx(be,{path:"sponsors",element:i.jsx(poe,{})}),i.jsx(be,{path:"videos",element:i.jsx(Doe,{})}),i.jsx(be,{path:"products",element:i.jsx(Foe,{})}),i.jsx(be,{path:"settings",element:i.jsx(Roe,{})}),i.jsx(be,{path:"fixtures",element:i.jsx($oe,{})}),i.jsx(be,{path:"users",element:i.jsx(Boe,{})}),i.jsx(be,{path:"menu-pages",element:i.jsx(Uoe,{})})]}),i.jsx(be,{path:"*",element:i.jsx(SG,{})})]})})]})});nE(document.getElementById("root")).render(i.jsx(Voe,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.