PageSourceSearch

https://cloveroa.co.kr/assets/index-BP_b1Zbv.js

js cloveroa.co.kr collected 2026-10-08 23:35:03 UTC 1,674,308 bytes, 4,484 lines download raw bytes

vendor: 10,698 bytes, lines 1-25
1var tO=Object.defineProperty;var nO=(n,e,t)=>e in n?tO(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Me=(n,e,t)=>nO(n,typeof e!="symbol"?e+"":e,t);function rO(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in n)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}})();function l5(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var fv={exports:{}},Zh={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and 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 SS;function sO(){if(SS)return Zh;SS=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,s,i){var l=null;if(i!==void 0&&(l=""+i),s.key!==void 0&&(l=""+s.key),"key"in s){i={};for(var d in s)d!=="key"&&(i[d]=s[d])}else i=s;return s=i.ref,{$$typeof:n,type:r,key:l,ref:s!==void 0?s:null,props:i}}return Zh.Fragment=e,Zh.jsx=t,Zh.jsxs=t,Zh}var jS;function aO(){return jS||(jS=1,fv.exports=sO()),fv.exports}var c=aO(),mv={exports:{}},tt={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and 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 AS;function iO(){if(AS)return tt;AS=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function w(H){return H===null||typeof H!="object"?null:(H=b&&H[b]||H["@@iterator"],typeof H=="function"?H:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,E={};function j(H,he,we){this.props=H,this.context=he,this.refs=E,this.updater=we||_}j.prototype.isReactComponent={},j.prototype.setState=function(H,he){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,he,"setState")},j.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function P(){}P.prototype=j.prototype;function A(H,he,we){this.props=H,this.context=he,this.refs=E,this.updater=we||_}var M=A.prototype=new P;M.constructor=A,N(M,j.prototype),M.isPureReactComponent=!0;var O=Array.isArray;function q(){}var L={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function I(H,he,we){var Se=we.ref;return{$$typeof:n,type:H,key:he,ref:Se!==void 0?Se:null,props:we}}function R(H,he){return I(H.type,he,H.props)}function F(H){return typeof H=="object"&&H!==null&&H.$$typeof===n}function B(H){var he={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(we){return he[we]})}var V=/\/+/g;function se(H,he){return typeof H=="object"&&H!==null&&H.key!=null?B(""+H.key):he.toString(36)}function ye(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(q,q):(H.status="pending",H.then(function(he){H.status==="pending"&&(H.status="fulfilled",H.value=he)},function(he){H.status==="pending"&&(H.status="rejected",H.reason=he)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function W(H,he,we,Se,Be){var $e=typeof H;($e==="undefined"||$e==="boolean")&&(H=null);var Je=!1;if(H===null)Je=!0;else switch($e){case"bigint":case"string":case"number":Je=!0;break;case"object":switch(H.$$typeof){case n:case e:Je=!0;break;case g:return Je=H._init,W(Je(H._payload),he,we,Se,Be)}}if(Je)return Be=Be(H),Je=Se===""?"."+se(H,0):Se,O(Be)?(we="",Je!=null&&(we=Je.replace(V,"$&/")+"/"),W(Be,he,we,"",function(G){return G})):Be!=null&&(F(Be)&&(Be=R(Be,we+(Be.key==null||H&&H.key===Be.key?"":(""+Be.key).replace(V,"$&/")+"/")+Je)),he.push(Be)),1;Je=0;var wt=Se===""?".":Se+":";if(O(H))for(var at=0;at<H.length;at++)Se=H[at],$e=wt+se(Se,at),Je+=W(Se,he,we,$e,Be);else if(at=w(H),typeof at=="function")for(H=at.call(H),at=0;!(Se=H.next()).done;)Se=Se.value,$e=wt+se(Se,at++),Je+=W(Se,he,we,$e,Be);else if($e==="object"){if(typeof H.then=="function")return W(ye(H),he,we,Se,Be);throw he=String(H),Error("Objects are not valid as a React child (found: "+(he==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":he)+"). If you meant to render a collection of children, use an array instead.")}return Je}function $(H,he,we){if(H==null)return H;var Se=[],Be=0;return W(H,Se,"","",function($e){return he.call(we,$e,Be++)}),Se}function X(H){if(H._status===-1){var he=H._result;he=he(),he.then(function(we){(H._status===0||H._status===-1)&&(H._status=1,H._result=we)},function(we){(H._status===0||H._status===-1)&&(H._status=2,H._result=we)}),H._status===-1&&(H._status=0,H._result=he)}if(H._status===1)return H._result.default;throw H._result}var be=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var he=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(he))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},Oe={map:$,forEach:function(H,he,we){$(H,function(){he.apply(this,arguments)},we)},count:function(H){var he=0;return $(H,function(){he++}),he},toArray:function(H){return $(H,function(he){return he})||[]},only:function(H){if(!F(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return tt.Activity=p,tt.Children=Oe,tt.Component=j,tt.Fragment=t,tt.Profiler=s,tt.PureComponent=A,tt.StrictMode=r,tt.Suspense=h,tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,tt.__COMPILER_RUNTIME={__proto__:null,c:function(H){return L.H.useMemoCache(H)}},tt.cache=function(H){return function(){return H.apply(null,arguments)}},tt.cacheSignal=function(){return null},tt.cloneElement=function(H,he,we){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var Se=N({},H.props),Be=H.key;if(he!=null)for($e in he.key!==void 0&&(Be=""+he.key),he)!k.call(he,$e)||$e==="key"||$e==="__self"||$e==="__source"||$e==="ref"&&he.ref===void 0||(Se[$e]=he[$e]);var $e=arguments.length-2;if($e===1)Se.children=we;else if(1<$e){for(var Je=Array($e),wt=0;wt<$e;wt++)Je[wt]=arguments[wt+2];Se.children=Je}return I(H.type,Be,Se)},tt.createContext=function(H){return H={$$typeof:l,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:i,_context:H},H},tt.createElement=function(H,he,we){var Se,Be={},$e=null;if(he!=null)for(Se in he.key!==void 0&&($e=""+he.key),he)k.call(he,Se)&&Se!=="key"&&Se!=="__self"&&Se!=="__source"&&(Be[Se]=he[Se]);var Je=arguments.length-2;if(Je===1)Be.children=we;else if(1<Je){for(var wt=Array(Je),at=0;at<Je;at++)wt[at]=arguments[at+2];Be.children=wt}if(H&&H.defaultProps)for(Se in Je=H.defaultProps,Je)Be[Se]===void 0&&(Be[Se]=Je[Se]);return I(H,$e,Be)},tt.createRef=function(){return{current:null}},tt.forwardRef=function(H){return{$$typeof:d,render:H}},tt.isValidElement=F,tt.lazy=function(H){return{$$typeof:g,_payload:{_status:-1,_result:H},_init:X}},tt.memo=function(H,he){return{$$typeof:m,type:H,compare:he===void 0?null:he}},tt.startTransition=function(H){var he=L.T,we={};L.T=we;try{var Se=H(),Be=L.S;Be!==null&&Be(we,Se),typeof Se=="object"&&Se!==null&&typeof Se.then=="function"&&Se.then(q,be)}catch($e){be($e)}finally{he!==null&&we.types!==null&&(he.types=we.types),L.T=he}},tt.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},tt.use=function(H){return L.H.use(H)},tt.useActionState=function(H,he,we){return L.H.useActionState(H,he,we)},tt.useCallback=function(H,he){return L.H.useCallback(H,he)},tt.useContext=function(H){return L.H.useContext(H)},tt.useDebugValue=function(){},tt.useDeferredValue=function(H,he){return L.H.useDeferredValue(H,he)},tt.useEffect=function(H,he){return L.H.useEffect(H,he)},tt.useEffectEvent=function(H){return L.H.useEffectEvent(H)},tt.useId=function(){return L.H.useId()},tt.useImperativeHandle=function(H,he,we){return L.H.useImperativeHandle(H,he,we)},tt.useInsertionEffect=function(H,he){return L.H.useInsertionEffect(H,he)},tt.useLayoutEffect=function(H,he){return L.H.useLayoutEffect(H,he)},tt.useMemo=function(H,he){return L.H.useMemo(H,he)},tt.useOptimistic=function(H,he){return L.H.useOptimistic(H,he)},tt.useReducer=function(H,he,we){return L.H.useReducer(H,he,we)},tt.useRef=function(H){return L.H.useRef(H)},tt.useState=function(H){return L.H.useState(H)},tt.useSyncExternalStore=function(H,he,we){return L.H.useSyncExternalStore(H,he,we)},tt.useTransition=function(){return L.H.useTransition()},tt.version="19.2.5",tt}var CS;function O1(){return CS||(CS=1,mv.exports=iO()),mv.exports}var D=O1();const ae=l5(D),c5=rO({__proto__:null,default:ae},[D]);var pv={exports:{}},ef={},gv={exports:{}},yv={};/**
18 * @license React
19 * scheduler.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and 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 */var DS;function oO(){return DS||(DS=1,(function(n){function e(W,$){var X=W.length;W.push($);e:for(;0<X;){var be=X-1>>>1,Oe=W[be];
vendor: 8,603 bytes, lines 25-41
25if(0<s(Oe,$))W[be]=$,W[X]=Oe,X=be;else break e}}function t(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var $=W[0],X=W.pop();if(X!==$){W[0]=X;e:for(var be=0,Oe=W.length,H=Oe>>>1;be<H;){var he=2*(be+1)-1,we=W[he],Se=he+1,Be=W[Se];if(0>s(we,X))Se<Oe&&0>s(Be,we)?(W[be]=Be,W[Se]=X,be=Se):(W[be]=we,W[he]=X,be=he);else if(Se<Oe&&0>s(Be,X))W[be]=Be,W[Se]=X,be=Se;else break e}}return $}function s(W,$){var X=W.sortIndex-$.sortIndex;return X!==0?X:W.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;n.unstable_now=function(){return i.now()}}else{var l=Date,d=l.now();n.unstable_now=function(){return l.now()-d}}var h=[],m=[],g=1,p=null,b=3,w=!1,_=!1,N=!1,E=!1,j=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function M(W){for(var $=t(m);$!==null;){if($.callback===null)r(m);else if($.startTime<=W)r(m),$.sortIndex=$.expirationTime,e(h,$);else break;$=t(m)}}function O(W){if(N=!1,M(W),!_)if(t(h)!==null)_=!0,q||(q=!0,B());else{var $=t(m);$!==null&&ye(O,$.startTime-W)}}var q=!1,L=-1,k=5,I=-1;function R(){return E?!0:!(n.unstable_now()-I<k)}function F(){if(E=!1,q){var W=n.unstable_now();I=W;var $=!0;try{e:{_=!1,N&&(N=!1,P(L),L=-1),w=!0;var X=b;try{t:{for(M(W),p=t(h);p!==null&&!(p.expirationTime>W&&R());){var be=p.callback;if(typeof be=="function"){p.callback=null,b=p.priorityLevel;var Oe=be(p.expirationTime<=W);if(W=n.unstable_now(),typeof Oe=="function"){p.callback=Oe,M(W),$=!0;break t}p===t(h)&&r(h),M(W)}else r(h);p=t(h)}if(p!==null)$=!0;else{var H=t(m);H!==null&&ye(O,H.startTime-W),$=!1}}break e}finally{p=null,b=X,w=!1}$=void 0}}finally{$?B():q=!1}}}var B;if(typeof A=="function")B=function(){A(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,se=V.port2;V.port1.onmessage=F,B=function(){se.postMessage(null)}}else B=function(){j(F,0)};function ye(W,$){L=j(function(){W(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(W){W.callback=null},n.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<W?Math.floor(1e3/W):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(W){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var X=b;b=$;try{return W()}finally{b=X}},n.unstable_requestPaint=function(){E=!0},n.unstable_runWithPriority=function(W,$){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=b;b=W;try{return $()}finally{b=X}},n.unstable_scheduleCallback=function(W,$,X){var be=n.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?be+X:be):X=be,W){case 1:var Oe=-1;break;case 2:Oe=250;break;case 5:Oe=1073741823;break;case 4:Oe=1e4;break;default:Oe=5e3}return Oe=X+Oe,W={id:g++,callback:$,priorityLevel:W,startTime:X,expirationTime:Oe,sortIndex:-1},X>be?(W.sortIndex=X,e(m,W),t(h)===null&&W===t(m)&&(N?(P(L),L=-1):N=!0,ye(O,X-be))):(W.sortIndex=Oe,e(h,W),_||w||(_=!0,q||(q=!0,B()))),W},n.unstable_shouldYield=R,n.unstable_wrapCallback=function(W){var $=b;return function(){var X=b;b=$;try{return W.apply(this,arguments)}finally{b=X}}}})(yv)),yv}var kS;function lO(){return kS||(kS=1,gv.exports=oO()),gv.exports}var xv={exports:{}},mr={};/**
26 * @license React
27 * react-dom.production.js
28 *
29 * Copyright (c) Meta Platforms, Inc. and 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 IS;function cO(){if(IS)return mr;IS=1;var n=O1();function e(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var r={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},s=Symbol.for("react.portal");function i(h,m,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:h,containerInfo:m,implementation:g}}var l=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return mr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,mr.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return i(h,m,null,g)},mr.flushSync=function(h){var m=l.T,g=r.p;try{if(l.T=null,r.p=2,h)return h()}finally{l.T=m,r.p=g,r.d.f()}},mr.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(h,m))},mr.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},mr.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,p=d(g,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?r.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:w}):g==="script"&&r.d.X(h,{crossOrigin:p,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},mr.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=d(m.as,m.crossOrigin);r.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(h)},mr.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,p=d(g,m.crossOrigin);r.d.L(h,g,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},mr.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=d(m.as,m.crossOrigin);r.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(h)},mr.requestFormReset=function(h){r.d.r(h)},mr.unstable_batchedUpdates=function(h,m){return h(m)},mr.useFormState=function(h,m,g){return l.H.useFormState(h,m,g)},mr.useFormStatus=function(){return l.H.useHostTransitionStatus()},mr.version="19.2.5",mr}var RS;function u5(){if(RS)return xv.exports;RS=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),xv.exports=cO(),xv.exports}/**
34 * @license React
35 * react-dom-client.production.js
36 *
37 * Copyright (c) Meta Platforms, Inc. and affiliates.
38 *
39 * This source code is licensed under the MIT license found in the
40 * LICENSE file in the root directory of this source tree.
41 */var MS;function uO(){if(MS)return ef;MS=1;var n=lO(),e=O1(),t=u5();function r(a){var o="https://react.dev/errors/"+a;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function i(a){var o=a,u=a;if(a.alternate)for(;o.return;)o=o.return;else{a=o;do o=a,(o.flags&4098)!==0&&(u=o.return),a=o.return;while(a)}return o.tag===3?u:null}function l(a){if(a.tag===13){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function d(a){if(a.tag===31){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}
vendor: 12,761 bytes, lines 41-48
41function h(a){if(i(a)!==a)throw Error(r(188))}function m(a){var o=a.alternate;if(!o){if(o=i(a),o===null)throw Error(r(188));return o!==a?null:a}for(var u=a,f=o;;){var x=u.return;if(x===null)break;var v=x.alternate;if(v===null){if(f=x.return,f!==null){u=f;continue}break}if(x.child===v.child){for(v=x.child;v;){if(v===u)return h(x),a;if(v===f)return h(x),o;v=v.sibling}throw Error(r(188))}if(u.return!==f.return)u=x,f=v;else{for(var S=!1,U=x.child;U;){if(U===u){S=!0,u=x,f=v;break}if(U===f){S=!0,f=x,u=v;break}U=U.sibling}if(!S){for(U=v.child;U;){if(U===u){S=!0,u=v,f=x;break}if(U===f){S=!0,f=v,u=x;break}U=U.sibling}if(!S)throw Error(r(189))}}if(u.alternate!==f)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:o}function g(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a;for(a=a.child;a!==null;){if(o=g(a),o!==null)return o;a=a.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function B(a){return a===null||typeof a!="object"?null:(a=F&&a[F]||a["@@iterator"],typeof a=="function"?a:null)}var V=Symbol.for("react.client.reference");function se(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===V?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case N:return"Fragment";case j:return"Profiler";case E:return"StrictMode";case O:return"Suspense";case q:return"SuspenseList";case I:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case _:return"Portal";case A:return a.displayName||"Context";case P:return(a._context.displayName||"Context")+".Consumer";case M:var o=a.render;return a=a.displayName,a||(a=o.displayName||o.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case L:return o=a.displayName||null,o!==null?o:se(a.type)||"Memo";case k:o=a._payload,a=a._init;try{return se(a(o))}catch{}}return null}var ye=Array.isArray,W=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},be=[],Oe=-1;function H(a){return{current:a}}function he(a){0>Oe||(a.current=be[Oe],be[Oe]=null,Oe--)}function we(a,o){Oe++,be[Oe]=a.current,a.current=o}var Se=H(null),Be=H(null),$e=H(null),Je=H(null);function wt(a,o){switch(we($e,o),we(Be,a),we(Se,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?WE(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=WE(o),a=QE(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}he(Se),we(Se,a)}function at(){he(Se),he(Be),he($e)}function G(a){a.memoizedState!==null&&we(Je,a);var o=Se.current,u=QE(o,a.type);o!==u&&(we(Be,a),we(Se,u))}function re(a){Be.current===a&&(he(Se),he(Be)),Je.current===a&&(he(Je),Wh._currentValue=X)}var ve,Re;function Le(a){if(ve===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ve=o&&o[1]||"",Re=-1<u.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+ve+a+Re}var qe=!1;function Yt(a,o){if(!a||qe)return"";qe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(o){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ce){var ie=ce}Reflect.construct(a,[],ge)}else{try{ge.call()}catch(ce){ie=ce}a.call(ge.prototype)}}else{try{throw Error()}catch(ce){ie=ce}(ge=a())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ce){if(ce&&ie&&typeof ce.stack=="string")return[ce.stack,ie.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=f.DetermineComponentFrameRoot(),S=v[0],U=v[1];if(S&&U){var Y=S.split(`
44`),te=U.split(`
45`);for(x=f=0;f<Y.length&&!Y[f].includes("DetermineComponentFrameRoot");)f++;for(;x<te.length&&!te[x].includes("DetermineComponentFrameRoot");)x++;if(f===Y.length||x===te.length)for(f=Y.length-1,x=te.length-1;1<=f&&0<=x&&Y[f]!==te[x];)x--;for(;1<=f&&0<=x;f--,x--)if(Y[f]!==te[x]){if(f!==1||x!==1)do if(f--,x--,0>x||Y[f]!==te[x]){var fe=`
46`+Y[f].replace(" at new "," at ");return a.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",a.displayName)),fe}while(1<=f&&0<=x);break}}}finally{qe=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Le(u):""}function qn(a,o){switch(a.tag){case 26:case 27:case 5:return Le(a.type);case 16:return Le("Lazy");case 13:return a.child!==o&&o!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Yt(a.type,!1);case 11:return Yt(a.type.render,!1);case 1:return Yt(a.type,!0);case 31:return Le("Activity");default:return""}}function gs(a){try{var o="",u=null;do o+=qn(a,u),u=a,a=a.return;while(a);return o}catch(f){return`
47Error generating stack: `+f.message+`
48`+f.stack}}var Jt=Object.prototype.hasOwnProperty,Zt=n.unstable_scheduleCallback,Dr=n.unstable_cancelCallback,la=n.unstable_shouldYield,ys=n.unstable_requestPaint,kn=n.unstable_now,kr=n.unstable_getCurrentPriorityLevel,xs=n.unstable_ImmediatePriority,Ps=n.unstable_UserBlockingPriority,Ir=n.unstable_NormalPriority,oe=n.unstable_LowPriority,de=n.unstable_IdlePriority,Te=n.log,St=n.unstable_setDisableYieldValue,ue=null,je=null;function De(a){if(typeof Te=="function"&&St(a),je&&typeof je.setStrictMode=="function")try{je.setStrictMode(ue,a)}catch{}}var ke=Math.clz32?Math.clz32:mt,He=Math.log,Xe=Math.LN2;function mt(a){return a>>>=0,a===0?32:31-(He(a)/Xe|0)|0}var Gt=256,wr=262144,$t=4194304;function wn(a){var o=a&42;if(o!==0)return o;switch(a&-a){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Hn(a,o,u){var f=a.pendingLanes;if(f===0)return 0;var x=0,v=a.suspendedLanes,S=a.pingedLanes;a=a.warmLanes;var U=f&134217727;return U!==0?(f=U&~v,f!==0?x=wn(f):(S&=U,S!==0?x=wn(S):u||(u=U&~a,u!==0&&(x=wn(u))))):(U=f&~v,U!==0?x=wn(U):S!==0?x=wn(S):u||(u=f&~a,u!==0&&(x=wn(u)))),x===0?0:o!==0&&o!==x&&(o&v)===0&&(v=x&-x,u=o&-o,v>=u||v===32&&(u&4194048)!==0)?o:x}function Rr(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function Zd(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32: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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dl(){var a=$t;return $t<<=1,($t&62914560)===0&&($t=4194304),a}function ca(a){for(var o=[],u=0;31>u;u++)o.push(a);return o}function hl(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function xx(a,o,u,f,x,v){var S=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var U=a.entanglements,Y=a.expirationTimes,te=a.hiddenUpdates;for(u=S&~u;0<u;){var fe=31-ke(u),ge=1<<fe;U[fe]=0,Y[fe]=-1;var ie=te[fe];if(ie!==null)for(te[fe]=null,fe=0;fe<ie.length;fe++){var ce=ie[fe];ce!==null&&(ce.lane&=-536870913)}u&=~ge}f!==0&&fl(a,f,0),v!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=v&~(S&~o))}function fl(a,o,u){a.pendingLanes|=o,a.suspendedLanes&=~o;var f=31-ke(o);a.entangledLanes|=o,a.entanglements[f]=a.entanglements[f]|1073741824|u&261930}function eh(a,o){var u=a.entangledLanes|=o;for(a=a.entanglements;u;){var f=31-ke(u),x=1<<f;x&o|a[f]&o&&(a[f]|=o),u&=~x}}function th(a,o){var u=o&-o;return u=(u&42)!==0?1:ml(u),(u&(a.suspendedLanes|o))!==0?0:u}function ml(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Ka(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Ym(){var a=$.p;return a!==0?a:(a=window.event,a===void 0?32:bS(a.type))}function Os(a,o){var u=$.p;try{return $.p=a,o()}finally{$.p=u}}var Ls=Math.random().toString(36).slice(2),In="__reactFiber$"+Ls,Jn="__reactProps$"+Ls,ua="__reactContainer$"+Ls,Lc="__reactEvents$"+Ls,bx="__reactListeners$"+Ls,Gm="__reactHandles$"+Ls,$m="__reactResources$"+Ls,da="__reactMarker$"+Ls;function Vc(a){delete a[In],delete a[Jn],delete a[Lc],delete a[bx],delete a[Gm]}function ha(a){var o=a[In];if(o)return o;for(var u=a.parentNode;u;){if(o=u[ua]||u[In]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(a=rS(a);a!==null;){if(u=a[In])return u;a=rS(a)}return o}a=u,u=a.parentNode}return null}function bs(a){if(a=a[In]||a[ua]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function es(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(r(33))}function fa(a){var o=a[$m];return o||(o=a[$m]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Rn(a){a[da]=!0}var nh=new Set,rh={};function ma(a,o){pa(a,o),pa(a+"Capture",o)}function pa(a,o){for(rh[a]=o,a=0;a<o.length;a++)nh.add(o[a])}var sh=RegExp("^[: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]*$"),ah={},ih={};function Km(a){return Jt.call(ih,a)?!0:Jt.call(ah,a)?!1:sh.test(a)?ih[a]=!0:(ah[a]=!0,!1)}function Fc(a,o,u){if(Km(o))if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(o);return;case"boolean":var f=o.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){a.removeAttribute(o);return}}a.setAttribute(o,""+u)}}function ts(a,o,u){if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttribute(o,""+u)}}function Mn(a,o,u,f){if(f===null)a.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(o,u,""+f)}}function Zn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Fi(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function oh(a,o,u){var f=Object.getOwnPropertyDescriptor(a.constructor.prototype,o);if(!a.hasOwnProperty(o)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var x=f.get,v=f.set;return Object.defineProperty(a,o,{configurable:!0,get:function(){return x.call(this)},set:function(S){u=""+S,v.call(this,S)}}),Object.defineProperty(a,o,{enumerable:f.enumerable}),{getValue:function(){return u},setValue:function(S){u=""+S},stopTracking:function(){a._valueTracker=null,delete a[o]}}}}function kt(a){if(!a._valueTracker){var o=Fi(a)?"checked":"value";a._valueTracker=oh(a,o,""+a[o])}}function pl(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var u=o.getValue(),f="";return a&&(f=Fi(a)?a.checked?"true":"false":a.value),a=f,a!==u?(o.setValue(a),!0):!1}function ga(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}
vendor: 4,523 bytes, line 48
48catch{return a.body}}var gl=/[\n"\\]/g;function Mr(a){return a.replace(gl,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Bc(a,o,u,f,x,v,S,U){a.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?a.type=S:a.removeAttribute("type"),o!=null?S==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+Zn(o)):a.value!==""+Zn(o)&&(a.value=""+Zn(o)):S!=="submit"&&S!=="reset"||a.removeAttribute("value"),o!=null?lh(a,S,Zn(o)):u!=null?lh(a,S,Zn(u)):f!=null&&a.removeAttribute("value"),x==null&&v!=null&&(a.defaultChecked=!!v),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?a.name=""+Zn(U):a.removeAttribute("name")}function Wm(a,o,u,f,x,v,S,U){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(a.type=v),o!=null||u!=null){if(!(v!=="submit"&&v!=="reset"||o!=null)){kt(a);return}u=u!=null?""+Zn(u):"",o=o!=null?""+Zn(o):u,U||o===a.value||(a.value=o),a.defaultValue=o}f=f??x,f=typeof f!="function"&&typeof f!="symbol"&&!!f,a.checked=U?a.checked:!!f,a.defaultChecked=!!f,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(a.name=S),kt(a)}function lh(a,o,u){o==="number"&&ga(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Bi(a,o,u,f){if(a=a.options,o){o={};for(var x=0;x<u.length;x++)o["$"+u[x]]=!0;for(u=0;u<a.length;u++)x=o.hasOwnProperty("$"+a[u].value),a[u].selected!==x&&(a[u].selected=x),x&&f&&(a[u].defaultSelected=!0)}else{for(u=""+Zn(u),o=null,x=0;x<a.length;x++){if(a[x].value===u){a[x].selected=!0,f&&(a[x].defaultSelected=!0);return}o!==null||a[x].disabled||(o=a[x])}o!==null&&(o.selected=!0)}}function Qm(a,o,u){if(o!=null&&(o=""+Zn(o),o!==a.value&&(a.value=o),u==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=u!=null?""+Zn(u):""}function Ui(a,o,u,f){if(o==null){if(f!=null){if(u!=null)throw Error(r(92));if(ye(f)){if(1<f.length)throw Error(r(93));f=f[0]}u=f}u==null&&(u=""),o=u}u=Zn(o),a.defaultValue=u,f=a.textContent,f===u&&f!==""&&f!==null&&(a.value=f),kt(a)}function Pr(a,o){if(o){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=o;return}}a.textContent=o}var Xm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ch(a,o,u){var f=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?a.setProperty(o,""):o==="float"?a.cssFloat="":a[o]="":f?a.setProperty(o,u):typeof u!="number"||u===0||Xm.has(o)?o==="float"?a.cssFloat=u:a[o]=(""+u).trim():a[o]=u+"px"}function uh(a,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(a=a.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||o!=null&&o.hasOwnProperty(f)||(f.indexOf("--")===0?a.setProperty(f,""):f==="float"?a.cssFloat="":a[f]="");for(var x in o)f=o[x],o.hasOwnProperty(x)&&u[x]!==f&&ch(a,x,f)}else for(var v in o)o.hasOwnProperty(v)&&ch(a,v,o[v])}function Uc(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Jm=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),zi=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function zc(a){return zi.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Vs(){}var dh=null;function vs(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var qi=null,ya=null;function yl(a){var o=bs(a);if(o&&(a=o.stateNode)){var u=a[Jn]||null;e:switch(a=o.stateNode,o.type){case"input":if(Bc(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Mr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var f=u[o];if(f!==a&&f.form===a.form){var x=f[Jn]||null;if(!x)throw Error(r(90));Bc(f,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(o=0;o<u.length;o++)f=u[o],f.form===a.form&&pl(f)}break e;case"textarea":Qm(a,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Bi(a,!!u.multiple,o,!1)}}}var qc=!1;function Hi(a,o,u){if(qc)return a(o,u);qc=!0;try{var f=a(o);return f}finally{if(qc=!1,(qi!==null||ya!==null)&&(Yp(),qi&&(o=qi,a=ya,ya=qi=null,yl(o),a)))for(o=0;o<a.length;o++)yl(a[o])}}function Fs(a,o){var u=a.stateNode;if(u===null)return null;var f=u[Jn]||null;if(f===null)return null;u=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(a=a.type,f=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!f;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var ws=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xl=!1;if(ws)try{var Ft={};Object.defineProperty(Ft,"passive",{get:function(){xl=!0}}),window.addEventListener("test",Ft,Ft),window.removeEventListener("test",Ft,Ft)}catch{xl=!1}var xa=null,hh=null,bl=null;function fh(){if(bl)return bl;var a,o=hh,u=o.length,f,x="value"in xa?xa.value:xa.textContent,v=x.length;for(a=0;a<u&&o[a]===x[a];a++);var S=u-a;for(f=1;f<=S&&o[u-f]===x[v-f];f++);return bl=x.slice(a,1<f?1-f:void 0)}function vl(a){var o=a.keyCode;
vendor: 2,821 bytes, line 48
48return"charCode"in a?(a=a.charCode,a===0&&o===13&&(a=13)):a=o,a===10&&(a=13),32<=a||a===13?a:0}function Wa(){return!0}function Bs(){return!1}function ir(a){function o(u,f,x,v,S){this._reactName=u,this._targetInst=x,this.type=f,this.nativeEvent=v,this.target=S,this.currentTarget=null;for(var U in a)a.hasOwnProperty(U)&&(u=a[U],this[U]=u?u(v):v[U]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Wa:Bs,this.isPropagationStopped=Bs,this}return p(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Wa)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Wa)},persist:function(){},isPersistent:Wa}),o}var Qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ba=ir(Qa),Yi=p({},Qa,{view:0,detail:0}),mh=ir(Yi),Gi,Hc,va,Yc=p({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$i,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==va&&(va&&a.type==="mousemove"?(Gi=a.screenX-va.screenX,Hc=a.screenY-va.screenY):Hc=Gi=0,va=a),Gi)},movementY:function(a){return"movementY"in a?a.movementY:Hc}}),ph=ir(Yc),wl=p({},Yc,{dataTransfer:0}),Zm=ir(wl),ep=p({},Yi,{relatedTarget:0}),_l=ir(ep),gh=p({},Qa,{animationName:0,elapsedTime:0,pseudoElement:0}),tp=ir(gh),Gc=p({},Qa,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),np=ir(Gc),rp=p({},Qa,{data:0}),wa=ir(rp),sp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ap={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"},ip={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function op(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=ip[a])?!!o[a]:!1}function $i(){return op}var _r=p({},Yi,{key:function(a){if(a.key){var o=sp[a.key]||a.key;if(o!=="Unidentified")return o}
vendor: 4,940 bytes, line 48
48return a.type==="keypress"?(a=vl(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?ap[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$i,charCode:function(a){return a.type==="keypress"?vl(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?vl(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),lp=ir(_r),cp=p({},Yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xa=ir(cp),y=p({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$i}),T=ir(y),C=p({},Qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),z=ir(C),Z=p({},Yc,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),le=ir(Z),Ne=p({},Qa,{newState:0,oldState:0}),rt=ir(Ne),_n=[9,13,27,32],jt=ws&&"CompositionEvent"in window,on=null;ws&&"documentMode"in document&&(on=document.documentMode);var _s=ws&&"TextEvent"in window&&!on,_a=ws&&(!jt||on&&8<on&&11>=on),Us=" ",zs=!1;function Tl(a,o){switch(a){case"keyup":return _n.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $c(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Kc=!1;function EP(a,o){switch(a){case"compositionend":return $c(o);case"keypress":return o.which!==32?null:(zs=!0,Us);case"textInput":return a=o.data,a===Us&&zs?null:a;default:return null}}function SP(a,o){if(Kc)return a==="compositionend"||!jt&&Tl(a,o)?(a=fh(),bl=hh=xa=null,Kc=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return _a&&o.locale!=="ko"?null:o.data;default:return null}}var jP={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 iT(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!jP[a.type]:o==="textarea"}function oT(a,o,u,f){qi?ya?ya.push(f):ya=[f]:qi=f,o=Jp(o,"onChange"),0<o.length&&(u=new ba("onChange","change",null,u,f),a.push({event:u,listeners:o}))}var yh=null,xh=null;function AP(a){qE(a,0)}function up(a){var o=es(a);if(pl(o))return a}function lT(a,o){if(a==="change")return o}var cT=!1;if(ws){var vx;if(ws){var wx="oninput"in document;if(!wx){var uT=document.createElement("div");uT.setAttribute("oninput","return;"),wx=typeof uT.oninput=="function"}vx=wx}else vx=!1;cT=vx&&(!document.documentMode||9<document.documentMode)}function dT(){yh&&(yh.detachEvent("onpropertychange",hT),xh=yh=null)}function hT(a){if(a.propertyName==="value"&&up(xh)){var o=[];oT(o,xh,a,vs(a)),Hi(AP,o)}}function CP(a,o,u){a==="focusin"?(dT(),yh=o,xh=u,yh.attachEvent("onpropertychange",hT)):a==="focusout"&&dT()}function DP(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return up(xh)}function kP(a,o){if(a==="click")return up(o)}function IP(a,o){if(a==="input"||a==="change")return up(o)}function RP(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var ns=typeof Object.is=="function"?Object.is:RP;function bh(a,o){if(ns(a,o))return!0;if(typeof a!="object"||a===null||typeof o!="object"||o===null)return!1;var u=Object.keys(a),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var x=u[f];if(!Jt.call(o,x)||!ns(a[x],o[x]))return!1}return!0}function fT(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function mT(a,o){var u=fT(a);a=0;for(var f;u;){if(u.nodeType===3){if(f=a+u.textContent.length,a<=o&&f>=o)return{node:u,offset:o-a};a=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=fT(u)}}function pT(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?pT(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function gT(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=ga(a.document);o instanceof a.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)a=o.contentWindow;else break;o=ga(a.document)}return o}function _x(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var MP=ws&&"documentMode"in document&&11>=document.documentMode,Wc=null,Tx=null,vh=null,Nx=!1;function yT(a,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;
vendor: 22,744 bytes, line 48
48Nx||Wc==null||Wc!==ga(f)||(f=Wc,"selectionStart"in f&&_x(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),vh&&bh(vh,f)||(vh=f,f=Jp(Tx,"onSelect"),0<f.length&&(o=new ba("onSelect","select",null,o,u),a.push({event:o,listeners:f}),o.target=Wc)))}function Nl(a,o){var u={};return u[a.toLowerCase()]=o.toLowerCase(),u["Webkit"+a]="webkit"+o,u["Moz"+a]="moz"+o,u}var Qc={animationend:Nl("Animation","AnimationEnd"),animationiteration:Nl("Animation","AnimationIteration"),animationstart:Nl("Animation","AnimationStart"),transitionrun:Nl("Transition","TransitionRun"),transitionstart:Nl("Transition","TransitionStart"),transitioncancel:Nl("Transition","TransitionCancel"),transitionend:Nl("Transition","TransitionEnd")},Ex={},xT={};ws&&(xT=document.createElement("div").style,"AnimationEvent"in window||(delete Qc.animationend.animation,delete Qc.animationiteration.animation,delete Qc.animationstart.animation),"TransitionEvent"in window||delete Qc.transitionend.transition);function El(a){if(Ex[a])return Ex[a];if(!Qc[a])return a;var o=Qc[a],u;for(u in o)if(o.hasOwnProperty(u)&&u in xT)return Ex[a]=o[u];return a}var bT=El("animationend"),vT=El("animationiteration"),wT=El("animationstart"),PP=El("transitionrun"),OP=El("transitionstart"),LP=El("transitioncancel"),_T=El("transitionend"),TT=new Map,Sx="abort auxClick beforeToggle 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(" ");Sx.push("scrollEnd");function qs(a,o){TT.set(a,o),ma(o,[a])}var dp=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Ts=[],Xc=0,jx=0;function hp(){for(var a=Xc,o=jx=Xc=0;o<a;){var u=Ts[o];Ts[o++]=null;var f=Ts[o];Ts[o++]=null;var x=Ts[o];Ts[o++]=null;var v=Ts[o];if(Ts[o++]=null,f!==null&&x!==null){var S=f.pending;S===null?x.next=x:(x.next=S.next,S.next=x),f.pending=x}v!==0&&NT(u,x,v)}}function fp(a,o,u,f){Ts[Xc++]=a,Ts[Xc++]=o,Ts[Xc++]=u,Ts[Xc++]=f,jx|=f,a.lanes|=f,a=a.alternate,a!==null&&(a.lanes|=f)}function Ax(a,o,u,f){return fp(a,o,u,f),mp(a)}function Sl(a,o){return fp(a,null,null,o),mp(a)}function NT(a,o,u){a.lanes|=u;var f=a.alternate;f!==null&&(f.lanes|=u);for(var x=!1,v=a.return;v!==null;)v.childLanes|=u,f=v.alternate,f!==null&&(f.childLanes|=u),v.tag===22&&(a=v.stateNode,a===null||a._visibility&1||(x=!0)),a=v,v=v.return;return a.tag===3?(v=a.stateNode,x&&o!==null&&(x=31-ke(u),a=v.hiddenUpdates,f=a[x],f===null?a[x]=[o]:f.push(o),o.lane=u|536870912),v):null}function mp(a){if(50<zh)throw zh=0,Lb=null,Error(r(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var Jc={};function VP(a,o,u,f){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rs(a,o,u,f){return new VP(a,o,u,f)}function Cx(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ja(a,o){var u=a.alternate;return u===null?(u=rs(a.tag,o,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=o,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,o=a.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function ET(a,o){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=o,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,o=u.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),a}function pp(a,o,u,f,x,v){var S=0;if(f=a,typeof a=="function")Cx(a)&&(S=1);else if(typeof a=="string")S=q6(a,u,Se.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case I:return a=rs(31,u,o,x),a.elementType=I,a.lanes=v,a;case N:return jl(u.children,x,v,o);case E:S=8,x|=24;break;case j:return a=rs(12,u,o,x|2),a.elementType=j,a.lanes=v,a;case O:return a=rs(13,u,o,x),a.elementType=O,a.lanes=v,a;case q:return a=rs(19,u,o,x),a.elementType=q,a.lanes=v,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case A:S=10;break e;case P:S=9;break e;case M:S=11;break e;case L:S=14;break e;case k:S=16,f=null;break e}S=29,u=Error(r(130,a===null?"null":typeof a,"")),f=null}return o=rs(S,u,o,x),o.elementType=a,o.type=f,o.lanes=v,o}function jl(a,o,u,f){return a=rs(7,a,f,o),a.lanes=u,a}function Dx(a,o,u){return a=rs(6,a,null,o),a.lanes=u,a}function ST(a){var o=rs(18,null,null,0);return o.stateNode=a,o}function kx(a,o,u){return o=rs(4,a.children!==null?a.children:[],a.key,o),o.lanes=u,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var jT=new WeakMap;function Ns(a,o){if(typeof a=="object"&&a!==null){var u=jT.get(a);return u!==void 0?u:(o={value:a,source:o,stack:gs(o)},jT.set(a,o),o)}return{value:a,source:o,stack:gs(o)}}var Zc=[],eu=0,gp=null,wh=0,Es=[],Ss=0,Ki=null,Ta=1,Na="";function Za(a,o){Zc[eu++]=wh,Zc[eu++]=gp,gp=a,wh=o}function AT(a,o,u){Es[Ss++]=Ta,Es[Ss++]=Na,Es[Ss++]=Ki,Ki=a;var f=Ta;a=Na;var x=32-ke(f)-1;f&=~(1<<x),u+=1;var v=32-ke(o)+x;if(30<v){var S=x-x%5;v=(f&(1<<S)-1).toString(32),f>>=S,x-=S,Ta=1<<32-ke(o)+x|u<<x|f,Na=v+a}else Ta=1<<v|u<<x|f,Na=a}function Ix(a){a.return!==null&&(Za(a,1),AT(a,1,0))}function Rx(a){for(;a===gp;)gp=Zc[--eu],Zc[eu]=null,wh=Zc[--eu],Zc[eu]=null;for(;a===Ki;)Ki=Es[--Ss],Es[Ss]=null,Na=Es[--Ss],Es[Ss]=null,Ta=Es[--Ss],Es[Ss]=null}function CT(a,o){Es[Ss++]=Ta,Es[Ss++]=Na,Es[Ss++]=Ki,Ta=o.id,Na=o.overflow,Ki=a}var or=null,en=null,vt=!1,Wi=null,js=!1,Mx=Error(r(519));function Qi(a){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _h(Ns(o,a)),Mx}function DT(a){var o=a.stateNode,u=a.type,f=a.memoizedProps;switch(o[In]=a,o[Jn]=f,u){case"dialog":ht("cancel",o),ht("close",o);break;case"iframe":case"object":case"embed":ht("load",o);break;case"video":case"audio":for(u=0;u<Hh.length;u++)ht(Hh[u],o);break;case"source":ht("error",o);break;case"img":case"image":case"link":ht("error",o),ht("load",o);break;case"details":ht("toggle",o);break;case"input":ht("invalid",o),Wm(o,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":ht("invalid",o);break;case"textarea":ht("invalid",o),Ui(o,f.value,f.defaultValue,f.children)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||f.suppressHydrationWarning===!0||$E(o.textContent,u)?(f.popover!=null&&(ht("beforetoggle",o),ht("toggle",o)),f.onScroll!=null&&ht("scroll",o),f.onScrollEnd!=null&&ht("scrollend",o),f.onClick!=null&&(o.onclick=Vs),o=!0):o=!1,o||Qi(a,!0)}function kT(a){for(or=a.return;or;)switch(or.tag){case 5:case 31:case 13:js=!1;return;case 27:case 3:js=!0;return;default:or=or.return}}function tu(a){if(a!==or)return!1;if(!vt)return kT(a),vt=!0,!1;var o=a.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Jb(a.type,a.memoizedProps)),u=!u),u&&en&&Qi(a),kT(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));en=nS(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));en=nS(a)}else o===27?(o=en,uo(a.type)?(a=rv,rv=null,en=a):en=o):en=or?Cs(a.stateNode.nextSibling):null;return!0}function Al(){en=or=null,vt=!1}function Px(){var a=Wi;return a!==null&&(Fr===null?Fr=a:Fr.push.apply(Fr,a),Wi=null),a}function _h(a){Wi===null?Wi=[a]:Wi.push(a)}var Ox=H(null),Cl=null,ei=null;function Xi(a,o,u){we(Ox,o._currentValue),o._currentValue=u}function ti(a){a._currentValue=Ox.current,he(Ox)}function Lx(a,o,u){for(;a!==null;){var f=a.alternate;if((a.childLanes&o)!==o?(a.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),a===u)break;a=a.return}}function Vx(a,o,u,f){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var v=x.dependencies;if(v!==null){var S=x.child;v=v.firstContext;e:for(;v!==null;){var U=v;v=x;for(var Y=0;Y<o.length;Y++)if(U.context===o[Y]){v.lanes|=u,U=v.alternate,U!==null&&(U.lanes|=u),Lx(v.return,u,a),f||(S=null);break e}v=U.next}}else if(x.tag===18){if(S=x.return,S===null)throw Error(r(341));S.lanes|=u,v=S.alternate,v!==null&&(v.lanes|=u),Lx(S,u,a),S=null}else S=x.child;if(S!==null)S.return=x;else for(S=x;S!==null;){if(S===a){S=null;break}if(x=S.sibling,x!==null){x.return=S.return,S=x;break}S=S.return}x=S}}function nu(a,o,u,f){a=null;for(var x=o,v=!1;x!==null;){if(!v){if((x.flags&524288)!==0)v=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var S=x.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var U=x.type;ns(x.pendingProps.value,S.value)||(a!==null?a.push(U):a=[U])}}else if(x===Je.current){if(S=x.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(Wh):a=[Wh])}x=x.return}a!==null&&Vx(o,a,u,f),o.flags|=262144}function yp(a){for(a=a.firstContext;a!==null;){if(!ns(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Dl(a){Cl=a,ei=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function lr(a){return IT(Cl,a)}function xp(a,o){return Cl===null&&Dl(a),IT(a,o)}function IT(a,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},ei===null){if(a===null)throw Error(r(308));ei=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else ei=ei.next=o;return u}var FP=typeof AbortController<"u"?AbortController:function(){var a=[],o=this.signal={aborted:!1,addEventListener:function(u,f){a.push(f)}};this.abort=function(){o.aborted=!0,a.forEach(function(u){return u()})}},BP=n.unstable_scheduleCallback,UP=n.unstable_NormalPriority,Pn={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fx(){return{controller:new FP,data:new Map,refCount:0}}function Th(a){a.refCount--,a.refCount===0&&BP(UP,function(){a.controller.abort()})}var Nh=null,Bx=0,ru=0,su=null;function zP(a,o){if(Nh===null){var u=Nh=[];Bx=0,ru=qb(),su={status:"pending",value:void 0,then:function(f){u.push(f)}}}return Bx++,o.then(RT,RT),o}function RT(){if(--Bx===0&&Nh!==null){su!==null&&(su.status="fulfilled");var a=Nh;Nh=null,ru=0,su=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function qP(a,o){var u=[],f={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return a.then(function(){f.status="fulfilled",f.value=o;for(var x=0;x<u.length;x++)(0,u[x])(o)},function(x){for(f.status="rejected",f.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),f}var MT=W.S;W.S=function(a,o){yE=kn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&zP(a,o),MT!==null&&MT(a,o)};var kl=H(null);function Ux(){var a=kl.current;return a!==null?a:Kt.pooledCache}function bp(a,o){o===null?we(kl,kl.current):we(kl,o.pool)}function PT(){var a=Ux();return a===null?null:{parent:Pn._currentValue,pool:a}}var au=Error(r(460)),zx=Error(r(474)),vp=Error(r(542)),wp={then:function(){}};function OT(a){return a=a.status,a==="fulfilled"||a==="rejected"}function LT(a,o,u){switch(u=a[u],u===void 0?a.push(o):u!==o&&(o.then(Vs,Vs),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,FT(a),a;default:if(typeof o.status=="string")o.then(Vs,Vs);else{if(a=Kt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=o,a.status="pending",a.then(function(f){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=f}},function(f){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=f}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,FT(a),a}throw Rl=o,au}}function Il(a){try{var o=a._init;return o(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Rl=u,au):u}}var Rl=null;function VT(){if(Rl===null)throw Error(r(459));var a=Rl;return Rl=null,a}function FT(a){if(a===au||a===vp)throw Error(r(483))}var iu=null,Eh=0;function _p(a){var o=Eh;return Eh+=1,iu===null&&(iu=[]),LT(iu,a,o)}function Sh(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function Tp(a,o){throw o.$$typeof===b?Error(r(525)):(a=Object.prototype.toString.call(o),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":a)))}function BT(a){function o(Q,K){if(a){var ee=Q.deletions;ee===null?(Q.deletions=[K],Q.flags|=16):ee.push(K)}}function u(Q,K){if(!a)return null;for(;K!==null;)o(Q,K),K=K.sibling;return null}function f(Q){for(var K=new Map;Q!==null;)Q.key!==null?K.set(Q.key,Q):K.set(Q.index,Q),Q=Q.sibling;return K}function x(Q,K){return Q=Ja(Q,K),Q.index=0,Q.sibling=null,Q}function v(Q,K,ee){return Q.index=ee,a?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<K?(Q.flags|=67108866,K):ee):(Q.flags|=67108866,K)):(Q.flags|=1048576,K)}function S(Q){return a&&Q.alternate===null&&(Q.flags|=67108866),Q}function U(Q,K,ee,me){return K===null||K.tag!==6?(K=Dx(ee,Q.mode,me),K.return=Q,K):(K=x(K,ee),K.return=Q,K)}function Y(Q,K,ee,me){var Ke=ee.type;return Ke===N?fe(Q,K,ee.props.children,me,ee.key):K!==null&&(K.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===k&&Il(Ke)===K.type)?(K=x(K,ee.props),Sh(K,ee),K.return=Q,K):(K=pp(ee.type,ee.key,ee.props,null,Q.mode,me),Sh(K,ee),K.return=Q,K)}function te(Q,K,ee,me){return K===null||K.tag!==4||K.stateNode.containerInfo!==ee.containerInfo||K.stateNode.implementation!==ee.implementation?(K=kx(ee,Q.mode,me),K.return=Q,K):(K=x(K,ee.children||[]),K.return=Q,K)}function fe(Q,K,ee,me,Ke){return K===null||K.tag!==7?(K=jl(ee,Q.mode,me,Ke),K.return=Q,K):(K=x(K,ee),K.return=Q,K)}function ge(Q,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Dx(""+K,Q.mode,ee),K.return=Q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return ee=pp(K.type,K.key,K.props,null,Q.mode,ee),Sh(ee,K),ee.return=Q,ee;case _:return K=kx(K,Q.mode,ee),K.return=Q,K;case k:return K=Il(K),ge(Q,K,ee)}if(ye(K)||B(K))return K=jl(K,Q.mode,ee,null),K.return=Q,K;if(typeof K.then=="function")return ge(Q,_p(K),ee);if(K.$$typeof===A)return ge(Q,xp(Q,K),ee);Tp(Q,K)}return null}function ie(Q,K,ee,me){var Ke=K!==null?K.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Ke!==null?null:U(Q,K,""+ee,me);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:return ee.key===Ke?Y(Q,K,ee,me):null;case _:return ee.key===Ke?te(Q,K,ee,me):null;case k:return ee=Il(ee),ie(Q,K,ee,me)}if(ye(ee)||B(ee))return Ke!==null?null:fe(Q,K,ee,me,null);if(typeof ee.then=="function")return ie(Q,K,_p(ee),me);if(ee.$$typeof===A)return ie(Q,K,xp(Q,ee),me);Tp(Q,ee)}return null}function ce(Q,K,ee,me,Ke){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return Q=Q.get(ee)||null,U(K,Q,""+me,Ke);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case w:return Q=Q.get(me.key===null?ee:me.key)||null,Y(K,Q,me,Ke);case _:return Q=Q.get(me.key===null?ee:me.key)||null,te(K,Q,me,Ke);case k:return me=Il(me),ce(Q,K,ee,me,Ke)}if(ye(me)||B(me))return Q=Q.get(ee)||null,fe(K,Q,me,Ke,null);if(typeof me.then=="function")return ce(Q,K,ee,_p(me),Ke);if(me.$$typeof===A)return ce(Q,K,ee,xp(K,me),Ke);Tp(K,me)}return null}function Pe(Q,K,ee,me){for(var Ke=null,Nt=null,Ue=K,it=K=0,gt=null;Ue!==null&&it<ee.length;it++){Ue.index>it?(gt=Ue,Ue=null):gt=Ue.sibling;var Et=ie(Q,Ue,ee[it],me);if(Et===null){Ue===null&&(Ue=gt);break}a&&Ue&&Et.alternate===null&&o(Q,Ue),K=v(Et,K,it),Nt===null?Ke=Et:Nt.sibling=Et,Nt=Et,Ue=gt}if(it===ee.length)return u(Q,Ue),vt&&Za(Q,it),Ke;if(Ue===null){for(;it<ee.length;it++)Ue=ge(Q,ee[it],me),Ue!==null&&(K=v(Ue,K,it),Nt===null?Ke=Ue:Nt.sibling=Ue,Nt=Ue);return vt&&Za(Q,it),Ke}for(Ue=f(Ue);it<ee.length;it++)gt=ce(Ue,Q,it,ee[it],me),gt!==null&&(a&&gt.alternate!==null&&Ue.delete(gt.key===null?it:gt.key),K=v(gt,K,it),Nt===null?Ke=gt:Nt.sibling=gt,Nt=gt);return a&&Ue.forEach(function(go){return o(Q,go)}),vt&&Za(Q,it),Ke}function We(Q,K,ee,me){if(ee==null)throw Error(r(151));for(var Ke=null,Nt=null,Ue=K,it=K=0,gt=null,Et=ee.next();Ue!==null&&!Et.done;it++,Et=ee.next()){Ue.index>it?(gt=Ue,Ue=null):gt=Ue.sibling;var go=ie(Q,Ue,Et.value,me);if(go===null){Ue===null&&(Ue=gt);break}a&&Ue&&go.alternate===null&&o(Q,Ue),K=v(go,K,it),Nt===null?Ke=go:Nt.sibling=go,Nt=go,Ue=gt}if(Et.done)return u(Q,Ue),vt&&Za(Q,it),Ke;if(Ue===null){for(;!Et.done;it++,Et=ee.next())Et=ge(Q,Et.value,me),Et!==null&&(K=v(Et,K,it),Nt===null?Ke=Et:Nt.sibling=Et,Nt=Et);return vt&&Za(Q,it),Ke}for(Ue=f(Ue);!Et.done;it++,Et=ee.next())Et=ce(Ue,Q,it,Et.value,me),Et!==null&&(a&&Et.alternate!==null&&Ue.delete(Et.key===null?it:Et.key),K=v(Et,K,it),Nt===null?Ke=Et:Nt.sibling=Et,Nt=Et);return a&&Ue.forEach(function(eO){return o(Q,eO)}),vt&&Za(Q,it),Ke}function zt(Q,K,ee,me){if(typeof ee=="object"&&ee!==null&&ee.type===N&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:e:{for(var Ke=ee.key;K!==null;){if(K.key===Ke){if(Ke=ee.type,Ke===N){if(K.tag===7){u(Q,K.sibling),me=x(K,ee.props.children),me.return=Q,Q=me;break e}}else if(K.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===k&&Il(Ke)===K.type){u(Q,K.sibling),me=x(K,ee.props),Sh(me,ee),me.return=Q,Q=me;break e}u(Q,K);break}else o(Q,K);K=K.sibling}ee.type===N?(me=jl(ee.props.children,Q.mode,me,ee.key),me.return=Q,Q=me):(me=pp(ee.type,ee.key,ee.props,null,Q.mode,me),Sh(me,ee),me.return=Q,Q=me)}return S(Q);case _:e:{for(Ke=ee.key;K!==null;){if(K.key===Ke)if(K.tag===4&&K.stateNode.containerInfo===ee.containerInfo&&K.stateNode.implementation===ee.implementation){u(Q,K.sibling),me=x(K,ee.children||[]),me.return=Q,Q=me;break e}else{u(Q,K);break}else o(Q,K);K=K.sibling}me=kx(ee,Q.mode,me),me.return=Q,Q=me}return S(Q);case k:return ee=Il(ee),zt(Q,K,ee,me)}if(ye(ee))return Pe(Q,K,ee,me);if(B(ee)){if(Ke=B(ee),typeof Ke!="function")throw Error(r(150));return ee=Ke.call(ee),We(Q,K,ee,me)}if(typeof ee.then=="function")return zt(Q,K,_p(ee),me);if(ee.$$typeof===A)return zt(Q,K,xp(Q,ee),me);Tp(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,K!==null&&K.tag===6?(u(Q,K.sibling),me=x(K,ee),me.return=Q,Q=me):(u(Q,K),me=Dx(ee,Q.mode,me),me.return=Q,Q=me),S(Q)):u(Q,K)}return function(Q,K,ee,me){try{Eh=0;var Ke=zt(Q,K,ee,me);return iu=null,Ke}catch(Ue){if(Ue===au||Ue===vp)throw Ue;var Nt=rs(29,Ue,null,Q.mode);return Nt.lanes=me,Nt.return=Q,Nt}finally{}}}var Ml=BT(!0),UT=BT(!1),Ji=!1;function qx(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hx(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Zi(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function eo(a,o,u){var f=a.updateQueue;if(f===null)return null;if(f=f.shared,(At&2)!==0){var x=f.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),f.pending=o,o=mp(a),NT(a,null,u),o}return fp(a,f,o,u),mp(a)}function jh(a,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var f=o.lanes;f&=a.pendingLanes,u|=f,o.lanes=u,eh(a,u)}}function Yx(a,o){var u=a.updateQueue,f=a.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var x=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var S={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};v===null?x=v=S:v=v.next=S,u=u.next}while(u!==null);v===null?x=v=o:v=v.next=o}else x=v=o;u={baseState:f.baseState,firstBaseUpdate:x,lastBaseUpdate:v,shared:f.shared,callbacks:f.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=o:a.next=o,u.lastBaseUpdate=o}var Gx=!1;function Ah(){if(Gx){var a=su;if(a!==null)throw a}}function Ch(a,o,u,f){Gx=!1;var x=a.updateQueue;Ji=!1;var v=x.firstBaseUpdate,S=x.lastBaseUpdate,U=x.shared.pending;if(U!==null){x.shared.pending=null;var Y=U,te=Y.next;Y.next=null,S===null?v=te:S.next=te,S=Y;var fe=a.alternate;fe!==null&&(fe=fe.updateQueue,U=fe.lastBaseUpdate,U!==S&&(U===null?fe.firstBaseUpdate=te:U.next=te,fe.lastBaseUpdate=Y))}if(v!==null){var ge=x.baseState;S=0,fe=te=Y=null,U=v;do{var ie=U.lane&-536870913,ce=ie!==U.lane;if(ce?(pt&ie)===ie:(f&ie)===ie){ie!==0&&ie===ru&&(Gx=!0),fe!==null&&(fe=fe.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Pe=a,We=U;ie=o;var zt=u;switch(We.tag){case 1:if(Pe=We.payload,typeof Pe=="function"){ge=Pe.call(zt,ge,ie);break e}ge=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=We.payload,ie=typeof Pe=="function"?Pe.call(zt,ge,ie):Pe,ie==null)break e;ge=p({},ge,ie);break e;case 2:Ji=!0}}ie=U.callback,ie!==null&&(a.flags|=64,ce&&(a.flags|=8192),ce=x.callbacks,ce===null?x.callbacks=[ie]:ce.push(ie))}else ce={lane:ie,tag:U.tag,payload:U.payload,callback:U.callback,next:null},fe===null?(te=fe=ce,Y=ge):fe=fe.next=ce,S|=ie;if(U=U.next,U===null){if(U=x.shared.pending,U===null)break;ce=U,U=ce.next,ce.next=null,x.lastBaseUpdate=ce,x.shared.pending=null}}while(!0);fe===null&&(Y=ge),x.baseState=Y,x.firstBaseUpdate=te,x.lastBaseUpdate=fe,v===null&&(x.shared.lanes=0),ao|=S,a.lanes=S,a.memoizedState=ge}}function zT(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function qT(a,o){var u=a.callbacks;
vendor: 4,101 bytes, line 48
48if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)zT(u[a],o)}var ou=H(null),Np=H(0);function HT(a,o){a=ui,we(Np,a),we(ou,o),ui=a|o.baseLanes}function $x(){we(Np,ui),we(ou,ou.current)}function Kx(){ui=Np.current,he(ou),he(Np)}var ss=H(null),As=null;function to(a){var o=a.alternate;we(Tn,Tn.current&1),we(ss,a),As===null&&(o===null||ou.current!==null||o.memoizedState!==null)&&(As=a)}function Wx(a){we(Tn,Tn.current),we(ss,a),As===null&&(As=a)}function YT(a){a.tag===22?(we(Tn,Tn.current),we(ss,a),As===null&&(As=a)):no()}function no(){we(Tn,Tn.current),we(ss,ss.current)}function as(a){he(ss),As===a&&(As=null),he(Tn)}var Tn=H(0);function Ep(a){for(var o=a;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||tv(u)||nv(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var ni=0,st=null,Bt=null,On=null,Sp=!1,lu=!1,Pl=!1,jp=0,Dh=0,cu=null,HP=0;function gn(){throw Error(r(321))}function Qx(a,o){if(o===null)return!1;for(var u=0;u<o.length&&u<a.length;u++)if(!ns(a[u],o[u]))return!1;return!0}function Xx(a,o,u,f,x,v){return ni=v,st=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,W.H=a===null||a.memoizedState===null?AN:hb,Pl=!1,v=u(f,x),Pl=!1,lu&&(v=$T(o,u,f,x)),GT(a),v}function GT(a){W.H=Rh;var o=Bt!==null&&Bt.next!==null;if(ni=0,On=Bt=st=null,Sp=!1,Dh=0,cu=null,o)throw Error(r(300));a===null||Ln||(a=a.dependencies,a!==null&&yp(a)&&(Ln=!0))}function $T(a,o,u,f){st=a;var x=0;do{if(lu&&(cu=null),Dh=0,lu=!1,25<=x)throw Error(r(301));if(x+=1,On=Bt=null,a.updateQueue!=null){var v=a.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}W.H=CN,v=o(u,f)}while(lu);return v}function YP(){var a=W.H,o=a.useState()[0];return o=typeof o.then=="function"?kh(o):o,a=a.useState()[0],(Bt!==null?Bt.memoizedState:null)!==a&&(st.flags|=1024),o}function Jx(){var a=jp!==0;return jp=0,a}function Zx(a,o,u){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~u}function eb(a){if(Sp){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}Sp=!1}ni=0,On=Bt=st=null,lu=!1,Dh=jp=0,cu=null}function Tr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return On===null?st.memoizedState=On=a:On=On.next=a,On}function Nn(){if(Bt===null){var a=st.alternate;a=a!==null?a.memoizedState:null}else a=Bt.next;var o=On===null?st.memoizedState:On.next;if(o!==null)On=o,Bt=a;else{if(a===null)throw st.alternate===null?Error(r(467)):Error(r(310));Bt=a,a={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},On===null?st.memoizedState=On=a:On=On.next=a}return On}function Ap(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kh(a){var o=Dh;return Dh+=1,cu===null&&(cu=[]),a=LT(cu,a,o),o=st,(On===null?o.memoizedState:On.next)===null&&(o=o.alternate,W.H=o===null||o.memoizedState===null?AN:hb),a}function Cp(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return kh(a);if(a.$$typeof===A)return lr(a)}throw Error(r(438,String(a)))}function tb(a){var o=null,u=st.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var f=st.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(o={data:f.data.map(function(x){return x.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Ap(),st.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(a),f=0;f<a;f++)u[f]=R;return o.index++,u}function ri(a,o){return typeof o=="function"?o(a):o}function Dp(a){var o=Nn();return nb(o,Bt,a)}function nb(a,o,u){var f=a.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=u;var x=a.baseQueue,v=f.pending;if(v!==null){if(x!==null){var S=x.next;
vendor: 16,110 bytes, line 48
48x.next=v.next,v.next=S}o.baseQueue=x=v,f.pending=null}if(v=a.baseState,x===null)a.memoizedState=v;else{o=x.next;var U=S=null,Y=null,te=o,fe=!1;do{var ge=te.lane&-536870913;if(ge!==te.lane?(pt&ge)===ge:(ni&ge)===ge){var ie=te.revertLane;if(ie===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ge===ru&&(fe=!0);else if((ni&ie)===ie){te=te.next,ie===ru&&(fe=!0);continue}else ge={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},Y===null?(U=Y=ge,S=v):Y=Y.next=ge,st.lanes|=ie,ao|=ie;ge=te.action,Pl&&u(v,ge),v=te.hasEagerState?te.eagerState:u(v,ge)}else ie={lane:ge,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},Y===null?(U=Y=ie,S=v):Y=Y.next=ie,st.lanes|=ge,ao|=ge;te=te.next}while(te!==null&&te!==o);if(Y===null?S=v:Y.next=U,!ns(v,a.memoizedState)&&(Ln=!0,fe&&(u=su,u!==null)))throw u;a.memoizedState=v,a.baseState=S,a.baseQueue=Y,f.lastRenderedState=v}return x===null&&(f.lanes=0),[a.memoizedState,f.dispatch]}function rb(a){var o=Nn(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var f=u.dispatch,x=u.pending,v=o.memoizedState;if(x!==null){u.pending=null;var S=x=x.next;do v=a(v,S.action),S=S.next;while(S!==x);ns(v,o.memoizedState)||(Ln=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),u.lastRenderedState=v}return[v,f]}function KT(a,o,u){var f=st,x=Nn(),v=vt;if(v){if(u===void 0)throw Error(r(407));u=u()}else u=o();var S=!ns((Bt||x).memoizedState,u);if(S&&(x.memoizedState=u,Ln=!0),x=x.queue,ib(XT.bind(null,f,x,a),[a]),x.getSnapshot!==o||S||On!==null&&On.memoizedState.tag&1){if(f.flags|=2048,uu(9,{destroy:void 0},QT.bind(null,f,x,u,o),null),Kt===null)throw Error(r(349));v||(ni&127)!==0||WT(f,o,u)}return u}function WT(a,o,u){a.flags|=16384,a={getSnapshot:o,value:u},o=st.updateQueue,o===null?(o=Ap(),st.updateQueue=o,o.stores=[a]):(u=o.stores,u===null?o.stores=[a]:u.push(a))}function QT(a,o,u,f){o.value=u,o.getSnapshot=f,JT(o)&&ZT(a)}function XT(a,o,u){return u(function(){JT(o)&&ZT(a)})}function JT(a){var o=a.getSnapshot;a=a.value;try{var u=o();return!ns(a,u)}catch{return!0}}function ZT(a){var o=Sl(a,2);o!==null&&Br(o,a,2)}function sb(a){var o=Tr();if(typeof a=="function"){var u=a;if(a=u(),Pl){De(!0);try{u()}finally{De(!1)}}}return o.memoizedState=o.baseState=a,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:a},o}function eN(a,o,u,f){return a.baseState=u,nb(a,Bt,typeof f=="function"?f:ri)}function GP(a,o,u,f,x){if(Rp(a))throw Error(r(485));if(a=o.action,a!==null){var v={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){v.listeners.push(S)}};W.T!==null?u(!0):v.isTransition=!1,f(v),u=o.pending,u===null?(v.next=o.pending=v,tN(o,v)):(v.next=u.next,o.pending=u.next=v)}}function tN(a,o){var u=o.action,f=o.payload,x=a.state;if(o.isTransition){var v=W.T,S={};W.T=S;try{var U=u(x,f),Y=W.S;Y!==null&&Y(S,U),nN(a,o,U)}catch(te){ab(a,o,te)}finally{v!==null&&S.types!==null&&(v.types=S.types),W.T=v}}else try{v=u(x,f),nN(a,o,v)}catch(te){ab(a,o,te)}}function nN(a,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){rN(a,o,f)},function(f){return ab(a,o,f)}):rN(a,o,u)}function rN(a,o,u){o.status="fulfilled",o.value=u,sN(o),a.state=u,o=a.pending,o!==null&&(u=o.next,u===o?a.pending=null:(u=u.next,o.next=u,tN(a,u)))}function ab(a,o,u){var f=a.pending;if(a.pending=null,f!==null){f=f.next;do o.status="rejected",o.reason=u,sN(o),o=o.next;while(o!==f)}a.action=null}function sN(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function aN(a,o){return o}function iN(a,o){if(vt){var u=Kt.formState;if(u!==null){e:{var f=st;if(vt){if(en){t:{for(var x=en,v=js;x.nodeType!==8;){if(!v){x=null;break t}if(x=Cs(x.nextSibling),x===null){x=null;break t}}v=x.data,x=v==="F!"||v==="F"?x:null}if(x){en=Cs(x.nextSibling),f=x.data==="F!";break e}}Qi(f)}f=!1}f&&(o=u[0])}}return u=Tr(),u.memoizedState=u.baseState=o,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aN,lastRenderedState:o},u.queue=f,u=EN.bind(null,st,f),f.dispatch=u,f=sb(!1),v=db.bind(null,st,!1,f.queue),f=Tr(),x={state:o,dispatch:null,action:a,pending:null},f.queue=x,u=GP.bind(null,st,x,v,u),x.dispatch=u,f.memoizedState=a,[o,u,!1]}function oN(a){var o=Nn();return lN(o,Bt,a)}function lN(a,o,u){if(o=nb(a,o,aN)[0],a=Dp(ri)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var f=kh(o)}catch(S){throw S===au?vp:S}else f=o;o=Nn();var x=o.queue,v=x.dispatch;return u!==o.memoizedState&&(st.flags|=2048,uu(9,{destroy:void 0},$P.bind(null,x,u),null)),[f,v,a]}function $P(a,o){a.action=o}function cN(a){var o=Nn(),u=Bt;if(u!==null)return lN(o,u,a);Nn(),o=o.memoizedState,u=Nn();var f=u.queue.dispatch;return u.memoizedState=a,[o,f,!1]}function uu(a,o,u,f){return a={tag:a,create:u,deps:f,inst:o,next:null},o=st.updateQueue,o===null&&(o=Ap(),st.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=a.next=a:(f=u.next,u.next=a,a.next=f,o.lastEffect=a),a}function uN(){return Nn().memoizedState}function kp(a,o,u,f){var x=Tr();st.flags|=a,x.memoizedState=uu(1|o,{destroy:void 0},u,f===void 0?null:f)}function Ip(a,o,u,f){var x=Nn();f=f===void 0?null:f;var v=x.memoizedState.inst;Bt!==null&&f!==null&&Qx(f,Bt.memoizedState.deps)?x.memoizedState=uu(o,v,u,f):(st.flags|=a,x.memoizedState=uu(1|o,v,u,f))}function dN(a,o){kp(8390656,8,a,o)}function ib(a,o){Ip(2048,8,a,o)}function KP(a){st.flags|=4;var o=st.updateQueue;if(o===null)o=Ap(),st.updateQueue=o,o.events=[a];else{var u=o.events;u===null?o.events=[a]:u.push(a)}}function hN(a){var o=Nn().memoizedState;return KP({ref:o,nextImpl:a}),function(){if((At&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function fN(a,o){return Ip(4,2,a,o)}function mN(a,o){return Ip(4,4,a,o)}function pN(a,o){if(typeof o=="function"){a=a();var u=o(a);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return a=a(),o.current=a,function(){o.current=null}}function gN(a,o,u){u=u!=null?u.concat([a]):null,Ip(4,4,pN.bind(null,o,a),u)}function ob(){}function yN(a,o){var u=Nn();o=o===void 0?null:o;var f=u.memoizedState;return o!==null&&Qx(o,f[1])?f[0]:(u.memoizedState=[a,o],a)}function xN(a,o){var u=Nn();o=o===void 0?null:o;var f=u.memoizedState;if(o!==null&&Qx(o,f[1]))return f[0];if(f=a(),Pl){De(!0);try{a()}finally{De(!1)}}return u.memoizedState=[f,o],f}function lb(a,o,u){return u===void 0||(ni&1073741824)!==0&&(pt&261930)===0?a.memoizedState=o:(a.memoizedState=u,a=bE(),st.lanes|=a,ao|=a,u)}function bN(a,o,u,f){return ns(u,o)?u:ou.current!==null?(a=lb(a,u,f),ns(a,o)||(Ln=!0),a):(ni&42)===0||(ni&1073741824)!==0&&(pt&261930)===0?(Ln=!0,a.memoizedState=u):(a=bE(),st.lanes|=a,ao|=a,o)}function vN(a,o,u,f,x){var v=$.p;$.p=v!==0&&8>v?v:8;var S=W.T,U={};W.T=U,db(a,!1,o,u);try{var Y=x(),te=W.S;if(te!==null&&te(U,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var fe=qP(Y,f);Ih(a,o,fe,ls(a))}else Ih(a,o,f,ls(a))}catch(ge){Ih(a,o,{then:function(){},status:"rejected",reason:ge},ls())}finally{$.p=v,S!==null&&U.types!==null&&(S.types=U.types),W.T=S}}function WP(){}function cb(a,o,u,f){if(a.tag!==5)throw Error(r(476));var x=wN(a).queue;vN(a,x,o,X,u===null?WP:function(){return _N(a),u(f)})}function wN(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:X},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:u},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function _N(a){var o=wN(a);o.next===null&&(o=a.alternate.memoizedState),Ih(a,o.next.queue,{},ls())}function ub(){return lr(Wh)}function TN(){return Nn().memoizedState}function NN(){return Nn().memoizedState}function QP(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var u=ls();a=Zi(u);var f=eo(o,a,u);f!==null&&(Br(f,o,u),jh(f,o,u)),o={cache:Fx()},a.payload=o;return}o=o.return}}function XP(a,o,u){var f=ls();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Rp(a)?SN(o,u):(u=Ax(a,o,u,f),u!==null&&(Br(u,a,f),jN(u,o,f)))}function EN(a,o,u){var f=ls();Ih(a,o,u,f)}function Ih(a,o,u,f){var x={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Rp(a))SN(o,x);else{var v=a.alternate;if(a.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var S=o.lastRenderedState,U=v(S,u);if(x.hasEagerState=!0,x.eagerState=U,ns(U,S))return fp(a,o,x,0),Kt===null&&hp(),!1}catch{}finally{}if(u=Ax(a,o,x,f),u!==null)return Br(u,a,f),jN(u,o,f),!0}return!1}function db(a,o,u,f){if(f={lane:2,revertLane:qb(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Rp(a)){if(o)throw Error(r(479))}else o=Ax(a,u,f,2),o!==null&&Br(o,a,2)}function Rp(a){var o=a.alternate;return a===st||o!==null&&o===st}function SN(a,o){lu=Sp=!0;var u=a.pending;u===null?o.next=o:(o.next=u.next,u.next=o),a.pending=o}function jN(a,o,u){if((u&4194048)!==0){var f=o.lanes;f&=a.pendingLanes,u|=f,o.lanes=u,eh(a,u)}}var Rh={readContext:lr,use:Cp,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useLayoutEffect:gn,useInsertionEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useSyncExternalStore:gn,useId:gn,useHostTransitionStatus:gn,useFormState:gn,useActionState:gn,useOptimistic:gn,useMemoCache:gn,useCacheRefresh:gn};Rh.useEffectEvent=gn;var AN={readContext:lr,use:Cp,useCallback:function(a,o){return Tr().memoizedState=[a,o===void 0?null:o],a},useContext:lr,useEffect:dN,useImperativeHandle:function(a,o,u){u=u!=null?u.concat([a]):null,kp(4194308,4,pN.bind(null,o,a),u)},useLayoutEffect:function(a,o){return kp(4194308,4,a,o)},useInsertionEffect:function(a,o){kp(4,2,a,o)},useMemo:function(a,o){var u=Tr();o=o===void 0?null:o;var f=a();if(Pl){De(!0);try{a()}finally{De(!1)}}return u.memoizedState=[f,o],f},useReducer:function(a,o,u){var f=Tr();if(u!==void 0){var x=u(o);if(Pl){De(!0);try{u(o)}finally{De(!1)}}}else x=o;return f.memoizedState=f.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},f.queue=a,a=a.dispatch=XP.bind(null,st,a),[f.memoizedState,a]},useRef:function(a){var o=Tr();return a={current:a},o.memoizedState=a},useState:function(a){a=sb(a);var o=a.queue,u=EN.bind(null,st,o);return o.dispatch=u,[a.memoizedState,u]},useDebugValue:ob,useDeferredValue:function(a,o){var u=Tr();return lb(u,a,o)},useTransition:function(){var a=sb(!1);return a=vN.bind(null,st,a.queue,!0,!1),Tr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,u){var f=st,x=Tr();if(vt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),Kt===null)throw Error(r(349));(pt&127)!==0||WT(f,o,u)}x.memoizedState=u;var v={value:u,getSnapshot:o};return x.queue=v,dN(XT.bind(null,f,v,a),[a]),f.flags|=2048,uu(9,{destroy:void 0},QT.bind(null,f,v,u,o),null),u},useId:function(){var a=Tr(),o=Kt.identifierPrefix;if(vt){var u=Na,f=Ta;u=(f&~(1<<32-ke(f)-1)).toString(32)+u,o="_"+o+"R_"+u,u=jp++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=HP++,o="_"+o+"r_"+u.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:ub,useFormState:iN,useActionState:iN,useOptimistic:function(a){var o=Tr();o.memoizedState=o.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=db.bind(null,st,!0,u),u.dispatch=o,[a,o]},useMemoCache:tb,useCacheRefresh:function(){return Tr().memoizedState=QP.bind(null,st)},useEffectEvent:function(a){var o=Tr(),u={impl:a};return o.memoizedState=u,function(){if((At&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},hb={readContext:lr,use:Cp,useCallback:yN,useContext:lr,useEffect:ib,useImperativeHandle:gN,useInsertionEffect:fN,useLayoutEffect:mN,useMemo:xN,useReducer:Dp,useRef:uN,useState:function(){return Dp(ri)},useDebugValue:ob,useDeferredValue:function(a,o){var u=Nn();return bN(u,Bt.memoizedState,a,o)},useTransition:function(){var a=Dp(ri)[0],o=Nn().memoizedState;return[typeof a=="boolean"?a:kh(a),o]},useSyncExternalStore:KT,useId:TN,useHostTransitionStatus:ub,useFormState:oN,useActionState:oN,useOptimistic:function(a,o){var u=Nn();return eN(u,Bt,a,o)},useMemoCache:tb,useCacheRefresh:NN};hb.useEffectEvent=hN;var CN={readContext:lr,use:Cp,useCallback:yN,useContext:lr,useEffect:ib,useImperativeHandle:gN,useInsertionEffect:fN,useLayoutEffect:mN,useMemo:xN,useReducer:rb,useRef:uN,useState:function(){return rb(ri)},useDebugValue:ob,useDeferredValue:function(a,o){var u=Nn();return Bt===null?lb(u,a,o):bN(u,Bt.memoizedState,a,o)},useTransition:function(){var a=rb(ri)[0],o=Nn().memoizedState;return[typeof a=="boolean"?a:kh(a),o]},useSyncExternalStore:KT,useId:TN,useHostTransitionStatus:ub,useFormState:cN,useActionState:cN,useOptimistic:function(a,o){var u=Nn();return Bt!==null?eN(u,Bt,a,o):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:tb,useCacheRefresh:NN};CN.useEffectEvent=hN;function fb(a,o,u,f){o=a.memoizedState,u=u(f,o),u=u==null?o:p({},o,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var mb={enqueueSetState:function(a,o,u){a=a._reactInternals;var f=ls(),x=Zi(f);x.payload=o,u!=null&&(x.callback=u),o=eo(a,x,f),o!==null&&(Br(o,a,f),jh(o,a,f))},enqueueReplaceState:function(a,o,u){a=a._reactInternals;var f=ls(),x=Zi(f);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=eo(a,x,f),o!==null&&(Br(o,a,f),jh(o,a,f))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var u=ls(),f=Zi(u);f.tag=2,o!=null&&(f.callback=o),o=eo(a,f,u),o!==null&&(Br(o,a,u),jh(o,a,u))}};function DN(a,o,u,f,x,v,S){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(f,v,S):o.prototype&&o.prototype.isPureReactComponent?!bh(u,f)||!bh(x,v):!0}function kN(a,o,u,f){a=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==a&&mb.enqueueReplaceState(o,o.state,null)}function Ol(a,o){var u=o;if("ref"in o){u={};for(var f in o)f!=="ref"&&(u[f]=o[f])}if(a=a.defaultProps){u===o&&(u=p({},u));for(var x in a)u[x]===void 0&&(u[x]=a[x])}return u}function IN(a){dp(a)}function RN(a){console.error(a)}function MN(a){dp(a)}function Mp(a,o){try{var u=a.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(f){setTimeout(function(){throw f})}}function PN(a,o,u){try{var f=a.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function pb(a,o,u){return u=Zi(u),u.tag=3,u.payload={element:null},u.callback=function(){Mp(a,o)},u}function ON(a){return a=Zi(a),a.tag=3,a}function LN(a,o,u,f){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var v=f.value;a.payload=function(){return x(v)},a.callback=function(){PN(o,u,f)}}var S=u.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(a.callback=function(){PN(o,u,f),typeof x!="function"&&(io===null?io=new Set([this]):io.add(this));var U=f.stack;this.componentDidCatch(f.value,{componentStack:U!==null?U:""})})}function JP(a,o,u,f,x){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(o=u.alternate,o!==null&&nu(o,u,x,!0),u=ss.current,u!==null){switch(u.tag){case 31:case 13:return As===null?Gp():u.alternate===null&&yn===0&&(yn=3),u.flags&=-257,u.flags|=65536,u.lanes=x,f===wp?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([f]):o.add(f),Bb(a,f,x)),!1;case 22:return u.flags|=65536,f===wp?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([f]):u.add(f)),Bb(a,f,x)),!1}throw Error(r(435,u.tag))}return Bb(a,f,x),Gp(),!1}if(vt)return o=ss.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,f!==Mx&&
vendor: 14,038 bytes, line 48
48(a=Error(r(422),{cause:f}),_h(Ns(a,u)))):(f!==Mx&&(o=Error(r(423),{cause:f}),_h(Ns(o,u))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,f=Ns(f,u),x=pb(a.stateNode,f,x),Yx(a,x),yn!==4&&(yn=2)),!1;var v=Error(r(520),{cause:f});if(v=Ns(v,u),Uh===null?Uh=[v]:Uh.push(v),yn!==4&&(yn=2),o===null)return!0;f=Ns(f,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,a=x&-x,u.lanes|=a,a=pb(u.stateNode,f,a),Yx(u,a),!1;case 1:if(o=u.type,v=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(io===null||!io.has(v))))return u.flags|=65536,x&=-x,u.lanes|=x,x=ON(x),LN(x,a,u,f),Yx(u,x),!1}u=u.return}while(u!==null);return!1}var gb=Error(r(461)),Ln=!1;function cr(a,o,u,f){o.child=a===null?UT(o,null,u,f):Ml(o,a.child,u,f)}function VN(a,o,u,f,x){u=u.render;var v=o.ref;if("ref"in f){var S={};for(var U in f)U!=="ref"&&(S[U]=f[U])}else S=f;return Dl(o),f=Xx(a,o,u,S,v,x),U=Jx(),a!==null&&!Ln?(Zx(a,o,x),si(a,o,x)):(vt&&U&&Ix(o),o.flags|=1,cr(a,o,f,x),o.child)}function FN(a,o,u,f,x){if(a===null){var v=u.type;return typeof v=="function"&&!Cx(v)&&v.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=v,BN(a,o,v,f,x)):(a=pp(u.type,null,f,o,o.mode,x),a.ref=o.ref,a.return=o,o.child=a)}if(v=a.child,!Nb(a,x)){var S=v.memoizedProps;if(u=u.compare,u=u!==null?u:bh,u(S,f)&&a.ref===o.ref)return si(a,o,x)}return o.flags|=1,a=Ja(v,f),a.ref=o.ref,a.return=o,o.child=a}function BN(a,o,u,f,x){if(a!==null){var v=a.memoizedProps;if(bh(v,f)&&a.ref===o.ref)if(Ln=!1,o.pendingProps=f=v,Nb(a,x))(a.flags&131072)!==0&&(Ln=!0);else return o.lanes=a.lanes,si(a,o,x)}return yb(a,o,u,f,x)}function UN(a,o,u,f){var x=f.children,v=a!==null?a.memoizedState:null;if(a===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((o.flags&128)!==0){if(v=v!==null?v.baseLanes|u:u,a!==null){for(f=o.child=a.child,x=0;f!==null;)x=x|f.lanes|f.childLanes,f=f.sibling;f=x&~v}else f=0,o.child=null;return zN(a,o,v,u,f)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&bp(o,v!==null?v.cachePool:null),v!==null?HT(o,v):$x(),YT(o);else return f=o.lanes=536870912,zN(a,o,v!==null?v.baseLanes|u:u,u,f)}else v!==null?(bp(o,v.cachePool),HT(o,v),no(),o.memoizedState=null):(a!==null&&bp(o,null),$x(),no());return cr(a,o,x,u),o.child}function Mh(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function zN(a,o,u,f,x){var v=Ux();return v=v===null?null:{parent:Pn._currentValue,pool:v},o.memoizedState={baseLanes:u,cachePool:v},a!==null&&bp(o,null),$x(),YT(o),a!==null&&nu(a,o,f,!0),o.childLanes=x,null}function Pp(a,o){return o=Lp({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function qN(a,o,u){return Ml(o,a.child,null,u),a=Pp(o,o.pendingProps),a.flags|=2,as(o),o.memoizedState=null,a}function ZP(a,o,u){var f=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(vt){if(f.mode==="hidden")return a=Pp(o,f),o.lanes=536870912,Mh(null,a);if(Wx(o),(a=en)?(a=tS(a,js),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ki!==null?{id:Ta,overflow:Na}:null,retryLane:536870912,hydrationErrors:null},u=ST(a),u.return=o,o.child=u,or=o,en=null)):a=null,a===null)throw Qi(o);return o.lanes=536870912,null}return Pp(o,f)}var v=a.memoizedState;if(v!==null){var S=v.dehydrated;if(Wx(o),x)if(o.flags&256)o.flags&=-257,o=qN(a,o,u);else if(o.memoizedState!==null)o.child=a.child,o.flags|=128,o=null;else throw Error(r(558));else if(Ln||nu(a,o,u,!1),x=(u&a.childLanes)!==0,Ln||x){if(f=Kt,f!==null&&(S=th(f,u),S!==0&&S!==v.retryLane))throw v.retryLane=S,Sl(a,S),Br(f,a,S),gb;Gp(),o=qN(a,o,u)}else a=v.treeContext,en=Cs(S.nextSibling),or=o,vt=!0,Wi=null,js=!1,a!==null&&CT(o,a),o=Pp(o,f),o.flags|=4096;return o}return a=Ja(a.child,{mode:f.mode,children:f.children}),a.ref=o.ref,o.child=a,a.return=o,a}function Op(a,o){var u=o.ref;if(u===null)a!==null&&a.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(o.flags|=4194816)}}function yb(a,o,u,f,x){return Dl(o),u=Xx(a,o,u,f,void 0,x),f=Jx(),a!==null&&!Ln?(Zx(a,o,x),si(a,o,x)):(vt&&f&&Ix(o),o.flags|=1,cr(a,o,u,x),o.child)}function HN(a,o,u,f,x,v){return Dl(o),o.updateQueue=null,u=$T(o,f,u,x),GT(a),f=Jx(),a!==null&&!Ln?(Zx(a,o,v),si(a,o,v)):(vt&&f&&Ix(o),o.flags|=1,cr(a,o,u,v),o.child)}function YN(a,o,u,f,x){if(Dl(o),o.stateNode===null){var v=Jc,S=u.contextType;typeof S=="object"&&S!==null&&(v=lr(S)),v=new u(f,v),o.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=mb,o.stateNode=v,v._reactInternals=o,v=o.stateNode,v.props=f,v.state=o.memoizedState,v.refs={},qx(o),S=u.contextType,v.context=typeof S=="object"&&S!==null?lr(S):Jc,v.state=o.memoizedState,S=u.getDerivedStateFromProps,typeof S=="function"&&(fb(o,u,S,f),v.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(S=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),S!==v.state&&mb.enqueueReplaceState(v,v.state,null),Ch(o,f,v,x),Ah(),v.state=o.memoizedState),typeof v.componentDidMount=="function"&&(o.flags|=4194308),f=!0}else if(a===null){v=o.stateNode;var U=o.memoizedProps,Y=Ol(u,U);v.props=Y;var te=v.context,fe=u.contextType;S=Jc,typeof fe=="object"&&fe!==null&&(S=lr(fe));var ge=u.getDerivedStateFromProps;fe=typeof ge=="function"||typeof v.getSnapshotBeforeUpdate=="function",U=o.pendingProps!==U,fe||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(U||te!==S)&&kN(o,v,f,S),Ji=!1;var ie=o.memoizedState;v.state=ie,Ch(o,f,v,x),Ah(),te=o.memoizedState,U||ie!==te||Ji?(typeof ge=="function"&&(fb(o,u,ge,f),te=o.memoizedState),(Y=Ji||DN(o,u,Y,f,ie,te,S))?(fe||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=te),v.props=f,v.state=te,v.context=S,f=Y):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{v=o.stateNode,Hx(a,o),S=o.memoizedProps,fe=Ol(u,S),v.props=fe,ge=o.pendingProps,ie=v.context,te=u.contextType,Y=Jc,typeof te=="object"&&te!==null&&(Y=lr(te)),U=u.getDerivedStateFromProps,(te=typeof U=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(S!==ge||ie!==Y)&&kN(o,v,f,Y),Ji=!1,ie=o.memoizedState,v.state=ie,Ch(o,f,v,x),Ah();var ce=o.memoizedState;S!==ge||ie!==ce||Ji||a!==null&&a.dependencies!==null&&yp(a.dependencies)?(typeof U=="function"&&(fb(o,u,U,f),ce=o.memoizedState),(fe=Ji||DN(o,u,fe,f,ie,ce,Y)||a!==null&&a.dependencies!==null&&yp(a.dependencies))?(te||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(f,ce,Y),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(f,ce,Y)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||S===a.memoizedProps&&ie===a.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||S===a.memoizedProps&&ie===a.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=ce),v.props=f,v.state=ce,v.context=Y,f=fe):(typeof v.componentDidUpdate!="function"||S===a.memoizedProps&&ie===a.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||S===a.memoizedProps&&ie===a.memoizedState||(o.flags|=1024),f=!1)}return v=f,Op(a,o),f=(o.flags&128)!==0,v||f?(v=o.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:v.render(),o.flags|=1,a!==null&&f?(o.child=Ml(o,a.child,null,x),o.child=Ml(o,null,u,x)):cr(a,o,u,x),o.memoizedState=v.state,a=o.child):a=si(a,o,x),a}function GN(a,o,u,f){return Al(),o.flags|=256,cr(a,o,u,f),o.child}var xb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bb(a){return{baseLanes:a,cachePool:PT()}}function vb(a,o,u){return a=a!==null?a.childLanes&~u:0,o&&(a|=os),a}function $N(a,o,u){var f=o.pendingProps,x=!1,v=(o.flags&128)!==0,S;if((S=v)||(S=a!==null&&a.memoizedState===null?!1:(Tn.current&2)!==0),S&&(x=!0,o.flags&=-129),S=(o.flags&32)!==0,o.flags&=-33,a===null){if(vt){if(x?to(o):no(),(a=en)?(a=tS(a,js),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ki!==null?{id:Ta,overflow:Na}:null,retryLane:536870912,hydrationErrors:null},u=ST(a),u.return=o,o.child=u,or=o,en=null)):a=null,a===null)throw Qi(o);return nv(a)?o.lanes=32:o.lanes=536870912,null}var U=f.children;return f=f.fallback,x?(no(),x=o.mode,U=Lp({mode:"hidden",children:U},x),f=jl(f,x,u,null),U.return=o,f.return=o,U.sibling=f,o.child=U,f=o.child,f.memoizedState=bb(u),f.childLanes=vb(a,S,u),o.memoizedState=xb,Mh(null,f)):(to(o),wb(o,U))}var Y=a.memoizedState;if(Y!==null&&(U=Y.dehydrated,U!==null)){if(v)o.flags&256?(to(o),o.flags&=-257,o=_b(a,o,u)):o.memoizedState!==null?(no(),o.child=a.child,o.flags|=128,o=null):(no(),U=f.fallback,x=o.mode,f=Lp({mode:"visible",children:f.children},x),U=jl(U,x,u,null),U.flags|=2,f.return=o,U.return=o,f.sibling=U,o.child=f,Ml(o,a.child,null,u),f=o.child,f.memoizedState=bb(u),f.childLanes=vb(a,S,u),o.memoizedState=xb,o=Mh(null,f));else if(to(o),nv(U)){if(S=U.nextSibling&&U.nextSibling.dataset,S)var te=S.dgst;S=te,f=Error(r(419)),f.stack="",f.digest=S,_h({value:f,source:null,stack:null}),o=_b(a,o,u)}else if(Ln||nu(a,o,u,!1),S=(u&a.childLanes)!==0,Ln||S){if(S=Kt,S!==null&&(f=th(S,u),f!==0&&f!==Y.retryLane))throw Y.retryLane=f,Sl(a,f),Br(S,a,f),gb;tv(U)||Gp(),o=_b(a,o,u)}else tv(U)?(o.flags|=192,o.child=a.child,o=null):(a=Y.treeContext,en=Cs(U.nextSibling),or=o,vt=!0,Wi=null,js=!1,a!==null&&CT(o,a),o=wb(o,f.children),o.flags|=4096);return o}return x?(no(),U=f.fallback,x=o.mode,Y=a.child,te=Y.sibling,f=Ja(Y,{mode:"hidden",children:f.children}),f.subtreeFlags=Y.subtreeFlags&65011712,te!==null?U=Ja(te,U):(U=jl(U,x,u,null),U.flags|=2),U.return=o,f.return=o,f.sibling=U,o.child=f,Mh(null,f),f=o.child,U=a.child.memoizedState,U===null?U=bb(u):(x=U.cachePool,x!==null?(Y=Pn._currentValue,x=x.parent!==Y?{parent:Y,pool:Y}:x):x=PT(),U={baseLanes:U.baseLanes|u,cachePool:x}),f.memoizedState=U,f.childLanes=vb(a,S,u),o.memoizedState=xb,Mh(a.child,f)):(to(o),u=a.child,a=u.sibling,u=Ja(u,{mode:"visible",children:f.children}),u.return=o,u.sibling=null,a!==null&&(S=o.deletions,S===null?(o.deletions=[a],o.flags|=16):S.push(a)),o.child=u,o.memoizedState=null,u)}function wb(a,o){return o=Lp({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function Lp(a,o){return a=rs(22,a,null,o),a.lanes=0,a}function _b(a,o,u){return Ml(o,a.child,null,u),a=wb(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function KN(a,o,u){a.lanes|=o;var f=a.alternate;f!==null&&(f.lanes|=o),Lx(a.return,o,u)}function Tb(a,o,u,f,x,v){var S=a.memoizedState;S===null?a.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:x,treeForkCount:v}:(S.isBackwards=o,S.rendering=null,S.renderingStartTime=0,S.last=f,S.tail=u,S.tailMode=x,S.treeForkCount=v)}function WN(a,o,u){var f=o.pendingProps,x=f.revealOrder,v=f.tail;f=f.children;var S=Tn.current,U=(S&2)!==0;if(U?(S=S&1|2,o.flags|=128):S&=1,we(Tn,S),cr(a,o,f,u),f=vt?wh:0,!U&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&KN(a,u,o);else if(a.tag===19)KN(a,u,o);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(x){case"forwards":for(u=o.child,x=null;u!==null;)a=u.alternate,a!==null&&Ep(a)===null&&(x=u),u=u.sibling;u=x,u===null?(x=o.child,o.child=null):(x=u.sibling,u.sibling=null),Tb(o,!1,x,u,v,f);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=o.child,o.child=null;x!==null;){if(a=x.alternate,a!==null&&Ep(a)===null){o.child=x;break}a=x.sibling,x.sibling=u,u=x,x=a}Tb(o,!0,u,null,v,f);break;case"together":Tb(o,!1,null,null,void 0,f);break;default:o.memoizedState=null}return o.child}function si(a,o,u){if(a!==null&&(o.dependencies=a.dependencies),ao|=o.lanes,(u&o.childLanes)===0)if(a!==null){if(nu(a,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(a!==null&&o.child!==a.child)throw Error(r(153));if(o.child!==null){for(a=o.child,u=Ja(a,a.pendingProps),o.child=u,u.return=o;a.sibling!==null;)a=a.sibling,u=u.sibling=Ja(a,a.pendingProps),u.return=o;u.sibling=null}return o.child}function Nb(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&yp(a)))}function e6(a,o,u){switch(o.tag){case 3:wt(o,o.stateNode.containerInfo),Xi(o,Pn,a.memoizedState.cache),Al();break;case 27:case 5:G(o);break;case 4:wt(o,o.stateNode.containerInfo);break;case 10:Xi(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Wx(o),null;break;case 13:var f=o.memoizedState;if(f!==null)return f.dehydrated!==null?(to(o),o.flags|=128,null):(u&o.child.childLanes)!==0?$N(a,o,u):(to(o),a=si(a,o,u),a!==null?a.sibling:null);to(o);break;case 19:var x=(a.flags&128)!==0;if(f=(u&o.childLanes)!==0,f||(nu(a,o,u,!1),f=(u&o.childLanes)!==0),x){if(f)return WN(a,o,u);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),we(Tn,Tn.current),f)break;return null;case 22:return o.lanes=0,UN(a,o,u,o.pendingProps);case 24:Xi(o,Pn,a.memoizedState.cache)}return si(a,o,u)}
vendor: 1,534 bytes, line 48
48function QN(a,o,u){if(a!==null)if(a.memoizedProps!==o.pendingProps)Ln=!0;else{if(!Nb(a,u)&&(o.flags&128)===0)return Ln=!1,e6(a,o,u);Ln=(a.flags&131072)!==0}else Ln=!1,vt&&(o.flags&1048576)!==0&&AT(o,wh,o.index);switch(o.lanes=0,o.tag){case 16:e:{var f=o.pendingProps;if(a=Il(o.elementType),o.type=a,typeof a=="function")Cx(a)?(f=Ol(a,f),o.tag=1,o=YN(null,o,a,f,u)):(o.tag=0,o=yb(null,o,a,f,u));else{if(a!=null){var x=a.$$typeof;if(x===M){o.tag=11,o=VN(null,o,a,f,u);break e}else if(x===L){o.tag=14,o=FN(null,o,a,f,u);break e}}throw o=se(a)||a,Error(r(306,o,""))}}return o;case 0:return yb(a,o,o.type,o.pendingProps,u);case 1:return f=o.type,x=Ol(f,o.pendingProps),YN(a,o,f,x,u);case 3:e:{if(wt(o,o.stateNode.containerInfo),a===null)throw Error(r(387));f=o.pendingProps;var v=o.memoizedState;x=v.element,Hx(a,o),Ch(o,f,null,u);var S=o.memoizedState;if(f=S.cache,Xi(o,Pn,f),f!==v.cache&&Vx(o,[Pn],u,!0),Ah(),f=S.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:S.cache},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){o=GN(a,o,f,u);break e}else if(f!==x){x=Ns(Error(r(424)),o),_h(x),o=GN(a,o,f,u);break e}else{switch(a=o.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(en=Cs(a.firstChild),or=o,vt=!0,Wi=null,js=!0,u=UT(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Al(),f===x){o=si(a,o,u);break e}cr(a,o,f,u)}o=o.child}return o;case 26:return Op(a,o),a===null?(u=oS(o.type,null,o.pendingProps,null))?o.memoizedState=u:vt||(u=
vendor: 4,969 bytes, line 48
48o.type,a=o.pendingProps,f=Zp($e.current).createElement(u),f[In]=o,f[Jn]=a,ur(f,u,a),Rn(f),o.stateNode=f):o.memoizedState=oS(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return G(o),a===null&&vt&&(f=o.stateNode=sS(o.type,o.pendingProps,$e.current),or=o,js=!0,x=en,uo(o.type)?(rv=x,en=Cs(f.firstChild)):en=x),cr(a,o,o.pendingProps.children,u),Op(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&vt&&((x=f=en)&&(f=D6(f,o.type,o.pendingProps,js),f!==null?(o.stateNode=f,or=o,en=Cs(f.firstChild),js=!1,x=!0):x=!1),x||Qi(o)),G(o),x=o.type,v=o.pendingProps,S=a!==null?a.memoizedProps:null,f=v.children,Jb(x,v)?f=null:S!==null&&Jb(x,S)&&(o.flags|=32),o.memoizedState!==null&&(x=Xx(a,o,YP,null,null,u),Wh._currentValue=x),Op(a,o),cr(a,o,f,u),o.child;case 6:return a===null&&vt&&((a=u=en)&&(u=k6(u,o.pendingProps,js),u!==null?(o.stateNode=u,or=o,en=null,a=!0):a=!1),a||Qi(o)),null;case 13:return $N(a,o,u);case 4:return wt(o,o.stateNode.containerInfo),f=o.pendingProps,a===null?o.child=Ml(o,null,f,u):cr(a,o,f,u),o.child;case 11:return VN(a,o,o.type,o.pendingProps,u);case 7:return cr(a,o,o.pendingProps,u),o.child;case 8:return cr(a,o,o.pendingProps.children,u),o.child;case 12:return cr(a,o,o.pendingProps.children,u),o.child;case 10:return f=o.pendingProps,Xi(o,o.type,f.value),cr(a,o,f.children,u),o.child;case 9:return x=o.type._context,f=o.pendingProps.children,Dl(o),x=lr(x),f=f(x),o.flags|=1,cr(a,o,f,u),o.child;case 14:return FN(a,o,o.type,o.pendingProps,u);case 15:return BN(a,o,o.type,o.pendingProps,u);case 19:return WN(a,o,u);case 31:return ZP(a,o,u);case 22:return UN(a,o,u,o.pendingProps);case 24:return Dl(o),f=lr(Pn),a===null?(x=Ux(),x===null&&(x=Kt,v=Fx(),x.pooledCache=v,v.refCount++,v!==null&&(x.pooledCacheLanes|=u),x=v),o.memoizedState={parent:f,cache:x},qx(o),Xi(o,Pn,x)):((a.lanes&u)!==0&&(Hx(a,o),Ch(o,null,null,u),Ah()),x=a.memoizedState,v=o.memoizedState,x.parent!==f?(x={parent:f,cache:f},o.memoizedState=x,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=x),Xi(o,Pn,f)):(f=v.cache,Xi(o,Pn,f),f!==x.cache&&Vx(o,[Pn],u,!0))),cr(a,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function ai(a){a.flags|=4}function Eb(a,o,u,f,x){if((o=(a.mode&32)!==0)&&(o=!1),o){if(a.flags|=16777216,(x&335544128)===x)if(a.stateNode.complete)a.flags|=8192;else if(TE())a.flags|=8192;else throw Rl=wp,zx}else a.flags&=-16777217}function XN(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!hS(o))if(TE())a.flags|=8192;else throw Rl=wp,zx}function Vp(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?dl():536870912,a.lanes|=o,mu|=o)}function Ph(a,o){if(!vt)switch(a.tailMode){case"hidden":o=a.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||a.tail===null?a.tail=null:a.tail.sibling=null:f.sibling=null}}function tn(a){var o=a.alternate!==null&&a.alternate.child===a.child,u=0,f=0;if(o)for(var x=a.child;x!==null;)u|=x.lanes|x.childLanes,f|=x.subtreeFlags&65011712,f|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)u|=x.lanes|x.childLanes,f|=x.subtreeFlags,f|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=f,a.childLanes=u,o}function t6(a,o,u){var f=o.pendingProps;switch(Rx(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(o),null;case 1:return tn(o),null;case 3:return u=o.stateNode,f=null,a!==null&&(f=a.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),ti(Pn),at(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(tu(o)?ai(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Px())),tn(o),null;case 26:var x=o.type,v=o.memoizedState;return a===null?(ai(o),v!==null?(tn(o),XN(o,v)):(tn(o),Eb(o,x,null,f,u))):v?v!==a.memoizedState?(ai(o),tn(o),XN(o,v)):(tn(o),o.flags&=-16777217):(a=a.memoizedProps,a!==f&&ai(o),tn(o),Eb(o,x,a,f,u)),null;case 27:if(re(o),u=$e.current,x=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==f&&ai(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return tn(o),null}a=Se.current,tu(o)?DT(o):(a=sS(x,f,u),o.stateNode=a,ai(o))}return tn(o),null;case 5:if(re(o),x=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==f&&ai(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return tn(o),null}if(v=Se.current,tu(o))DT(o);else{var S=Zp($e.current);switch(v){case 1:v=S.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:v=S.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":v=S.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":v=S.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":v=S.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;
vendor: 25,985 bytes, line 48
48case"select":v=typeof f.is=="string"?S.createElement("select",{is:f.is}):S.createElement("select"),f.multiple?v.multiple=!0:f.size&&(v.size=f.size);break;default:v=typeof f.is=="string"?S.createElement(x,{is:f.is}):S.createElement(x)}}v[In]=o,v[Jn]=f;e:for(S=o.child;S!==null;){if(S.tag===5||S.tag===6)v.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===o)break e;for(;S.sibling===null;){if(S.return===null||S.return===o)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}o.stateNode=v;e:switch(ur(v,x,f),x){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&ai(o)}}return tn(o),Eb(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,u),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==f&&ai(o);else{if(typeof f!="string"&&o.stateNode===null)throw Error(r(166));if(a=$e.current,tu(o)){if(a=o.stateNode,u=o.memoizedProps,f=null,x=or,x!==null)switch(x.tag){case 27:case 5:f=x.memoizedProps}a[In]=o,a=!!(a.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||$E(a.nodeValue,u)),a||Qi(o,!0)}else a=Zp(a).createTextNode(f),a[In]=o,o.stateNode=a}return tn(o),null;case 31:if(u=o.memoizedState,a===null||a.memoizedState!==null){if(f=tu(o),u!==null){if(a===null){if(!f)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[In]=o}else Al(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;tn(o),a=!1}else u=Px(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return o.flags&256?(as(o),o):(as(o),null);if((o.flags&128)!==0)throw Error(r(558))}return tn(o),null;case 13:if(f=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=tu(o),f!==null&&f.dehydrated!==null){if(a===null){if(!x)throw Error(r(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[In]=o}else Al(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;tn(o),x=!1}else x=Px(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(as(o),o):(as(o),null)}return as(o),(o.flags&128)!==0?(o.lanes=u,o):(u=f!==null,a=a!==null&&a.memoizedState!==null,u&&(f=o.child,x=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(x=f.alternate.memoizedState.cachePool.pool),v=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(v=f.memoizedState.cachePool.pool),v!==x&&(f.flags|=2048)),u!==a&&u&&(o.child.flags|=8192),Vp(o,o.updateQueue),tn(o),null);case 4:return at(),a===null&&$b(o.stateNode.containerInfo),tn(o),null;case 10:return ti(o.type),tn(o),null;case 19:if(he(Tn),f=o.memoizedState,f===null)return tn(o),null;if(x=(o.flags&128)!==0,v=f.rendering,v===null)if(x)Ph(f,!1);else{if(yn!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(v=Ep(a),v!==null){for(o.flags|=128,Ph(f,!1),a=v.updateQueue,o.updateQueue=a,Vp(o,a),o.subtreeFlags=0,a=u,u=o.child;u!==null;)ET(u,a),u=u.sibling;return we(Tn,Tn.current&1|2),vt&&Za(o,f.treeForkCount),o.child}a=a.sibling}f.tail!==null&&kn()>qp&&(o.flags|=128,x=!0,Ph(f,!1),o.lanes=4194304)}else{if(!x)if(a=Ep(v),a!==null){if(o.flags|=128,x=!0,a=a.updateQueue,o.updateQueue=a,Vp(o,a),Ph(f,!0),f.tail===null&&f.tailMode==="hidden"&&!v.alternate&&!vt)return tn(o),null}else 2*kn()-f.renderingStartTime>qp&&u!==536870912&&(o.flags|=128,x=!0,Ph(f,!1),o.lanes=4194304);f.isBackwards?(v.sibling=o.child,o.child=v):(a=f.last,a!==null?a.sibling=v:o.child=v,f.last=v)}return f.tail!==null?(a=f.tail,f.rendering=a,f.tail=a.sibling,f.renderingStartTime=kn(),a.sibling=null,u=Tn.current,we(Tn,x?u&1|2:u&1),vt&&Za(o,f.treeForkCount),a):(tn(o),null);case 22:case 23:return as(o),Kx(),f=o.memoizedState!==null,a!==null?a.memoizedState!==null!==f&&(o.flags|=8192):f&&(o.flags|=8192),f?(u&536870912)!==0&&(o.flags&128)===0&&(tn(o),o.subtreeFlags&6&&(o.flags|=8192)):tn(o),u=o.updateQueue,u!==null&&Vp(o,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==u&&(o.flags|=2048),a!==null&&he(kl),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),ti(Pn),tn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function n6(a,o){switch(Rx(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return ti(Pn),at(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return re(o),null;case 31:if(o.memoizedState!==null){if(as(o),o.alternate===null)throw Error(r(340));Al()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(as(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Al()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return he(Tn),null;case 4:return at(),null;case 10:return ti(o.type),null;case 22:case 23:return as(o),Kx(),a!==null&&he(kl),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return ti(Pn),null;case 25:return null;default:return null}}function JN(a,o){switch(Rx(o),o.tag){case 3:ti(Pn),at();break;case 26:case 27:case 5:re(o);break;case 4:at();break;case 31:o.memoizedState!==null&&as(o);break;case 13:as(o);break;case 19:he(Tn);break;case 10:ti(o.type);break;case 22:case 23:as(o),Kx(),a!==null&&he(kl);break;case 24:ti(Pn)}}function Oh(a,o){try{var u=o.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var x=f.next;u=x;do{if((u.tag&a)===a){f=void 0;var v=u.create,S=u.inst;f=v(),S.destroy=f}u=u.next}while(u!==x)}}catch(U){Rt(o,o.return,U)}}function ro(a,o,u){try{var f=o.updateQueue,x=f!==null?f.lastEffect:null;if(x!==null){var v=x.next;f=v;do{if((f.tag&a)===a){var S=f.inst,U=S.destroy;if(U!==void 0){S.destroy=void 0,x=o;var Y=u,te=U;try{te()}catch(fe){Rt(x,Y,fe)}}}f=f.next}while(f!==v)}}catch(fe){Rt(o,o.return,fe)}}function ZN(a){var o=a.updateQueue;if(o!==null){var u=a.stateNode;try{qT(o,u)}catch(f){Rt(a,a.return,f)}}}function eE(a,o,u){u.props=Ol(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(f){Rt(a,o,f)}}function Lh(a,o){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var f=a.stateNode;break;case 30:f=a.stateNode;break;default:f=a.stateNode}typeof u=="function"?a.refCleanup=u(f):u.current=f}}catch(x){Rt(a,o,x)}}function Ea(a,o){var u=a.ref,f=a.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(x){Rt(a,o,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){Rt(a,o,x)}else u.current=null}function tE(a){var o=a.type,u=a.memoizedProps,f=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break e;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(x){Rt(a,a.return,x)}}function Sb(a,o,u){try{var f=a.stateNode;N6(f,a.type,u,o),f[Jn]=o}catch(x){Rt(a,a.return,x)}}function nE(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&uo(a.type)||a.tag===4}function jb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||nE(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&uo(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Ab(a,o,u){var f=a.tag;if(f===5||f===6)a=a.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(a),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Vs));else if(f!==4&&(f===27&&uo(a.type)&&(u=a.stateNode,o=null),a=a.child,a!==null))for(Ab(a,o,u),a=a.sibling;a!==null;)Ab(a,o,u),a=a.sibling}function Fp(a,o,u){var f=a.tag;if(f===5||f===6)a=a.stateNode,o?u.insertBefore(a,o):u.appendChild(a);else if(f!==4&&(f===27&&uo(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Fp(a,o,u),a=a.sibling;a!==null;)Fp(a,o,u),a=a.sibling}function rE(a){var o=a.stateNode,u=a.memoizedProps;try{for(var f=a.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);ur(o,f,u),o[In]=a,o[Jn]=u}catch(v){Rt(a,a.return,v)}}var ii=!1,Vn=!1,Cb=!1,sE=typeof WeakSet=="function"?WeakSet:Set,er=null;function r6(a,o){if(a=a.containerInfo,Qb=ig,a=gT(a),_x(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var x=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{u.nodeType,v.nodeType}catch{u=null;break e}var S=0,U=-1,Y=-1,te=0,fe=0,ge=a,ie=null;t:for(;;){for(var ce;ge!==u||x!==0&&ge.nodeType!==3||(U=S+x),ge!==v||f!==0&&ge.nodeType!==3||(Y=S+f),ge.nodeType===3&&(S+=ge.nodeValue.length),(ce=ge.firstChild)!==null;)ie=ge,ge=ce;for(;;){if(ge===a)break t;if(ie===u&&++te===x&&(U=S),ie===v&&++fe===f&&(Y=S),(ce=ge.nextSibling)!==null)break;ge=ie,ie=ge.parentNode}ge=ce}u=U===-1||Y===-1?null:{start:U,end:Y}}else u=null}u=u||{start:0,end:0}}else u=null;for(Xb={focusedElem:a,selectionRange:u},ig=!1,er=o;er!==null;)if(o=er,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,er=a;else for(;er!==null;){switch(o=er,v=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)x=a[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&v!==null){a=void 0,u=o,x=v.memoizedProps,v=v.memoizedState,f=u.stateNode;try{var Pe=Ol(u.type,x);a=f.getSnapshotBeforeUpdate(Pe,v),f.__reactInternalSnapshotBeforeUpdate=a}catch(We){Rt(u,u.return,We)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,u=a.nodeType,u===9)ev(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":ev(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=o.sibling,a!==null){a.return=o.return,er=a;break}er=o.return}}function aE(a,o,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:li(a,u),f&4&&Oh(5,u);break;case 1:if(li(a,u),f&4)if(a=u.stateNode,o===null)try{a.componentDidMount()}catch(S){Rt(u,u.return,S)}else{var x=Ol(u.type,o.memoizedProps);o=o.memoizedState;try{a.componentDidUpdate(x,o,a.__reactInternalSnapshotBeforeUpdate)}catch(S){Rt(u,u.return,S)}}f&64&&ZN(u),f&512&&Lh(u,u.return);break;case 3:if(li(a,u),f&64&&(a=u.updateQueue,a!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{qT(a,o)}catch(S){Rt(u,u.return,S)}}break;case 27:o===null&&f&4&&rE(u);case 26:case 5:li(a,u),o===null&&f&4&&tE(u),f&512&&Lh(u,u.return);break;case 12:li(a,u);break;case 31:li(a,u),f&4&&lE(a,u);break;case 13:li(a,u),f&4&&cE(a,u),f&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=h6.bind(null,u),I6(a,u))));break;case 22:if(f=u.memoizedState!==null||ii,!f){o=o!==null&&o.memoizedState!==null||Vn,x=ii;var v=Vn;ii=f,(Vn=o)&&!v?ci(a,u,(u.subtreeFlags&8772)!==0):li(a,u),ii=x,Vn=v}break;case 30:break;default:li(a,u)}}function iE(a){var o=a.alternate;o!==null&&(a.alternate=null,iE(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&Vc(o)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var ln=null,Or=!1;function oi(a,o,u){for(u=u.child;u!==null;)oE(a,o,u),u=u.sibling}function oE(a,o,u){if(je&&typeof je.onCommitFiberUnmount=="function")try{je.onCommitFiberUnmount(ue,u)}catch{}switch(u.tag){case 26:Vn||Ea(u,o),oi(a,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Vn||Ea(u,o);var f=ln,x=Or;uo(u.type)&&(ln=u.stateNode,Or=!1),oi(a,o,u),Gh(u.stateNode),ln=f,Or=x;break;case 5:Vn||Ea(u,o);case 6:if(f=ln,x=Or,ln=null,oi(a,o,u),ln=f,Or=x,ln!==null)if(Or)try{(ln.nodeType===9?ln.body:ln.nodeName==="HTML"?ln.ownerDocument.body:ln).removeChild(u.stateNode)}catch(v){Rt(u,o,v)}else try{ln.removeChild(u.stateNode)}catch(v){Rt(u,o,v)}break;case 18:ln!==null&&(Or?(a=ln,ZE(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),_u(a)):ZE(ln,u.stateNode));break;case 4:f=ln,x=Or,ln=u.stateNode.containerInfo,Or=!0,oi(a,o,u),ln=f,Or=x;break;case 0:case 11:case 14:case 15:ro(2,u,o),Vn||ro(4,u,o),oi(a,o,u);break;case 1:Vn||(Ea(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"&&eE(u,o,f)),oi(a,o,u);break;case 21:oi(a,o,u);break;case 22:Vn=(f=Vn)||u.memoizedState!==null,oi(a,o,u),Vn=f;break;default:oi(a,o,u)}}function lE(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{_u(a)}catch(u){Rt(o,o.return,u)}}}function cE(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{_u(a)}catch(u){Rt(o,o.return,u)}}function s6(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new sE),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new sE),o;default:throw Error(r(435,a.tag))}}function Bp(a,o){var u=s6(a);o.forEach(function(f){if(!u.has(f)){u.add(f);var x=f6.bind(null,a,f);f.then(x,x)}})}function Lr(a,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var x=u[f],v=a,S=o,U=S;e:for(;U!==null;){switch(U.tag){case 27:if(uo(U.type)){ln=U.stateNode,Or=!1;break e}break;case 5:ln=U.stateNode,Or=!1;break e;case 3:case 4:ln=U.stateNode.containerInfo,Or=!0;break e}U=U.return}if(ln===null)throw Error(r(160));oE(v,S,x),ln=null,Or=!1,v=x.alternate,v!==null&&(v.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)uE(o,a),o=o.sibling}var Hs=null;function uE(a,o){var u=a.alternate,f=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Lr(o,a),Vr(a),f&4&&(ro(3,a,a.return),Oh(3,a),ro(5,a,a.return));break;case 1:Lr(o,a),Vr(a),f&512&&(Vn||u===null||Ea(u,u.return)),f&64&&ii&&(a=a.updateQueue,a!==null&&(f=a.callbacks,f!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var x=Hs;if(Lr(o,a),Vr(a),f&512&&(Vn||u===null||Ea(u,u.return)),f&4){var v=u!==null?u.memoizedState:null;if(f=a.memoizedState,u===null)if(f===null)if(a.stateNode===null){e:{f=a.type,u=a.memoizedProps,x=x.ownerDocument||x;t:switch(f){case"title":v=x.getElementsByTagName("title")[0],(!v||v[da]||v[In]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=x.createElement(f),x.head.insertBefore(v,x.querySelector("head > title"))),ur(v,f,u),v[In]=a,Rn(v),f=v;break e;case"link":var S=uS("link","href",x).get(f+(u.href||""));if(S){for(var U=0;U<S.length;U++)if(v=S[U],v.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&v.getAttribute("rel")===(u.rel==null?null:u.rel)&&v.getAttribute("title")===(u.title==null?null:u.title)&&v.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){S.splice(U,1);break t}}v=x.createElement(f),ur(v,f,u),x.head.appendChild(v);break;case"meta":if(S=uS("meta","content",x).get(f+(u.content||""))){for(U=0;U<S.length;U++)if(v=S[U],v.getAttribute("content")===(u.content==null?null:""+u.content)&&v.getAttribute("name")===(u.name==null?null:u.name)&&v.getAttribute("property")===(u.property==null?null:u.property)&&v.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&v.getAttribute("charset")===(u.charSet==null?null:u.charSet)){S.splice(U,1);break t}}v=x.createElement(f),ur(v,f,u),x.head.appendChild(v);break;default:throw Error(r(468,f))}v[In]=a,Rn(v),f=v}a.stateNode=f}else dS(x,a.type,a.stateNode);else a.stateNode=cS(x,f,a.memoizedProps);else v!==f?(v===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):v.count--,f===null?dS(x,a.type,a.stateNode):cS(x,f,a.memoizedProps)):f===null&&a.stateNode!==null&&Sb(a,a.memoizedProps,u.memoizedProps)}break;case 27:Lr(o,a),Vr(a),f&512&&(Vn||u===null||Ea(u,u.return)),u!==null&&f&4&&Sb(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Lr(o,a),Vr(a),f&512&&(Vn||u===null||Ea(u,u.return)),a.flags&32){x=a.stateNode;try{Pr(x,"")}catch(Pe){Rt(a,a.return,Pe)}}f&4&&a.stateNode!=null&&(x=a.memoizedProps,Sb(a,x,u!==null?u.memoizedProps:x)),f&1024&&(Cb=!0);break;case 6:if(Lr(o,a),Vr(a),f&4){if(a.stateNode===null)throw Error(r(162));f=a.memoizedProps,u=a.stateNode;try{u.nodeValue=f}catch(Pe){Rt(a,a.return,Pe)}}break;case 3:if(ng=null,x=Hs,Hs=eg(o.containerInfo),Lr(o,a),Hs=x,Vr(a),f&4&&u!==null&&u.memoizedState.isDehydrated)try{_u(o.containerInfo)}catch(Pe){Rt(a,a.return,Pe)}Cb&&(Cb=!1,dE(a));break;case 4:f=Hs,Hs=eg(a.stateNode.containerInfo),Lr(o,a),Vr(a),Hs=f;break;case 12:Lr(o,a),Vr(a);break;case 31:Lr(o,a),Vr(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Bp(a,f)));break;case 13:Lr(o,a),Vr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(zp=kn()),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Bp(a,f)));break;case 22:x=a.memoizedState!==null;var Y=u!==null&&u.memoizedState!==null,te=ii,fe=Vn;if(ii=te||x,Vn=fe||Y,Lr(o,a),Vn=fe,ii=te,Vr(a),f&8192)e:for(o=a.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||Y||ii||Vn||Ll(a)),u=null,o=a;;){if(o.tag===5||o.tag===26){if(u===null){Y=u=o;try{if(v=Y.stateNode,x)S=v.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{U=Y.stateNode;var ge=Y.memoizedProps.style,ie=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;U.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(Pe){Rt(Y,Y.return,Pe)}}}else if(o.tag===6){if(u===null){Y=o;try{Y.stateNode.nodeValue=x?"":Y.memoizedProps}catch(Pe){Rt(Y,Y.return,Pe)}}}else if(o.tag===18){if(u===null){Y=o;try{var ce=Y.stateNode;x?eS(ce,!0):eS(Y.stateNode,!1)}catch(Pe){Rt(Y,Y.return,Pe)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===a)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}f&4&&(f=a.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,Bp(a,u))));break;case 19:Lr(o,a),Vr(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,Bp(a,f)));break;case 30:break;case 21:break;default:Lr(o,a),Vr(a)}}function Vr(a){var o=a.flags;if(o&2){try{for(var u,f=a.return;f!==null;){if(nE(f)){u=f;break}f=f.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,v=jb(a);Fp(a,v,x);break;case 5:var S=u.stateNode;u.flags&32&&(Pr(S,""),u.flags&=-33);var U=jb(a);Fp(a,U,S);break;case 3:case 4:var Y=u.stateNode.containerInfo,te=jb(a);Ab(a,te,Y);break;default:throw Error(r(161))}}catch(fe){Rt(a,a.return,fe)}a.flags&=-3}o&4096&&(a.flags&=-4097)}function dE(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;dE(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function li(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)aE(a,o.alternate,o),o=o.sibling}function Ll(a){for(a=a.child;a!==null;){var o=a;switch(o.tag){case 0:case 11:case 14:case 15:ro(4,o,o.return),Ll(o);break;case 1:Ea(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&eE(o,o.return,u),Ll(o);break;case 27:Gh(o.stateNode);case 26:case 5:Ea(o,o.return),Ll(o);break;case 22:o.memoizedState===null&&Ll(o);break;case 30:Ll(o);break;default:Ll(o)}a=a.sibling}}function ci(a,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var f=o.alternate,x=a,v=o,S=v.flags;switch(v.tag){case 0:case 11:case 15:ci(x,v,u),Oh(4,v);break;case 1:if(ci(x,v,u),f=v,x=f.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(te){Rt(f,f.return,te)}if(f=v,x=f.updateQueue,x!==null){var U=f.stateNode;try{var Y=x.shared.hiddenCallbacks;if(Y!==null)for(x.shared.hiddenCallbacks=null,x=0;x<Y.length;x++)zT(Y[x],U)}catch(te){Rt(f,f.return,te)}}u&&S&64&&ZN(v),Lh(v,v.return);break;case 27:rE(v);case 26:case 5:ci(x,v,u),u&&f===null&&S&4&&tE(v),Lh(v,v.return);break;case 12:ci(x,v,u);break;case 31:ci(x,v,u),u&&S&4&&lE(x,v);break;case 13:ci(x,v,u),u&&S&4&&cE(x,v);break;case 22:v.memoizedState===null&&ci(x,v,u),Lh(v,v.return);break;case 30:break;default:ci(x,v,u)}o=o.sibling}}function Db(a,o){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&Th(u))}function kb(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Th(a))}function Ys(a,o,u,f){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)hE(a,o,u,f),o=o.sibling}function hE(a,o,u,f){var x=o.flags;switch(o.tag){case 0:case 11:case 15:Ys(a,o,u,f),x&2048&&Oh(9,o);break;case 1:Ys(a,o,u,f);break;case 3:Ys(a,o,u,f),x&2048&&(a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Th(a)));break;case 12:if(x&2048){Ys(a,o,u,f),a=o.stateNode;try{var v=o.memoizedProps,S=v.id,U=v.onPostCommit;typeof U=="function"&&U(S,o.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(Y){Rt(o,o.return,Y)}}else Ys(a,o,u,f);break;case 31:Ys(a,o,u,f);break;case 13:Ys(a,o,u,f);break;case 23:break;case 22:v=o.stateNode,S=o.alternate,o.memoizedState!==null?v._visibility&2?Ys(a,o,u,f):Vh(a,o):v._visibility&2?Ys(a,o,u,f):(v._visibility|=2,du(a,o,u,f,(o.subtreeFlags&10256)!==0||!1)),x&2048&&Db(S,o);break;case 24:Ys(a,o,u,f),x&2048&&kb(o.alternate,o);break;default:Ys(a,o,u,f)}}function du(a,o,u,f,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var v=a,S=o,U=u,Y=f,te=S.flags;switch(S.tag){case 0:case 11:case 15:du(v,S,U,Y,x),Oh(8,S);break;case 23:break;case 22:var fe=S.stateNode;S.memoizedState!==null?fe._visibility&2?du(v,S,U,Y,x):Vh(v,S):(fe._visibility|=2,du(v,S,U,Y,x)),x&&te&2048&&Db(S.alternate,S);break;case 24:du(v,S,U,Y,x),x&&te&2048&&kb(S.alternate,S);break;default:du(v,S,U,Y,x)}o=o.sibling}}function Vh(a,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=a,f=o,x=f.flags;switch(f.tag){case 22:Vh(u,f),x&2048&&Db(f.alternate,f);break;case 24:Vh(u,f),x&2048&&kb(f.alternate,f);break;default:Vh(u,f)}o=o.sibling}}var Fh=8192;function hu(a,o,u){if(a.subtreeFlags&Fh)for(a=a.child;a!==null;)fE(a,o,u),a=a.sibling}function fE(a,o,u){switch(a.tag){case 26:hu(a,o,u),a.flags&Fh&&a.memoizedState!==null&&H6(u,Hs,a.memoizedState,a.memoizedProps);break;case 5:hu(a,o,u);break;case 3:case 4:var f=Hs;Hs=eg(a.stateNode.containerInfo),hu(a,o,u),Hs=f;break;case 22:a.memoizedState===null&&(f=a.alternate,f!==null&&f.memoizedState!==null?(f=Fh,Fh=16777216,hu(a,o,u),Fh=f):hu(a,o,u));break;default:hu(a,o,u)}}function mE(a){var o=a.alternate;if(o!==null&&(a=o.child,a!==null)){o.child=null;do o=a.sibling,a.sibling=null,a=o;while(a!==null)}}function Bh(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var f=o[u];er=f,gE(f,a)}mE(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)pE(a),a=a.sibling}function pE(a){switch(a.tag){case 0:case 11:case 15:Bh(a),a.flags&2048&&ro(9,a,a.return);break;case 3:Bh(a);break;case 12:Bh(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,Up(a)):Bh(a);break;default:Bh(a)}}function Up(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var f=o[u];er=f,gE(f,a)}mE(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:ro(8,o,o.return),Up(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Up(o));break;default:Up(o)}a=a.sibling}}function gE(a,o){for(;er!==null;){var u=er;switch(u.tag){case 0:case 11:case 15:ro(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Th(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,er=f;else e:for(u=a;er!==null;){f=er;var x=f.sibling,v=f.return;if(iE(f),f===u){er=null;break e}if(x!==null){x.return=v,er=x;break e}er=v}}}var a6={getCacheForType:function(a){var o=lr(Pn),u=o.data.get(a);return u===void 0&&(u=a(),o.data.set(a,u)),u},cacheSignal:function(){return lr(Pn).controller.signal}},i6=typeof WeakMap=="function"?WeakMap:Map,At=0,Kt=null,dt=null,pt=0,It=0,is=null,so=!1,fu=!1,Ib=!1,ui=0,yn=0,ao=0,Vl=0,Rb=0,os=0,mu=0,Uh=null,Fr=null,Mb=!1,zp=0,yE=0,qp=1/0,Hp=null,io=null,Yn=0,oo=null,pu=null,di=0,Pb=0,Ob=null,xE=null,zh=0,Lb=null;function ls(){return(At&2)!==0&&pt!==0?pt&-pt:W.T!==null?qb():Ym()}function bE(){if(os===0)if((pt&536870912)===0||vt){var a=wr;wr<<=1,(wr&3932160)===0&&(wr=262144),os=a}else os=536870912;return a=ss.current,a!==null&&(a.flags|=32),os}function Br(a,o,u){(a===Kt&&(It===2||It===9)||a.cancelPendingCommit!==null)&&(gu(a,0),lo(a,pt,os,!1)),hl(a,u),((At&2)===0||a!==Kt)&&(a===Kt&&((At&2)===0&&(Vl|=u),yn===4&&lo(a,pt,os,!1)),Sa(a))}function vE(a,o,u){if((At&6)!==0)throw Error(r(327));var f=!u&&(o&127)===0&&(o&a.expiredLanes)===0||Rr(a,o),x=f?c6(a,o):Fb(a,o,!0),v=f;do{if(x===0){fu&&!f&&lo(a,o,0,!1);break}else{if(u=a.current.alternate,v&&!o6(u)){x=Fb(a,o,!1),v=!1;continue}if(x===2){if(v=o,a.errorRecoveryDisabledLanes&v)var S=0;else S=a.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){o=S;e:{var U=a;x=Uh;var Y=U.current.memoizedState.isDehydrated;if(Y&&(gu(U,S).flags|=256),S=Fb(U,S,!1),S!==2){if(Ib&&!Y){U.errorRecoveryDisabledLanes|=v,Vl|=v,x=4;break e}v=Fr,Fr=x,v!==null&&(Fr===null?Fr=v:Fr.push.apply(Fr,v))}x=S}if(v=!1,x!==2)continue}}if(x===1){gu(a,0),lo(a,o,0,!0);break}e:{switch(f=a,v=x,v){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:lo(f,o,os,!so);break e;case 2:Fr=null;break;case 3:case 5:break;default:throw Error(r(329))}
vendor: 20,147 bytes, line 48
48if((o&62914560)===o&&(x=zp+300-kn(),10<x)){if(lo(f,o,os,!so),Hn(f,0,!0)!==0)break e;di=o,f.timeoutHandle=XE(wE.bind(null,f,u,Fr,Hp,Mb,o,os,Vl,mu,so,v,"Throttled",-0,0),x);break e}wE(f,u,Fr,Hp,Mb,o,os,Vl,mu,so,v,null,-0,0)}}break}while(!0);Sa(a)}function wE(a,o,u,f,x,v,S,U,Y,te,fe,ge,ie,ce){if(a.timeoutHandle=-1,ge=o.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vs},fE(o,v,ge);var Pe=(v&62914560)===v?zp-kn():(v&4194048)===v?yE-kn():0;if(Pe=Y6(ge,Pe),Pe!==null){di=v,a.cancelPendingCommit=Pe(CE.bind(null,a,o,v,u,f,x,S,U,Y,fe,ge,null,ie,ce)),lo(a,v,S,!te);return}}CE(a,o,v,u,f,x,S,U,Y)}function o6(a){for(var o=a;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var x=u[f],v=x.getSnapshot;x=x.value;try{if(!ns(v(),x))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function lo(a,o,u,f){o&=~Rb,o&=~Vl,a.suspendedLanes|=o,a.pingedLanes&=~o,f&&(a.warmLanes|=o),f=a.expirationTimes;for(var x=o;0<x;){var v=31-ke(x),S=1<<v;f[v]=-1,x&=~S}u!==0&&fl(a,u,o)}function Yp(){return(At&6)===0?(qh(0),!1):!0}function Vb(){if(dt!==null){if(It===0)var a=dt.return;else a=dt,ei=Cl=null,eb(a),iu=null,Eh=0,a=dt;for(;a!==null;)JN(a.alternate,a),a=a.return;dt=null}}function gu(a,o){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,j6(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),di=0,Vb(),Kt=a,dt=u=Ja(a.current,null),pt=o,It=0,is=null,so=!1,fu=Rr(a,o),Ib=!1,mu=os=Rb=Vl=ao=yn=0,Fr=Uh=null,Mb=!1,(o&8)!==0&&(o|=o&32);var f=a.entangledLanes;if(f!==0)for(a=a.entanglements,f&=o;0<f;){var x=31-ke(f),v=1<<x;o|=a[x],f&=~v}return ui=o,hp(),u}function _E(a,o){st=null,W.H=Rh,o===au||o===vp?(o=VT(),It=3):o===zx?(o=VT(),It=4):It=o===gb?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,is=o,dt===null&&(yn=1,Mp(a,Ns(o,a.current)))}function TE(){var a=ss.current;return a===null?!0:(pt&4194048)===pt?As===null:(pt&62914560)===pt||(pt&536870912)!==0?a===As:!1}function NE(){var a=W.H;return W.H=Rh,a===null?Rh:a}function EE(){var a=W.A;return W.A=a6,a}function Gp(){yn=4,so||(pt&4194048)!==pt&&ss.current!==null||(fu=!0),(ao&134217727)===0&&(Vl&134217727)===0||Kt===null||lo(Kt,pt,os,!1)}function Fb(a,o,u){var f=At;At|=2;var x=NE(),v=EE();(Kt!==a||pt!==o)&&(Hp=null,gu(a,o)),o=!1;var S=yn;e:do try{if(It!==0&&dt!==null){var U=dt,Y=is;switch(It){case 8:Vb(),S=6;break e;case 3:case 2:case 9:case 6:ss.current===null&&(o=!0);var te=It;if(It=0,is=null,yu(a,U,Y,te),u&&fu){S=0;break e}break;default:te=It,It=0,is=null,yu(a,U,Y,te)}}l6(),S=yn;break}catch(fe){_E(a,fe)}while(!0);return o&&a.shellSuspendCounter++,ei=Cl=null,At=f,W.H=x,W.A=v,dt===null&&(Kt=null,pt=0,hp()),S}function l6(){for(;dt!==null;)SE(dt)}function c6(a,o){var u=At;At|=2;var f=NE(),x=EE();Kt!==a||pt!==o?(Hp=null,qp=kn()+500,gu(a,o)):fu=Rr(a,o);e:do try{if(It!==0&&dt!==null){o=dt;var v=is;t:switch(It){case 1:It=0,is=null,yu(a,o,v,1);break;case 2:case 9:if(OT(v)){It=0,is=null,jE(o);break}o=function(){It!==2&&It!==9||Kt!==a||(It=7),Sa(a)},v.then(o,o);break e;case 3:It=7;break e;case 4:It=5;break e;case 7:OT(v)?(It=0,is=null,jE(o)):(It=0,is=null,yu(a,o,v,7));break;case 5:var S=null;switch(dt.tag){case 26:S=dt.memoizedState;case 5:case 27:var U=dt;if(S?hS(S):U.stateNode.complete){It=0,is=null;var Y=U.sibling;if(Y!==null)dt=Y;else{var te=U.return;te!==null?(dt=te,$p(te)):dt=null}break t}}It=0,is=null,yu(a,o,v,5);break;case 6:It=0,is=null,yu(a,o,v,6);break;case 8:Vb(),yn=6;break e;default:throw Error(r(462))}}u6();break}catch(fe){_E(a,fe)}while(!0);return ei=Cl=null,W.H=f,W.A=x,At=u,dt!==null?0:(Kt=null,pt=0,hp(),yn)}function u6(){for(;dt!==null&&!la();)SE(dt)}function SE(a){var o=QN(a.alternate,a,ui);a.memoizedProps=a.pendingProps,o===null?$p(a):dt=o}function jE(a){var o=a,u=o.alternate;switch(o.tag){case 15:case 0:o=HN(u,o,o.pendingProps,o.type,void 0,pt);break;case 11:o=HN(u,o,o.pendingProps,o.type.render,o.ref,pt);break;case 5:eb(o);default:JN(u,o),o=dt=ET(o,ui),o=QN(u,o,ui)}a.memoizedProps=a.pendingProps,o===null?$p(a):dt=o}function yu(a,o,u,f){ei=Cl=null,eb(o),iu=null,Eh=0;var x=o.return;try{if(JP(a,x,o,u,pt)){yn=1,Mp(a,Ns(u,a.current)),dt=null;return}}catch(v){if(x!==null)throw dt=x,v;yn=1,Mp(a,Ns(u,a.current)),dt=null;return}o.flags&32768?(vt||f===1?a=!0:fu||(pt&536870912)!==0?a=!1:(so=a=!0,(f===2||f===9||f===3||f===6)&&(f=ss.current,f!==null&&f.tag===13&&(f.flags|=16384))),AE(o,a)):$p(o)}function $p(a){var o=a;do{if((o.flags&32768)!==0){AE(o,so);return}a=o.return;var u=t6(o.alternate,o,ui);if(u!==null){dt=u;return}if(o=o.sibling,o!==null){dt=o;return}dt=o=a}while(o!==null);yn===0&&(yn=5)}function AE(a,o){do{var u=n6(a.alternate,a);if(u!==null){u.flags&=32767,dt=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(a=a.sibling,a!==null)){dt=a;return}dt=a=u}while(a!==null);yn=6,dt=null}function CE(a,o,u,f,x,v,S,U,Y){a.cancelPendingCommit=null;do Kp();while(Yn!==0);if((At&6)!==0)throw Error(r(327));if(o!==null){if(o===a.current)throw Error(r(177));if(v=o.lanes|o.childLanes,v|=jx,xx(a,u,v,S,U,Y),a===Kt&&(dt=Kt=null,pt=0),pu=o,oo=a,di=u,Pb=v,Ob=x,xE=f,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,m6(Ir,function(){return ME(),null})):(a.callbackNode=null,a.callbackPriority=0),f=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||f){f=W.T,W.T=null,x=$.p,$.p=2,S=At,At|=4;try{r6(a,o,u)}finally{At=S,$.p=x,W.T=f}}Yn=1,DE(),kE(),IE()}}function DE(){if(Yn===1){Yn=0;var a=oo,o=pu,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=W.T,W.T=null;var f=$.p;$.p=2;var x=At;At|=4;try{uE(o,a);var v=Xb,S=gT(a.containerInfo),U=v.focusedElem,Y=v.selectionRange;if(S!==U&&U&&U.ownerDocument&&pT(U.ownerDocument.documentElement,U)){if(Y!==null&&_x(U)){var te=Y.start,fe=Y.end;if(fe===void 0&&(fe=te),"selectionStart"in U)U.selectionStart=te,U.selectionEnd=Math.min(fe,U.value.length);else{var ge=U.ownerDocument||document,ie=ge&&ge.defaultView||window;if(ie.getSelection){var ce=ie.getSelection(),Pe=U.textContent.length,We=Math.min(Y.start,Pe),zt=Y.end===void 0?We:Math.min(Y.end,Pe);!ce.extend&&We>zt&&(S=zt,zt=We,We=S);var Q=mT(U,We),K=mT(U,zt);if(Q&&K&&(ce.rangeCount!==1||ce.anchorNode!==Q.node||ce.anchorOffset!==Q.offset||ce.focusNode!==K.node||ce.focusOffset!==K.offset)){var ee=ge.createRange();ee.setStart(Q.node,Q.offset),ce.removeAllRanges(),We>zt?(ce.addRange(ee),ce.extend(K.node,K.offset)):(ee.setEnd(K.node,K.offset),ce.addRange(ee))}}}}for(ge=[],ce=U;ce=ce.parentNode;)ce.nodeType===1&&ge.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ge.length;U++){var me=ge[U];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}ig=!!Qb,Xb=Qb=null}finally{At=x,$.p=f,W.T=u}}a.current=o,Yn=2}}function kE(){if(Yn===2){Yn=0;var a=oo,o=pu,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=W.T,W.T=null;var f=$.p;$.p=2;var x=At;At|=4;try{aE(a,o.alternate,o)}finally{At=x,$.p=f,W.T=u}}Yn=3}}function IE(){if(Yn===4||Yn===3){Yn=0,ys();var a=oo,o=pu,u=di,f=xE;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Yn=5:(Yn=0,pu=oo=null,RE(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(io=null),Ka(u),o=o.stateNode,je&&typeof je.onCommitFiberRoot=="function")try{je.onCommitFiberRoot(ue,o,void 0,(o.current.flags&128)===128)}catch{}if(f!==null){o=W.T,x=$.p,$.p=2,W.T=null;try{for(var v=a.onRecoverableError,S=0;S<f.length;S++){var U=f[S];v(U.value,{componentStack:U.stack})}}finally{W.T=o,$.p=x}}(di&3)!==0&&Kp(),Sa(a),x=a.pendingLanes,(u&261930)!==0&&(x&42)!==0?a===Lb?zh++:(zh=0,Lb=a):zh=0,qh(0)}}function RE(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,Th(o)))}function Kp(){return DE(),kE(),IE(),ME()}function ME(){if(Yn!==5)return!1;var a=oo,o=Pb;Pb=0;var u=Ka(di),f=W.T,x=$.p;try{$.p=32>u?32:u,W.T=null,u=Ob,Ob=null;var v=oo,S=di;if(Yn=0,pu=oo=null,di=0,(At&6)!==0)throw Error(r(331));var U=At;if(At|=4,pE(v.current),hE(v,v.current,S,u),At=U,qh(0,!1),je&&typeof je.onPostCommitFiberRoot=="function")try{je.onPostCommitFiberRoot(ue,v)}catch{}return!0}finally{$.p=x,W.T=f,RE(a,o)}}function PE(a,o,u){o=Ns(u,o),o=pb(a.stateNode,o,2),a=eo(a,o,2),a!==null&&(hl(a,2),Sa(a))}function Rt(a,o,u){if(a.tag===3)PE(a,a,u);else for(;o!==null;){if(o.tag===3){PE(o,a,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(io===null||!io.has(f))){a=Ns(u,a),u=ON(2),f=eo(o,u,2),f!==null&&(LN(u,f,o,a),hl(f,2),Sa(f));break}}o=o.return}}function Bb(a,o,u){var f=a.pingCache;if(f===null){f=a.pingCache=new i6;var x=new Set;f.set(o,x)}else x=f.get(o),x===void 0&&(x=new Set,f.set(o,x));x.has(u)||(Ib=!0,x.add(u),a=d6.bind(null,a,o,u),o.then(a,a))}function d6(a,o,u){var f=a.pingCache;f!==null&&f.delete(o),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,Kt===a&&(pt&u)===u&&(yn===4||yn===3&&(pt&62914560)===pt&&300>kn()-zp?(At&2)===0&&gu(a,0):Rb|=u,mu===pt&&(mu=0)),Sa(a)}function OE(a,o){o===0&&(o=dl()),a=Sl(a,o),a!==null&&(hl(a,o),Sa(a))}function h6(a){var o=a.memoizedState,u=0;o!==null&&(u=o.retryLane),OE(a,u)}function f6(a,o){var u=0;switch(a.tag){case 31:case 13:var f=a.stateNode,x=a.memoizedState;x!==null&&(u=x.retryLane);break;case 19:f=a.stateNode;break;case 22:f=a.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(o),OE(a,u)}function m6(a,o){return Zt(a,o)}var Wp=null,xu=null,Ub=!1,Qp=!1,zb=!1,co=0;function Sa(a){a!==xu&&a.next===null&&(xu===null?Wp=xu=a:xu=xu.next=a),Qp=!0,Ub||(Ub=!0,g6())}function qh(a,o){if(!zb&&Qp){zb=!0;do for(var u=!1,f=Wp;f!==null;){if(a!==0){var x=f.pendingLanes;if(x===0)var v=0;else{var S=f.suspendedLanes,U=f.pingedLanes;v=(1<<31-ke(42|a)+1)-1,v&=x&~(S&~U),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(u=!0,BE(f,v))}else v=pt,v=Hn(f,f===Kt?v:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(v&3)===0||Rr(f,v)||(u=!0,BE(f,v));f=f.next}while(u);zb=!1}}function p6(){LE()}function LE(){Qp=Ub=!1;var a=0;co!==0&&S6()&&(a=co);for(var o=kn(),u=null,f=Wp;f!==null;){var x=f.next,v=VE(f,o);v===0?(f.next=null,u===null?Wp=x:u.next=x,x===null&&(xu=u)):(u=f,(a!==0||(v&3)!==0)&&(Qp=!0)),f=x}Yn!==0&&Yn!==5||qh(a),co!==0&&(co=0)}function VE(a,o){for(var u=a.suspendedLanes,f=a.pingedLanes,x=a.expirationTimes,v=a.pendingLanes&-62914561;0<v;){var S=31-ke(v),U=1<<S,Y=x[S];Y===-1?((U&u)===0||(U&f)!==0)&&(x[S]=Zd(U,o)):Y<=o&&(a.expiredLanes|=U),v&=~U}if(o=Kt,u=pt,u=Hn(a,a===o?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f=a.callbackNode,u===0||a===o&&(It===2||It===9)||a.cancelPendingCommit!==null)return f!==null&&f!==null&&Dr(f),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Rr(a,u)){if(o=u&-u,o===a.callbackPriority)return o;switch(f!==null&&Dr(f),Ka(u)){case 2:case 8:u=Ps;break;case 32:u=Ir;break;case 268435456:u=de;break;default:u=Ir}return f=FE.bind(null,a),u=Zt(u,f),a.callbackPriority=o,a.callbackNode=u,o}return f!==null&&f!==null&&Dr(f),a.callbackPriority=2,a.callbackNode=null,2}function FE(a,o){if(Yn!==0&&Yn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(Kp()&&a.callbackNode!==u)return null;var f=pt;return f=Hn(a,a===Kt?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f===0?null:(vE(a,f,o),VE(a,kn()),a.callbackNode!=null&&a.callbackNode===u?FE.bind(null,a):null)}function BE(a,o){if(Kp())return null;vE(a,o,!0)}function g6(){A6(function(){(At&6)!==0?Zt(xs,p6):LE()})}function qb(){if(co===0){var a=ru;a===0&&(a=Gt,Gt<<=1,(Gt&261888)===0&&(Gt=256)),co=a}return co}function UE(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:zc(""+a)}function zE(a,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,a.id&&u.setAttribute("form",a.id),o.parentNode.insertBefore(u,o),a=new FormData(a),u.parentNode.removeChild(u),a}function y6(a,o,u,f,x){if(o==="submit"&&u&&u.stateNode===x){var v=UE((x[Jn]||null).action),S=f.submitter;S&&(o=(o=S[Jn]||null)?UE(o.formAction):S.getAttribute("formAction"),o!==null&&(v=o,S=null));var U=new ba("action","action",null,f,x);a.push({event:U,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(co!==0){var Y=S?zE(x,S):new FormData(x);cb(u,{pending:!0,data:Y,method:x.method,action:v},null,Y)}}else typeof v=="function"&&(U.preventDefault(),Y=S?zE(x,S):new FormData(x),cb(u,{pending:!0,data:Y,method:x.method,action:v},v,Y))},currentTarget:x}]})}}for(var Hb=0;Hb<Sx.length;Hb++){var Yb=Sx[Hb],x6=Yb.toLowerCase(),b6=Yb[0].toUpperCase()+Yb.slice(1);qs(x6,"on"+b6)}qs(bT,"onAnimationEnd"),qs(vT,"onAnimationIteration"),qs(wT,"onAnimationStart"),qs("dblclick","onDoubleClick"),qs("focusin","onFocus"),qs("focusout","onBlur"),qs(PP,"onTransitionRun"),qs(OP,"onTransitionStart"),qs(LP,"onTransitionCancel"),qs(_T,"onTransitionEnd"),pa("onMouseEnter",["mouseout","mouseover"]),pa("onMouseLeave",["mouseout","mouseover"]),pa("onPointerEnter",["pointerout","pointerover"]),pa("onPointerLeave",["pointerout","pointerover"]),ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hh="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(" "),v6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hh));function qE(a,o){o=(o&4)!==0;for(var u=0;u<a.length;u++){var f=a[u],x=f.event;f=f.listeners;e:{var v=void 0;if(o)for(var S=f.length-1;0<=S;S--){var U=f[S],Y=U.instance,te=U.currentTarget;if(U=U.listener,Y!==v&&x.isPropagationStopped())break e;v=U,x.currentTarget=te;try{v(x)}catch(fe){dp(fe)}x.currentTarget=null,v=Y}else for(S=0;S<f.length;S++){if(U=f[S],Y=U.instance,te=U.currentTarget,U=U.listener,Y!==v&&x.isPropagationStopped())break e;v=U,x.currentTarget=te;try{v(x)}catch(fe){dp(fe)}x.currentTarget=null,v=Y}}}}function ht(a,o){var u=o[Lc];u===void 0&&(u=o[Lc]=new Set);var f=a+"__bubble";u.has(f)||(HE(o,a,2,!1),u.add(f))}function Gb(a,o,u){var f=0;o&&(f|=4),HE(u,a,f,o)}var Xp="_reactListening"+Math.random().toString(36).slice(2);function $b(a){if(!a[Xp]){a[Xp]=!0,nh.forEach(function(u){u!=="selectionchange"&&(v6.has(u)||Gb(u,!1,a),Gb(u,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[Xp]||(o[Xp]=!0,Gb("selectionchange",!1,o))}}function HE(a,o,u,f){switch(bS(o)){case 2:var x=K6;break;case 8:x=W6;break;default:x=lv}u=x.bind(null,o,u,a),x=void 0,!xl||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(x=!0),f?x!==void 0?a.addEventListener(o,u,{capture:!0,passive:x}):a.addEventListener(o,u,!0):x!==void 0?a.addEventListener(o,u,{passive:x}):a.addEventListener(o,u,!1)}function Kb(a,o,u,f,x){var v=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var S=f.tag;if(S===3||S===4){var U=f.stateNode.containerInfo;if(U===x)break;if(S===4)for(S=f.return;S!==null;){var Y=S.tag;if((Y===3||Y===4)&&S.stateNode.containerInfo===x)return;S=S.return}for(;U!==null;){if(S=ha(U),S===null)return;if(Y=S.tag,Y===5||Y===6||Y===26||Y===27){f=v=S;continue e}U=U.parentNode}}f=f.return}Hi(function(){var te=v,fe=vs(u),ge=[];e:{var ie=TT.get(a);if(ie!==void 0){var ce=ba,Pe=a;switch(a){case"keypress":if(vl(u)===0)break e;case"keydown":case"keyup":ce=lp;break;case"focusin":Pe="focus",ce=_l;break;case"focusout":Pe="blur",ce=_l;break;case"beforeblur":case"afterblur":ce=_l;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=Zm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=T;break;case bT:case vT:case wT:ce=tp;break;case _T:ce=z;break;case"scroll":case"scrollend":ce=mh;break;case"wheel":ce=le;break;case"copy":case"cut":case"paste":ce=np;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Xa;break;case"toggle":case"beforetoggle":ce=rt}var We=(o&4)!==0,zt=!We&&(a==="scroll"||a==="scrollend"),Q=We?ie!==null?ie+"Capture":null:ie;We=[];for(var K=te,ee;K!==null;){var me=K;if(ee=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ee===null||Q===null||(me=Fs(K,Q),me!=null&&We.push(Yh(K,me,ee))),zt)break;K=K.return}0<We.length&&(ie=new ce(ie,Pe,null,u,fe),ge.push({event:ie,listeners:We}))}}if((o&7)===0){e:{if(ie=a==="mouseover"||a==="pointerover",ce=a==="mouseout"||a==="pointerout",ie&&u!==dh&&(Pe=u.relatedTarget||u.fromElement)&&(ha(Pe)||Pe[ua]))break e;if((ce||ie)&&(ie=fe.window===fe?fe:(ie=fe.ownerDocument)?ie.defaultView||ie.parentWindow:window,ce?(Pe=u.relatedTarget||u.toElement,ce=te,Pe=Pe?ha(Pe):null,Pe!==null&&(zt=i(Pe),We=Pe.tag,Pe!==zt||We!==5&&We!==27&&We!==6)&&(Pe=null)):(ce=null,Pe=te),ce!==Pe)){if(We=ph,me="onMouseLeave",Q="onMouseEnter",K="mouse",(a==="pointerout"||a==="pointerover")&&(We=Xa,me="onPointerLeave",Q="onPointerEnter",K="pointer"),zt=ce==null?ie:es(ce),ee=Pe==null?ie:es(Pe),ie=new We(me,K+"leave",ce,u,fe),ie.target=zt,ie.relatedTarget=ee,me=null,ha(fe)===te&&(We=new We(Q,K+"enter",Pe,u,fe),We.target=ee,We.relatedTarget=zt,me=We),zt=me,ce&&Pe)t:{for(We=w6,Q=ce,K=Pe,ee=0,me=Q;me;me=We(me))ee++;me=0;for(var Ke=K;Ke;Ke=We(Ke))me++;for(;0<ee-me;)Q=We(Q),ee--;for(;0<me-ee;)K=We(K),me--;for(;ee--;){if(Q===K||K!==null&&Q===K.alternate){We=Q;break t}Q=We(Q),K=We(K)}We=null}else We=null;ce!==null&&YE(ge,ie,ce,We,!1),Pe!==null&&zt!==null&&YE(ge,zt,Pe,We,!0)}}e:{if(ie=te?es(te):window,ce=ie.nodeName&&ie.nodeName.toLowerCase(),ce==="select"||ce==="input"&&ie.type==="file")var Nt=lT;else if(iT(ie))if(cT)Nt=IP;else{Nt=DP;var Ue=CP}else ce=ie.nodeName,!ce||ce.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?te&&Uc(te.elementType)&&(Nt=lT):Nt=kP;if(Nt&&(Nt=Nt(a,te))){oT(ge,Nt,u,fe);break e}Ue&&Ue(a,ie,te),a==="focusout"&&te&&ie.type==="number"&&te.memoizedProps.value!=null&&lh(ie,"number",ie.value)}switch(Ue=te?es(te):window,a){case"focusin":(iT(Ue)||Ue.contentEditable==="true")&&(Wc=Ue,Tx=te,vh=null);break;case"focusout":vh=Tx=Wc=null;break;case"mousedown":Nx=!0;break;case"contextmenu":case"mouseup":case"dragend":Nx=!1,yT(ge,u,fe);break;case"selectionchange":if(MP)break;case"keydown":case"keyup":yT(ge,u,fe)}var it;if(jt)e:{switch(a){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else Kc?Tl(a,u)&&(gt="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(gt="onCompositionStart");gt&&(_a&&u.locale!=="ko"&&(Kc||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&Kc&&(it=fh()):(xa=fe,hh="value"in xa?xa.value:xa.textContent,Kc=!0)),Ue=Jp(te,gt),0<Ue.length&&(gt=new wa(gt,a,null,u,fe),ge.push({event:gt,listeners:Ue}),it?gt.data=it:(it=$c(u),it!==null&&(gt.data=it)))),(it=_s?EP(a,u):SP(a,u))&&(gt=Jp(te,"onBeforeInput"),0<gt.length&&(Ue=new wa("onBeforeInput","beforeinput",null,u,fe),ge.push({event:Ue,listeners:gt}),Ue.data=it)),y6(ge,a,te,u,fe)}qE(ge,o)})}function Yh(a,o,u){return{instance:a,listener:o,currentTarget:u}}function Jp(a,o){for(var u=o+"Capture",f=[];a!==null;){var x=a,v=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||v===null||(x=Fs(a,u),x!=null&&f.unshift(Yh(a,x,v)),x=Fs(a,o),x!=null&&f.pu
vendor: 6,258 bytes, lines 48-49
48sh(Yh(a,x,v))),a.tag===3)return f;a=a.return}return[]}function w6(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function YE(a,o,u,f,x){for(var v=o._reactName,S=[];u!==null&&u!==f;){var U=u,Y=U.alternate,te=U.stateNode;if(U=U.tag,Y!==null&&Y===f)break;U!==5&&U!==26&&U!==27||te===null||(Y=te,x?(te=Fs(u,v),te!=null&&S.unshift(Yh(u,te,Y))):x||(te=Fs(u,v),te!=null&&S.push(Yh(u,te,Y)))),u=u.return}S.length!==0&&a.push({event:o,listeners:S})}var _6=/\r\n?/g,T6=/\u0000|\uFFFD/g;function GE(a){return(typeof a=="string"?a:""+a).replace(_6,`
49`).replace(T6,"")}function $E(a,o){return o=GE(o),GE(a)===o}function Ut(a,o,u,f,x,v){switch(u){case"children":typeof f=="string"?o==="body"||o==="textarea"&&f===""||Pr(a,f):(typeof f=="number"||typeof f=="bigint")&&o!=="body"&&Pr(a,""+f);break;case"className":ts(a,"class",f);break;case"tabIndex":ts(a,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":ts(a,u,f);break;case"style":uh(a,f,v);break;case"data":if(o!=="object"){ts(a,"data",f);break}case"src":case"href":if(f===""&&(o!=="a"||u!=="href")){a.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(u);break}f=zc(""+f),a.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(u==="formAction"?(o!=="input"&&Ut(a,o,"name",x.name,x,null),Ut(a,o,"formEncType",x.formEncType,x,null),Ut(a,o,"formMethod",x.formMethod,x,null),Ut(a,o,"formTarget",x.formTarget,x,null)):(Ut(a,o,"encType",x.encType,x,null),Ut(a,o,"method",x.method,x,null),Ut(a,o,"target",x.target,x,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(u);break}f=zc(""+f),a.setAttribute(u,f);break;case"onClick":f!=null&&(a.onclick=Vs);break;case"onScroll":f!=null&&ht("scroll",a);break;case"onScrollEnd":f!=null&&ht("scrollend",a);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":a.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){a.removeAttribute("xlink:href");break}u=zc(""+f),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,""+f):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":f===!0?a.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,f):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?a.setAttribute(u,f):a.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?a.removeAttribute(u):a.setAttribute(u,f);break;case"popover":ht("beforetoggle",a),ht("toggle",a),Fc(a,"popover",f);break;case"xlinkActuate":Mn(a,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Mn(a,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Mn(a,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Mn(a,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Mn(a,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Mn(a,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Mn(a,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Mn(a,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Mn(a,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":Fc(a,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Jm.get(u)||u,Fc(a,u,f))}}function Wb(a,o,u,f,x,v){switch(u){case"style":uh(a,f,v);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof f=="string"?Pr(a,f):(typeof f=="number"||typeof f=="bigint")&&Pr(a,""+f);break;case"onScroll":f!=null&&ht("scroll",a);break;case"onScrollEnd":f!=null&&ht("scrollend",a);break;case"onClick":f!=null&&(a.onclick=Vs);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rh.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),o=u.slice(2,x?u.length-7:void 0),v=a[Jn]||null,v=v!=null?v[u]:null,typeof v=="function"&&a.removeEventListener(o,v,x),typeof f=="function")){typeof v!="function"&&v!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(o,f,x);break e}u in a?a[u]=f:f===!0?a.setAttribute(u,""):Fc(a,u,f)}}}function ur(a,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ht("error",a),ht("load",a);var f=!1,x=!1,v;for(v in u)if(u.hasOwnProperty(v)){var S=u[v];
vendor: 9,278 bytes, line 49
49if(S!=null)switch(v){case"src":f=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ut(a,o,v,S,u,null)}}x&&Ut(a,o,"srcSet",u.srcSet,u,null),f&&Ut(a,o,"src",u.src,u,null);return;case"input":ht("invalid",a);var U=v=S=x=null,Y=null,te=null;for(f in u)if(u.hasOwnProperty(f)){var fe=u[f];if(fe!=null)switch(f){case"name":x=fe;break;case"type":S=fe;break;case"checked":Y=fe;break;case"defaultChecked":te=fe;break;case"value":v=fe;break;case"defaultValue":U=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,o));break;default:Ut(a,o,f,fe,u,null)}}Wm(a,v,U,Y,te,S,x,!1);return;case"select":ht("invalid",a),f=S=v=null;for(x in u)if(u.hasOwnProperty(x)&&(U=u[x],U!=null))switch(x){case"value":v=U;break;case"defaultValue":S=U;break;case"multiple":f=U;default:Ut(a,o,x,U,u,null)}o=v,u=S,a.multiple=!!f,o!=null?Bi(a,!!f,o,!1):u!=null&&Bi(a,!!f,u,!0);return;case"textarea":ht("invalid",a),v=x=f=null;for(S in u)if(u.hasOwnProperty(S)&&(U=u[S],U!=null))switch(S){case"value":f=U;break;case"defaultValue":x=U;break;case"children":v=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(91));break;default:Ut(a,o,S,U,u,null)}Ui(a,f,x,v);return;case"option":for(Y in u)if(u.hasOwnProperty(Y)&&(f=u[Y],f!=null))switch(Y){case"selected":a.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Ut(a,o,Y,f,u,null)}return;case"dialog":ht("beforetoggle",a),ht("toggle",a),ht("cancel",a),ht("close",a);break;case"iframe":case"object":ht("load",a);break;case"video":case"audio":for(f=0;f<Hh.length;f++)ht(Hh[f],a);break;case"image":ht("error",a),ht("load",a);break;case"details":ht("toggle",a);break;case"embed":case"source":case"link":ht("error",a),ht("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in u)if(u.hasOwnProperty(te)&&(f=u[te],f!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ut(a,o,te,f,u,null)}return;default:if(Uc(o)){for(fe in u)u.hasOwnProperty(fe)&&(f=u[fe],f!==void 0&&Wb(a,o,fe,f,u,void 0));return}}for(U in u)u.hasOwnProperty(U)&&(f=u[U],f!=null&&Ut(a,o,U,f,u,null))}function N6(a,o,u,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,v=null,S=null,U=null,Y=null,te=null,fe=null;for(ce in u){var ge=u[ce];if(u.hasOwnProperty(ce)&&ge!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":Y=ge;default:f.hasOwnProperty(ce)||Ut(a,o,ce,null,f,ge)}}for(var ie in f){var ce=f[ie];if(ge=u[ie],f.hasOwnProperty(ie)&&(ce!=null||ge!=null))switch(ie){case"type":v=ce;break;case"name":x=ce;break;case"checked":te=ce;break;case"defaultChecked":fe=ce;break;case"value":S=ce;break;case"defaultValue":U=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,o));break;default:ce!==ge&&Ut(a,o,ie,ce,f,ge)}}Bc(a,S,U,Y,te,fe,v,x);return;case"select":ce=S=U=ie=null;for(v in u)if(Y=u[v],u.hasOwnProperty(v)&&Y!=null)switch(v){case"value":break;case"multiple":ce=Y;default:f.hasOwnProperty(v)||Ut(a,o,v,null,f,Y)}for(x in f)if(v=f[x],Y=u[x],f.hasOwnProperty(x)&&(v!=null||Y!=null))switch(x){case"value":ie=v;break;case"defaultValue":U=v;break;case"multiple":S=v;default:v!==Y&&Ut(a,o,x,v,f,Y)}o=U,u=S,f=ce,ie!=null?Bi(a,!!u,ie,!1):!!f!=!!u&&(o!=null?Bi(a,!!u,o,!0):Bi(a,!!u,u?[]:"",!1));return;case"textarea":ce=ie=null;for(U in u)if(x=u[U],u.hasOwnProperty(U)&&x!=null&&!f.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:Ut(a,o,U,null,f,x)}for(S in f)if(x=f[S],v=u[S],f.hasOwnProperty(S)&&(x!=null||v!=null))switch(S){case"value":ie=x;break;case"defaultValue":ce=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==v&&Ut(a,o,S,x,f,v)}Qm(a,ie,ce);return;case"option":for(var Pe in u)if(ie=u[Pe],u.hasOwnProperty(Pe)&&ie!=null&&!f.hasOwnProperty(Pe))switch(Pe){case"selected":a.selected=!1;break;default:Ut(a,o,Pe,null,f,ie)}for(Y in f)if(ie=f[Y],ce=u[Y],f.hasOwnProperty(Y)&&ie!==ce&&(ie!=null||ce!=null))switch(Y){case"selected":a.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:Ut(a,o,Y,ie,f,ce)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var We in u)ie=u[We],u.hasOwnProperty(We)&&ie!=null&&!f.hasOwnProperty(We)&&Ut(a,o,We,null,f,ie);for(te in f)if(ie=f[te],ce=u[te],f.hasOwnProperty(te)&&ie!==ce&&(ie!=null||ce!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,o));break;default:Ut(a,o,te,ie,f,ce)}return;default:if(Uc(o)){for(var zt in u)ie=u[zt],u.hasOwnProperty(zt)&&ie!==void 0&&!f.hasOwnProperty(zt)&&Wb(a,o,zt,void 0,f,ie);for(fe in f)ie=f[fe],ce=u[fe],!f.hasOwnProperty(fe)||ie===ce||ie===void 0&&ce===void 0||Wb(a,o,fe,ie,f,ce);return}}for(var Q in u)ie=u[Q],u.hasOwnProperty(Q)&&ie!=null&&!f.hasOwnProperty(Q)&&Ut(a,o,Q,null,f,ie);for(ge in f)ie=f[ge],ce=u[ge],!f.hasOwnProperty(ge)||ie===ce||ie==null&&ce==null||Ut(a,o,ge,ie,f,ce)}function KE(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function E6(){if(typeof performance.getEntriesByType=="function"){for(var a=0,o=0,u=performance.getEntriesByType("resource"),f=0;f<u.length;f++){var x=u[f],v=x.transferSize,S=x.initiatorType,U=x.duration;if(v&&U&&KE(S)){for(S=0,U=x.responseEnd,f+=1;f<u.length;f++){var Y=u[f],te=Y.startTime;if(te>U)break;var fe=Y.transferSize,ge=Y.initiatorType;fe&&KE(ge)&&(Y=Y.responseEnd,S+=fe*(Y<U?1:(U-te)/(Y-te)))}if(--f,o+=8*(v+S)/(x.duration/1e3),a++,10<a)break}}if(0<a)return o/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Qb=null,Xb=null;function Zp(a){return a.nodeType===9?a:a.ownerDocument}function WE(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function QE(a,o){if(a===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&o==="foreignObject"?0:a}function Jb(a,o){return a==="textarea"||a==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Zb=null;function S6(){var a=window.event;return a&&a.type==="popstate"?a===Zb?!1:(Zb=a,!0):(Zb=null,!1)}var XE=typeof setTimeout=="function"?setTimeout:void 0,j6=typeof clearTimeout=="function"?clearTimeout:void 0,JE=typeof Promise=="function"?Promise:void 0,A6=typeof queueMicrotask=="function"?queueMicrotask:typeof JE<"u"?function(a){return JE.resolve(null).then(a).catch(C6)}:XE;function C6(a){setTimeout(function(){throw a})}function uo(a){return a==="head"}function ZE(a,o){var u=o,f=0;do{var x=u.nextSibling;if(a.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(f===0){a.removeChild(x),_u(o);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")Gh(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Gh(u);for(var v=u.firstChild;v;){var S=v.nextSibling,U=v.nodeName;v[da]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&v.rel.toLowerCase()==="stylesheet"||u.removeChild(v),v=S}}else u==="body"&&Gh(a.ownerDocument.body);u=x}while(u);_u(o)}function eS(a,o){var u=a;a=0;do{var f=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),f&&f.nodeType===8)if(u=f.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=f}while(u)}function ev(a){var o=a.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":ev(u),Vc(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function D6(a,o,u,f){for(;a.nodeType===1;){var x=u;if(a.nodeName.toLowerCase()!==o.toLowerCase()){if(!f&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(f){if(!a[da])switch(o){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(v=a.getAttribute("rel"),v==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(v!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(v=a.getAttribute("src"),(v!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&v&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(o==="input"&&a.type==="hidden"){var v=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===v)return a}else return a;
vendor: 9,781 bytes, line 49
49if(a=Cs(a.nextSibling),a===null)break}return null}function k6(a,o,u){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Cs(a.nextSibling),a===null))return null;return a}function tS(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=Cs(a.nextSibling),a===null))return null;return a}function tv(a){return a.data==="$?"||a.data==="$~"}function nv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function I6(a,o){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=o;else if(a.data!=="$?"||u.readyState!=="loading")o();else{var f=function(){o(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),a._reactRetry=f}}function Cs(a){for(;a!=null;a=a.nextSibling){var o=a.nodeType;if(o===1||o===3)break;if(o===8){if(o=a.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return a}var rv=null;function nS(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(o===0)return Cs(a.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}a=a.nextSibling}return null}function rS(a){a=a.previousSibling;for(var o=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return a;o--}else u!=="/$"&&u!=="/&"||o++}a=a.previousSibling}return null}function sS(a,o,u){switch(o=Zp(u),a){case"html":if(a=o.documentElement,!a)throw Error(r(452));return a;case"head":if(a=o.head,!a)throw Error(r(453));return a;case"body":if(a=o.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Gh(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);Vc(a)}var Ds=new Map,aS=new Set;function eg(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var hi=$.d;$.d={f:R6,r:M6,D:P6,C:O6,L:L6,m:V6,X:B6,S:F6,M:U6};function R6(){var a=hi.f(),o=Yp();return a||o}function M6(a){var o=bs(a);o!==null&&o.tag===5&&o.type==="form"?_N(o):hi.r(a)}var bu=typeof document>"u"?null:document;function iS(a,o,u){var f=bu;if(f&&typeof o=="string"&&o){var x=Mr(o);x='link[rel="'+a+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),aS.has(x)||(aS.add(x),a={rel:a,crossOrigin:u,href:o},f.querySelector(x)===null&&(o=f.createElement("link"),ur(o,"link",a),Rn(o),f.head.appendChild(o)))}}function P6(a){hi.D(a),iS("dns-prefetch",a,null)}function O6(a,o){hi.C(a,o),iS("preconnect",a,o)}function L6(a,o,u){hi.L(a,o,u);var f=bu;if(f&&a&&o){var x='link[rel="preload"][as="'+Mr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Mr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Mr(u.imageSizes)+'"]')):x+='[href="'+Mr(a)+'"]';var v=x;switch(o){case"style":v=vu(a);break;case"script":v=wu(a)}Ds.has(v)||(a=p({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:a,as:o},u),Ds.set(v,a),f.querySelector(x)!==null||o==="style"&&f.querySelector($h(v))||o==="script"&&f.querySelector(Kh(v))||(o=f.createElement("link"),ur(o,"link",a),Rn(o),f.head.appendChild(o)))}}function V6(a,o){hi.m(a,o);var u=bu;if(u&&a){var f=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+Mr(f)+'"][href="'+Mr(a)+'"]',v=x;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=wu(a)}if(!Ds.has(v)&&(a=p({rel:"modulepreload",href:a},o),Ds.set(v,a),u.querySelector(x)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Kh(v)))return}f=u.createElement("link"),ur(f,"link",a),Rn(f),u.head.appendChild(f)}}}function F6(a,o,u){hi.S(a,o,u);var f=bu;if(f&&a){var x=fa(f).hoistableStyles,v=vu(a);o=o||"default";var S=x.get(v);if(!S){var U={loading:0,preload:null};if(S=f.querySelector($h(v)))U.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":o},u),(u=Ds.get(v))&&sv(a,u);var Y=S=f.createElement("link");Rn(Y),ur(Y,"link",a),Y._p=new Promise(function(te,fe){Y.onload=te,Y.onerror=fe}),Y.addEventListener("load",function(){U.loading|=1}),Y.addEventListener("error",function(){U.loading|=2}),U.loading|=4,tg(S,o,f)}S={type:"stylesheet",instance:S,count:1,state:U},x.set(v,S)}}}function B6(a,o){hi.X(a,o);var u=bu;if(u&&a){var f=fa(u).hoistableScripts,x=wu(a),v=f.get(x);v||(v=u.querySelector(Kh(x)),v||(a=p({src:a,async:!0},o),(o=Ds.get(x))&&av(a,o),v=u.createElement("script"),Rn(v),ur(v,"link",a),u.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},f.set(x,v))}}function U6(a,o){hi.M(a,o);var u=bu;if(u&&a){var f=fa(u).hoistableScripts,x=wu(a),v=f.get(x);v||(v=u.querySelector(Kh(x)),v||(a=p({src:a,async:!0,type:"module"},o),(o=Ds.get(x))&&av(a,o),v=u.createElement("script"),Rn(v),ur(v,"link",a),u.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},f.set(x,v))}}function oS(a,o,u,f){var x=(x=$e.current)?eg(x):null;if(!x)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=vu(u.href),u=fa(x).hoistableStyles,f=u.get(o),f||(f={type:"style",instance:null,count:0,state:null},u.set(o,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=vu(u.href);var v=fa(x).hoistableStyles,S=v.get(a);if(S||(x=x.ownerDocument||x,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(a,S),(v=x.querySelector($h(a)))&&!v._p&&(S.instance=v,S.state.loading=5),Ds.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ds.set(a,u),v||z6(x,a,u,S.state))),o&&f===null)throw Error(r(528,""));return S}if(o&&f!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=wu(u),u=fa(x).hoistableScripts,f=u.get(o),f||(f={type:"script",instance:null,count:0,state:null},u.set(o,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function vu(a){return'href="'+Mr(a)+'"'}function $h(a){return'link[rel="stylesheet"]['+a+"]"}function lS(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function z6(a,o,u,f){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?f.loading=1:(o=a.createElement("link"),f.preload=o,o.addEventListener("load",function(){return f.loading|=1}),o.addEventListener("error",function(){return f.loading|=2}),ur(o,"link",u),Rn(o),a.head.appendChild(o))}function wu(a){return'[src="'+Mr(a)+'"]'}function Kh(a){return"script[async]"+a}function cS(a,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var f=a.querySelector('style[data-href~="'+Mr(u.href)+'"]');if(f)return o.instance=f,Rn(f),f;var x=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(a.ownerDocument||a).createElement("style"),Rn(f),ur(f,"style",x),tg(f,u.precedence,a),o.instance=f;case"stylesheet":x=vu(u.href);var v=a.querySelector($h(x));if(v)return o.state.loading|=4,o.instance=v,Rn(v),v;f=lS(u),(x=Ds.get(x))&&sv(f,x),v=(a.ownerDocument||a).createElement("link"),Rn(v);var S=v;return S._p=new Promise(function(U,Y){S.onload=U,S.onerror=Y}),ur(v,"link",f),o.state.loading|=4,tg(v,u.precedence,a),o.instance=v;case"script":return v=wu(u.src),(x=a.querySelector(Kh(v)))?(o.instance=x,Rn(x),x):(f=u,(x=Ds.get(v))&&(f=p({},u),av(f,x)),a=a.ownerDocument||a,x=a.createElement("script"),Rn(x),ur(x,"link",f),a.head.appendChild(x),o.instance=x);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(f=o.instance,o.state.loading|=4,tg(f,u.precedence,a));return o.instance}function tg(a,o,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=f.length?f[f.length-1]:null,v=x,S=0;S<f.length;S++){var U=f[S];if(U.dataset.precedence===o)v=U;else if(v!==x)break}v?v.parentNode.insertBefore(a,v.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(a,o.firstChild))}function sv(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function av(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var ng=null;function uS(a,o,u){if(ng===null){var f=new Map,x=ng=new Map;x.set(u,f)}else x=ng,f=x.get(u),f||(f=new Map,x.set(u,f));if(f.has(a))return f;for(f.set(a,null),u=u.getElementsByTagName(a),x=0;x<u.length;x++){var v=u[x];if(!(v[da]||v[In]||a==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var S=v.getAttribute(o)||"";S=a+S;var U=f.get(S);U?U.push(v):f.set(S,[v])}}return f}function dS(a,o,u){a=a.ownerDocument||a,a.head.insertBefore(u,o==="title"?a.querySelector("head > title"):null)}function q6(a,o,u){if(u===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function hS(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function H6(a,o,u,f){if(u.type==="stylesheet"&&(typeof f.media!="str
49ing"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=vu(f.href),v=o.querySelector($h(x));if(v){o=v._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=rg.bind(a),o.then(a,a)),u.state.loading|=4,u.instance=v,Rn(v);return}v=o.ownerDocument||o,f=lS(f),(x=Ds.get(x))&&sv(f,x),v=v.createElement("link"),Rn(v);var S=v;S._p=new Promise(function(U,Y){S.onload=U,S.onerror=Y}),ur(v,"link",f),u.instance=v}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=rg.bind(a),o.addEventListener("load",u),o.addEventListener("error",u))}}var iv=0;function Y6(a,o){return a.stylesheets&&a.count===0&&ag(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var f=setTimeout(function(){if(a.stylesheets&&ag(a,a.stylesheets),a.unsuspend){var v=a.unsuspend;a.unsuspend=null,v()}},6e4+o);0<a.imgBytes&&iv===0&&(iv=62500*E6());var x=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&ag(a,a.stylesheets),a.unsuspend)){var v=a.unsuspend;a.unsuspend=null,v()}},(a.imgBytes>iv?50:800)+o);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(f),clearTimeout(x)}}:null}function rg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ag(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var sg=null;function ag(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,sg=new Map,o.forEach(G6,a),sg=null,rg.call(a))}function G6(a,o){if(!(o.state.loading&4)){var u=sg.get(a);if(u)var f=u.get(null);else{u=new Map,sg.set(a,u);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<x.length;v++){var S=x[v];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(u.set(S.dataset.precedence,S),f=S)}f&&u.set(null,f)}x=o.instance,S=x.getAttribute("data-precedence"),v=u.get(S)||f,v===f&&u.set(null,x),u.set(S,x),this.count++,f=rg.bind(this),x.addEventListener("load",f),x.addEventListener("error",f),v?v.parentNode.insertBefore(x,v.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),o.state.loading|=4}}var Wh={$$typeof:A,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function $6(a,o,u,f,x,v,S,U,Y){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ca(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.hiddenUpdates=ca(null),this.identifierPrefix=f,this.onUncaughtError=x,this.onCaughtError=v,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function fS(a,o,u,f,x,v,S,U,Y,te,fe,ge){return a=new $6(a,o,u,S,Y,te,fe,ge,U),o=1,v===!0&&(o|=24),v=rs(3,null,null,o),a.current=v,v.stateNode=a,o=Fx(),o.refCount++,a.pooledCache=o,o.refCount++,v.memoizedState={element:f,isDehydrated:u,cac
vendor: 5,201 bytes, line 49
49he:o},qx(v),a}function mS(a){return a?(a=Jc,a):Jc}function pS(a,o,u,f,x,v){x=mS(x),f.context===null?f.context=x:f.pendingContext=x,f=Zi(o),f.payload={element:u},v=v===void 0?null:v,v!==null&&(f.callback=v),u=eo(a,f,o),u!==null&&(Br(u,a,o),jh(u,a,o))}function gS(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<o?u:o}}function ov(a,o){gS(a,o),(a=a.alternate)&&gS(a,o)}function yS(a){if(a.tag===13||a.tag===31){var o=Sl(a,67108864);o!==null&&Br(o,a,67108864),ov(a,67108864)}}function xS(a){if(a.tag===13||a.tag===31){var o=ls();o=ml(o);var u=Sl(a,o);u!==null&&Br(u,a,o),ov(a,o)}}var ig=!0;function K6(a,o,u,f){var x=W.T;W.T=null;var v=$.p;try{$.p=2,lv(a,o,u,f)}finally{$.p=v,W.T=x}}function W6(a,o,u,f){var x=W.T;W.T=null;var v=$.p;try{$.p=8,lv(a,o,u,f)}finally{$.p=v,W.T=x}}function lv(a,o,u,f){if(ig){var x=cv(f);if(x===null)Kb(a,o,f,og,u),vS(a,f);else if(X6(x,a,o,u,f))f.stopPropagation();else if(vS(a,f),o&4&&-1<Q6.indexOf(a)){for(;x!==null;){var v=bs(x);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var S=wn(v.pendingLanes);if(S!==0){var U=v;for(U.pendingLanes|=2,U.entangledLanes|=2;S;){var Y=1<<31-ke(S);U.entanglements[1]|=Y,S&=~Y}Sa(v),(At&6)===0&&(qp=kn()+500,qh(0))}}break;case 31:case 13:U=Sl(v,2),U!==null&&Br(U,v,2),Yp(),ov(v,2)}if(v=cv(f),v===null&&Kb(a,o,f,og,u),v===x)break;x=v}x!==null&&f.stopPropagation()}else Kb(a,o,f,null,u)}}function cv(a){return a=vs(a),uv(a)}var og=null;function uv(a){if(og=null,a=ha(a),a!==null){var o=i(a);if(o===null)a=null;else{var u=o.tag;if(u===13){if(a=l(o),a!==null)return a;a=null}else if(u===31){if(a=d(o),a!==null)return a;a=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return og=a,null}function bS(a){switch(a){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(kr()){case xs:return 2;case Ps:return 8;case Ir:case oe:return 32;case de:return 268435456;default:return 32}default:return 32}}var dv=!1,ho=null,fo=null,mo=null,Qh=new Map,Xh=new Map,po=[],Q6="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".split(" ");function vS(a,o){switch(a){case"focusin":case"focusout":ho=null;break;case"dragenter":case"dragleave":fo=null;break;case"mouseover":case"mouseout":mo=null;break;case"pointerover":case"pointerout":Qh.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xh.delete(o.pointerId)}}function Jh(a,o,u,f,x,v){return a===null||a.nativeEvent!==v?(a={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:v,targetContainers:[x]},o!==null&&(o=bs(o),o!==null&&yS(o)),a):(a.eventSystemFlags|=f,o=a.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),a)}function X6(a,o,u,f,x){switch(o){case"focusin":return ho=Jh(ho,a,o,u,f,x),!0;case"dragenter":return fo=Jh(fo,a,o,u,f,x),!0;case"mouseover":return mo=Jh(mo,a,o,u,f,x),!0;case"pointerover":var v=x.pointerId;return Qh.set(v,Jh(Qh.get(v)||null,a,o,u,f,x)),!0;case"gotpointercapture":return v=x.pointerId,Xh.set(v,Jh(Xh.get(v)||null,a,o,u,f,x)),!0}return!1}function wS(a){var o=ha(a.target);if(o!==null){var u=i(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){a.blockedOn=o,Os(a.priority,function(){xS(u)});return}}else if(o===31){if(o=d(u),o!==null){a.blockedOn=o,Os(a.priority,function(){xS(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function lg(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var u=cv(a.nativeEvent);if(u===null){u=a.nativeEvent;var f=new u.constructor(u.type,u);dh=f,u.target.dispatchEvent(f),dh=null}else return o=bs(u),o!==null&&yS(o),a.blockedOn=u,!1;o.shift()}return!0}function _S(a,o,u){lg(a)&&u.delete(o)}function J6(){dv=!1,ho!==null&&lg(ho)&&(ho=null),fo!==null&&lg(fo)&&(fo=null),mo!==null&&lg(mo)&&(mo=null),Qh.forEac
49h(_S),Xh.forEach(_S)}function cg(a,o){a.blockedOn===o&&(a.blockedOn=null,dv||(dv=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,J6)))}var ug=null;function TS(a){ug!==a&&(ug=a,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ug===a&&(ug=null);for(var o=0;o<a.length;o+=3){var u=a[o],f=a[o+1],x=a[o+2];if(typeof f!="function"){if(uv(f||u)===null)continue;break}var v=bs(u);v!==null&&(a.splice(o,3),o-=3,cb(v,{pending:!0,data:x,method:u.method,action:f},f,x))}}))}function _u(a){function o(Y){return cg(Y,a)}ho!==null&&cg(ho,a),fo!==null&&cg(fo,a),mo!==null&&cg(mo,a),Qh.forEach(o),Xh.forEach(o);for(var u=0;u<po.length;u++){var f=po[u];f.blockedOn===a&&(f.blockedOn=null)}for(;0<po.length&&(u=po[0],u.blockedOn===null);)wS(u),u.blockedOn===null&&po.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var x=u[f],v=u[f+1],S=x[Jn]||null;if(typeof v=="function")S||TS(u);else if(S){var U=null;if(v&&v.hasAttribute("formAction")){if(x=v,S=v[Jn]||null)U=S.formAction;else if(uv(x)!==null)continue}else U=S.action;typeof U=="function"?u[f+1]=U:(u.splice(f,3),f-=3),TS(u)}}}function NS(){function a(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(S){return x=S})},focusReset:"manual",scroll:"manual"})}function o(){x!==null&&(x(),x=null),f||setTimeout(u,20)}function u(){if(!f&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,x=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){f=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),x!==null&&(x(),x=null)}}}function hv(a){this._internalRoot=a}dg.prototype.render=hv.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,f=ls();pS(u,f,a,o,null,null)},dg.prototype.unmount=hv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;pS(a.current,2,null,a,null,null),Yp(),o[ua]=null}};function dg(a){this._internalRoot=a}dg.prototype.unstable_scheduleHydration=function(a){if(a){var o=Ym();a={blockedOn:null,target:a,priority:o};for(var u=0;u<po.length&&o!==0&&o<po[u].priority;u++);po.splice(u,0,a),u===0&&wS(a)}};var ES=e.version;if(ES!=="19.2.5")throw Error(r(527,ES,"19.2.5"));$.findDOMNode=function(a){var o=a._reactInternals;if(o===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=m(o),a=a!==null?g(a):null,a=a===null?null:a.stateNode,a};var Z6={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hg.isDisabled&&hg.supportsFiber)try{ue=hg.inject(Z6),je=hg}catch{}}return ef.createRoot=function(a,o){if(!s(a))throw Error(r(299));var u=!1,f="",x=IN,v=RN,S=MN;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(v=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError)),o=fS(a,1,!1,null,null,u,f,null,x,v,S,NS),a[ua]=o.current,$b(a),new hv(o)},ef.hydrateRoot=function(a,o,u){if(!s(a))throw Error(r(299));var f=!1,x="",v=IN,S=RN,U=MN,Y=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(v=u.onUncaughtError),u.onCaughtError!==void 0&&(S=u.onCaughtError),u.onRecoverableError!==void 0&&(U=u.onRecoverableError),u.formState!==void 0&&(Y=u.formState)),o=fS(a,1,!0,o,u??null,f,x,Y,v,S,U,NS),o.context=mS(null),u=o.current,f=ls(),f=ml(f),x=Zi(f),x.callback=null,eo(u,x,f),u=f,o.current.lanes=u,hl(o,u),Sa(o),a[ua]=o.current,$b(a),new dg(o)},ef.version="19.2.5",ef}var PS;function dO(){if(PS)return pv.exports;PS=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),pv.exports=uO(),pv.exports}var hO=dO();/**
50 * react-router v7.14.1
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */var OS="popstate";function LS(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function fO(n={}){function e(r,s){var m;let i=(m=s.state)==null?void 0:m.masked,{pathname:l,search:d,hash:h}=i||r.location;return fw("",{pathname:l,search:d,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function t(r,s){return typeof s=="string"?s:Uf(s)}return pO(e,t,null,n)}function dn(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function sa(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function mO(){return Math.random().toString(36).substring(2,10)}function VS(n,e){return{usr:n.state,key:n.key,idx:e,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function fw(n,e,t=null,r,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof e=="string"?kd(e):e,state:t,key:e&&e.key||r||mO(),unstable_mask:s}}function Uf({pathname:n="/",search:e="",hash:t=""}){return e&&e!=="?"&&(n+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(n+=t.charAt(0)==="#"?t:"#"+t),n}function kd(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substring(t),n=n.substring(0,t));let r=n.indexOf("?");r>=0&&(e.search=n.substring(r),n=n.substring(0,r)),n&&(e.pathname=n)}return e}function pO(n,e,t,r={}){let{window:s=document.defaultView,v5Compat:i=!1}=r,l=s.history,d="POP",h=null,m=g();m==null&&(m=0,l.replaceState({...l.state,idx:m},""));function g(){return(l.state||{idx:null}).idx}function p(){d="POP";let E=g(),j=E==null?null:E-m;m=E,h&&h({action:d,location:N.location,delta:j})}function b(E,j){d="PUSH";let P=LS(E)?E:fw(N.location,E,j);m=g()+1;let A=VS(P,m),M=N.createHref(P.unstable_mask||P);try{l.pushState(A,"",M)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;s.location.assign(M)}i&&h&&h({action:d,location:N.location,delta:1})}function w(E,j){d="REPLACE";let P=LS(E)?E:fw(N.location,E,j);m=g();let A=VS(P,m),M=N.createHref(P.unstable_mask||P);l.replaceState(A,"",M),i&&h&&h({action:d,location:N.location,delta:0})}function _(E){return gO(E)}let N={get action(){return d},get location(){return n(s,l)},listen(E){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(OS,p),h=E,()=>{s.removeEventListener(OS,p),h=null}},createHref(E){return e(s,E)},createURL:_,encodeLocation(E){let j=_(E);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:b,replace:w,go(E){return l.go(E)}};return N}function gO(n,e=!1){let t="http://localhost";
58typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),dn(t,"No window.location.(origin|href) available to create URL");let r=typeof n=="string"?n:Uf(n);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=t+r),new URL(r,t)}function d5(n,e,t="/"){return yO(n,e,t,!1)}function yO(n,e,t,r){let s=typeof e=="string"?kd(e):e,i=Ni(s.pathname||"/",t);if(i==null)return null;let l=h5(n);xO(l);let d=null;for(let h=0;d==null&&h<l.length;++h){let m=CO(i);d=jO(l[h],m,r)}return d}function h5(n,e=[],t=[],r="",s=!1){let i=(l,d,h=s,m)=>{let g={relativePath:m===void 0?l.path||"":m,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&h)return;dn(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let p=Js([r,g.relativePath]),b=t.concat(g);l.children&&l.children.length>0&&(dn(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),h5(l.children,e,b,p,h)),!(l.path==null&&!l.index)&&e.push({path:p,score:EO(p,l.index),routesMeta:b})};return n.forEach((l,d)=>{var h;if(l.path===""||!((h=l.path)!=null&&h.includes("?")))i(l,d);else for(let m of f5(l.path))i(l,d,!0,m)}),e}function f5(n){let e=n.split("/");if(e.length===0)return[];let[t,...r]=e,s=t.endsWith("?"),i=t.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let l=f5(r.join("/")),d=[];return d.push(...l.map(h=>h===""?i:[i,h].join("/"))),s&&d.push(...l),d.map(h=>n.startsWith("/")&&h===""?"/":h)}function xO(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:SO(e.routesMeta.map(r=>r.childrenIndex),t.routesMeta.map(r=>r.childrenIndex)))}var bO=/^:[\w-]+$/,vO=3,wO=2,_O=1,TO=10,NO=-2,FS=n=>n==="*";function EO(n,e){let t=n.split("/"),r=t.length;return t.some(FS)&&(r+=NO),e&&(r+=wO),t.filter(s=>!FS(s)).reduce((s,i)=>s+(bO.test(i)?vO:i===""?_O:TO),r)}function SO(n,e){return n.length===e.length&&n.slice(0,-1).every((r,s)=>r===e[s])?n[n.length-1]-e[e.length-1]:0}function jO(n,e,t=!1){let{routesMeta:r}=n,s={},i="/",l=[];for(let d=0;d<r.length;++d){let h=r[d],m=d===r.length-1,g=i==="/"?e:e.slice(i.length)||"/",p=S0({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},g),b=h.route;if(!p&&m&&t&&!r[r.length-1].route.index&&(p=S0({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!p)return null;
58Object.assign(s,p.params),l.push({params:s,pathname:Js([i,p.pathname]),pathnameBase:RO(Js([i,p.pathnameBase])),route:b}),p.pathnameBase!=="/"&&(i=Js([i,p.pathnameBase]))}return l}function S0(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[t,r]=AO(n.path,n.caseSensitive,n.end),s=e.match(t);if(!s)return null;let i=s[0],l=i.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:r.reduce((m,{paramName:g,isOptional:p},b)=>{if(g==="*"){let _=d[b]||"";l=i.slice(0,i.length-_.length).replace(/(.)\/+$/,"$1")}const w=d[b];return p&&!w?m[g]=void 0:m[g]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:i,pathnameBase:l,pattern:n}}function AO(n,e=!1,t=!0){sa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let r=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,d,h,m,g)=>{if(r.push({paramName:d,isOptional:h!=null}),h){let p=g.charAt(m+l.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(r.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function CO(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return sa(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),n}}function Ni(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,r=n.charAt(t);return r&&r!=="/"?null:n.slice(t)||"/"}var DO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function kO(n,e="/"){let{pathname:t,search:r="",hash:s=""}=typeof n=="string"?kd(n):n,i;return t?(t=m5(t),t.startsWith("/")?i=BS(t.substring(1),"/"):i=BS(t,e)):i=e,{pathname:i,search:MO(r),hash:PO(s)}}function BS(n,e){let t=j0(e).split("/");return n.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function bv(n,e,t,r){return`Cannot include a '${n}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function IO(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function L1(n){let e=IO(n);return e.map((t,r)=>r===e.length-1?t.pathname:t.pathnameBase)}function vy(n,e,t,r=!1){let s;typeof n=="string"?s=kd(n):(s={...n},dn(!s.pathname||!s.pathname.includes("?"),bv("?","pathname","search",s)),dn(!s.pathname||!s.pathname.includes("#"),bv("#","pathname","hash",s)),dn(!s.search||!s.search.includes("#"),bv("#","search","hash",s)));let i=n===""||s.pathname==="",l=i?"/":s.pathname,d;if(l==null)d=t;else{let p=e.length-1;if(!r&&l.startsWith("..")){let b=l.split("/");for(;b[0]==="..";)b.shift(),p-=1;s.pathname=b.join("/")}d=p>=0?e[p]:"/"}let h=kO(s,d),m=l&&l!=="/"&&l.endsWith("/"),g=(i||l===".")&&t.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}var m5=n=>n.replace(/\/\/+/g,"/"),Js=n=>m5(n.join("/")),j0=n=>n.replace(/\/+$/,""),RO=n=>j0(n).replace(/^\/*/,"/"),MO=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,PO=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,OO=class{constructor(n,e,t,r=!1){this.status=n,this.statusText=e||"",this.internal=r,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function LO(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function VO(n){let e=n.map(t=>t.route.path).filter(Boolean);return Js(e)||"/"}var p5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function g5(n,e){let t=n;if(typeof t!="string"||!DO.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let r=t,s=!1;if(p5)try{let i=new URL(window.location.href),l=t.startsWith("//")?new URL(i.protocol+t):new URL(t),d=Ni(l.pathname,e);l.origin===i.origin&&d!=null?t=d+l.search+l.hash:s=!0}catch{sa(!1,`<Link to="${t}">
58 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var y5=["POST","PUT","PATCH","DELETE"];new Set(y5);var FO=["GET",...y5];new Set(FO);var Id=D.createContext(null);Id.displayName="DataRouter";var wy=D.createContext(null);wy.displayName="DataRouterState";var x5=D.createContext(!1);function BO(){return D.useContext(x5)}var b5=D.createContext({isTransitioning:!1});b5.displayName="ViewTransition";var UO=D.createContext(new Map);UO.displayName="Fetchers";var zO=D.createContext(null);zO.displayName="Await";var ms=D.createContext(null);ms.displayName="Navigation";var gm=D.createContext(null);gm.displayName="Location";var $a=D.createContext({outlet:null,matches:[],isDataRoute:!1});$a.displayName="Route";var V1=D.createContext(null);V1.displayName="RouteError";var v5="REACT_ROUTER_ERROR",qO="REDIRECT",HO="ROUTE_ERROR_RESPONSE";function YO(n){if(n.startsWith(`${v5}:${qO}:{`))try{let e=JSON.parse(n.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function GO(n){if(n.startsWith(`${v5}:${HO}:{`))try{let e=JSON.parse(n.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new OO(e.status,e.statusText,e.data)}catch{}}function $O(n,{relative:e}={}){dn(Rd(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:r}=D.useContext(ms),{hash:s,pathname:i,search:l}=ym(n,{relative:e}),d=i;return t!=="/"&&(d=i==="/"?t:Js([t,i])),r.createHref({pathname:d,search:l,hash:s})}function Rd(){return D.useContext(gm)!=null}function ps(){return dn(Rd(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(gm).location}var w5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _5(n){D.useContext(ms).static||D.useLayoutEffect(n)}function _y(){let{isDataRoute:n}=D.useContext($a);return n?iL():KO()}function KO(){dn(Rd(),"useNavigate() may be used only in the context of a <Router> component.");let n=D.useContext(Id),{basename:e,navigator:t}=D.useContext(ms),{matches:r}=D.useContext($a),{pathname:s}=ps(),i=JSON.stringify(L1(r)),l=D.useRef(!1);return _5(()=>{l.current=!0}),D.useCallback((h,m={})=>{if(sa(l.current,w5),!l.current)return;if(typeof h=="number"){t.go(h);return}let g=vy(h,JSON.parse(i),s,m.relative==="path");n==null&&e!=="/"&&(g.pathname=g.pathname==="/"?e:Js([e,g.pathname])),(m.replace?t.replace:t.push)(g,m.state,m)},[e,t,i,s,n])}D.createContext(null);function ym(n,{relative:e}={}){let{matches:t}=D.useContext($a),{pathname:r}=ps(),s=JSON.stringify(L1(t));return D.useMemo(()=>vy(n,JSON.parse(s),r,e==="path"),[n,s,r,e])}function WO(n,e){return T5(n,e)}function T5(n,e,t){var E;dn(Rd(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=D.useContext(ms),{matches:s}=D.useContext($a),i=s[s.length-1],l=i?i.params:{},d=i?i.pathname:"/",h=i?i.pathnameBase:"/",m=i&&i.route;{let j=m&&m.path||"";E5(d,!m||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
60Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let g=ps(),p;if(e){let j=typeof e=="string"?kd(e):e;dn(h==="/"||((E=j.pathname)==null?void 0:E.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${j.pathname}" was given in the \`location\` prop.`),p=j}else p=g;let b=p.pathname||"/",w=b;if(h!=="/"){let j=h.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(j.length).join("/")}let _=d5(n,{pathname:w});sa(m||_!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),sa(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let N=eL(_&&_.map(j=>Object.assign({},j,{params:Object.assign({},l,j.params),pathname:Js([h,r.encodeLocation?r.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?h:Js([h,r.encodeLocation?r.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),s,t);return e&&N?D.createElement(gm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...p},navigationType:"POP"}},N):N}function QO(){let n=aL(),e=LO(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",n),l=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:i},"ErrorBoundary")," or"," ",D.createElement("code",{style:i},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application 
60Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},e),t?D.createElement("pre",{style:s},t):null,l)}var XO=D.createElement(QO,null),N5=class extends D.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,e){return e.location!==n.location||e.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:e.error,location:e.location,revalidation:n.revalidation||e.revalidation}}componentDidCatch(n,e){this.props.onError?this.props.onError(n,e):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const t=GO(n.digest);t&&(n=t)}let e=n!==void 0?D.createElement($a.Provider,{value:this.props.routeContext},D.createElement(V1.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?D.createElement(JO,{error:n},e):e}};N5.contextType=x5;var vv=new WeakMap;function JO({children:n,error:e}){let{basename:t}=D.useContext(ms);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=YO(e.digest);if(r){let s=vv.get(e);if(s)throw s;let i=g5(r.location,t);if(p5&&!vv.get(e))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw vv.set(e,l),l}return D.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return n}function ZO({routeContext:n,match:e,children:t}){let r=D.useContext(Id);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),D.createElement($a.Provider,{value:n},t)}function eL(n,e=[],t){let r=t==null?void 0:t.state;if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let s=n,i=r==null?void 0:r.errors;if(i!=null){let g=s.findIndex(p=>p.route.id&&(i==null?void 0:i[p.route.id])!==void 0);dn(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let l=!1,d=-1;if(t&&r){l=r.renderFallback;for(let g=0;g<s.length;g++){let p=s[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=g),p.route.id){let{loaderData:b,errors:w}=r,_=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!w||w[p.route.id]===void 0);if(p.route.lazy||_){t.isStatic&&(l=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let h=t==null?void 0:t.onError,m=r&&h?(g,p)=>{var b,w;h(g,{location:r.location,params:((w=(b=r.matches)==null?void 0:b[0])==null?void 0:w.params)??{},unstable_pattern:VO(r.matches),errorInfo:p})}:void 0;return s.reduceRight((g,p,b)=>{let w,_=!1,N=null,E=null;r&&(w=i&&p.route.id?i[p.route.id]:void 0,N=p.route.errorElement||XO,l&&(d<0&&b===0?(E5("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,E=null):d===b&&(_=!0,E=p.route.hydrateFallbackElement||null)));let j=e.concat(s.slice(0,b+1)),P=()=>{let A;return w?A=N:_?A=E:p.route.Component?A=D.createElement(p.route.Component,null):p.route.element?A=p.route.element:A=g,D.createElement(ZO,{match:p,routeContext:{outlet:g,matches:j,isDataRoute:r!=null},children:A})};return r&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?D.createElement(N5,{location:r.location,revalidation:r.revalidation,component:N,error:w,children:P(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:m}):P()},null)}function F1(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function tL(n){let e=D.useContext(Id);return dn(e,F1(n)),e}function nL(n){let e=D.useContext(wy);return dn(e,F1(n)),e}function rL(n){let e=D.useContext($a);return dn(e,F1(n)),e}function B1(n){let e=rL(n),t=e.matches[e.matches.length-1];return dn(t.route.id,`${n} can only be used on routes that contain a unique "id"`),t.route.id}function sL(){return B1("useRouteId")}function aL(){var r;let n=D.useContext(V1),e=nL("useRouteError"),t=B1("useRouteError");return n!==void 0?n:(r=e.errors)==null?void 0:r[t]}function iL(){let{router:n}=tL("useNavigate"),e=B1("useNavigate"),t=D.useRef(!1);return _5(()=>{t.current=!0}),D.useCallback(async(s,i={})=>{sa(t.current,w5),t.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:e,...i}))},[n,e])}var US={};function E5(n,e,t){!e&&!US[n]&&(US[n]=!0,sa(!1,t))}D.memo(oL);function oL({routes:n,future:e,state:t,isStatic:r,onError:s}){return T5(n,void 0,{state:t,isStatic:r,onError:s})}function lL({to:n,replace:e,state:t,relative:r}){dn(Rd(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=D.useContext(ms);sa(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=D.useContext($a),{pathname:l}=ps(),d=_y(),h=vy(n,L1(i),l,r==="path"),m=JSON.stringify(h);return D.useEffect(()=>{d(JSON.parse(m),{replace:e,state:t,relative:r})},[d,m,r,e,t]),null}function Gn(n){dn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function cL({basename:n="/",children:e=null,location:t,navigationType:r="POP",navigator:s,static:i=!1,unstable_useTransitions:l}){dn(!Rd(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),h=D.useMemo(()=>({basename:d,navigator:s,static:i,unstable_useTransitions:l,future:{}}),[d,s,i,l]);typeof t=="string"&&(t=kd(t));
60let{pathname:m="/",search:g="",hash:p="",state:b=null,key:w="default",unstable_mask:_}=t,N=D.useMemo(()=>{let E=Ni(m,d);return E==null?null:{location:{pathname:E,search:g,hash:p,state:b,key:w,unstable_mask:_},navigationType:r}},[d,m,g,p,b,w,r,_]);return sa(N!=null,`<Router basename="${d}"> is not able to match the URL "${m}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:D.createElement(ms.Provider,{value:h},D.createElement(gm.Provider,{children:e,value:N}))}function uL({children:n,location:e}){return WO(mw(n),e)}function mw(n,e=[]){let t=[];return D.Children.forEach(n,(r,s)=>{if(!D.isValidElement(r))return;let i=[...e,s];if(r.type===D.Fragment){t.push.apply(t,mw(r.props.children,i));return}dn(r.type===Gn,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),dn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=mw(r.props.children,i)),t.push(l)}),t}var Fg="get",Bg="application/x-www-form-urlencoded";function Ty(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function dL(n){return Ty(n)&&n.tagName.toLowerCase()==="button"}function hL(n){return Ty(n)&&n.tagName.toLowerCase()==="form"}function fL(n){return Ty(n)&&n.tagName.toLowerCase()==="input"}function mL(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function pL(n,e){return n.button===0&&(!e||e==="_self")&&!mL(n)}var fg=null;function gL(){if(fg===null)try{new FormData(document.createElement("form"),0),fg=!1}catch{fg=!0}return fg}var yL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wv(n){return n!=null&&!yL.has(n)?(sa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bg}"`),null):n}function xL(n,e){let t,r,s,i,l;if(hL(n)){let d=n.getAttribute("action");r=d?Ni(d,e):null,t=n.getAttribute("method")||Fg,s=wv(n.getAttribute("enctype"))||Bg,i=new FormData(n)}else if(dL(n)||fL(n)&&(n.type==="submit"||n.type==="image")){let d=n.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=n.getAttribute("formaction")||d.getAttribute("action");if(r=h?Ni(h,e):null,t=n.getAttribute("formmethod")||d.getAttribute("method")||Fg,s=wv(n.getAttribute("formenctype"))||wv(d.getAttribute("enctype"))||Bg,i=new FormData(d,n),!gL()){let{name:m,type:g,value:p}=n;if(g==="image"){let b=m?`${m}.`:"";i.append(`${b}x`,"0"),i.append(`${b}y`,"0")}else m&&i.append(m,p)}}else{if(Ty(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=Fg,r=null,s=Bg,l=n}return i&&s==="text/plain"&&(l=i,i=void 0),{action:r,method:t.toLowerCase(),encType:s,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function U1(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function S5(n,e,t,r){let s=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:e&&Ni(s.pathname,e)==="/"?s.pathname=`${j0(e)}/_root.${r}`:s.pathname=`${j0(s.pathname)}.${r}`,s}async function bL(n,e){if(n.id in e)return e[n.id];try{let t=await import(n.module);return e[n.id]=t,t}catch(t){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.
60isSpaMode,window.location.reload(),new Promise(()=>{})}}function vL(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function wL(n,e,t){let r=await Promise.all(n.map(async s=>{let i=e.routes[s.route.id];if(i){let l=await bL(i,t);return l.links?l.links():[]}return[]}));return EL(r.flat(1).filter(vL).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function zS(n,e,t,r,s,i){let l=(h,m)=>t[m]?h.route.id!==t[m].route.id:!0,d=(h,m)=>{var g;return t[m].pathname!==h.pathname||((g=t[m].route.path)==null?void 0:g.endsWith("*"))&&t[m].params["*"]!==h.params["*"]};return i==="assets"?e.filter((h,m)=>l(h,m)||d(h,m)):i==="data"?e.filter((h,m)=>{var p;let g=r.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(l(h,m)||d(h,m))return!0;if(h.route.shouldRevalidate){let b=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((p=t[0])==null?void 0:p.params)||{},nextUrl:new URL(n,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function _L(n,e,{includeHydrateFallback:t}={}){return TL(n.map(r=>{let s=e.routes[r.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function TL(n){return[...new Set(n)]}function NL(n){let e={},t=Object.keys(n).sort();for(let r of t)e[r]=n[r];return e}function EL(n,e){let t=new Set;return new Set(e),n.reduce((r,s)=>{let i=JSON.stringify(NL(s));return t.has(i)||(t.add(i),r.push({key:i,link:s})),r},[])}function z1(){let n=D.useContext(Id);return U1(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function SL(){let n=D.useContext(wy);return U1(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var q1=D.createContext(void 0);q1.displayName="FrameworkContext";function H1(){let n=D.useContext(q1);return U1(n,"You must render this element inside a <HydratedRouter> element"),n}function jL(n,e){let t=D.useContext(q1),[r,s]=D.useState(!1),[i,l]=D.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:m,onMouseLeave:g,onTouchStart:p}=e,b=D.useRef(null);D.useEffect(()=>{if(n==="render"&&l(!0),n==="viewport"){let N=j=>{j.forEach(P=>{l(P.isIntersecting)})},E=new IntersectionObserver(N,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[n]),D.useEffect(()=>{if(r){let N=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(N)}}},[r]);let w=()=>{s(!0)},_=()=>{s(!1),l(!1)};return t?n!=="intent"?[i,b,{}]:[i,b,{onFocus:tf(d,w),onBlur:tf(h,_),onMouseEnter:tf(m,w),onMouseLeave:tf(g,_),onTouchStart:tf(p,w)}]:[!1,b,{}]}function tf(n,e){return t=>{n&&n(t),t.defaultPrevented||e(t)}}function AL({page:n,...e}){let t=BO(),{router:r}=z1(),s=D.useMemo(()=>d5(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?t?D.createElement(DL,{page:n,matches:s,...e}):D.createElement(kL,{page:n,matches:s,...e}):null}function CL(n){let{manifest:e,routeModules:t}=H1(),[r,s]=D.useState([]);return D.useEffect(()=>{let i=!1;return wL(n,e,t).then(l=>{i||s(l)}),()=>{i=!0}},[n,e,t]),r}function DL({page:n,matches:e,...t}){let r=ps(),{future:s}=H1(),{basename:i}=z1(),l=D.useMemo(()=>{if(n===r.pathname+r.search+r.hash)return[];let d=S5(n,i,s.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,m=[];for(let g of e)typeof g.route.shouldRevalidate=="function"?h=!0:m.push(g.route.id);return h&&m.length>0&&d.searchParams.set("_routes",m.join(",")),[d.pathname+d.search]},[i,s.unstable_trailingSlashAwareDataRequests,n,r,e]);return D.createElement(D.Fragment,null,l.map(d=>D.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...t})))}function kL({page:n,matches:e,...t}){let r=ps(),{future:s,manifest:i,routeModules:l}=H1(),{basename:d}=z1(),{loaderData:h,matches:m}=SL(),g=D.useMemo(()=>zS(n,e,m,i,r,"data"),[n,e,m,i,r]),p=D.useMemo(()=>zS(n,e,m,i,r,"assets"),[n,e,m,i,r]),b=D.useMemo(()=>
60{if(n===r.pathname+r.search+r.hash)return[];let N=new Set,E=!1;if(e.forEach(P=>{var M;let A=i.routes[P.route.id];!A||!A.hasLoader||(!g.some(O=>O.route.id===P.route.id)&&P.route.id in h&&((M=l[P.route.id])!=null&&M.shouldRevalidate)||A.hasClientLoader?E=!0:N.add(P.route.id))}),N.size===0)return[];let j=S5(n,d,s.unstable_trailingSlashAwareDataRequests,"data");return E&&N.size>0&&j.searchParams.set("_routes",e.filter(P=>N.has(P.route.id)).map(P=>P.route.id).join(",")),[j.pathname+j.search]},[d,s.unstable_trailingSlashAwareDataRequests,h,r,i,g,e,n,l]),w=D.useMemo(()=>_L(p,i),[p,i]),_=CL(p);return D.createElement(D.Fragment,null,b.map(N=>D.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...t})),w.map(N=>D.createElement("link",{key:N,rel:"modulepreload",href:N,...t})),_.map(({key:N,link:E})=>D.createElement("link",{key:N,nonce:t.nonce,...E,crossOrigin:E.crossOrigin??t.crossOrigin})))}function IL(...n){return e=>{n.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var RL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{RL&&(window.__reactRouterVersion="7.14.1")}catch{}function ML({basename:n,children:e,unstable_useTransitions:t,window:r}){let s=D.useRef();s.current==null&&(s.current=fO({window:r,v5Compat:!0}));let i=s.current,[l,d]=D.useState({action:i.action,location:i.location}),h=D.useCallback(m=>{t===!1?d(m):D.startTransition(()=>d(m))},[t]);return D.useLayoutEffect(()=>i.listen(h),[i,h]),D.createElement(cL,{basename:n,children:e,location:l.location,navigationType:l.action,navigator:i,unstable_useTransitions:t})}var j5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bn=D.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:s,reloadDocument:i,replace:l,unstable_mask:d,state:h,target:m,to:g,preventScrollReset:p,viewTransition:b,unstable_defaultShouldRevalidate:w,..._},N){let{basename:E,navigator:j,unstable_useTransitions:P}=D.useContext(ms),A=typeof g=="string"&&j5.test(g),M=g5(g,E);g=M.to;let O=$O(g,{relative:s}),q=ps(),L=null;if(d){let ye=vy(d,[],q.unstable_mask?q.unstable_mask.pathname:"/",!0);E!=="/"&&(ye.pathname=ye.pathname==="/"?E:Js([E,ye.pathname])),L=j.createHref(ye)}let[k,I,R]=jL(r,_),F=VL(g,{replace:l,unstable_mask:d,state:h,target:m,preventScrollReset:p,relative:s,viewTransition:b,unstable_defaultShouldRevalidate:w,unstable_useTransitions:P});function B(ye){e&&e(ye),ye.defaultPrevented||F(ye)}let V=!(M.isExternal||i),se=D.createElement("a",{..._,...R,href:(V?L:void 0)||M.absoluteURL||O,onClick:V?B:e,ref:IL(N,I),target:m,"data-discover":!A&&t==="render"?"true":void 0});return k&&!A?D.createElement(D.Fragment,null,se,D.createElement(AL,{page:O})):se});bn.displayName="Link";var PL=D.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:s=!1,style:i,to:l,viewTransition:d,children:h,...m},g){let p=ym(l,{relative:m.relative}),b=ps(),w=D.useContext(wy),{navigator:_,basename:N}=D.useContext(ms),E=w!=null&&qL(p)&&d===!0,j=_.encodeLocation?_.encodeLocation(p).pathname:p.pathname,P=b.pathname,A=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;t||(P=P.toLowerCase(),A=A?A.toLowerCase():null,j=j.toLowerCase()),A&&N&&(A=Ni(A,N)||A);const M=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let O=P===j||!s&&P.startsWith(j)&&P.charAt(M)==="/",q=A!=null&&(A===j||!s&&A.startsWith(j)&&A.charAt(j.length)==="/"),L={isActive:O,isPending:q,isTransitioning:E},k=O?e:void 0,I;typeof r=="function"?I=r(L):I=[r,O?"active":null,q?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let R=typeof i=="function"?i(L):i;return D.createElement(bn,{...m,"aria-current":k,className:I,ref:g,style:R,to:l,viewTransition:d},typeof h=="function"?h(L):h)});PL.displayName="NavLink";var OL=D.forwardRef(({discover:n="render",fetcherKey:e,navigate:t,reloadDocument:r,replace:s,state:i,method:l=Fg,action:d,onSubmit:h,relative:m,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:b,...w},_)=>{let{unstable_useTransitions:N}=D.useContext(ms),E=UL(),j=zL(d,{relative:m}
60),P=l.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&j5.test(d),M=O=>{if(h&&h(O),O.defaultPrevented)return;O.preventDefault();let q=O.nativeEvent.submitter,L=(q==null?void 0:q.getAttribute("formmethod"))||l,k=()=>E(q||O.currentTarget,{fetcherKey:e,method:L,navigate:t,replace:s,state:i,relative:m,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:b});N&&t!==!1?D.startTransition(()=>k()):k()};return D.createElement("form",{ref:_,method:P,action:j,onSubmit:r?h:M,...w,"data-discover":!A&&n==="render"?"true":void 0})});OL.displayName="Form";function LL(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function A5(n){let e=D.useContext(Id);return dn(e,LL(n)),e}function VL(n,{target:e,replace:t,unstable_mask:r,state:s,preventScrollReset:i,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let g=_y(),p=ps(),b=ym(n,{relative:l});return D.useCallback(w=>{if(pL(w,e)){w.preventDefault();let _=t!==void 0?t:Uf(p)===Uf(b),N=()=>g(n,{replace:_,unstable_mask:r,state:s,preventScrollReset:i,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:h});m?D.startTransition(()=>N()):N()}},[p,g,b,t,r,s,e,n,i,l,d,h,m])}var FL=0,BL=()=>`__${String(++FL)}__`;function UL(){let{router:n}=A5("useSubmit"),{basename:e}=D.useContext(ms),t=sL(),r=n.fetch,s=n.navigate;return D.useCallback(async(i,l={})=>{let{action:d,method:h,encType:m,formData:g,body:p}=xL(i,e);if(l.navigate===!1){let b=l.fetcherKey||BL();await r(b,t,l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:p,formMethod:l.method||h,formEncType:l.encType||m,flushSync:l.flushSync})}else await s(l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:p,formMethod:l.method||h,formEncType:l.encType||m,replace:l.replace,state:l.state,fromRouteId:t,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,s,e,t])}function zL(n,{relative:e}={}){let{basename:t}=D.useContext(ms),r=D.useContext($a);dn(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),i={...ym(n||".",{relative:e})},l=ps();if(n==null){i.search=l.search;let d=new URLSearchParams(i.search),h=d.getAll("index");if(h.some(g=>g==="")){d.delete("index"),h.filter(p=>p).forEach(p=>d.append("index",p));let g=d.toString();i.search=g?`?${g}`:""}}return(!n||n===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(i.pathname=i.pathname==="/"?t:Js([t,i.pathname])),Uf(i)}function qL(n,{relative:e}={}){let t=D.useContext(b5);dn(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=A5("useViewTransitionState"),s=ym(n,{relative:e});if(!t.isTransitioning)return!1;let i=Ni(t.currentLocation.pathname,r)||t.currentLocation.pathname,l=Ni(t.nextLocation.pathname,r)||t.nextLocation.pathname;return S0(s.pathname,l)!=null||S0(s.pathname,i)!=null}var C5=u5();const HL=l5(C5),YL="https://d10oyxvq19ziww.cloudfront.net",GL=/^https?:\/\/firebasestorage\.googleapis\.com\/v0\/b\/[^/]+\/o\/([^?]+)/;function zf(n){if(!n||typeof n!="string")return n??"";const e=n.match(GL);return e?`${YL}/homepage/${decodeURIComponent(e[1])}`:n}function pw(n){if(typeof n=="string")return zf(n);if(Array.isArray(n))return n.map(e=>pw(e));if(n&&typeof n=="object"){const e={};for(const t of Object.keys(n))e[t]=pw(n[t]);return e}return n}const et=({src:n,onError:e,...t})=>{const r=typeof n=="string"?n:"",[s,i]=ae.useState(()=>zf(r));ae.useEffect(()=>{i(zf(r))},[r]);const l=d=>{r&&s!==r&&i(r),e==null||e(d)};return c.jsx("img",{...t,src:s||void 0,onError:l})},D5=({src:n,onError:e,...t})=>{const r=typeof n=="string"?n:"",[s,i]=ae.useState(()=>zf(r));ae.useEffect(()=>{i(zf(r))},[r]);const l=d=>{r&&s!==r&&i(r),e==null||e(d)};return c.jsx("video",{...t,src:s||void 0,onError:l})},Y1=D.createContext({});function G1(n){const e=D.useRef(null);return e.current===null&&(e.current=n()),e.current}const $L=typeof window<"u",k5=$L?D.useLayoutEffect:D.useEffect,Ny=D.createContext(null);function $1(n,e){n.indexOf(e)===-1&&n.push(e)}function Zu(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const Ya=(n,e,t)=>t>e?e:t<n?n:t;let K1=()=>{};const qo={},I5=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function R5(n){return typeof n=="object"&&n!==null}const M5=n=>/^0[^.\s]+$/u.test(n);function P5(n){let e;return()=>(e===void 0&&(e=n()),e)}const Ms=n=>n,KL=(n,e)=>t=>e(n(t)),xm=(...n)=>n.reduce(KL),ed=(n,e,t)=>{const r=e-n;return r===0?1:(t-n)/r};class W1{constructor(){this.subscriptions=[]}add(e){return $1(this.subscriptions,e),()=>Zu(this.subscriptions,e)}notify(e,t,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,t,r);else for(let i=0;i<s;i++){const l=this.subscriptions[i];l&&l(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wr=n=>n*1e3,Rs=n=>n/1e3;function O5(n,e){return e?n*(1e3/e):0}const WL=(n,e,t)=>{const r=e-n;return((t-n)%r+r)%r+n},L5=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,QL=1e-7,XL=12;function JL(n,e,t,r,s){let i,l,d=0;do l=e+(t-e)/2,i=L5(l,r,s)-n,i>0?t=l:e=l;
vendor: 94,736 bytes, line 60
60while(Math.abs(i)>QL&&++d<XL);return l}function bm(n,e,t,r){if(n===e&&t===r)return Ms;const s=i=>JL(i,0,1,n,t);return i=>i===0||i===1?i:L5(s(i),e,r)}const V5=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,F5=n=>e=>1-n(1-e),B5=bm(.33,1.53,.69,.99),Q1=F5(B5),U5=V5(Q1),z5=n=>n>=1?1:(n*=2)<1?.5*Q1(n):.5*(2-Math.pow(2,-10*(n-1))),X1=n=>1-Math.sin(Math.acos(n)),q5=F5(X1),H5=V5(X1),ZL=bm(.42,0,1,1),eV=bm(0,0,.58,1),Y5=bm(.42,0,.58,1),G5=n=>Array.isArray(n)&&typeof n[0]!="number";function $5(n,e){return G5(n)?n[WL(0,n.length,e)]:n}const K5=n=>Array.isArray(n)&&typeof n[0]=="number",tV={linear:Ms,easeIn:ZL,easeInOut:Y5,easeOut:eV,circIn:X1,circInOut:H5,circOut:q5,backIn:Q1,backInOut:U5,backOut:B5,anticipate:z5},nV=n=>typeof n=="string",qS=n=>{if(K5(n)){K1(n.length===4);const[e,t,r,s]=n;return bm(e,t,r,s)}else if(nV(n))return tV[n];return n},mg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rV(n,e){let t=new Set,r=new Set,s=!1,i=!1;const l=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function h(g){l.has(g)&&(m.schedule(g),n()),g(d)}const m={schedule:(g,p=!1,b=!1)=>{const _=b&&s?t:r;return p&&l.add(g),_.add(g),g},cancel:g=>{r.delete(g),l.delete(g)},process:g=>{if(d=g,s){i=!0;return}s=!0;const p=t;t=r,r=p,t.forEach(h),t.clear(),s=!1,i&&(i=!1,m.process(g))}};return m}const sV=40;function W5(n,e){let t=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>t=!0,l=mg.reduce((A,M)=>(A[M]=rV(i),A),{}),{setup:d,read:h,resolveKeyframes:m,preUpdate:g,update:p,preRender:b,render:w,postRender:_}=l,N=()=>{const A=qo.useManualTiming,M=A?s.timestamp:performance.now();t=!1,A||(s.delta=r?1e3/60:Math.max(Math.min(M-s.timestamp,sV),1)),s.timestamp=M,s.isProcessing=!0,d.process(s),h.process(s),m.process(s),g.process(s),p.process(s),b.process(s),w.process(s),_.process(s),s.isProcessing=!1,t&&e&&(r=!1,n(N))},E=()=>{t=!0,r=!0,s.isProcessing||n(N)};return{schedule:mg.reduce((A,M)=>{const O=l[M];return A[M]=(q,L=!1,k=!1)=>(t||E(),O.schedule(q,L,k)),A},{}),cancel:A=>{for(let M=0;M<mg.length;M++)l[mg[M]].cancel(A)},state:s,steps:l}}const{schedule:Wt,cancel:Ho,state:dr,steps:_v}=W5(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ms,!0);let Ug;function aV(){Ug=void 0}const jr={now:()=>(Ug===void 0&&jr.set(dr.isProcessing||qo.useManualTiming?dr.timestamp:performance.now()),Ug),set:n=>{Ug=n,queueMicrotask(aV)}},Q5=n=>e=>typeof e=="string"&&e.startsWith(n),X5=Q5("--"),iV=Q5("var(--"),J1=n=>iV(n)?oV.test(n.split("/*")[0].trim()):!1,oV=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function HS(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Md={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},qf={...Md,transform:n=>Ya(0,1,n)},pg={...Md,default:1},Ef=n=>Math.round(n*1e5)/1e5,Z1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function lV(n){return n==null}const cV=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,e_=(n,e)=>t=>!!(typeof t=="string"&&cV.test(t)&&t.startsWith(n)||e&&!lV(t)&&Object.prototype.hasOwnProperty.call(t,e)),J5=(n,e,t)=>r=>{if(typeof r!="string")return r;const[s,i,l,d]=r.match(Z1);return{[n]:parseFloat(s),[e]:parseFloat(i),[t]:parseFloat(l),alpha:d!==void 0?parseFloat(d):1}},uV=n=>Ya(0,255,n),Tv={...Md,transform:n=>Math.round(uV(n))},Zl={test:e_("rgb","red"),parse:J5("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:r=1})=>"rgba("+Tv.transform(n)+", "+Tv.transform(e)+", "+Tv.transform(t)+", "+Ef(qf.transform(r))+")"};function dV(n){let e="",t="",r="",s="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),r=n.substring(5,7),s=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),r=n.substring(3,4),s=n.substring(4,5),e+=e,t+=t,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const gw={test:e_("#"),parse:dV,transform:Zl.transform},vm=n=>({test:e=>typeof e=="string"&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),_o=vm("deg"),Fa=vm("%"),Ve=vm("px"),hV=vm("vh"),fV=vm("vw"),YS={...Fa,parse:n=>Fa.parse(n)/100,transform:n=>Fa.transform(n*100)},Vu={test:e_("hsl","hue"),parse:J5("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:r=1})=>"hsla("+Math.round(n)+", "+Fa.transform(Ef(e))+", "+Fa.transform(Ef(t))+", "+Ef(qf.transform(r))+")"},Un={test:n=>Zl.test(n)||gw.test(n)||Vu.test(n),parse:n=>Zl.test(n)?Zl.parse(n):Vu.test(n)?Vu.parse(n):gw.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Zl.transform(n):Vu.transform(n),getAnimatableNone:n=>{const e=Un.parse(n);return e.alpha=0,Un.transform(e)}},mV=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pV(n){var e,t;return isNaN(n)&&typeof n=="string"&&(((e=n.match(Z1))==null?void 0:e.length)||0)+(((t=n.match(mV))==null?void 0:t.length)||0)>0}const Z5="number",ek="color",gV="var",yV="var(",GS="${}",xV=/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 td(n){const e=n.toString(),t=[],r={color:[],number:[],var:[]},s=[];let i=0;const d=e.replace(xV,h=>(Un.test(h)?(r.color.push(i),s.push(ek),t.push(Un.parse(h))):h.startsWith(yV)?(r.var.push(i),s.push(gV),t.push(h)):(r.number.push(i),s.push(Z5),t.push(parseFloat(h))),++i,GS)).split(GS);return{values:t,split:d,indexes:r,types:s}}function bV(n){return td(n).values}function tk({split:n,types:e}){const t=n.length;return r=>{let s="";for(let i=0;i<t;i++)if(s+=n[i],r[i]!==void 0){const l=e[i];l===Z5?s+=Ef(r[i]):l===ek?s+=Un.transform(r[i]):s+=r[i]}return s}}function vV(n){return tk(td(n))}const wV=n=>typeof n=="number"?0:Un.test(n)?Un.getAnimatableNone(n):n,_V=(n,e)=>typeof n=="number"?e!=null&&e.trim().endsWith("/")?n:0:wV(n);function TV(n){const e=td(n);return tk(e)(e.values.map((r,s)=>_V(r,e.split[s])))}const Zs={test:pV,parse:bV,createTransformer:vV,getAnimatableNone:TV};function Nv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function NV({hue:n,saturation:e,lightness:t,alpha:r}){n/=360,e/=100,t/=100;let s=0,i=0,l=0;if(!e)s=i=l=t;else{const d=t<.5?t*(1+e):t+e-t*e,h=2*t-d;s=Nv(h,d,n+1/3),i=Nv(h,d,n),l=Nv(h,d,n-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(l*255),alpha:r}}function A0(n,e){return t=>t>0?e:n}const Qt=(n,e,t)=>n+(e-n)*t,Ev=(n,e,t)=>{const r=n*n,s=t*(e*e-r)+r;return s<0?0:Math.sqrt(s)},EV=[gw,Zl,Vu],SV=n=>EV.find(e=>e.test(n));function $S(n){const e=SV(n);if(!e)return!1;let t=e.parse(n);return e===Vu&&(t=NV(t)),t}const KS=(n,e)=>{const t=$S(n),r=$S(e);if(!t||!r)return A0(n,e);const s={...t};return i=>(s.red=Ev(t.red,r.red,i),s.green=Ev(t.green,r.green,i),s.blue=Ev(t.blue,r.blue,i),s.alpha=Qt(t.alpha,r.alpha,i),Zl.transform(s))},yw=new Set(["none","hidden"]);function jV(n,e){return yw.has(n)?t=>t<=0?n:e:t=>t>=1?e:n}function AV(n,e){return t=>Qt(n,e,t)}function t_(n){return typeof n=="number"?AV:typeof n=="string"?J1(n)?A0:Un.test(n)?KS:kV:Array.isArray(n)?nk:typeof n=="object"?Un.test(n)?KS:CV:A0}function nk(n,e){const t=[...n],r=t.length,s=n.map((i,l)=>t_(i)(i,e[l]));return i=>{for(let l=0;l<r;l++)t[l]=s[l](i);return t}}function CV(n,e){const t={...n,...e},r={};for(const s in t)n[s]!==void 0&&e[s]!==void 0&&(r[s]=t_(n[s])(n[s],e[s]));return s=>{for(const i in r)t[i]=r[i](s);return t}}function DV(n,e){const t=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],l=n.indexes[i][r[i]],d=n.values[l]??0;t[s]=d,r[i]++}return t}const kV=(n,e)=>{const t=Zs.createTransformer(e),r=td(n),s=td(e);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?yw.has(n)&&!s.values.length||yw.has(e)&&!r.values.length?jV(n,e):xm(nk(DV(r,s),s.values),t):A0(n,e)};function rk(n,e,t){return typeof n=="number"&&typeof e=="number"&&typeof t=="number"?Qt(n,e,t):t_(n)(n,e)}const IV=n=>{const e=({timestamp:t})=>n(t);return{start:(t=!0)=>Wt.update(e,t),stop:()=>Ho(e),now:()=>dr.isProcessing?dr.timestamp:jr.now()}},sk=(n,e,t=10)=>{let r="";const s=Math.max(Math.round(e/t),2);for(let i=0;i<s;i++)r+=Math.round(n(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},C0=2e4;function n_(n){let e=0;const t=50;let r=n.next(e);for(;!r.done&&e<C0;)e+=t,r=n.next(e);return e>=C0?1/0:e}function ak(n,e=100,t){const r=t({...n,keyframes:[0,e]}),s=Math.min(n_(r),C0);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:Rs(s)}}const xn={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};function xw(n,e){return n*Math.sqrt(1-e*e)}const RV=12;function MV(n,e,t){let r=t;for(let s=1;s<RV;s++)r=r-n(r)/e(r);return r}const Sv=.001;function PV({duration:n=xn.duration,bounce:e=xn.bounce,velocity:t=xn.velocity,mass:r=xn.mass}){let s,i,l=1-e;l=Ya(xn.minDamping,xn.maxDamping,l),n=Ya(xn.minDuration,xn.maxDuration,Rs(n)),l<1?(s=m=>{const g=m*l,p=g*n,b=g-t,w=xw(m,l),_=Math.exp(-p);return Sv-b/w*_},i=m=>{const p=m*l*n,b=p*t+t,w=Math.pow(l,2)*Math.pow(m,2)*n,_=Math.exp(-p),N=xw(Math.pow(m,2),l);return(-s(m)+Sv>0?-1:1)*((b-w)*_)/N}):(s=m=>{const g=Math.exp(-m*n),p=(m-t)*n+1;return-Sv+g*p},i=m=>{const g=Math.exp(-m*n),p=(t-m)*(n*n);return g*p});const d=5/n,h=MV(s,i,d);if(n=Wr(n),isNaN(h))return{stiffness:xn.stiffness,damping:xn.damping,duration:n};{const m=Math.pow(h,2)*r;return{stiffness:m,damping:l*2*Math.sqrt(r*m),duration:n}}}const OV=["duration","bounce"],LV=["stiffness","damping","mass"];function WS(n,e){return e.some(t=>n[t]!==void 0)}function VV(n){let e={velocity:xn.velocity,stiffness:xn.stiffness,damping:xn.damping,mass:xn.mass,isResolvedFromDuration:!1,...n};if(!WS(n,LV)&&WS(n,OV))if(e.velocity=0,n.visualDuration){const t=n.visualDuration,r=2*Math.PI/(t*1.2),s=r*r,i=2*Ya(.05,1,1-(n.bounce||0))*Math.sqrt(s);e={...e,mass:xn.mass,stiffness:s,damping:i}}else{const t=PV({...n,velocity:0});e={...e,...t,mass:xn.mass},e.isResolvedFromDuration=!0}return e}function Hf(n=xn.visualDuration,e=xn.bounce){const t=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:e}:n;let{restSpeed:r,restDelta:s}=t;const i=t.keyframes[0],l=t.keyframes[t.keyframes.length-1],d={done:!1,value:i},{stiffness:h,damping:m,mass:g,duration:p,velocity:b,isResolvedFromDuration:w}=VV({...t,velocity:-Rs(t.velocity||0)}),_=b||0,N=m/(2*Math.sqrt(h*g)),E=l-i,j=Rs(Math.sqrt(h/g)),P=Math.abs(E)<5;r||(r=P?xn.restSpeed.granular:xn.restSpeed.default),s||(s=P?xn.restDelta.granular:xn.restDelta.default);let A,M,O,q,L,k;if(N<1)O=xw(j,N),q=(_+N*j*E)/O,A=R=>{const F=Math.exp(-N*j*R);return l-F*(q*Math.sin(O*R)+E*Math.cos(O*R))},L=N*j*q+E*O,k=N*j*E-q*O,M=R=>Math.exp(-N*j*R)*(L*Math.sin(O*R)+k*Math.cos(O*R));else if(N===1){A=F=>l-Math.exp(-j*F)*(E+(_+j*E)*F);const R=_+j*E;M=F=>Math.exp(-j*F)*(j*R*F-_)}else{const R=j*Math.sqrt(N*N-1);A=se=>{const ye=Math.exp(-N*j*se),W=Math.min(R*se,300);return l-ye*((_+N*j*E)*Math.sinh(W)+R*E*Math.cosh(W))/R};const F=(_+N*j*E)/R,B=N*j*F-E*R,V=N*j*E-F*R;M=se=>{const ye=Math.exp(-N*j*se),W=Math.min(R*se,300);return ye*(B*Math.sinh(W)+V*Math.cosh(W))}}const I={calculatedDuration:w&&p||null,velocity:R=>Wr(M(R)),next:R=>{if(!w&&N<1){const B=Math.exp(-N*j*R),V=Math.sin(O*R),se=Math.cos(O*R),ye=l-B*(q*V+E*se),W=Wr(B*(L*V+k*se));return d.done=Math.abs(W)<=r&&Math.abs(l-ye)<=s,d.value=d.done?l:ye,d}const F=A(R);if(w)d.done=R>=p;else{const B=Wr(M(R));d.done=Math.abs(B)<=r&&Math.abs(l-F)<=s}return d.value=d.done?l:F,d},toString:()=>{const R=Math.min(n_(I),C0),F=sk(B=>I.next(R*B).value,R,30);return R+"ms "+F},toTransition:()=>{}};return I}Hf.applyToOptions=n=>{const e=ak(n,100,Hf);return n.ease=e.ease,n.duration=Wr(e.duration),n.type="keyframes",n};const FV=5;function ik(n,e,t){const r=Math.max(e-FV,0);return O5(t-n(r),e-r)}function bw({keyframes:n,velocity:e=0,power:t=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:l,min:d,max:h,restDelta:m=.5,restSpeed:g}){const p=n[0],b={done:!1,value:p},w=k=>d!==void 0&&k<d||h!==void 0&&k>h,_=k=>d===void 0?h:h===void 0||Math.abs(d-k)<Math.abs(h-k)?d:h;let N=t*e;const E=p+N,j=l===void 0?E:l(E);j!==E&&(N=j-p);const P=k=>-N*Math.exp(-k/r),A=k=>j+P(k),M=k=>{const I=P(k),R=A(k);b.done=Math.abs(I)<=m,b.value=b.done?j:R};let O,q;const L=k=>{w(b.value)&&(O=k,q=Hf({keyframes:[b.value,_(b.value)],velocity:ik(A,k,b.value),damping:s,stiffness:i,restDelta:m,restSpeed:g}))};return L(0),{calculatedDuration:null,next:k=>{let I=!1;return!q&&O===void 0&&(I=!0,M(k),L(k)),O!==void 0&&k>=O?q.next(k-O):(!I&&M(k),b)}}}function BV(n,e,t){const r=[],s=t||qo.mix||rk,i=n.length-1;for(let l=0;l<i;l++){let d=s(n[l],n[l+1]);if(e){const h=Array.isArray(e)?e[l]||Ms:e;d=xm(h,d)}r.push(d)}return r}function UV(n,e,{clamp:t=!0,ease:r,mixer:s}={}){const i=n.length;if(K1(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const l=n[0]===n[1];n[0]>n[i-1]&&(n=[...n].reverse(),e=[...e].reverse());const d=BV(e,r,s),h=d.length,m=g=>{if(l&&g<n[0])return e[0];let p=0;if(h>1)for(;p<n.length-2&&!(g<n[p+1]);p++);const b=ed(n[p],n[p+1],g);return d[p](b)};return t?g=>m(Ya(n[0],n[i-1],g)):m}function ok(n,e){const t=n[n.length-1];for(let r=1;r<=e;r++){const s=ed(0,e,r);n.push(Qt(t,1,s))}}function lk(n){const e=[0];return ok(e,n.length-1),e}function zV(n,e){return n.map(t=>t*e)}function qV(n,e){return n.map(()=>e||Y5).splice(0,n.length-1)}function Sf({duration:n=300,keyframes:e,times:t,ease:r="easeInOut"}){const s=G5(r)?r.map(qS):qS(r),i={done:!1,value:e[0]},l=zV(t&&t.length===e.length?t:lk(e),n),d=UV(l,e,{ease:Array.isArray(s)?s:qV(e,s)});return{calculatedDuration:n,next:h=>(i.value=d(h),i.done=h>=n,i)}}const HV=n=>n!==null;function Ey(n,{repeat:e,repeatType:t="loop"},r,s=1){const i=n.filter(HV),d=s<0||e&&t!=="loop"&&e%2===1?0:i.length-1;return!d||r===void 0?i[d]:r}const YV={decay:bw,inertia:bw,tween:Sf,keyframes:Sf,spring:Hf};function ck(n){typeof n.type=="string"&&(n.type=YV[n.type])}class r_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const GV=n=>n/100;class D0 extends r_{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:t}=this.options;t&&t.updatedAt!==jr.now()&&this.tick(jr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ck(e);const{type:t=Sf,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:l=0}=e;let{keyframes:d}=e;const h=t||Sf;h!==Sf&&typeof d[0]!="number"&&(this.mixKeyframes=xm(GV,rk(d[0],d[1])),d=[0,100]);const m=h({...e,keyframes:d});i==="mirror"&&(this.mirroredGenerator=h({...e,keyframes:[...d].reverse(),velocity:-l})),m.calculatedDuration===null&&(m.calculatedDuration=n_(m));const{calculatedDuration:g}=m;this.calculatedDuration=g,this.resolvedDuration=g+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=m}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:l,resolvedDuration:d,calculatedDuration:h}=this;if(this.startTime===null)return r.next(0);const{delay:m=0,keyframes:g,repeat:p,repeatType:b,repeatDelay:w,type:_,onUpdate:N,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const j=this.currentTime-m*(this.playbackSpeed>=0?1:-1),P=this.playbackSpeed>=0?j<0:j>s;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let A=this.currentTime,M=r;if(p){const k=Math.min(this.currentTime,s)/d;let I=Math.floor(k),R=k%1;!R&&k>=1&&(R=1),R===1&&I--,I=Math.min(I,p+1),!!(I%2)&&(b==="reverse"?(R=1-R,w&&(R-=w/d)):b==="mirror"&&(M=l)),A=Ya(0,1,R)*d}let O;P?(this.delayState.value=g[0],O=this.delayState):O=M.next(A),i&&!P&&(O.value=i(O.value));let{done:q}=O;!P&&h!==null&&(q=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&q);return L&&_!==bw&&(O.value=Ey(g,this.options,E,this.speed)),N&&N(O.value),L&&this.finish(),O}then(e,t){return this.finished.then(e,t)}get duration(){return Rs(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Rs(e)}get time(){return Rs(this.currentTime)}set time(e){e=Wr(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const t=this.generator.next(e).value;return ik(r=>this.generator.next(r).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(jr.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Rs(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=IV,startTime:t}=this.options;this.driver||(this.driver=e(l=>this.tick(l))),(i=(s=this.options).onPlay)==null||i.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=t??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(jr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function $V(n){for(let e=1;e<n.length;e++)n[e]??(n[e]=n[e-1])}const ec=n=>n*180/Math.PI,vw=n=>{const e=ec(Math.atan2(n[1],n[0]));return ww(e)},KV={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:vw,rotateZ:vw,skewX:n=>ec(Math.atan(n[1])),skewY:n=>ec(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},ww=n=>(n=n%360,n<0&&(n+=360),n),QS=vw,XS=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),JS=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),WV={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:XS,scaleY:JS,scale:n=>(XS(n)+JS(n))/2,rotateX:n=>ww(ec(Math.atan2(n[6],n[5]))),rotateY:n=>ww(ec(Math.atan2(-n[2],n[0]))),rotateZ:QS,rotate:QS,skewX:n=>ec(Math.atan(n[4])),skewY:n=>ec(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function _w(n){return n.includes("scale")?1:0}function Tw(n,e){if(!n||n==="none")return _w(e);const t=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(t)r=WV,s=t;else{const d=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=KV,s=d}if(!s)return _w(e);const i=r[e],l=s[1].split(",").map(XV);return typeof i=="function"?i(l):l[i]}const QV=(n,e)=>{const{transform:t="none"}=getComputedStyle(n);return Tw(t,e)};function XV(n){return parseFloat(n.trim())}const Pd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Od=new Set(Pd),ZS=n=>n===Md||n===Ve,JV=new Set(["x","y","z"]),ZV=Pd.filter(n=>!JV.has(n));function e8(n){const e=[];return ZV.forEach(t=>{const r=n.getValue(t);r!==void 0&&(e.push([t,r.get()]),r.set(t.startsWith("scale")?1:0))}),e}const ko={width:({x:n},{paddingLeft:e="0",paddingRight:t="0",boxSizing:r})=>{const s=n.max-n.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(t)},height:({y:n},{paddingTop:e="0",paddingBottom:t="0",boxSizing:r})=>{const s=n.max-n.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(t)},top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:(n,{transform:e})=>Tw(e,"x"),y:(n,{transform:e})=>Tw(e,"y")};ko.translateX=ko.x;ko.translateY=ko.y;const ac=new Set;let Nw=!1,Ew=!1,Sw=!1;function uk(){if(Ew){const n=Array.from(ac).filter(r=>r.needsMeasurement),e=new Set(n.map(r=>r.element)),t=new Map;e.forEach(r=>{const s=e8(r);s.length&&(t.set(r,s),r.render())}),n.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=t.get(r);s&&s.forEach(([i,l])=>{var d;(d=r.getValue(i))==null||d.set(l)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ew=!1,Nw=!1,ac.forEach(n=>n.complete(Sw)),ac.clear()}function dk(){ac.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Ew=!0)})}function t8(){Sw=!0,dk(),uk(),Sw=!1}class s_{constructor(e,t,r,s,i,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=s,this.element=i,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(ac.add(this),Nw||(Nw=!0,Wt.read(dk),Wt.resolveKeyframes(uk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),l=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&t){const d=r.readValue(t,l);d!=null&&(e[0]=d)}e[0]===void 0&&(e[0]=l),s&&i===void 0&&s.set(e[0])}$V(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ac.delete(this)}cancel(){this.state==="scheduled"&&(ac.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const n8=n=>n.startsWith("--");function hk(n,e,t){n8(e)?n.style.setProperty(e,t):n.style[e]=t}const r8={};function fk(n,e){const t=P5(n);return()=>r8[e]??t()}const s8=fk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),mk=fk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yf=([n,e,t,r])=>`cubic-bezier(${n}, ${e}, ${t}, ${r})`,ej={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yf([0,.65,.55,1]),circOut:yf([.55,0,1,.45]),backIn:yf([.31,.01,.66,-.59]),backOut:yf([.33,1.53,.69,.99])};function pk(n,e){if(n)return typeof n=="function"?mk()?sk(n,e):"ease-out":K5(n)?yf(n):Array.isArray(n)?n.map(t=>pk(t,e)||ej.easeOut):ej[n]}function a8(n,e,t,{delay:r=0,duration:s=300,repeat:i=0,repeatType:l="loop",ease:d="easeOut",times:h}={},m=void 0){const g={[e]:t};h&&(g.offset=h);const p=pk(d,s);Array.isArray(p)&&(g.easing=p);const b={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:l==="reverse"?"alternate":"normal"};return m&&(b.pseudoElement=m),n.animate(g,b)}function a_(n){return typeof n=="function"&&"applyToOptions"in n}function i8({type:n,...e}){return a_(n)&&mk()?n.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class gk extends r_{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:r,keyframes:s,pseudoElement:i,allowFlatten:l=!1,finalKeyframe:d,onComplete:h}=e;this.isPseudoElement=!!i,this.allowFlatten=l,this.options=e,K1(typeof e.type!="string");const m=i8(e);this.animation=a8(t,r,s,m,i),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const g=Ey(s,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(g),hk(t,r,g),this.animation.cancel()}h==null||h(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r,s;const e=(t=this.options)==null?void 0:t.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var t,r;const e=((r=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:r.call(t).duration)||0;return Rs(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Rs(e)}get time(){return Rs(Number(this.animation.currentTime)||0)}set time(e){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wr(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&s8()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),r&&(this.animation.rangeEnd=r),Ms):s(this)}}const yk={anticipate:z5,backInOut:U5,circInOut:H5};function o8(n){return n in yk}function l8(n){typeof n.ease=="string"&&o8(n.ease)&&(n.ease=yk[n.ease])}const jv=10;class c8 extends gk{constructor(e){l8(e),ck(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:r,onComplete:s,element:i,...l}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const d=new D0({...l,autoplay:!1}),h=Math.max(jv,jr.now()-this.startTime),m=Ya(0,jv,h-jv),g=d.sample(h).value,{name:p}=this.options;i&&p&&hk(i,p,g),t.setWithVelocity(d.sample(Math.max(0,h-m)).value,g,m),d.stop()}}const tj=(n,e)=>e==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Zs.test(n)||n==="0")&&!n.startsWith("url("));function u8(n){const e=n[0];if(n.length===1)return!0;for(let t=0;t<n.length;t++)if(n[t]!==e)return!0}function d8(n,e,t,r){const s=n[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=n[n.length-1],l=tj(s,e),d=tj(i,e);return!l||!d?!1:u8(n)||(t==="spring"||a_(t))&&r}function jw(n){n.duration=0,n.type="keyframes"}const xk=new Set(["opacity","clipPath","filter","transform"]),h8=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function f8(n){for(let e=0;e<n.length;e++)if(typeof n[e]=="string"&&h8.test(n[e]))return!0;return!1}const m8=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),p8=P5(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function g8(n){var p;const{motionValue:e,name:t,repeatDelay:r,repeatType:s,damping:i,type:l,keyframes:d}=n;if(!(((p=e==null?void 0:e.owner)==null?void 0:p.current)instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=e.owner.getProps();return p8()&&t&&(xk.has(t)||m8.has(t)&&f8(d))&&(t!=="transform"||!g)&&!m&&!r&&s!=="mirror"&&i!==0&&l!=="inertia"}const y8=40;class x8 extends r_{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:l="loop",keyframes:d,name:h,motionValue:m,element:g,...p}){var _;super(),this.stop=()=>{var N,E;this._animation&&(this._animation.stop(),(N=this.stopTimeline)==null||N.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=jr.now();const b={autoplay:e,delay:t,type:r,repeat:s,repeatDelay:i,repeatType:l,name:h,motionValue:m,element:g,...p},w=(g==null?void 0:g.KeyframeResolver)||s_;this.keyframeResolver=new w(d,(N,E,j)=>this.onKeyframesResolved(N,E,b,!j),h,m,g),(_=this.keyframeResolver)==null||_.scheduleResolve()}onKeyframesResolved(e,t,r,s){var j,P;this.keyframeResolver=void 0;const{name:i,type:l,velocity:d,delay:h,isHandoff:m,onUpdate:g}=r;this.resolvedAt=jr.now();let p=!0;d8(e,i,l,d)||(p=!1,(qo.instantAnimations||!h)&&(g==null||g(Ey(e,r,t))),e[0]=e[e.length-1],jw(r),r.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>y8?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},_=p&&!m&&g8(w),N=(P=(j=w.motionValue)==null?void 0:j.owner)==null?void 0:P.current;let E;if(_)try{E=new c8({...w,element:N})}catch{E=new D0(w)}else E=new D0(w);E.finished.then(()=>{this.notifyFinished()}).catch(Ms),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),t8()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}class b8{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=t}attachTimeline(e){const t=this.animations.map(r=>r.attachTimeline(e));return()=>{t.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return nj(this.animations,"duration")}get iterationDuration(){return nj(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function nj(n,e){let t=0;for(let r=0;r<n.length;r++){const s=n[r][e];s!==null&&s>t&&(t=s)}return t}class v8 extends b8{then(e,t){return this.finished.finally(e).then(()=>{})}}function bk(n,e,t,r=0,s=1){const i=Array.from(n).sort((m,g)=>m.sortNodePosition(g)).indexOf(e),l=n.size,d=(l-1)*r;return typeof t=="function"?t(i,l):s===1?i*r:d-i*r}const w8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _8(n){const e=w8.exec(n);if(!e)return[,];const[,t,r,s]=e;return[`--${t??r}`,s]}function vk(n,e,t=1){const[r,s]=_8(n);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const l=i.trim();return I5(l)?parseFloat(l):l}return J1(s)?vk(s,e,t+1):s}const T8={type:"spring",stiffness:500,damping:25,restSpeed:10},N8=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),E8={type:"keyframes",duration:.8},S8={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},j8=(n,{keyframes:e})=>e.length>2?E8:Od.has(n)?n.startsWith("scale")?N8(e[1]):T8:S8;function wk(n,e){if(n!=null&&n.inherit&&e){const{inherit:t,...r}=n;return{...e,...r}}return n}function i_(n,e){const t=(n==null?void 0:n[e])??(n==null?void 0:n.default)??n;return t!==n?wk(t,n):t}const A8=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function C8(n){for(const e in n)if(!A8.has(e))return!0;return!1}const o_=(n,e,t,r={},s,i)=>l=>{const d=i_(r,n)||{},h=d.delay||r.delay||0;let{elapsed:m=0}=r;m=m-Wr(h);const g={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...d,delay:-m,onUpdate:b=>{e.set(b),d.onUpdate&&d.onUpdate(b)},onComplete:()=>{l(),d.onComplete&&d.onComplete()},name:n,motionValue:e,element:i?void 0:s};C8(d)||Object.assign(g,j8(n,g)),g.duration&&(g.duration=Wr(g.duration)),g.repeatDelay&&(g.repeatDelay=Wr(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let p=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(jw(g),g.delay===0&&(p=!0)),(qo.instantAnimations||qo.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(p=!0,jw(g),g.delay=0),g.allowFlatten=!d.type&&!d.ease,p&&!i&&e.get()!==void 0){const b=Ey(g.keyframes,d);if(b!==void 0){Wt.update(()=>{g.onUpdate(b),g.onComplete()});return}}return d.isSync?new D0(g):new x8(g)};function rj(n){const e=[{},{}];return n==null||n.values.forEach((t,r)=>{e[0][r]=t.get(),e[1][r]=t.getVelocity()}),e}function l_(n,e,t,r){if(typeof e=="function"){const[s,i]=rj(r);e=e(t!==void 0?t:n.custom,s,i)}if(typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"){const[s,i]=rj(r);e=e(t!==void 0?t:n.custom,s,i)}return e}function ic(n,e,t){const r=n.getProps();return l_(r,e,t!==void 0?t:r.custom,n)}const _k=new Set(["width","height","top","left","right","bottom",...Pd]),sj=30,D8=n=>!isNaN(parseFloat(n));class k8{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=jr.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=jr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=D8(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new W1);const r=this.events[e].add(t);return e==="change"?()=>{r(),Wt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=jr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>sj)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,sj);return O5(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function mc(n,e){return new k8(n,e)}const Aw=n=>Array.isArray(n);function I8(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,mc(t))}function R8(n){return Aw(n)?n[n.length-1]||0:n}function M8(n,e){const t=ic(n,e);let{transitionEnd:r={},transition:s={},...i}=t||{};i={...i,...r};for(const l in i){const d=R8(i[l]);I8(n,l,d)}}const $n=n=>!!(n&&n.getVelocity);function P8(n){return!!($n(n)&&n.add)}function Cw(n,e){const t=n.getValue("willChange");if(P8(t))return t.add(e);if(!t&&qo.WillChange){const r=new qo.WillChange("auto");n.addValue("willChange",r),r.add(e)}}function c_(n){return n.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const O8="framerAppearId",Tk="data-"+c_(O8);function Nk(n){return n.props[Tk]}function L8({protectedKeys:n,needsAnimating:e},t){const r=n.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,r}function u_(n,e,{delay:t=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:l,...d}=e;const h=n.getDefaultTransition();i=i?wk(i,h):h;const m=i==null?void 0:i.reduceMotion;r&&(i=r);const g=[],p=s&&n.animationState&&n.animationState.getState()[s];for(const b in d){const w=n.getValue(b,n.latestValues[b]??null),_=d[b];if(_===void 0||p&&L8(p,b))continue;const N={delay:t,...i_(i||{},b)},E=w.get();if(E!==void 0&&!w.isAnimating()&&!Array.isArray(_)&&_===E&&!N.velocity){Wt.update(()=>w.set(_));continue}let j=!1;if(window.MotionHandoffAnimation){const M=Nk(n);if(M){const O=window.MotionHandoffAnimation(M,b,Wt);O!==null&&(N.startTime=O,j=!0)}}Cw(n,b);const P=m??n.shouldReduceMotion;w.start(o_(b,w,_,P&&_k.has(b)?{type:!1}:N,n,j));const A=w.animation;A&&g.push(A)}if(l){const b=()=>Wt.update(()=>{l&&M8(n,l)});g.length?Promise.all(g).then(b):b()}return g}function Dw(n,e,t={}){var h;const r=ic(n,e,t.type==="exit"?(h=n.presenceContext)==null?void 0:h.custom:void 0);let{transition:s=n.getDefaultTransition()||{}}=r||{};t.transitionOverride&&(s=t.transitionOverride);const i=r?()=>Promise.all(u_(n,r,t)):()=>Promise.resolve(),l=n.variantChildren&&n.variantChildren.size?(m=0)=>{const{delayChildren:g=0,staggerChildren:p,staggerDirection:b}=s;return V8(n,e,m,g,p,b,t)}:()=>Promise.resolve(),{when:d}=s;if(d){const[m,g]=d==="beforeChildren"?[i,l]:[l,i];return m().then(()=>g())}else return Promise.all([i(),l(t.delay)])}function V8(n,e,t=0,r=0,s=0,i=1,l){const d=[];for(const h of n.variantChildren)h.notify("AnimationStart",e),d.push(Dw(h,e,{...l,delay:t+(typeof r=="function"?0:r)+bk(n.variantChildren,h,r,s,i)}).then(()=>h.notify("AnimationComplete",e)));return Promise.all(d)}function F8(n,e,t={}){n.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>Dw(n,i,t));r=Promise.all(s)}else if(typeof e=="string")r=Dw(n,e,t);else{const s=typeof e=="function"?ic(n,e,t.custom):e;r=Promise.all(u_(n,s,t))}return r.then(()=>{n.notify("AnimationComplete",e)})}const B8={test:n=>n==="auto",parse:n=>n},Ek=n=>e=>e.test(n),Sk=[Md,Ve,Fa,_o,fV,hV,B8],aj=n=>Sk.find(Ek(n));function U8(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||M5(n):!0}const z8=new Set(["brightness","contrast","saturate","opacity"]);function q8(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[r]=t.match(Z1)||[];if(!r)return n;const s=t.replace(r,"");let i=z8.has(e)?1:0;return r!==t&&(i*=100),e+"("+i+s+")"}const H8=/\b([a-z-]*)\(.*?\)/gu,kw={...Zs,getAnimatableNone:n=>{const e=n.match(H8);return e?e.map(q8).join(" "):n}},Iw={...Zs,getAnimatableNone:n=>{const e=Zs.parse(n);return Zs.createTransformer(n)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},ij={...Md,transform:Math.round},Y8={rotate:_o,rotateX:_o,rotateY:_o,rotateZ:_o,scale:pg,scaleX:pg,scaleY:pg,scaleZ:pg,skew:_o,skewX:_o,skewY:_o,distance:Ve,translateX:Ve,translateY:Ve,translateZ:Ve,x:Ve,y:Ve,z:Ve,perspective:Ve,transformPerspective:Ve,opacity:qf,originX:YS,originY:YS,originZ:Ve},d_={borderWidth:Ve,borderTopWidth:Ve,borderRightWidth:Ve,borderBottomWidth:Ve,borderLeftWidth:Ve,borderRadius:Ve,borderTopLeftRadius:Ve,borderTopRightRadius:Ve,borderBottomRightRadius:Ve,borderBottomLeftRadius:Ve,width:Ve,maxWidth:Ve,height:Ve,maxHeight:Ve,top:Ve,right:Ve,bottom:Ve,left:Ve,inset:Ve,insetBlock:Ve,insetBlockStart:Ve,insetBlockEnd:Ve,insetInline:Ve,insetInlineStart:Ve,insetInlineEnd:Ve,padding:Ve,paddingTop:Ve,paddingRight:Ve,paddingBottom:Ve,paddingLeft:Ve,paddingBlock:Ve,paddingBlockStart:Ve,paddingBlockEnd:Ve,paddingInline:Ve,paddingInlineStart:Ve,paddingInlineEnd:Ve,margin:Ve,marginTop:Ve,marginRight:Ve,marginBottom:Ve,marginLeft:Ve,marginBlock:Ve,marginBlockStart:Ve,marginBlockEnd:Ve,marginInline:Ve,marginInlineStart:Ve,marginInlineEnd:Ve,fontSize:Ve,backgroundPositionX:Ve,backgroundPositionY:Ve,...Y8,zIndex:ij,fillOpacity:qf,strokeOpacity:qf,numOctaves:ij},G8={...d_,color:Un,backgroundColor:Un,outlineColor:Un,fill:Un,stroke:Un,borderColor:Un,borderTopColor:Un,borderRightColor:Un,borderBottomColor:Un,borderLeftColor:Un,filter:kw,WebkitFilter:kw,mask:Iw,WebkitMask:Iw},jk=n=>G8[n],$8=new Set([kw,Iw]);function Ak(n,e){let t=jk(n);return $8.has(t)||(t=Zs),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const K8=new Set(["auto","none","0"]);function W8(n,e,t){let r=0,s;for(;r<n.length&&!s;){const i=n[r];typeof i=="string"&&!K8.has(i)&&td(i).values.length&&(s=n[r]),r++}if(s&&t)for(const i of e)n[i]=Ak(t,s)}class Q8 extends s_{constructor(e,t,r,s,i){super(e,t,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let g=0;g<e.length;g++){let p=e[g];if(typeof p=="string"&&(p=p.trim(),J1(p))){const b=vk(p,t.current);b!==void 0&&(e[g]=b),g===e.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!_k.has(r)||e.length!==2)return;const[s,i]=e,l=aj(s),d=aj(i),h=HS(s),m=HS(i);if(h!==m&&ko[r]){this.needsMeasurement=!0;return}if(l!==d)if(ZS(l)&&ZS(d))for(let g=0;g<e.length;g++){const p=e[g];typeof p=="string"&&(e[g]=parseFloat(p))}else ko[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||U8(e[s]))&&r.push(s);r.length&&W8(e,r,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ko[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var d;const{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(t);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,l=r[i];r[i]=ko[t](e.measureViewportBox(),window.getComputedStyle(e.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(d=this.removedTransforms)!=null&&d.length&&this.removedTransforms.forEach(([h,m])=>{e.getValue(h).set(m)}),this.resolveNoneKeyframes()}}function h_(n,e,t){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;e&&(r=e.current);const s=(t==null?void 0:t[n])??r.querySelectorAll(n);return s?Array.from(s):[]}return Array.from(n).filter(r=>r!=null)}const Ck=(n,e)=>e&&typeof n=="number"?e.transform(n):n;function zg(n){return R5(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:f_}=W5(queueMicrotask,!1),Ks={x:!1,y:!1};function Dk(){return Ks.x||Ks.y}function X8(n){return n==="x"||n==="y"?Ks[n]?null:(Ks[n]=!0,()=>{Ks[n]=!1}):Ks.x||Ks.y?null:(Ks.x=Ks.y=!0,()=>{Ks.x=Ks.y=!1})}function kk(n,e){const t=h_(n),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[t,s,()=>r.abort()]}function J8(n){return!(n.pointerType==="touch"||Dk())}function Z8(n,e,t={}){const[r,s,i]=kk(n,t);return r.forEach(l=>{let d=!1,h=!1,m;const g=()=>{l.removeEventListener("pointerleave",_)},p=E=>{m&&(m(E),m=void 0),g()},b=E=>{d=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),h&&(h=!1,p(E))},w=()=>{d=!0,window.addEventListener("pointerup",b,s),window.addEventListener("pointercancel",b,s)},_=E=>{if(E.pointerType!=="touch"){if(d){h=!0;return}p(E)}},N=E=>{if(!J8(E))return;h=!1;const j=e(l,E);typeof j=="function"&&(m=j,l.addEventListener("pointerleave",_,s))};l.addEventListener("pointerenter",N,s),l.addEventListener("pointerdown",w,s)}),i}const Ik=(n,e)=>e?n===e?!0:Ik(n,e.parentElement):!1,m_=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,e9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function t9(n){return e9.has(n.tagName)||n.isContentEditable===!0}const n9=new Set(["INPUT","SELECT","TEXTAREA"]);function r9(n){return n9.has(n.tagName)||n.isContentEditable===!0}const qg=new WeakSet;function oj(n){return e=>{e.key==="Enter"&&n(e)}}function Av(n,e){n.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const s9=(n,e)=>{const t=n.currentTarget;if(!t)return;const r=oj(()=>{if(qg.has(t))return;Av(t,"down");const s=oj(()=>{Av(t,"up")}),i=()=>Av(t,"cancel");t.addEventListener("keyup",s,e),t.addEventListener("blur",i,e)});t.addEventListener("keydown",r,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",r),e)};function lj(n){return m_(n)&&!Dk()}const cj=new WeakSet;function a9(n,e,t={}){const[r,s,i]=kk(n,t),l=d=>{const h=d.currentTarget;if(!lj(d)||cj.has(d))return;qg.add(h),t.stopPropagation&&cj.add(d);const m=e(h,d),g=(w,_)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",b),qg.has(h)&&qg.delete(h),lj(w)&&typeof m=="function"&&m(w,{success:_})},p=w=>{g(w,h===window||h===document||t.useGlobalTarget||Ik(h,w.target))},b=w=>{g(w,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",b,s)};return r.forEach(d=>{(t.useGlobalTarget?window:d).addEventListener("pointerdown",l,s),zg(d)&&(d.addEventListener("focus",m=>s9(m,s)),!t9(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),i}function Sy(n){return R5(n)&&"ownerSVGElement"in n}const Hg=new WeakMap;let To;const Rk=(n,e,t)=>(r,s)=>s&&s[0]?s[0][n+"Size"]:Sy(r)&&"getBBox"in r?r.getBBox()[e]:r[t],i9=Rk("inline","width","offsetWidth"),o9=Rk("block","height","offsetHeight");function l9({target:n,borderBoxSize:e}){var t;(t=Hg.get(n))==null||t.forEach(r=>{r(n,{get width(){return i9(n,e)},get height(){return o9(n,e)}})})}function c9(n){n.forEach(l9)}function u9(){typeof ResizeObserver>"u"||(To=new ResizeObserver(c9))}function d9(n,e){To||u9();const t=h_(n);return t.forEach(r=>{let s=Hg.get(r);s||(s=new Set,Hg.set(r,s)),s.add(e),To==null||To.observe(r)}),()=>{t.forEach(r=>{const s=Hg.get(r);s==null||s.delete(e),s!=null&&s.size||To==null||To.unobserve(r)})}}const Yg=new Set;let Fu;function h9(){Fu=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yg.forEach(e=>e(n))},window.addEventListener("resize",Fu)}function f9(n){return Yg.add(n),Fu||h9(),()=>{Yg.delete(n),!Yg.size&&typeof Fu=="function"&&(window.removeEventListener("resize",Fu),Fu=void 0)}}function uj(n,e){return typeof n=="function"?f9(n):d9(n,e)}function Mk(n){return Sy(n)&&n.tagName==="svg"}const m9=[...Sk,Un,Zs],p9=n=>m9.find(Ek(n)),dj=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bu=()=>({x:dj(),y:dj()}),hj=()=>({min:0,max:0}),Bn=()=>({x:hj(),y:hj()}),Yf=new WeakMap;function jy(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Gf(n){return typeof n=="string"||Array.isArray(n)}const p_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],g_=["initial",...p_];function Ay(n){return jy(n.animate)||g_.some(e=>Gf(n[e]))}function Pk(n){return!!(Ay(n)||n.variants)}function g9(n,e,t){for(const r in e){const s=e[r],i=t[r];if($n(s))n.addValue(r,s);else if($n(i))n.addValue(r,mc(s,{owner:n}));else if(i!==s)if(n.hasValue(r)){const l=n.getValue(r);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=n.getStaticValue(r);n.addValue(r,mc(l!==void 0?l:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const Rw={current:null},Ok={current:!1},y9=typeof window<"u";function x9(){if(Ok.current=!0,!!y9)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>Rw.current=n.matches;n.addEventListener("change",e),e()}else Rw.current=!1}const fj=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let k0={};function Lk(n){k0=n}function b9(){return k0}class Vk{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:l,visualState:d},h={}){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=s_,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 w=jr.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Wt.render(this.render,!1,!0))};const{latestValues:m,renderState:g}=d;this.latestValues=m,this.baseTarget={...m},this.initialValues=t.initial?{...m}:{},this.renderState=g,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=h,this.blockInitialAnimation=!!l,this.isControllingVariants=Ay(t),this.isVariantNode=Pk(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:p,...b}=this.scrapeMotionValuesFromProps(t,{},this);for(const w in b){const _=b[w];m[w]!==void 0&&$n(_)&&_.set(m[w])}}mount(e){var t,r;if(this.hasBeenMounted)for(const s in this.initialValues)(t=this.values.get(s))==null||t.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,Yf.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ok.current||x9(),this.shouldReduceMotion=Rw.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),Ho(this.notifyUpdate),Ho(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&xk.has(e)&&this.current instanceof HTMLElement){const{factory:l,keyframes:d,times:h,ease:m,duration:g}=t.accelerate,p=new gk({element:this.current,name:e,keyframes:d,times:h,ease:m,duration:Wr(g)}),b=l(p);this.valueSubscriptions.set(e,()=>{b(),p.cancel()});return}const r=Od.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",l=>{this.latestValues[e]=l,this.props.onUpdate&&Wt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in k0){const t=k0[e];if(!t)continue;const{isEnabled:r,Feature:s}=t;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Bn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let r=0;r<fj.length;r++){const s=fj[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,l=e[i];l&&(this.propEventSubscriptions[s]=this.on(s,l))}this.prevMotionValues=g9(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&t!==void 0&&(r=mc(t===null?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(I5(r)||M5(r))?r=parseFloat(r):!p9(r)&&Zs.test(t)&&(r=Ak(e,t)),this.setBaseTarget(e,$n(r)?r.get():r)),$n(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var i;const{initial:t}=this.props;let r;if(typeof t=="string"||typeof t=="object"){const l=l_(this.props,t,(i=this.presenceContext)==null?void 0:i.custom);l&&(r=l[e])}if(t&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!$n(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new W1),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){f_.render(this.render)}}class Fk extends Vk{constructor(){super(...arguments),this.KeyframeResolver=Q8}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const r=e.style;return r?r[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;$n(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}let nl=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Bk({top:n,left:e,right:t,bottom:r}){return{x:{min:e,max:t},y:{min:n,max:r}}}function v9({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function w9(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),r=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:r.y,right:r.x}}function Cv(n){return n===void 0||n===1}function Mw({scale:n,scaleX:e,scaleY:t}){return!Cv(n)||!Cv(e)||!Cv(t)}function ql(n){return Mw(n)||Uk(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Uk(n){return mj(n.x)||mj(n.y)}function mj(n){return n&&n!=="0%"}function I0(n,e,t){const r=n-t,s=e*r;return t+s}function pj(n,e,t,r,s){return s!==void 0&&(n=I0(n,s,r)),I0(n,t,r)+e}function Pw(n,e=0,t=1,r,s){n.min=pj(n.min,e,t,r,s),n.max=pj(n.max,e,t,r,s)}function zk(n,{x:e,y:t}){Pw(n.x,e.translate,e.scale,e.originPoint),Pw(n.y,t.translate,t.scale,t.originPoint)}const gj=.999999999999,yj=1.0000000000001;function _9(n,e,t,r=!1){var d;const s=t.length;if(!s)return;e.x=e.y=1;let i,l;for(let h=0;h<s;h++){i=t[h],l=i.projectionDelta;const{visualElement:m}=i.options;m&&m.props.style&&m.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Da(n.x,-i.scroll.offset.x),Da(n.y,-i.scroll.offset.y)),l&&(e.x*=l.x.scale,e.y*=l.y.scale,zk(n,l)),r&&ql(i.latestValues)&&Gg(n,i.latestValues,(d=i.layout)==null?void 0:d.layoutBox))}e.x<yj&&e.x>gj&&(e.x=1),e.y<yj&&e.y>gj&&(e.y=1)}function Da(n,e){n.min+=e,n.max+=e}function xj(n,e,t,r,s=.5){const i=Qt(n.min,n.max,s);Pw(n,e,t,i,r)}function bj(n,e){return typeof n=="string"?parseFloat(n)/100*(e.max-e.min):n}function Gg(n,e,t){const r=t??n;xj(n.x,bj(e.x,r.x),e.scaleX,e.scale,e.originX),xj(n.y,bj(e.y,r.y),e.scaleY,e.scale,e.originY)}function qk(n,e){return Bk(w9(n.getBoundingClientRect(),e))}function T9(n,e,t){const r=qk(n,t),{scroll:s}=e;return s&&(Da(r.x,s.offset.x),Da(r.y,s.offset.y)),r}const N9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},E9=Pd.length;function S9(n,e,t){let r="",s=!0;for(let i=0;i<E9;i++){const l=Pd[i],d=n[l];if(d===void 0)continue;let h=!0;if(typeof d=="number")h=d===(l.startsWith("scale")?1:0);else{const m=parseFloat(d);h=l.startsWith("scale")?m===1:m===0}if(!h||t){const m=Ck(d,d_[l]);if(!h){s=!1;const g=N9[l]||l;r+=`${g}(${m}) `}t&&(e[l]=m)}}return r=r.trim(),t?r=t(e,s?"":r):s&&(r="none"),r}function y_(n,e,t){const{style:r,vars:s,transformOrigin:i}=n;let l=!1,d=!1;for(const h in e){const m=e[h];if(Od.has(h)){l=!0;continue}else if(X5(h)){s[h]=m;continue}else{const g=Ck(m,d_[h]);h.startsWith("origin")?(d=!0,i[h]=g):r[h]=g}}if(e.transform||(l||t?r.transform=S9(e,n.transform,t):r.transform&&(r.transform="none")),d){const{originX:h="50%",originY:m="50%",originZ:g=0}=i;r.transformOrigin=`${h} ${m} ${g}`}}function Hk(n,{style:e,vars:t},r,s){const i=n.style;let l;for(l in e)i[l]=e[l];s==null||s.applyProjectionStyles(i,r);for(l in t)i.setProperty(l,t[l])}function vj(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const nf={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(Ve.test(n))n=parseFloat(n);else return n;const t=vj(n,e.target.x),r=vj(n,e.target.y);return`${t}% ${r}%`}},j9={correct:(n,{treeScale:e,projectionDelta:t})=>{const r=n,s=Zs.parse(n);if(s.length>5)return r;const i=Zs.createTransformer(n),l=typeof s[0]!="number"?1:0,d=t.x.scale*e.x,h=t.y.scale*e.y;s[0+l]/=d,s[1+l]/=h;const m=Qt(d,h,.5);return typeof s[2+l]=="number"&&(s[2+l]/=m),typeof s[3+l]=="number"&&(s[3+l]/=m),i(s)}},Ow={borderRadius:{...nf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nf,borderTopRightRadius:nf,borderBottomLeftRadius:nf,borderBottomRightRadius:nf,boxShadow:j9};function Yk(n,{layout:e,layoutId:t}){return Od.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Ow[n]||n==="opacity")}function x_(n,e,t){var l;const r=n.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const d in r)($n(r[d])||s&&$n(s[d])||Yk(d,n)||((l=t==null?void 0:t.getValue(d))==null?void 0:l.liveStyle)!==void 0)&&(i[d]=r[d]);return i}function A9(n){return window.getComputedStyle(n)}class Gk extends Fk{constructor(){super(...arguments),this.type="html",this.renderInstance=Hk}readValueFromInstance(e,t){var r;if(Od.has(t))return(r=this.projection)!=null&&r.isProjecting?_w(t):QV(e,t);{const s=A9(e),i=(X5(t)?s.getPropertyValue(t):s[t])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return qk(e,t)}build(e,t,r){y_(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return x_(e,t,r)}}function C9(n,e){return n in e}class D9 extends Vk{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(C9(t,e)){const r=e[t];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Bn()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}const k9={offset:"stroke-dashoffset",array:"stroke-dasharray"},I9={offset:"strokeDashoffset",array:"strokeDasharray"};function R9(n,e,t=1,r=0,s=!0){n.pathLength=1;const i=s?k9:I9;n[i.offset]=`${-r}`,n[i.array]=`${e} ${t}`}const M9=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function $k(n,{attrX:e,attrY:t,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:l=0,...d},h,m,g){if(y_(n,d,m),h){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:p,style:b}=n;p.transform&&(b.transform=p.transform,delete p.transform),(b.transform||p.transformOrigin)&&(b.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),b.transform&&(b.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete p.transformBox);for(const w of M9)p[w]!==void 0&&(b[w]=p[w],delete p[w]);e!==void 0&&(p.x=e),t!==void 0&&(p.y=t),r!==void 0&&(p.scale=r),s!==void 0&&R9(p,s,i,l,!1)}const Kk=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"]),Wk=n=>typeof n=="string"&&n.toLowerCase()==="svg";function P9(n,e,t,r){Hk(n,e,void 0,r);for(const s in e.attrs)n.setAttribute(Kk.has(s)?s:c_(s),e.attrs[s])}function Qk(n,e,t){const r=x_(n,e,t);for(const s in n)if($n(n[s])||$n(e[s])){const i=Pd.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=n[s]}return r}class Xk extends Fk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bn}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Od.has(t)){const r=jk(t);return r&&r.default||0}return t=Kk.has(t)?t:c_(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return Qk(e,t,r)}build(e,t,r){$k(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,s){P9(e,t,r,s)}mount(e){this.isSVGTag=Wk(e.tagName),super.mount(e)}}const O9=g_.length;function Jk(n){if(!n)return;if(!n.isControllingVariants){const t=n.parent?Jk(n.parent)||{}:{};return n.props.initial!==void 0&&(t.initial=n.props.initial),t}const e={};for(let t=0;t<O9;t++){const r=g_[t],s=n.props[r];(Gf(s)||s===!1)&&(e[r]=s)}return e}function Zk(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let r=0;r<t;r++)if(e[r]!==n[r])return!1;return!0}const L9=[...p_].reverse(),V9=p_.length;function F9(n){return e=>Promise.all(e.map(({animation:t,options:r})=>F8(n,t,r)))}function B9(n){let e=F9(n),t=wj(),r=!0,s=!1;const i=m=>(g,p)=>{var w;const b=ic(n,p,m==="exit"?(w=n.presenceContext)==null?void 0:w.custom:void 0);if(b){const{transition:_,transitionEnd:N,...E}=b;g={...g,...E,...N}}return g};function l(m){e=m(n)}function d(m){const{props:g}=n,p=Jk(n.parent)||{},b=[],w=new Set;let _={},N=1/0;for(let j=0;j<V9;j++){const P=L9[j],A=t[P],M=g[P]!==void 0?g[P]:p[P],O=Gf(M),q=P===m?A.isActive:null;q===!1&&(N=j);let L=M===p[P]&&M!==g[P]&&O;if(L&&(r||s)&&n.manuallyAnimateOnMount&&(L=!1),A.protectedKeys={..._},!A.isActive&&q===null||!M&&!A.prevProp||jy(M)||typeof M=="boolean")continue;if(P==="exit"&&A.isActive&&q!==!0){A.prevResolvedValues&&(_={..._,...A.prevResolvedValues});continue}const k=U9(A.prevProp,M);let I=k||P===m&&A.isActive&&!L&&O||j>N&&O,R=!1;const F=Array.isArray(M)?M:[M];let B=F.reduce(i(P),{});q===!1&&(B={});const{prevResolvedValues:V={}}=A,se={...V,...B},ye=X=>{I=!0,w.has(X)&&(R=!0,w.delete(X)),A.needsAnimating[X]=!0;const be=n.getValue(X);be&&(be.liveStyle=!1)};for(const X in se){const be=B[X],Oe=V[X];if(_.hasOwnProperty(X))continue;let H=!1;Aw(be)&&Aw(Oe)?H=!Zk(be,Oe):H=be!==Oe,H?be!=null?ye(X):w.add(X):be!==void 0&&w.has(X)?ye(X):A.protectedKeys[X]=!0}A.prevProp=M,A.prevResolvedValues=B,A.isActive&&(_={..._,...B}),(r||s)&&n.blockInitialAnimation&&(I=!1);const W=L&&k;I&&(!W||R)&&b.push(...F.map(X=>{const be={type:P};if(typeof X=="string"&&(r||s)&&!W&&n.manuallyAnimateOnMount&&n.parent){const{parent:Oe}=n,H=ic(Oe,X);if(Oe.enteringChildren&&H){const{delayChildren:he}=H.transition||{};be.delay=bk(Oe.enteringChildren,n,he)}}return{animation:X,options:be}}))}if(w.size){const j={};if(typeof g.initial!="boolean"){const P=ic(n,Array.isArray(g.initial)?g.initial[0]:g.initial);P&&P.transition&&(j.transition=P.transition)}w.forEach(P=>{const A=n.getBaseTarget(P),M=n.getValue(P);M&&(M.liveStyle=!0),j[P]=A??null}),b.push({animation:j})}let E=!!b.length;return r&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(E=!1),r=!1,s=!1,E?e(b):Promise.resolve()}function h(m,g){var b;if(t[m].isActive===g)return Promise.resolve();(b=n.variantChildren)==null||b.forEach(w=>{var _;return(_=w.animationState)==null?void 0:_.setActive(m,g)}),t[m].isActive=g;const p=d(m);for(const w in t)t[w].protectedKeys={};return p}return{animateChanges:d,setActive:h,setAnimateFunction:l,getState:()=>t,reset:()=>{t=wj(),s=!0}}}function U9(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!Zk(e,n):!1}function Fl(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wj(){return{animate:Fl(!0),whileInView:Fl(),whileHover:Fl(),whileTap:Fl(),whileDrag:Fl(),whileFocus:Fl(),exit:Fl()}}function Lw(n,e){n.min=e.min,n.max=e.max}function Gs(n,e){Lw(n.x,e.x),Lw(n.y,e.y)}function _j(n,e){n.translate=e.translate,n.scale=e.scale,n.originPoint=e.originPoint,n.origin=e.origin}const eI=1e-4,z9=1-eI,q9=1+eI,tI=.01,H9=0-tI,Y9=0+tI;function Ar(n){return n.max-n.min}function G9(n,e,t){return Math.abs(n-e)<=t}function Tj(n,e,t,r=.5){n.origin=r,n.originPoint=Qt(e.min,e.max,n.origin),n.scale=Ar(t)/Ar(e),n.translate=Qt(t.min,t.max,n.origin)-n.originPoint,(n.scale>=z9&&n.scale<=q9||isNaN(n.scale))&&(n.scale=1),(n.translate>=H9&&n.translate<=Y9||isNaN(n.translate))&&(n.translate=0)}function jf(n,e,t,r){Tj(n.x,e.x,t.x,r?r.originX:void 0),Tj(n.y,e.y,t.y,r?r.originY:void 0)}function Nj(n,e,t,r=0){const s=r?Qt(t.min,t.max,r):t.min;n.min=s+e.min,n.max=n.min+Ar(e)}function $9(n,e,t,r){Nj(n.x,e.x,t.x,r==null?void 0:r.x),Nj(n.y,e.y,t.y,r==null?void 0:r.y)}function Ej(n,e,t,r=0){const s=r?Qt(t.min,t.max,r):t.min;n.min=e.min-s,n.max=n.min+Ar(e)}function R0(n,e,t,r){Ej(n.x,e.x,t.x,r==null?void 0:r.x),Ej(n.y,e.y,t.y,r==null?void 0:r.y)}function Sj(n,e,t,r,s){return n-=e,n=I0(n,1/t,r),s!==void 0&&(n=I0(n,1/s,r)),n}function K9(n,e=0,t=1,r=.5,s,i=n,l=n){if(Fa.test(e)&&(e=parseFloat(e),e=Qt(l.min,l.max,e/100)-l.min),typeof e!="number")return;let d=Qt(i.min,i.max,r);n===i&&(d-=e),n.min=Sj(n.min,e,t,d,s),n.max=Sj(n.max,e,t,d,s)}function jj(n,e,[t,r,s],i,l){K9(n,e[t],e[r],e[s],e.scale,i,l)}const W9=["x","scaleX","originX"],Q9=["y","scaleY","originY"];function Aj(n,e,t,r){jj(n.x,e,W9,t?t.x:void 0,r?r.x:void 0),jj(n.y,e,Q9,t?t.y:void 0,r?r.y:void 0)}function Cj(n){return n.translate===0&&n.scale===1}function nI(n){return Cj(n.x)&&Cj(n.y)}function Dj(n,e){return n.min===e.min&&n.max===e.max}function X9(n,e){return Dj(n.x,e.x)&&Dj(n.y,e.y)}function kj(n,e){return Math.round(n.min)===Math.round(e.min)&&Math.round(n.max)===Math.round(e.max)}function rI(n,e){return kj(n.x,e.x)&&kj(n.y,e.y)}function Ij(n){return Ar(n.x)/Ar(n.y)}function Rj(n,e){return n.translate===e.translate&&n.scale===e.scale&&n.originPoint===e.originPoint}function ja(n){return[n("x"),n("y")]}function J9(n,e,t){let r="";const s=n.x.translate/e.x,i=n.y.translate/e.y,l=(t==null?void 0:t.z)||0;if((s||i||l)&&(r=`translate3d(${s}px, ${i}px, ${l}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:m,rotate:g,rotateX:p,rotateY:b,skewX:w,skewY:_}=t;m&&(r=`perspective(${m}px) ${r}`),g&&(r+=`rotate(${g}deg) `),p&&(r+=`rotateX(${p}deg) `),b&&(r+=`rotateY(${b}deg) `),w&&(r+=`skewX(${w}deg) `),_&&(r+=`skewY(${_}deg) `)}const d=n.x.scale*e.x,h=n.y.scale*e.y;return(d!==1||h!==1)&&(r+=`scale(${d}, ${h})`),r||"none"}const sI=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Z9=sI.length,Mj=n=>typeof n=="string"?parseFloat(n):n,Pj=n=>typeof n=="number"||Ve.test(n);function e7(n,e,t,r,s,i){s?(n.opacity=Qt(0,t.opacity??1,t7(r)),n.opacityExit=Qt(e.opacity??1,0,n7(r))):i&&(n.opacity=Qt(e.opacity??1,t.opacity??1,r));for(let l=0;l<Z9;l++){const d=sI[l];let h=Oj(e,d),m=Oj(t,d);if(h===void 0&&m===void 0)continue;h||(h=0),m||(m=0),h===0||m===0||Pj(h)===Pj(m)?(n[d]=Math.max(Qt(Mj(h),Mj(m),r),0),(Fa.test(m)||Fa.test(h))&&(n[d]+="%")):n[d]=m}(e.rotate||t.rotate)&&(n.rotate=Qt(e.rotate||0,t.rotate||0,r))}function Oj(n,e){return n[e]!==void 0?n[e]:n.borderRadius}const t7=aI(0,.5,q5),n7=aI(.5,.95,Ms);function aI(n,e,t){return r=>r<n?0:r>e?1:t(ed(n,e,r))}function iI(n,e,t){const r=$n(n)?n:mc(n);return r.start(o_("",r,e,t)),r.animation}function $f(n,e,t,r={passive:!0}){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t)}const r7=(n,e)=>n.depth-e.depth;class s7{constructor(){this.children=[],this.isDirty=!1}add(e){$1(this.children,e),this.isDirty=!0}remove(e){Zu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(r7),this.isDirty=!1,this.children.forEach(e)}}function a7(n,e){const t=jr.now(),r=({timestamp:s})=>{const i=s-t;i>=e&&(Ho(r),n(i-e))};return Wt.setup(r,!0),()=>Ho(r)}function $g(n){return $n(n)?n.get():n}class i7{constructor(){this.members=[]}add(e){$1(this.members,e);for(let t=this.members.length-1;t>=0;t--){const r=this.members[t];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Zu(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Zu(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){var t;for(let r=this.members.indexOf(e)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((t=s.instance)==null?void 0:t.isConnected)!==!1)return this.promote(s),!0}return!1}promote(e,t){var s;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:l}=e.options;(i===void 0||i!==l)&&(e.resumeFrom=r,t&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(s=e.root)!=null&&s.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,r,s,i,l;(r=(t=e.options).onExitComplete)==null||r.call(t),(l=(s=e.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||l.call(i)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Kg={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Dv=["","X","Y","Z"],o7=1e3;let l7=0;function kv(n,e,t,r){const{latestValues:s}=e;s[n]&&(t[n]=s[n],e.setStaticValue(n,0),r&&(r[n]=0))}function oI(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:e}=n.options;if(!e)return;const t=Nk(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:i}=n.options;window.MotionCancelOptimisedAnimation(t,"transform",Wt,!(s||i))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&oI(r)}function lI({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},d=e==null?void 0:e()){this.id=l7++,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(d7),this.nodes.forEach(y7),this.nodes.forEach(x7),this.nodes.forEach(h7)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new s7)}addEventListener(l,d){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new W1),this.eventHandlers.get(l).add(d)}notifyListeners(l,...d){const h=this.eventHandlers.get(l);h&&h.notify(...d)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=Sy(l)&&!Mk(l),this.instance=l;const{layoutId:d,layout:h,visualElement:m}=this.options;if(m&&!m.current&&m.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||d)&&(this.isLayoutDirty=!0),n){let g,p=0;const b=()=>this.root.updateBlockedByResize=!1;Wt.read(()=>{p=window.innerWidth}),n(l,()=>{const w=window.innerWidth;w!==p&&(p=w,this.root.updateBlockedByResize=!0,g&&g(),g=a7(b,250),Kg.hasAnimatedSinceResize&&(Kg.hasAnimatedSinceResize=!1,this.nodes.forEach(Fj)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||h)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:p,hasRelativeLayoutChanged:b,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||m.getDefaultTransition()||T7,{onLayoutAnimationStart:N,onLayoutAnimationComplete:E}=m.getProps(),j=!this.targetLayout||!rI(this.targetLayout,w),P=!p&&b;if(this.options.layoutRoot||this.resumeFrom||P||p&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...i_(_,"layout"),onPlay:N,onComplete:E};(m.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(g,P)}else p||Fj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ho(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(b7),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&oI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const p=this.path[g];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:d,layout:h}=this.options;if(d===void 0&&!h)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(m7),this.nodes.forEach(Lj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Vj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(p7),this.nodes.forEach(g7),this.nodes.forEach(c7),this.nodes.forEach(u7)):this.nodes.forEach(Vj),this.clearAllSnapshots();const d=jr.now();dr.delta=Ya(0,1e3/60,d-dr.timestamp),dr.timestamp=d,dr.isProcessing=!0,_v.update.process(dr),_v.preRender.process(dr),_v.render.process(dr),dr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,f_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(f7),this.sharedNodes.forEach(v7)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ar(this.snapshot.measuredBox.x)&&!Ar(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 h=0;h<this.path.length;h++)this.path[h].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Bn()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(d=!1),d&&this.instance){const h=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:h,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!nI(this.projectionDelta),h=this.getTransformTemplate(),m=h?h(this.latestValues,""):void 0,g=m!==this.prevTransformTemplateValue;l&&this.instance&&(d||ql(this.latestValues)||g)&&(s(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const d=this.measurePageBox();let h=this.removeElementScroll(d);return l&&(h=this.removeTransform(h)),N7(h),{animationId:this.root.animationId,measuredBox:d,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){var m;const{visualElement:l}=this.options;if(!l)return Bn();const d=l.measureViewportBox();if(!(((m=this.scroll)==null?void 0:m.wasRoot)||this.path.some(E7))){const{scroll:g}=this.root;g&&(Da(d.x,g.offset.x),Da(d.y,g.offset.y))}return d}removeElementScroll(l){var h;const d=Bn();if(Gs(d,l),(h=this.scroll)!=null&&h.wasRoot)return d;for(let m=0;m<this.path.length;m++){const g=this.path[m],{scroll:p,options:b}=g;g!==this.root&&p&&b.layoutScroll&&(p.wasRoot&&Gs(d,l),Da(d.x,p.offset.x),Da(d.y,p.offset.y))}return d}applyTransform(l,d=!1,h){var g,p;const m=h||Bn();Gs(m,l);for(let b=0;b<this.path.length;b++){const w=this.path[b];!d&&w.options.layoutScroll&&w.scroll&&w!==w.root&&(Da(m.x,-w.scroll.offset.x),Da(m.y,-w.scroll.offset.y)),ql(w.latestValues)&&Gg(m,w.latestValues,(g=w.layout)==null?void 0:g.layoutBox)}return ql(this.latestValues)&&Gg(m,this.latestValues,(p=this.layout)==null?void 0:p.layoutBox),m}removeTransform(l){var h;const d=Bn();Gs(d,l);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!ql(g.latestValues))continue;let p;g.instance&&(Mw(g.latestValues)&&g.updateSnapshot(),p=Bn(),Gs(p,g.measurePageBox())),Aj(d,g.latestValues,(h=g.snapshot)==null?void 0:h.layoutBox,p)}return ql(this.latestValues)&&Aj(d,this.latestValues),d}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.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!==dr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var w;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==d;if(!(l||h&&this.isSharedProjectionDirty||this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:p}=this.options;if(!this.layout||!(g||p))return;this.resolvedRelativeTargetAt=dr.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Bn(),this.targetWithTransforms=Bn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$9(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Gs(this.target,this.layout.layoutBox),zk(this.target,this.targetDelta)):Gs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Mw(this.parent.latestValues)||Uk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,d,h){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bn(),this.relativeTargetOrigin=Bn(),R0(this.relativeTargetOrigin,d,h,this.options.layoutAnchor||void 0),Gs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var _;const l=this.getLead(),d=!!this.resumingFrom||this!==l;let h=!0;if((this.isProjectionDirty||(_=this.parent)!=null&&_.isProjectionDirty)&&(h=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===dr.timestamp&&(h=!1),h)return;const{layout:m,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||g))return;Gs(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;_9(this.layoutCorrected,this.treeScale,this.path,d),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Bn());const{target:w}=l;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_j(this.prevProjectionDelta.x,this.projectionDelta.x),_j(this.prevProjectionDelta.y,this.projectionDelta.y)),jf(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!Rj(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var d;if((d=this.options.visualElement)==null||d.scheduleRender(),l){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bu(),this.projectionDelta=Bu(),this.projectionDeltaWithTransform=Bu()}setAnimationOrigin(l,d=!1){const h=this.snapshot,m=h?h.latestValues:{},g={...this.latestValues},p=Bu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const b=Bn(),w=h?h.source:void 0,_=this.layout?this.layout.source:void 0,N=w!==_,E=this.getStack(),j=!E||E.members.length<=1,P=!!(N&&!j&&this.options.crossfade===!0&&!this.path.some(_7));this.animationProgress=0;let A;this.mixTargetDelta=M=>{const O=M/1e3;Bj(p.x,l.x,O),Bj(p.y,l.y,O),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(R0(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),w7(this.relativeTarget,this.relativeTargetOrigin,b,O),A&&X9(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=Bn()),Gs(A,this.relativeTarget)),N&&(this.animationValues=g,e7(g,m,this.latestValues,O,P,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var d,h,m;this.notifyListeners("animationStart"),(d=this.currentAnimation)==null||d.stop(),(m=(h=this.resumingFrom)==null?void 0:h.currentAnimation)==null||m.stop(),this.pendingAnimation&&(Ho(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wt.update(()=>{Kg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=mc(0)),this.motionValue.jump(0,!1),this.currentAnimation=iI(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),l.onUpdate&&l.onUpdate(g)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.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 l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(o7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:d,target:h,layout:m,latestValues:g}=l;if(!(!d||!h||!m)){if(this!==l&&this.layout&&m&&cI(this.options.animationType,this.layout.layoutBox,m.layoutBox)){h=this.target||Bn();const p=Ar(this.layout.layoutBox.x);h.x.min=l.target.x.min,h.x.max=h.x.min+p;const b=Ar(this.layout.layoutBox.y);h.y.min=l.target.y.min,h.y.max=h.y.min+b}Gs(d,h),Gg(d,g),jf(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(l,d){this.sharedNodes.has(l)||this.sharedNodes.set(l,new i7),this.sharedNodes.get(l).add(d);const m=d.options.initialPromotionConfig;d.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(d):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var d;const{layoutId:l}=this.options;return l?((d=this.getStack())==null?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:l}=this.options;return l?(d=this.getStack())==null?void 0:d.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:d,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),l&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let d=!1;const{latestValues:h}=l;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(d=!0),!d)return;const m={};h.z&&kv("z",l,m,this.animationValues);for(let g=0;g<Dv.length;g++)kv(`rotate${Dv[g]}`,l,m,this.animationValues),kv(`skew${Dv[g]}`,l,m,this.animationValues);l.render();for(const g in m)l.setStaticValue(g,m[g]),this.animationValues&&(this.animationValues[g]=m[g]);l.scheduleRender()}applyProjectionStyles(l,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=$g(d==null?void 0:d.pointerEvents)||"",l.transform=h?h(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=$g(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!ql(this.latestValues)&&(l.transform=h?h({},""):"none",this.hasProjected=!1);return}l.visibility="";const g=m.animationValues||m.latestValues;this.applyTransformsToTarget();let p=J9(this.projectionDeltaWithTransform,this.treeScale,g);h&&(p=h(g,p)),l.transform=p;const{x:b,y:w}=this.projectionDelta;l.transformOrigin=`${b.origin*100}% ${w.origin*100}% 0`,m.animationValues?l.opacity=m===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:l.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const _ in Ow){if(g[_]===void 0)continue;const{correct:N,applyTo:E,isCSSVariable:j}=Ow[_],P=p==="none"?g[_]:N(g[_],m);if(E){const A=E.length;for(let M=0;M<A;M++)l[E[M]]=P}else j?this.options.visualElement.renderState.vars[_]=P:l[_]=P}this.options.layoutId&&(l.pointerEvents=m===this?$g(d==null?void 0:d.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var d;return(d=l.currentAnimation)==null?void 0:d.stop()}),this.root.nodes.forEach(Lj),this.root.sharedNodes.clear()}}}function c7(n){n.updateLayout()}function u7(n){var t;const e=((t=n.resumeFrom)==null?void 0:t.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&e&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=n.layout,{animationType:i}=n.options,l=e.source!==n.layout.source;if(i==="size")ja(p=>{const b=l?e.measuredBox[p]:e.layoutBox[p],w=Ar(b);b.min=r[p].min,b.max=b.min+w});else if(i==="x"||i==="y"){const p=i==="x"?"y":"x";Lw(l?e.measuredBox[p]:e.layoutBox[p],r[p])}else cI(i,e.layoutBox,r)&&ja(p=>{const b=l?e.measuredBox[p]:e.layoutBox[p],w=Ar(r[p]);b.max=b.min+w,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[p].max=n.relativeTarget[p].min+w)});const d=Bu();jf(d,r,e.layoutBox);const h=Bu();l?jf(h,n.applyTransform(s,!0),e.measuredBox):jf(h,r,e.layoutBox);const m=!nI(d);let g=!1;if(!n.resumeFrom){const p=n.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:b,layout:w}=p;if(b&&w){const _=n.options.layoutAnchor||void 0,N=Bn();R0(N,e.layoutBox,b.layoutBox,_);const E=Bn();R0(E,r,w.layoutBox,_),rI(N,E)||(g=!0),p.options.layoutRoot&&(n.relativeTarget=E,n.relativeTargetOrigin=N,n.relativeParent=p)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:h,layoutDelta:d,hasLayoutChanged:m,hasRelativeLayoutChanged:g})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function d7(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function h7(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function f7(n){n.clearSnapshot()}function Lj(n){n.clearMeasurements()}function m7(n){n.isLayoutDirty=!0,n.updateLayout()}function Vj(n){n.isLayoutDirty=!1}
60function p7(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function g7(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function Fj(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function y7(n){n.resolveTargetDelta()}function x7(n){n.calcProjection()}function b7(n){n.resetSkewAndRotation()}function v7(n){n.removeLeadSnapshot()}function Bj(n,e,t){n.translate=Qt(e.translate,0,t),n.scale=Qt(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function Uj(n,e,t,r){n.min=Qt(e.min,t.min,r),n.max=Qt(e.max,t.max,r)}function w7(n,e,t,r){Uj(n.x,e.x,t.x,r),Uj(n.y,e.y,t.y,r)}function _7(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const T7={duration:.45,ease:[.4,0,.1,1]},zj=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),qj=zj("applewebkit/")&&!zj("chrome/")?Math.round:Ms;function Hj(n){n.min=qj(n.min),n.max=qj(n.max)}function N7(n){Hj(n.x),Hj(n.y)}function cI(n,e,t){return n==="position"||n==="preserve-aspect"&&!G9(Ij(e),Ij(t),.2)}function E7(n){var e;return n!==n.root&&((e=n.scroll)==null?void 0:e.wasRoot)}const S7=lI({attachResizeListener:(n,e)=>$f(n,"resize",e),measureScroll:()=>{var n,e;return{x:document.documentElement.scrollLeft||((n=document.body)==null?void 0:n.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Iv={current:void 0},uI=lI({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Iv.current){const n=new S7({});n.mount(window),n.setOptions({layoutScroll:!0}),Iv.current=n}return Iv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),b_=D.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function Yj(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function j7(...n){return e=>{let t=!1;const r=n.map(s=>{const i=Yj(s,e);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Yj(n[s],null)}}}}function A7(...n){return D.useCallback(j7(...n),n)}class C7 extends D.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(zg(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=t.offsetParent,s=zg(r)&&r.offsetWidth||0,i=zg(r)&&r.offsetHeight||0,l=getComputedStyle(t),d=this.props.sizeRef.current;d.height=parseFloat(l.height),d.width=parseFloat(l.width),d.top=t.offsetTop,d.left=t.offsetLeft,d.right=s-d.width-d.left,d.bottom=i-d.height-d.top}return null}componentDidUpdate(){}render(){return this.props.children}}function D7({children:n,isPresent:e,anchorX:t,anchorY:r,root:s,pop:i}){var b;const l=D.useId(),d=D.useRef(null),h=D.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:m}=D.useContext(b_),g=((b=n.props)==null?void 0:b.ref)??(n==null?void 0:n.ref),p=A7(d,g);return D.useInsertionEffect(()=>{const{width:w,height:_,top:N,left:E,right:j,bottom:P}=h.current;if(e||i===!1||!d.current||!w||!_)return;const A=t==="left"?`left: ${E}`:`right: ${j}`,M=r==="bottom"?`bottom: ${P}`:`top: ${N}`;d.current.dataset.motionPopId=l;const O=document.createElement("style");m&&(O.nonce=m);const q=s??document.head;return q.appendChild(O),O.sheet&&O.sheet.insertRule(`
61          [data-motion-pop-id="${l}"] {
62            position: absolute !important;
63            width: ${w}px !important;
64            height: ${_}px !important;
65            ${A}px !important;
66            ${M}px !important;
67          }
68        `),()=>{var L;(L=d.current)==null||L.removeAttribute("data-motion-pop-id"),q.contains(O)&&q.removeChild(O)}},[e]),c.jsx(C7,{isPresent:e,childRef:d,sizeRef:h,pop:i,children:i===!1?n:D.cloneElement(n,{ref:p})})}const k7=({children:n,initial:e,isPresent:t,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:l,anchorX:d,anchorY:h,root:m})=>{const g=G1(I7),p=D.useId();let b=!0,w=D.useMemo(()=>(b=!1,{id:p,initial:e,isPresent:t,custom:s,onExitComplete:_=>{g.set(_,!0);for(const N of g.values())if(!N)return;r&&r()},register:_=>(g.set(_,!1),()=>g.delete(_))}),[t,g,r]);return i&&b&&(w={...w}),D.useMemo(()=>{g.forEach((_,N)=>g.set(N,!1))},[t]),D.useEffect(()=>{!t&&!g.size&&r&&r()},[t]),n=c.jsx(D7,{pop:l==="popLayout",isPresent:t,anchorX:d,anchorY:h,root:m,children:n}),c.jsx(Ny.Provider,{value:w,children:n})};function I7(){return new Map}function dI(n=!0){const e=D.useContext(Ny);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:s}=e,i=D.useId();D.useEffect(()=>{if(n)return s(i)},[n]);const l=D.useCallback(()=>n&&r&&r(i),[i,r,n]);return!t&&r?[!1,l]:[!0]}const gg=n=>n.key||"";function Gj(n){const e=[];
vendor: 4,369 bytes, line 68
68return D.Children.forEach(n,t=>{D.isValidElement(t)&&e.push(t)}),e}const Cr=({children:n,custom:e,initial:t=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:l=!1,anchorX:d="left",anchorY:h="top",root:m})=>{const[g,p]=dI(l),b=D.useMemo(()=>Gj(n),[n]),w=l&&!g?[]:b.map(gg),_=D.useRef(!0),N=D.useRef(b),E=G1(()=>new Map),j=D.useRef(new Set),[P,A]=D.useState(b),[M,O]=D.useState(b);k5(()=>{_.current=!1,N.current=b;for(let k=0;k<M.length;k++){const I=gg(M[k]);w.includes(I)?(E.delete(I),j.current.delete(I)):E.get(I)!==!0&&E.set(I,!1)}},[M,w.length,w.join("-")]);const q=[];if(b!==P){let k=[...b];for(let I=0;I<M.length;I++){const R=M[I],F=gg(R);w.includes(F)||(k.splice(I,0,R),q.push(R))}return i==="wait"&&q.length&&(k=q),O(Gj(k)),A(b),null}const{forceRender:L}=D.useContext(Y1);return c.jsx(c.Fragment,{children:M.map(k=>{const I=gg(k),R=l&&!g?!1:b===M||w.includes(I),F=()=>{if(j.current.has(I))return;if(E.has(I))j.current.add(I),E.set(I,!0);else return;let B=!0;E.forEach(V=>{V||(B=!1)}),B&&(L==null||L(),O(N.current),l&&(p==null||p()),r&&r())};return c.jsx(k7,{isPresent:R,initial:!_.current||t?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:m,onExitComplete:R?void 0:F,anchorX:d,anchorY:h,children:k},I)})})},hI=D.createContext({strict:!1}),$j={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 Kj=!1;function R7(){if(Kj)return;const n={};for(const e in $j)n[e]={isEnabled:t=>$j[e].some(r=>!!t[r])};Lk(n),Kj=!0}function fI(){return R7(),b9()}function M7(n){const e=fI();for(const t in n)e[t]={...e[t],...n[t]};Lk(e)}const P7=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 M0(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||P7.has(n)}let mI=n=>!M0(n);function O7(n){typeof n=="function"&&(mI=e=>e.startsWith("on")?!M0(e):n(e))}try{O7(require("@emotion/is-prop-valid").default)}catch{}function L7(n,e,t){const r={};for(const s in n)s==="values"&&typeof n.values=="object"||$n(n[s])||(mI(s)||t===!0&&M0(s)||!e&&!M0(s)||n.draggable&&s.startsWith("onDrag"))&&(r[s]=n[s]);return r}const Cy=D.createContext({});function V7(n,e){if(Ay(n)){const{initial:t,animate:r}=n;return{initial:t===!1||Gf(t)?t:void 0,animate:Gf(r)?r:void 0}}return n.inherit!==!1?e:{}}function F7(n){const{initial:e,animate:t}=V7(n,D.useContext(Cy));return D.useMemo(()=>({initial:e,animate:t}),[Wj(e),Wj(t)])}function Wj(n){return Array.isArray(n)?n.join(" "):n}const v_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pI(n,e,t){for(const r in e)!$n(e[r])&&!Yk(r,t)&&(n[r]=e[r])}function B7({transformTemplate:n},e){return D.useMemo(()=>{const t=v_();return y_(t,e,n),Object.assign({},t.vars,t.style)},[e])}function U7(n,e){const t=n.style||{},r={};return pI(r,t,n),Object.assign(r,B7(n,e)),r}function z7(n,e){const t={},r=U7(n,e);return n.drag&&n.dragListener!==!1&&(t.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(t.tabIndex=0),t.style=r,t}const gI=()=>({...v_(),attrs:{}});function q7(n,e,t,r){const s=D.useMemo(()=>{const i=gI();return $k(i,e,Wk(r),n.transformTemplate,n.style),{...i.attrs,style:{...i.style}}},[e]);if(n.style){const i={};pI(i,n.style,n),s.style={...i,...s.style}}return s}const H7=["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"];
vendor: 26,954 bytes, line 68
68function w_(n){return typeof n!="string"||n.includes("-")?!1:!!(H7.indexOf(n)>-1||/[A-Z]/u.test(n))}function Y7(n,e,t,{latestValues:r},s,i=!1,l){const h=(l??w_(n)?q7:z7)(e,r,s,n),m=L7(e,typeof n=="string",i),g=n!==D.Fragment?{...m,...h,ref:t}:{},{children:p}=e,b=D.useMemo(()=>$n(p)?p.get():p,[p]);return D.createElement(n,{...g,children:b})}function G7({scrapeMotionValuesFromProps:n,createRenderState:e},t,r,s){return{latestValues:$7(t,r,s,n),renderState:e()}}function $7(n,e,t,r){const s={},i=r(n,{});for(const b in i)s[b]=$g(i[b]);let{initial:l,animate:d}=n;const h=Ay(n),m=Pk(n);e&&m&&!h&&n.inherit!==!1&&(l===void 0&&(l=e.initial),d===void 0&&(d=e.animate));let g=t?t.initial===!1:!1;g=g||l===!1;const p=g?d:l;if(p&&typeof p!="boolean"&&!jy(p)){const b=Array.isArray(p)?p:[p];for(let w=0;w<b.length;w++){const _=l_(n,b[w]);if(_){const{transitionEnd:N,transition:E,...j}=_;for(const P in j){let A=j[P];if(Array.isArray(A)){const M=g?A.length-1:0;A=A[M]}A!==null&&(s[P]=A)}for(const P in N)s[P]=N[P]}}}return s}const yI=n=>(e,t)=>{const r=D.useContext(Cy),s=D.useContext(Ny),i=()=>G7(n,e,r,s);return t?i():G1(i)},K7=yI({scrapeMotionValuesFromProps:x_,createRenderState:v_}),W7=yI({scrapeMotionValuesFromProps:Qk,createRenderState:gI}),Q7=Symbol.for("motionComponentSymbol");function X7(n,e,t){const r=D.useRef(t);D.useInsertionEffect(()=>{r.current=t});const s=D.useRef(null);return D.useCallback(i=>{var d;i&&((d=n.onMount)==null||d.call(n,i));const l=r.current;if(typeof l=="function")if(i){const h=l(i);typeof h=="function"&&(s.current=h)}else s.current?(s.current(),s.current=null):l(i);else l&&(l.current=i);e&&(i?e.mount(i):e.unmount())},[e])}const xI=D.createContext({});function Iu(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function J7(n,e,t,r,s,i){var A,M;const{visualElement:l}=D.useContext(Cy),d=D.useContext(hI),h=D.useContext(Ny),m=D.useContext(b_),g=m.reducedMotion,p=m.skipAnimations,b=D.useRef(null),w=D.useRef(!1);r=r||d.renderer,!b.current&&r&&(b.current=r(n,{visualState:e,parent:l,props:t,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:g,skipAnimations:p,isSVG:i}),w.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const _=b.current,N=D.useContext(xI);_&&!_.projection&&s&&(_.type==="html"||_.type==="svg")&&Z7(b.current,t,s,N);const E=D.useRef(!1);D.useInsertionEffect(()=>{_&&E.current&&_.update(t,h)});const j=t[Tk],P=D.useRef(!!j&&typeof window<"u"&&!((A=window.MotionHandoffIsComplete)!=null&&A.call(window,j))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,j)));return k5(()=>{w.current=!0,_&&(E.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),P.current&&_.animationState&&_.animationState.animateChanges())}),D.useEffect(()=>{_&&(!P.current&&_.animationState&&_.animationState.animateChanges(),P.current&&(queueMicrotask(()=>{var O;(O=window.MotionHandoffMarkAsComplete)==null||O.call(window,j)}),P.current=!1),_.enteringChildren=void 0)}),_}function Z7(n,e,t,r){const{layoutId:s,layout:i,drag:l,dragConstraints:d,layoutScroll:h,layoutRoot:m,layoutAnchor:g,layoutCrossfade:p}=e;n.projection=new t(n.latestValues,e["data-framer-portal-id"]?void 0:bI(n.parent)),n.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!l||d&&Iu(d),visualElement:n,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:p,layoutScroll:h,layoutRoot:m,layoutAnchor:g})}function bI(n){if(n)return n.options.allowProjection!==!1?n.projection:bI(n.parent)}function Rv(n,{forwardMotionProps:e=!1,type:t}={},r,s){r&&M7(r);const i=t?t==="svg":w_(n),l=i?W7:K7;function d(m,g){let p;const b={...D.useContext(b_),...m,layoutId:eF(m)},{isStatic:w}=b,_=F7(m),N=l(m,w);if(!w&&typeof window<"u"){tF();const E=nF(b);p=E.MeasureLayout,_.visualElement=J7(n,N,b,s,E.ProjectionNode,i)}return c.jsxs(Cy.Provider,{value:_,children:[p&&_.visualElement?c.jsx(p,{visualElement:_.visualElement,...b}):null,Y7(n,m,X7(N,_.visualElement,g),N,w,e,i)]})}d.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const h=D.forwardRef(d);return h[Q7]=n,h}function eF({layoutId:n}){const e=D.useContext(Y1).id;return e&&n!==void 0?e+"-"+n:n}function tF(n,e){D.useContext(hI).strict}function nF(n){const e=fI(),{drag:t,layout:r}=e;if(!t&&!r)return{};const s={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(n)||r!=null&&r.isEnabled(n)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function rF(n,e){if(typeof Proxy>"u")return Rv;const t=new Map,r=(i,l)=>Rv(i,l,n,e),s=(i,l)=>r(i,l);return new Proxy(s,{get:(i,l)=>l==="create"?r:(t.has(l)||t.set(l,Rv(l,void 0,n,e)),t.get(l))})}const sF=(n,e)=>e.isSVG??w_(n)?new Xk(e):new Gk(e,{allowProjection:n!==D.Fragment});class aF extends nl{constructor(e){super(e),e.animationState||(e.animationState=B9(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();jy(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let iF=0;class oF extends nl{constructor(){super(...arguments),this.id=iF++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){const{initial:l,custom:d}=this.node.getProps();if(typeof l=="string"){const h=ic(this.node,l,d);if(h){const{transition:m,transitionEnd:g,...p}=h;for(const b in p)(i=this.node.getValue(b))==null||i.jump(p[b])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);t&&!e&&s.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const lF={animation:{Feature:aF},exit:{Feature:oF}};function wm(n){return{point:{x:n.pageX,y:n.pageY}}}const cF=n=>e=>m_(e)&&n(e,wm(e));function Af(n,e,t,r){return $f(n,e,cF(t),r)}const vI=({current:n})=>n?n.ownerDocument.defaultView:null,Qj=(n,e)=>Math.abs(n-e);function uF(n,e){const t=Qj(n.x,e.x),r=Qj(n.y,e.y);return Math.sqrt(t**2+r**2)}const Xj=new Set(["auto","scroll"]);class wI{constructor(e,t,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:l=3,element:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=yg(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Mv(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,N=uF(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!N)return;const{point:E}=w,{timestamp:j}=dr;this.history.push({...E,timestamp:j});const{onStart:P,onMove:A}=this.handlers;_||(P&&P(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,w)},this.handlePointerMove=(w,_)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=_,this.lastMoveEventInfo=yg(_,this.transformPagePoint),Wt.update(this.updatePoint,!0)},this.handlePointerUp=(w,_)=>{this.end();const{onEnd:N,onSessionEnd:E,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=Mv(w.type==="pointercancel"?this.lastMoveEventInfo:yg(_,this.transformPagePoint),this.history);this.startEvent&&N&&N(w,P),E&&E(w,P)},!m_(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const h=wm(e),m=yg(h,this.transformPagePoint),{point:g}=m,{timestamp:p}=dr;this.history=[{...g,timestamp:p}];const{onSessionStart:b}=t;b&&b(e,Mv(m,this.history)),this.removeListeners=xm(Af(this.contextWindow,"pointermove",this.handlePointerMove),Af(this.contextWindow,"pointerup",this.handlePointerUp),Af(this.contextWindow,"pointercancel",this.handlePointerUp)),d&&this.startScrollTracking(d)}startScrollTracking(e){let t=e.parentElement;for(;t;){const r=getComputedStyle(t);(Xj.has(r.overflowX)||Xj.has(r.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-t.x,y:s.y-t.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),Wt.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ho(this.updatePoint)}}function yg(n,e){return e?{point:e(n.point)}:n}function Jj(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Mv({point:n},e){return{point:n,delta:Jj(n,_I(e)),offset:Jj(n,dF(e)),velocity:hF(e,.1)}}function dF(n){return n[0]}function _I(n){return n[n.length-1]}function hF(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,r=null;const s=_I(n);for(;t>=0&&(r=n[t],!(s.timestamp-r.timestamp>Wr(e)));)t--;if(!r)return{x:0,y:0};r===n[0]&&n.length>2&&s.timestamp-r.timestamp>Wr(e)*2&&(r=n[1]);const i=Rs(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const l={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function fF(n,{min:e,max:t},r){return e!==void 0&&n<e?n=r?Qt(e,n,r.min):Math.max(n,e):t!==void 0&&n>t&&(n=r?Qt(t,n,r.max):Math.min(n,t)),n}function Zj(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function mF(n,{top:e,left:t,bottom:r,right:s}){return{x:Zj(n.x,t,s),y:Zj(n.y,e,r)}}function eA(n,e){let t=e.min-n.min,r=e.max-n.max;return e.max-e.min<n.max-n.min&&([t,r]=[r,t]),{min:t,max:r}}function pF(n,e){return{x:eA(n.x,e.x),y:eA(n.y,e.y)}}function gF(n,e){let t=.5;const r=Ar(n),s=Ar(e);return s>r?t=ed(e.min,e.max-r,n.min):r>s&&(t=ed(n.min,n.max-s,e.min)),Ya(0,1,t)}function yF(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const Vw=.35;function xF(n=Vw){return n===!1?n=0:n===!0&&(n=Vw),{x:tA(n,"left","right"),y:tA(n,"top","bottom")}}function tA(n,e,t){return{min:nA(n,e),max:nA(n,t)}}function nA(n,e){return typeof n=="number"?n:n[e]||0}const bF=new WeakMap;class vF{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Bn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=p=>{t&&this.snapToCursor(wm(p).point),this.stopAnimation()},l=(p,b)=>{const{drag:w,dragPropagation:_,onDragStart:N}=this.getProps();if(w&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=X8(w),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ja(j=>{let P=this.getAxisMotionValue(j).get()||0;if(Fa.test(P)){const{projection:A}=this.visualElement;if(A&&A.layout){const M=A.layout.layoutBox[j];M&&(P=Ar(M)*(parseFloat(P)/100))}}this.originPoint[j]=P}),N&&Wt.update(()=>N(p,b),!1,!0),Cw(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},d=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b;const{dragPropagation:w,dragDirectionLock:_,onDirectionLock:N,onDrag:E}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:j}=b;if(_&&this.currentDirection===null){this.currentDirection=_F(j),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",b.point,j),this.updateAxis("y",b.point,j),this.visualElement.render(),E&&Wt.update(()=>E(p,b),!1,!0)},h=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b,this.stop(p,b),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:g}=this.getProps();this.panSession=new wI(e,{onSessionStart:i,onStart:l,onMove:d,onSessionEnd:h,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:r,contextWindow:vI(this.visualElement),element:this.visualElement.current})}stop(e,t){const r=e||this.latestPointerEvent,s=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:l}=s;this.startAnimation(l);const{onDragEnd:d}=this.getProps();d&&Wt.postRender(()=>d(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,r){const{drag:s}=this.getProps();if(!r||!xg(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let l=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(l=fF(l,this.constraints[e],this.elastic[e])),i.set(l)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;e&&Iu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=mF(r.layoutBox,e):this.constraints=!1,this.elastic=xF(t),s!==this.constraints&&!Iu(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&ja(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=yF(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Iu(e))return!1;const r=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=T9(r,s.root,this.visualElement.getTransformPagePoint());let l=pF(s.layout.layoutBox,i);if(t){const d=t(v9(l));this.hasMutatedConstraints=!!d,d&&(l=Bk(d))}return l}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:l,onDragTransitionEnd:d}=this.getProps(),h=this.constraints||{},m=ja(g=>{if(!xg(g,t,this.currentDirection))return;let p=h&&h[g]||{};(l===!0||l===g)&&(p={min:0,max:0});const b=s?200:1e6,w=s?40:1e7,_={type:"inertia",velocity:r?e[g]:0,bounceStiffness:b,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(g,_)});return Promise.all(m).then(d)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return Cw(this.visualElement,e),r.start(o_(e,r,0,t,this.visualElement,!1))}stopAnimation(){ja(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),s=r[t];return s||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ja(t=>{const{drag:r}=this.getProps();if(!xg(t,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(t);if(s&&s.layout){const{min:l,max:d}=s.layout.layoutBox[t],h=i.get()||0;i.set(e[t]-Qt(l,d,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!Iu(t)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ja(l=>{const d=this.getAxisMotionValue(l);if(d&&this.constraints!==!1){const h=d.get();s[l]=gF({min:h,max:h},this.constraints[l])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ja(l=>{if(!xg(l,e,null))return;const d=this.getAxisMotionValue(l),{min:h,max:m}=this.constraints[l];d.set(Qt(h,m,s[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bF.set(this.visualElement,this);const e=this.visualElement.current,t=Af(e,"pointerdown",m=>{const{drag:g,dragListener:p=!0}=this.getProps(),b=m.target,w=b!==e&&r9(b);g&&p&&!w&&this.start(m)});let r;const s=()=>{const{dragConstraints:m}=this.getProps();Iu(m)&&m.current&&(this.constraints=this.resolveRefConstraints(),r||(r=wF(e,m.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,l=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Wt.read(s);const d=$f(window,"resize",()=>this.scalePositionWithinConstraints()),h=i.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(ja(p=>{const b=this.getAxisMotionValue(p);b&&(this.originPoint[p]+=m[p].translate,b.set(b.get()+m[p].translate))}),this.visualElement.render())}));return()=>{d(),t(),l(),h&&h(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:l=Vw,dragMomentum:d=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:l,dragMomentum:d}}}function rA(n){let e=!0;return()=>{if(e){e=!1;return}n()}}function wF(n,e,t){const r=uj(n,rA(t)),s=uj(e,rA(t));return()=>{r(),s()}}function xg(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function _F(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class TF extends nl{constructor(e){super(e),this.removeGroupControls=Ms,this.removeListeners=Ms,this.controls=new vF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ms}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Pv=n=>(e,t)=>{n&&Wt.update(()=>n(e,t),!1,!0)};class NF extends nl{constructor(){super(...arguments),this.removePointerDownListener=Ms}onPointerDown(e){this.session=new wI(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vI(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Pv(e),onStart:Pv(t),onMove:Pv(r),onEnd:(i,l)=>{delete this.session,s&&Wt.postRender(()=>s(i,l))}}}mount(){this.removePointerDownListener=Af(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ov=!1;class EF extends D.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),r&&r.register&&s&&r.register(i),Ov&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Kg.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:s,isPresent:i}=this.props,{projection:l}=r;return l&&(l.isPresent=i,e.layoutDependency!==t&&l.setOptions({...l.options,layoutDependency:t}),Ov=!0,s||e.layoutDependency!==t||t===void 0||e.isPresent!==i?l.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?l.promote():l.relegate()||Wt.postRender(()=>{const d=l.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=t,r.root.didUpdate(),f_.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:s}=e;Ov=!0,s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function TI(n){const[e,t]=dI(),r=D.useContext(Y1);return c.jsx(EF,{...n,layoutGroup:r,switchLayoutGroup:D.useContext(xI),isPresent:e,safeToRemove:t})}const SF={pan:{Feature:NF},drag:{Feature:TF,ProjectionNode:uI,MeasureLayout:TI}};function sA(n,e,t){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",t==="Start");const s="onHover"+t,i=r[s];i&&Wt.postRender(()=>i(e,wm(e)))}class jF extends nl{mount(){const{current:e}=this.node;e&&(this.unmount=Z8(e,(t,r)=>(sA(this.node,r,"Start"),s=>sA(this.node,s,"End"))))}unmount(){}}class AF extends nl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=xm($f(this.node.current,"focus",()=>this.onFocus()),$f(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function aA(n,e,t){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",t==="Start");const s="onTap"+(t==="End"?"":t),i=r[s];i&&Wt.postRender(()=>i(e,wm(e)))}class CF extends nl{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=a9(e,(s,i)=>(aA(this.node,i,"Start"),(l,{success:d})=>aA(this.node,l,d?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Fw=new WeakMap,Lv=new WeakMap,DF=n=>{const e=Fw.get(n.target);e&&e(n)},kF=n=>{n.forEach(DF)};function IF({root:n,...e}){const t=n||document;Lv.has(t)||Lv.set(t,{});const r=Lv.get(t),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(kF,{root:n,...e})),r[s]}function RF(n,e,t){const r=IF(e);return Fw.set(n,t),r.observe(n),()=>{Fw.delete(n),r.unobserve(n)}}const MF={some:0,all:1};class PF extends nl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var h;(h=this.stopObserver)==null||h.call(this);const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:s="some",once:i}=e,l={root:t?t.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:MF[s]},d=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,i&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:p,onViewportLeave:b}=this.node.getProps(),w=g?p:b;w&&w(m)};this.stopObserver=RF(this.node.current,l,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(OF(e,t))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function OF({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const LF={inView:{Feature:PF},tap:{Feature:CF},focus:{Feature:AF},hover:{Feature:jF}},VF={layout:{ProjectionNode:uI,MeasureLayout:TI}},FF={...lF,...LF,...SF,...VF},Ge=rF(FF,sF);function __(n){return typeof n=="object"&&!Array.isArray(n)}function NI(n,e,t,r){return n==null?[]:typeof n=="string"&&__(e)?h_(n,t,r):n instanceof NodeList?Array.from(n):Array.isArray(n)?n.filter(s=>s!=null):[n]}function BF(n,e,t){return n*(e+1)}function iA(n,e,t,r){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,n+parseFloat(e)):e==="<"?t:e.startsWith("<")?Math.max(0,t+parseFloat(e.slice(1))):r.get(e)??n}function UF(n,e,t){for(let r=0;r<n.length;r++){const s=n[r];s.at>e&&s.at<t&&(Zu(n,s),r--)}}function zF(n,e,t,r,s,i){UF(n,s,i);for(let l=0;l<e.length;l++)n.push({value:e[l],at:Qt(s,i,r[l]),easing:$5(t,l)})}function qF(n,e){for(let t=0;t<n.length;t++)n[t]=n[t]/(e+1)}function HF(n,e){return n.at===e.at?n.value===null?1:e.value===null?-1:0:n.at-e.at}const YF="easeInOut";function GF(n,{defaultTransition:e={},...t}={},r,s){const i=e.duration||.3,l=new Map,d=new Map,h={},m=new Map;let g=0,p=0,b=0;for(let w=0;w<n.length;w++){const _=n[w];if(typeof _=="string"){m.set(_,p);continue}else if(!Array.isArray(_)){m.set(_.name,iA(p,_.at,g,m));continue}let[N,E,j={}]=_;j.at!==void 0&&(p=iA(p,j.at,g,m));let P=0;const A=(M,O,q,L=0,k=0)=>{const I=$F(M),{delay:R=0,times:F=lk(I),type:B=e.type||"keyframes",repeat:V,repeatType:se,repeatDelay:ye=0,...W}=O;let{ease:$=e.ease||"easeOut",duration:X}=O;const be=typeof R=="function"?R(L,k):R,Oe=I.length,H=a_(B)?B:s==null?void 0:s[B||"keyframes"];if(Oe<=2&&H){let Be=100;if(Oe===2&&QF(I)){const wt=I[1]-I[0];Be=Math.abs(wt)}const $e={...e,...W};X!==void 0&&($e.duration=Wr(X));const Je=ak($e,Be,H);$=Je.ease,X=Je.duration}X??(X=i);const he=p+be;F.length===1&&F[0]===0&&(F[1]=1);const we=F.length-I.length;if(we>0&&ok(F,we),I.length===1&&I.unshift(null),V){X=BF(X,V);const Be=[...I],$e=[...F];$=Array.isArray($)?[...$]:[$];const Je=[...$];for(let wt=0;wt<V;wt++){I.push(...Be);for(let at=0;at<Be.length;at++)F.push($e[at]+(wt+1)),$.push(at===0?"linear":$5(Je,at-1))}qF(F,V)}const Se=he+X;zF(q,I,$,F,he,Se),P=Math.max(be+X,P),b=Math.max(Se,b)};if($n(N)){const M=oA(N,d);A(E,j,lA("default",M))}else{const M=NI(N,E,r,h),O=M.length;for(let q=0;q<O;q++){E=E,j=j;const L=M[q],k=oA(L,d);for(const I in E)A(E[I],KF(j,I),lA(I,k),q,O)}}g=p,p+=P}return d.forEach((w,_)=>{for(const N in w){const E=w[N];E.sort(HF);const j=[],P=[],A=[];for(let L=0;L<E.length;
68L++){const{at:k,value:I,easing:R}=E[L];j.push(I),P.push(ed(0,b,k)),A.push(R||"easeOut")}P[0]!==0&&(P.unshift(0),j.unshift(j[0]),A.unshift(YF)),P[P.length-1]!==1&&(P.push(1),j.push(null)),l.has(_)||l.set(_,{keyframes:{},transition:{}});const M=l.get(_);M.keyframes[N]=j;const{type:O,...q}=e;M.transition[N]={...q,duration:b,ease:A,times:P,...t}}}),l}function oA(n,e){return!e.has(n)&&e.set(n,{}),e.get(n)}function lA(n,e){return e[n]||(e[n]=[]),e[n]}function $F(n){return Array.isArray(n)?n:[n]}function KF(n,e){return n&&n[e]?{...n,...n[e]}:{...n}}const WF=n=>typeof n=="number",QF=n=>n.every(WF);function XF(n){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},t=Sy(n)&&!Mk(n)?new Xk(e):new Gk(e);t.mount(n),Yf.set(n,t)}function JF(n){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},t=new D9(e);t.mount(n),Yf.set(n,t)}function ZF(n,e){return $n(n)||typeof n=="number"||typeof n=="string"&&!__(e)}function EI(n,e,t,r){const s=[];if(ZF(n,e))s.push(iI(n,__(e)&&e.default||e,t&&(t.default||t)));else{if(n==null)return s;const i=NI(n,e,r),l=i.length;for(let d=0;d<l;d++){const h=i[d],m=h instanceof Element?XF:JF;Yf.has(h)||m(h);const g=Yf.get(h),p={...t};"delay"in p&&typeof p.delay=="function"&&(p.delay=p.delay(d,l)),s.push(...u_(g,{...e,transition:p},{}))}}return s}function eB(n,e,t){const r=[],s=n.map(l=>{if(Array.isArray(l)&&typeof l[0]=="function"){const d=l[0],h=mc(0);return h.on("change",d),l.length===1?[h,[0,1]]:l.length===2?[h,[0,1],l[1]]:[h,l[1],l[2]]}return l});return GF(s,e,t,{spring:Hf}).forEach(({keyframes:l,transition:d},h)=>{r.push(...EI(h,l,d))}),r}function tB(n){return Array.isArray(n)&&n.some(Array.isArray)}function nB(n={}){const{scope:e,reduceMotion:t}=n;function r(s,i,l){let d=[],h;if(tB(s)){const{onComplete:g,...p}=i||{};typeof g=="function"&&(h=g),d=eB(s,t!==void 0?{reduceMotion:t,...p}:p,e)}else{const{onComplete:g,...p}=l||{};typeof g=="function"&&(h=g),d=EI(s,i,t!==void 0?{reduceMotion:t,...p}:p,e)}const m=new v8(d);return h&&m.finished.then(h),e&&(e.animations.push(m),m.finished.then(()=>{Zu(e.animations,m)})),m}return r}const rB=nB();/**
69 * @license lucide-react v0.546.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const sB=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aB=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),cA=n=>{const e=aB(n);return e.charAt(0).toUpperCase()+e.slice(1)},SI=(...n)=>n.filter((e,t,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===t).join(" ").trim(),iB=n=>{for(const e in n)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
74 * @license lucide-react v0.546.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */var oB={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"};/**
79 * @license lucide-react v0.546.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const lB=D.forwardRef(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:l,...d},h)=>D.createElement("svg",{ref:h,...oB,width:e,height:e,stroke:n,strokeWidth:r?Number(t)*24/Number(e):t,className:SI("lucide",s),...!i&&!iB(d)&&{"aria-hidden":"true"},...d},[...l.map(([m,g])=>D.createElement(m,g)),...Array.isArray(i)?i:[i]]));/**
84 * @license lucide-react v0.546.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const Ce=(n,e)=>{const t=D.forwardRef(({className:r,...s},i)=>D.createElement(lB,{ref:i,iconNode:e,className:SI(`lucide-${sB(cA(n))}`,`lucide-${n}`,r),...s}));return t.displayName=cA(n),t};/**
89 * @license lucide-react v0.546.0 - ISC
90 *
91 * This source code is licensed under the ISC license.
92 * See the LICENSE file in the root directory of this source tree.
93 */const cB=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
93-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],uB=Ce("activity",cB);/**
94 * @license lucide-react v0.546.0 - ISC
95 *
96 * This source code is licensed under the ISC license.
97 * See the LICENSE file in the root directory of this source tree.
98 */const dB=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],uA=Ce("arrow-down",dB);/**
99 * @license lucide-react v0.546.0 - ISC
100 *
101 * This source code is licensed under the ISC license.
102 * See the LICENSE file in the root directory of this source tree.
103 */const hB=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],fB=Ce("arrow-left",hB);/**
104 * @license lucide-react v0.546.0 - ISC
105 *
106 * This source code is licensed under the ISC license.
107 * See the LICENSE file in the root directory of this source tree.
108 */const mB=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],nd=Ce("arrow-right",mB);/**
109 * @license lucide-react v0.546.0 - ISC
110 *
111 * This source code is licensed under the ISC license.
112 * See the LICENSE file in the root directory of this source tree.
113 */const pB=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],gB=Ce("arrow-up-down",pB);/**
114 * @license lucide-react v0.546.0 - ISC
115 *
116 * This source code is licensed under the ISC license.
117 * See the LICENSE file in the root directory of this source tree.
118 */const yB=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],dA=Ce("arrow-up-right",yB);/**
119 * @license lucide-react v0.546.0 - ISC
120 *
121 * This source code is licensed under the ISC license.
122 * See the LICENSE file in the root directory of this source tree.
123 */const xB=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Bw=Ce("arrow-up",xB);/**
124 * @license lucide-react v0.546.0 - ISC
125 *
126 * This source code is licensed under the ISC license.
127 * See the LICENSE file in the root directory of this source tree.
128 */const bB=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],oc=Ce("award",bB);/**
129 * @license lucide-react v0.546.0 - ISC
130 *
131 * This source code is licensed under the ISC license.
132 * See the LICENSE file in the root directory of this source tree.
133 */const vB=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Kf=Ce("book-open",vB);/**
134 * @license lucide-react v0.546.0 - ISC
135 *
136 * This source code is licensed under the ISC license.
137 * See the LICENSE file in the root directory of this source tree.
138 */const wB=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],_B=Ce("boxes",wB);/**
139 * @license lucide-react v0.546.0 - ISC
140 *
141 * This source code is licensed under the ISC license.
142 * See the LICENSE file in the root directory of this source tree.
143 */const TB=[["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"}]],NB=Ce("briefcase",TB);/**
144 * @license lucide-react v0.546.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const EB=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}
148],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Uw=Ce("building-2",EB);/**
149 * @license lucide-react v0.546.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const SB=[["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"}]],Wf=Ce("calendar",SB);/**
154 * @license lucide-react v0.546.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const jB=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],bg=Ce("check",jB);/**
159 * @license lucide-react v0.546.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const AB=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qf=Ce("chevron-down",AB);/**
164 * @license lucide-react v0.546.0 - ISC
165 *
166 * This source code is licensed under the ISC license.
167 * See the LICENSE file in the root directory of this source tree.
168 */const CB=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],zw=Ce("chevron-left",CB);/**
169 * @license lucide-react v0.546.0 - ISC
170 *
171 * This source code is licensed under the ISC license.
172 * See the LICENSE file in the root directory of this source tree.
173 */const DB=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wg=Ce("chevron-right",DB);/**
174 * @license lucide-react v0.546.0 - ISC
175 *
176 * This source code is licensed under the ISC license.
177 * See the LICENSE file in the root directory of this source tree.
178 */const kB=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Xf=Ce("chevron-up",kB);/**
179 * @license lucide-react v0.546.0 - ISC
180 *
181 * This source code is licensed under the ISC license.
182 * See the LICENSE file in the root directory of this source tree.
183 */const IB=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],RB=Ce("circle-check-big",IB);/**
184 * @license lucide-react v0.546.0 - ISC
185 *
186 * This source code is licensed under the ISC license.
187 * See the LICENSE file in the root directory of this source tree.
188 */const MB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],T_=Ce("circle-question-mark",MB);/**
189 * @license lucide-react v0.546.0 - ISC
190 *
191 * This source code is licensed under the ISC license.
192 * See the LICENSE file in the root directory of this source tree.
193 */const PB=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qw=Ce("clock",PB);/**
194 * @license lucide-react v0.546.0 - ISC
195 *
196 * This source code is licensed under the ISC license.
197 * See the LICENSE file in the root directory of this source tree.
198 */const OB=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],vg=Ce("coins",OB);/**
199 * @license lucide-react v0.546.0 - ISC
200 *
201 * This source code is licensed under the ISC license.
202 * See the LICENSE file in the root directory of this source tree.
203 */const LB=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],hA=Ce("copy",LB);/**
204 * @license lucide-react v0.546.0 - ISC
205 *
206 * This source code is licensed under the ISC license.
207 * See the LICENSE file in the root directory of this source tree.
208 */const VB=[["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"}]],FB=Ce("crown",VB);/**
209 * @license lucide-react v0.546.0 - ISC
210 *
211 * This source code is licensed under the ISC license.
212 * See the LICENSE file in the root directory of this source tree.
213 */const BB=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],N_=Ce("download",BB);/**
214 * @license lucide-react v0.546.0 - ISC
215 *
216 * This source code is licensed under the ISC license.
217 * See the LICENSE file in the root directory of this source tree.
218 */const UB=[["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"}]],P0=Ce("external-link",UB);/**
219 * @license lucide-react v0.546.0 - ISC
220 *
221 * This source code is licensed under the ISC license.
222 * See the LICENSE file in the root directory of this source tree.
223 */const zB=[["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"}]],qB=Ce("eye-off",zB);/**
224 * @license lucide-react v0.546.0 - ISC
225 *
226 * This source code is licensed under the ISC license.
227 * See the LICENSE file in the root directory of this source tree.
228 */const HB=[["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"}]],YB=Ce("eye",HB);/**
229 * @license lucide-react v0.546.0 - ISC
230 *
231 * This source code is licensed under the ISC license.
232 * See the LICENSE file in the root directory of this source tree.
233 */const GB=[["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:"m9 15 2 2 4-4",key:"1grp1n"}]],$B=Ce("file-check",GB);/**
234 * @license lucide-react v0.546.0 - ISC
235 *
236 * This source code is licensed under the ISC license.
237 * See the LICENSE file in the root directory of this source tree.
238 */const KB=[["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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],jI=Ce("file-json",KB);/**
239 * @license lucide-react v0.546.0 - ISC
240 *
241 * This source code is licensed under the ISC license.
242 * See the LICENSE file in the root directory of this source tree.
243 */const WB=[["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"}]],Dy=Ce("file-text",WB);/**
244 * @license lucide-react v0.546.0 - ISC
245 *
246 * This source code is licensed under the ISC license.
247 * See the LICENSE file in the root directory of this source tree.
248 */const QB=[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]],XB=Ce("gem",QB);/**
249 * @license lucide-react v0.546.0 - ISC
250 *
251 * This source code is licensed under the ISC license.
252 * See the LICENSE file in the root directory of this source tree.
253 */const JB=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],ZB=Ce("graduation-cap",JB);/**
254 * @license lucide-react v0.546.0 - ISC
255 *
256 * This source code is licensed under the ISC license.
257 * See the LICENSE file in the root directory of this source tree.
258 */const eU=[["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"}]],fA=Ce("grip-vertical",eU);/**
259 * @license lucide-react v0.546.0 - ISC
260 *
261 * This source code is licensed under the ISC license.
262 * See the LICENSE file in the root directory of this source tree.
263 */const tU=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],mA=Ce("history",tU);/**
264 * @license lucide-react v0.546.0 - ISC
265 *
266 * This source code is licensed under the ISC license.
267 * See the LICENSE file in the root directory of this source tree.
268 */const nU=[["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-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],rU=Ce("house",nU);/**
269 * @license lucide-react v0.546.0 - ISC
270 *
271 * This source code is licensed under the ISC license.
272 * See the LICENSE file in the root directory of this source tree.
273 */const sU=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],En=Ce("image-plus",sU);/**
274 * @license lucide-react v0.546.0 - ISC
275 *
276 * This source code is licensed under the ISC license.
277 * See the LICENSE file in the root directory of this source tree.
278 */const aU=[["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"}]],AI=Ce("image",aU);/**
279 * @license lucide-react v0.546.0 - ISC
280 *
281 * This source code is licensed under the ISC license.
282 * See the LICENSE file in the root directory of this source tree.
283 */const iU=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],oU=Ce("inbox",iU);/**
284 * @license lucide-react v0.546.0 - ISC
285 *
286 * This source code is licensed under the ISC license.
287 * See the LICENSE file in the root directory of this source tree.
288 */const lU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Hw=Ce("info",lU);/**
289 * @license lucide-react v0.546.0 - ISC
290 *
291 * This source code is licensed under the ISC license.
292 * See the LICENSE file in the root directory of this source tree.
293 */const cU=[["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"}]],uU=Ce("key",cU);/**
294 * @license lucide-react v0.546.0 - ISC
295 *
296 * This source code is licensed under the ISC license.
297 * See the LICENSE file in the root directory of this source tree.
298 */const dU=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],hU=Ce("landmark",dU);/**
299 * @license lucide-react v0.546.0 - ISC
300 *
301 * This source code is licensed under the ISC license.
302 * See the LICENSE file in the root directory of this source tree.
303 */const fU=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],mU=Ce("layers",fU);/**
304 * @license lucide-react v0.546.0 - ISC
305 *
306 * This source code is licensed under the ISC license.
307 * See the LICENSE file in the root directory of this source tree.
308 */const pU=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],CI=Ce("leaf",pU);/**
309 * @license lucide-react v0.546.0 - ISC
310 *
311 * This source code is licensed under the ISC license.
312 * See the LICENSE file in the root directory of this source tree.
313 */const gU=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],No=Ce("loader-circle",gU);/**
314 * @license lucide-react v0.546.0 - ISC
315 *
316 * This source code is licensed under the ISC license.
317 * See the LICENSE file in the root directory of this source tree.
318 */const yU=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],xU=Ce("log-out",yU);/**
319 * @license lucide-react v0.546.0 - ISC
320 *
321 * This source code is licensed under the ISC license.
322 * See the LICENSE file in the root directory of this source tree.
323 */const bU=[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]],vU=Ce("mail-warning",bU);/**
324 * @license lucide-react v0.546.0 - ISC
325 *
326 * This source code is licensed under the ISC license.
327 * See the LICENSE file in the root directory of this source tree.
328 */const wU=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Yw=Ce("mail",wU);/**
329 * @license lucide-react v0.546.0 - ISC
330 *
331 * This source code is licensed under the ISC license.
332 * See the LICENSE file in the root directory of this source tree.
333 */const _U=[["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"}]],Cf=Ce("map-pin",_U);/**
334 * @license lucide-react v0.546.0 - ISC
335 *
336 * This source code is licensed under the ISC license.
337 * See the LICENSE file in the root directory of this source tree.
338 */const TU=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],pA=Ce("map",TU);/**
339 * @license lucide-react v0.546.0 - ISC
340 *
341 * This source code is licensed under the ISC license.
342 * See the LICENSE file in the root directory of this source tree.
343 */const NU=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],EU=Ce("menu",NU);/**
344 * @license lucide-react v0.546.0 - ISC
345 *
346 * This source code is licensed under the ISC license.
347 * See the LICENSE file in the root directory of this source tree.
348 */const SU=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],DI=Ce("message-circle",SU);/**
349 * @license lucide-react v0.546.0 - ISC
350 *
351 * This source code is licensed under the ISC license.
352 * See the LICENSE file in the root directory of this source tree.
353 */const jU=[["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"}]],AU=Ce("monitor",jU);/**
354 * @license lucide-react v0.546.0 - ISC
355 *
356 * This source code is licensed under the ISC license.
357 * See the LICENSE file in the root directory of this source tree.
358 */const CU=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:
358"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]],gA=Ce("move",CU);/**
359 * @license lucide-react v0.546.0 - ISC
360 *
361 * This source code is licensed under the ISC license.
362 * See the LICENSE file in the root directory of this source tree.
363 */const DU=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],kU=Ce("newspaper",DU);/**
364 * @license lucide-react v0.546.0 - ISC
365 *
366 * This source code is licensed under the ISC license.
367 * See the LICENSE file in the root directory of this source tree.
368 */const IU=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],E_=Ce("palette",IU);/**
369 * @license lucide-react v0.546.0 - ISC
370 *
371 * This source code is licensed under the ISC license.
372 * See the LICENSE file in the root directory of this source tree.
373 */const RU=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],kI=Ce("pen-line",RU);/**
374 * @license lucide-react v0.546.0 - ISC
375 *
376 * This source code is licensed under the ISC license.
377 * See the LICENSE file in the root directory of this source tree.
378 */const MU=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],PU=Ce("phone",MU);/**
379 * @license lucide-react v0.546.0 - ISC
380 *
381 * This source code is licensed under the ISC license.
382 * See the LICENSE file in the root directory of this source tree.
383 */const OU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Is=Ce("plus",OU);/**
384 * @license lucide-react v0.546.0 - ISC
385 *
386 * This source code is licensed under the ISC license.
387 * See the LICENSE file in the root directory of this source tree.
388 */const LU=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],VU=Ce("qr-code",LU);/**
389 * @license lucide-react v0.546.0 - ISC
390 *
391 * This source code is licensed under the ISC license.
392 * See the LICENSE file in the root directory of this source tree.
393 */const FU=[["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"}]],yA=Ce("refresh-cw",FU);/**
394 * @license lucide-react v0.546.0 - ISC
395 *
396 * This source code is licensed under the ISC license.
397 * See the LICENSE file in the root directory of this source tree.
398 */const BU=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],UU=Ce("rotate-ccw",BU);/**
399 * @license lucide-react v0.546.0 - ISC
400 *
401 * This source code is licensed under the ISC license.
402 * See the LICENSE file in the root directory of this source tree.
403 */const zU=[["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"}]],Vv=Ce("save",zU);/**
404 * @license lucide-react v0.546.0 - ISC
405 *
406 * This source code is licensed under the ISC license.
407 * See the LICENSE file in the root directory of this source tree.
408 */const qU=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Yo=Ce("search",qU);/**
409 * @license lucide-react v0.546.0 - ISC
410 *
411 * This source code is licensed under the ISC license.
412 * See the LICENSE file in the root directory of this source tree.
413 */const HU=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],II=Ce("send",HU);/**
414 * @license lucide-react v0.546.0 - ISC
415 *
416 * This source code is licensed under the ISC license.
417 * See the LICENSE file in the root directory of this source tree.
418 */const YU=[["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
418y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],zu=Ce("shield-check",YU);/**
419 * @license lucide-react v0.546.0 - ISC
420 *
421 * This source code is licensed under the ISC license.
422 * See the LICENSE file in the root directory of this source tree.
423 */const GU=[["path",{d:"M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3",key:"1dgpiv"}],["path",{d:"M2 16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z",key:"xacw8m"}],["path",{d:"M4 18v2",key:"jwo5n2"}],["path",{d:"M20 18v2",key:"1ar1qi"}],["path",{d:"M12 4v9",key:"oqhhn3"}]],$U=Ce("sofa",GU);/**
424 * @license lucide-react v0.546.0 - ISC
425 *
426 * This source code is licensed under the ISC license.
427 * See the LICENSE file in the root directory of this source tree.
428 */const KU=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
428],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],S_=Ce("sparkles",KU);/**
429 * @license lucide-react v0.546.0 - ISC
430 *
431 * This source code is licensed under the ISC license.
432 * See the LICENSE file in the root directory of this source tree.
433 */const WU=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],QU=Ce("store",WU);/**
434 * @license lucide-react v0.546.0 - ISC
435 *
436 * This source code is licensed under the ISC license.
437 * See the LICENSE file in the root directory of this source tree.
438 */const XU=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sn=Ce("trash-2",XU);/**
439 * @license lucide-react v0.546.0 - ISC
440 *
441 * This source code is licensed under the ISC license.
442 * See the LICENSE file in the root directory of this source tree.
443 */const JU=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],RI=Ce("trash",JU);/**
444 * @license lucide-react v0.546.0 - ISC
445 *
446 * This source code is licensed under the ISC license.
447 * See the LICENSE file in the root directory of this source tree.
448 */const ZU=[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]],ez=Ce("trees",ZU);/**
449 * @license lucide-react v0.546.0 - ISC
450 *
451 * This source code is licensed under the ISC license.
452 * See the LICENSE file in the root directory of this source tree.
453 */const tz=[["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"}]],xA=Ce("triangle-alert",tz);/**
454 * @license lucide-react v0.546.0 - ISC
455 *
456 * This source code is licensed under the ISC license.
457 * See the LICENSE file in the root directory of this source tree.
458 */const nz=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],MI=Ce("type",nz);/**
459 * @license lucide-react v0.546.0 - ISC
460 *
461 * This source code is licensed under the ISC license.
462 * See the LICENSE file in the root directory of this source tree.
463 */const rz=[["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"}]],sz=Ce("user",rz);/**
464 * @license lucide-react v0.546.0 - ISC
465 *
466 * This source code is licensed under the ISC license.
467 * See the LICENSE file in the root directory of this source tree.
468 */const az=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],iz=Ce("users",az);/**
469 * @license lucide-react v0.546.0 - ISC
470 *
471 * This source code is licensed under the ISC license.
472 * See the LICENSE file in the root directory of this source tree.
473 */const oz=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ds=Ce("x",oz),Gw=({className:n="",size:e=32})=>c.jsxs("svg",{width:e,height:e,viewBox:"-100 -100 200 200",className:n,xmlns:"http://www.w3.org/2000/svg",children:[c.jsxs("defs",{children:[c.jsx("pattern",{id:"clover-stripes",width:"20",height:"12",patternUnits:"userSpaceOnUse",patternTransform:"rotate(0)",children:c.jsx("rect",{width:"20",height:"6",fill:"currentColor"})}),c.jsx("g",{id:"clover-leaf",children:c.jsx("path",{d:"M 0,-8 L -30,-38 A 24 24 0 1 1 0,-52 A 24 24 0 1 1 3
4730,-38 Z"})})]}),c.jsx("use",{href:"#clover-leaf",transform:"rotate(0)",fill:"currentColor"}),c.jsx("use",{href:"#clover-leaf",transform:"rotate(-90)",fill:"currentColor"}),c.jsx("use",{href:"#clover-leaf",transform:"rotate(180)",fill:"currentColor"}),c.jsx("use",{href:"#clover-leaf",transform:"rotate(90)",fill:"url(#clover-stripes)"}),c.jsx("path",{d:"M 12,12 Q 40,30 80,85 L 85,85 L 85,75 Q 40,25 22,12 Z",fill:"currentColor"})]}),lz=({isOpen:n,onClose:e})=>{const[t,r]=D.useState(""),s=_y(),i=l=>{l.preventDefault(),t.trim()&&(s(`/products?search=${encodeURIComponent(t)}`),e())};return c.jsx(Cr,{children:n&&c.jsxs(c.Fragment,{children:[c.jsx(Ge.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:e,className:"fixed inset-0 bg-black/80 z-[60] backdrop-blur-sm"}),c.jsx(Ge.div,{initial:{opacity:0,y:-50},animate:{opacity:1,y:0},exit:{opacity:0,y:-50},className:"fixed top-0 left-0 w-full bg-white z-[70] p-6 md:p-12",children:c.jsxs("div",{className:"max-w-4xl mx-auto relative",children:[c.jsx("button",{onClick:e,className:"absolute right-0 top-1/2 -translate-y-1/2 p-2 hover:bg-gray-100 rounded-full transition-colors",children:c.jsx(ds,{size:24})}),c.jsxs("form",{onSubmit:i,className:"flex items-center",children:[c.jsx(Yo,{size:32,className:"text-gray-400 mr-4"}),c.jsx("input",{type:"text",value:t,onChange:l=>r(l.target.value),placeholder:"What are you looking for?",className:"w-full text-3xl md:text-5xl font-light outline-none placeholder:text-gray-300 bg-transparent",autoFocus:!0})]})]})})]})})},cz=()=>c.jsx("div",{className:"w-5 h-5 border-2 border-white rounded-full flex items-center justify-center",children:c.jsxs("div",{className:"flex gap-0.5",children:[c.jsx("div",{className:"w-1 h-1 bg-white rounded-full"}),c.jsx("div",{className:"w-1 h-1 bg-white rounded-full"})]})});function uz(n){const e=n.replace(/\s+/g,"").toLowerCase();return e.includes("우수제품")||e.includes("조달")||e.includes("조달청")?`조달청 지정 우수 가구 정보입니다!
474[우수제품 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000025&xview=) 또는 우리 사이트의 [우수제품 소개](/spaces/excellent) 페이지에서 바로 확인하실 수 있습니다.`:e.includes("q시리즈")||e.includes("큐시리즈")?`컴팩트하고 실용적인 업무 데스크, Q 시리즈 정보입니다!
475[Q 시리즈 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000002&xview=list)에서 확인해 보세요.`:e.includes("c시리즈")||e.includes("씨시리즈")?`유연한 조합이 가능한 모듈 가구, C 시리즈 정보입니다!
476[C 시리즈 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000007&xview=list)에서 확인해 보세요.`:e.includes("m시리즈")||e.includes("엠시리즈")?`미니멀한 디자인의 중역/사무 데스크, M 시리즈 정보입니다!
477[M 시리즈 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000016&xview=list)에서 확인해 보세요.`:e.includes("a시리즈")||e.includes("에이시리즈")?`개방감 있고 자유로운 시스템 가구, A 시리즈 정보입니다!
478[A 시리즈 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000026&xview=list)에서 확인해 보세요.`:e.includes("책상")||e.includes("데스크")?e.includes("높이")||e.includes("높낮이")||e.includes("모션")||e.includes("조절")?`높낮이/각도 조절 책상 정보입니다!
479[모션 데스크 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000015&xview=list)에서 확인해 보세요.`:`사무실의 중심이 되는 크로바 책상 시리즈입니다!
480[사무용 책상 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000116&xview=list) 또는 우리 사이트의 [사무용 가구 시스템](/spaces/office)을 둘러보세요.`:e.includes("캐비닛")||e.includes("수납")||e.includes("스토리지")?`효율적인 정리를 위한 스토리지/캐비닛 수납 시리즈입니다!
481[스토리지 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000121&xview=list)에서 만나보세요.`:e.includes("사물함")||e.includes("락커")||e.includes("라커")?`안전하고 편리한 사물함 시리즈 정보입니다!
482[사물함 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/series.php?xcate1=0000000001&xcate2=0000000027&xview=list)에서 만나보세요.`:e.includes("파티션")||e.includes("칸막이")||e.includes("스크린")||e.includes("블럭")?`공간을 효율적으로 나누는 파티션 시스템입니다!
483[파티션 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000009&xview=) 또는 우리 사이트의 [파티션 시스템](/spaces/partition)을 확인하세요.`:e.includes("도서관")||e.includes("교육용")||e.includes("학교")||e.includes("교실")||e.includes("학원")||e.includes("기숙사")||e.includes("실험실")?`집중과 학습을 돕는 교육 및 도서관 가구입니다!
484[교육용 가구 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000017&xview=) 또는 우리 사이트의 [교육용/도서관 가구](/spaces/education) 페이지를 방문해 보세요.`:e.includes("중역")||e.includes("임원")||e.includes("슈퍼")||e.includes("퍼스트")||e.includes("마스터")?`최고의 품격과 위엄을 갖춘 중역용 가구 시리즈입니다!
485[중역용 가구 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000018&xview=) 또는 우리 사이트의 [중역용 가구](/spaces/executive) 페이지를 확인하세요.`:e.includes("의자")||e.includes("체어")||e.includes("스툴")||e.includes("바체어")?`인체공학적 디자인으로 하루 종일 편안한 의자 컬렉션입니다!
486[의자 컬렉션 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000019&xview=) 또는 우리 사이트의 [의자 컬렉션 페이지](/spaces/chair)를 확인해 보세요.`:e.includes("소파")||e.includes("라운지")||e.includes("응접")?`품격 있는 편안함을 제공하는 소파 & 라운지 가구입니다!
487[소파 & 라운지 카탈로그](https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000020&xview=) 또는 우리 사이트의 [소파 & 라운지 페이지](/spaces/sofa)에서 확인하세요.`:e.includes("상담")||e.includes("컨설íŒ
487…")||e.includes("견적")||e.includes("도면")||e.includes("신청")||e.includes("무료")?`크로바가구의 1:1 공간 제안 전문 컨설팅 서비스입니다!
488지금 바로 [무료 상담 및 컨설팅 신청](/support)에서 간편하게 접수하실 수 있습니다.`:e.includes("소재")||e.includes("자재")||e.includes("친환경")||e.includes("e0")||e.includes("eo")||e.includes("보드")?`환경을 생각하는 E0 등급 친환경 명품 자재를 사용합니다!
489자세한 정보는 [친환경 자재 마스터](/materials) 페이지를 둘러보세요.`:e.includes("ai")||e.includes("매칭")||e.includes("추천")||e.includes("챗봇")||e.includes("허브")?`당신만을 위한 공간 가구를 똑똑하게 매칭해 드립니다!
490[AI 가구 매칭 허브](/ai-hub)에서 쉽고 빠르게 추천을 받아보세요.`:e.includes("회사")||e.includes("소개")||e.includes("연혁")||e.includes("역사")||e.includes("위치")?`조달청 지정 명품 가구 브랜드, 크로바가구의 비전과 가치입니다!
491더 깊은 스토리는 [회사 소개 페이지](/about)에서 확인하실 수 있습니다.`:e.includes("할수있")||e.includes("할수있니")||e.includes("기능")||e.includes("안내")||e.includes("도와줘")||e.includes("추천")||e.includes("안녕")||e.includes("반갑")||e.includes("하이")||e.includes("hello")||e.includes("hi")?`안녕하세요! 크로바가구 AI 챗봇입니다. 아래와 같은 정보를 안내해 드릴 수 있습니다.
492
493- 조달청 우수제품 정보 및 바로가기
494- 공간별 가구 추천 (책상, 의자, 캐비닛, 파티션 등)
495- Q시리즈, C시리즈 등 가구 스펙 확인
496- 무료 공간 컨설팅 및 도면 상담 신청
497- 친환경 자재 등급 안내
498
499궁금하신 제품이나 키워드를 편하게 말씀해 주세요!`:null}const bA=({variant:n="floating"})=>{const[e,t]=D.useState(!1),[r,s]=D.useState(!1),[i,l]=D.useState(!1),[d,h]=D.useState(""),[m,g]=D.useState([{id:"1",text:"안녕하세요! 크로바가구입니다. 무엇을 도와드릴까요?",isBot:!0}]),[p,b]=D.useState(!1),w=D.useRef(null),_=()=>{var j;(j=w.current)==null||j.scrollIntoView({behavior:"smooth"})},N=j=>{const P=/\[([^\]]+)\]\(([^)]+)\)/g,A=[];let M=0,O;for(;(O=P.exec(j))!==null;){const[q,L,k]=O,I=O.index;I>M&&A.push(j.substring(M,I)),k.startsWith("/")?A.push(c.jsx(bn,{to:k,onClick:()=>t(!1),className:"text-[#457f58] font-bold underline hover:text-[#224328] transition-colors inline-block mx-0.5",children:L},I)):A.push(c.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"text-[#457f58] font-bold underline hover:text-[#224328] transition-colors inline-block mx-0.5",children:L},I)),M=P.lastIndex}return M<j.length&&A.push(j.substring(M)),A.length>0?c.jsx("span",{className:"whitespace-pre-line",children:A}):c.jsx("span",{className:"whitespace-pre-line",children:j})};D.useEffect(()=>{e&&_()},[m,e]),D.useEffect(()=>{const j=()=>l(window.scrollY>20);return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[]);const E=async j=>{if(j==null||j.preventDefault(),!d.trim()||p)return;const P=d.trim(),A={id:Date.now().toString(),text:P,isBot:!1};g(O=>[...O,A]),h(""),b(!0);const M=uz(P);if(M){setTimeout(()=>{const O={id:(Date.now()+1).toString(),text:M,isBot:!0};g(q=>[...q,O]),b(!1)},300);return}try{let q="";{const I=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:P,history:m.map(F=>({text:F.text,isBot:F.isBot}))})});if(!I.ok)throw new Error("API request failed");q=(await I.json()).reply}const L={id:(Date.now()+1).toString(),text:q,isBot:!0};g(k=>[...k,L])}catch(O){console.error("Error sending message:",O);const q={id:(Date.now()+1).toString(),text:"죄송합니다. 현재 고객 센터 및 AI 챗봇 연결이 지연되고 있습니다. 잠시 후 다시 시도해주시거나, 급하신 용무는 대표 번호(1588-0000) 또는 고객 지원실을 통해 접수해주시면 신속하게 도와드리겠습니다.",isBot:!0};g(L=>[...L,q])}finally{b(!1)}};return c.jsxs(c.Fragment,{children:[c.jsxs(Ge.button,{initial:{scale:0},animate:{scale:1},transition:{scale:{duration:.2}},whileTap:{scale:.95},onClick:()=>t(!0),onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),title:"무엇이든 물어보세요",className:`${n==="header"?"p-2 bg-[#457f58] text-white rounded-full shadow-lg hover:shadow-xl transition-all":n==="header-pill"?`${i||r?"px-4 py-2 -mt-1":"p-2 -mt-3"} ${i||r?"bg-[#224328] text-white":"bg-transparent text-white"} rounded-full flex items-center gap-2 shadow-lg hover:shadow-xl transition-all duration-300`:n==="floating-mobile"?`fixed bottom-6 right-6 p-4 bg-[#224328] text-white rounded-full shadow-2xl z-50 transition-transform ${e?"scale-0 opacity-0 pointer-events-none":"scale-100 opacity-100"}`:`fixed top-24 right-6 p-4 bg-[#457f58] text-white rounded-full shadow-2xl z-40 transition-transform ${e?"scale-0 opacity-0 pointer-events-none":"scale-100 opacity-100"}`}`,children:[c.jsx(Ge.div,{animate:{y:[0,-2,0]},transition:{duration:4,repeat:1/0,ease:"easeInOut"},className:"relative flex items-center justify-center",children:c.jsx("div",{className:`${i||r?"w-6 h-6":"w-8 h-8"} bg-[#457f58] rounded-full flex items-center justify-center`,children:c.jsxs(Ge.div,{animate:{x:[-2,2,-2]},transition:{duration:3,repeat:1/0,ease:"easeInOut"},className:"flex gap-1",children:[c.jsx(Ge.div,{animate:{scaleY:[1,.1,1]},transition:{duration:.2,repeat:1/0,repeatDelay:3},className:`${i||r?"w-1 h-1":"w-1.5 h-1.5"} bg-white rounded-full`}),c.jsx(Ge.div,{animate:{scaleY:[1,.1,1]},transition:{duration:.2,repeat:1/0,repeatDelay:3},className:`${i||r?"w-1 h-1":"w-1.5 h-1.5"} bg-white rounded-full`})]})})}),n==="header-pill"&&c.jsx(Cr,{children:(i||r)&&c.jsx(Ge.span,{initial:{width:0,opacity:0}
499,animate:{width:"auto",opacity:1},exit:{width:0,opacity:0},transition:{duration:.2},className:"text-sm font-semibold whitespace-nowrap overflow-hidden relative flex items-center justify-center",children:c.jsx("span",{className:"ml-2",children:r?"무엇이든 물어보세요":"문의하기"})})})]}),c.jsx(Cr,{children:e&&c.jsxs(Ge.div,{initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.95},transition:{duration:.2},className:`fixed bg-[#224328] rounded-2xl shadow-[0_20px_40px_-10px_rgba(0,0,0,0.25)] z-50 flex flex-col overflow-hidden ${n==="floating-mobile"?"bottom-24 left-6 right-6 h-[500px] max-h-[70vh]":`right-4 sm:right-6 w-[calc(100vw-2rem)] sm:w-[340px] md:w-[380px] h-[500px] max-h-[80vh] ${n==="header"?"top-20":"top-24"}`}`,children:[c.jsxs("div",{className:"bg-[#224328] text-white p-4 flex justify-between items-center rounded-t-2xl",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(cz,{}),c.jsx("span",{className:"font-medium",children:"CLOVER FURNITURE 챗봇"})]}),c.jsx("button",{onClick:()=>t(!1),className:"text-gray-300 hover:text-white transition-colors",children:c.jsx(ds,{size:20})})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-4 bg-gray-50 flex flex-col gap-4",children:[m.map(j=>c.jsx("div",{className:`flex ${j.isBot?"justify-start":"justify-end"}`,children:c.jsx("div",{className:`max-w-[80%] p-3 rounded-2xl text-sm leading-relaxed ${j.isBot?"bg-white text-gray-800 border border-gray-100 rounded-tl-sm shadow-sm":"bg-[#457f58] text-white rounded-tr-sm shadow-sm"}`,children:N(j.text)})},j.id)),p&&c.jsx("div",{className:"flex justify-start",children:c.jsxs("div",{className:"max-w-[80%] p-3 rounded-2xl text-sm bg-white text-gray-500 border border-gray-100 rounded-tl-sm flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),c.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),c.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}}),c.jsx("span",{className:"text-xs text-gray-400 ml-1",children:"크로바가구 답변 생각 중..."})]})}),c.jsx("div",{ref:w})]}),c.jsxs("form",{onSubmit:E,className:"p-3 bg-white border-t border-gray-100 flex gap-2",children:[c.jsx("input",{type:"text",value:d,onChange:j=>h(j.target.value),disabled:p,placeholder:p?"답변을 생각하는 중입니다...":"메시지를 입력하세요...",className:"flex-1 bg-gray-50 border border-gray-200 rounded-full px-4 py-2 text-sm text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#224328] focus:border-transparent transition-all disabled:opacity-60"}),c.jsx("button",{type:"submit",disabled:!d.trim()||p,className:"p-2 bg-[#457f58] text-white rounded-full disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors flex-shrink-0",children:c.jsx(II,{size:18,className:"ml-0.5"})})]})]})})]})},dz=()=>{};var vA={};/**
500 * @license
501 * Copyright 2017 Google LLC
502 *
503 * Licensed under the Apache License, Version 2.0 (the "License");
504 * you may not use this file except in compliance with the License.
505 * You may obtain a copy of the License at
506 *
507 *   http://www.apache.org/licenses/LICENSE-2.0
508 *
509 * Unless required by applicable law or agreed to in writing, software
510 * distributed under the License is distributed on an "AS IS" BASIS,
511 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
512 * See the License for the specific language governing permissions and
513 * limitations under the License.
514 */const PI=function(n){const e=[];let t=0;for(let r=0;r<n.length;r++){let s=n.charCodeAt(r);s<128?e[t++]=s:s<2048?(e[t++]=s>>6|192,e[t++]=s&63|128):(s&64512)===55296&&r+1<n.length&&(n.charCodeAt(r+1)&64512)===56320?(s=65536+((s&1023)<<10)+(n.charCodeAt(++r)&1023),e[t++]=s>>18|240,e[t++]=s>>12&63|128,e[t++]=s>>6&63|128,e[t++]=s&63|128):(e[t++]=s>>12|224,e[t++]=s>>6&63|128,e[t++]=s&63|128)}return e},hz=function(n){const e=[];let t=0,r=0;for(;t<n.length;){const s=n[t++];if(s<128)e[r++]=String.fromCharCode(s);else if(s>191&&s<224){const i=n[t++];e[r++]=String.fromCharCode((s&31)<<6|i&63)}else if(s>239&&s<365){const i=n[t++],l=n[t++],d=n[t++],h=((s&7)<<18|(i&63)<<12|(l&63)<<6|d&63)-65536;e[r++]=String.fromCharCode(55296+(h>>10)),e[r++]=String.fromCharCode(56320+(h&1023))}else{const i=n[t++],l=n[t++];e[r++]=String.fromCharCode((s&15)<<12|(i&63)<<6|l&63)}}return e.join("")},OI={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(n,e){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let s=0;s<n.length;s+=3){const i=n[s],l=s+1<n.length,d=l?n[s+1]:0,h=s+2<n.length,m=h?n[s+2]:0,g=i>>2,p=(i&3)<<4|d>>4;let b=(d&15)<<2|m>>6,w=m&63;h||(w=64,l||(b=64)),r.push(t[g],t[p],t[b],t[w])}return r.join("")},encodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(n):this.encodeByteArray(PI(n),e)},decodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(n):hz(this.decodeStringToByteArray(n,e))},decodeStringToByteArray(n,e){this.init_();const t=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let s=0;s<n.length;){const i=t[n.charAt(s++)],d=s<n.length?t[n.charAt(s)]:0;++s;const m=s<n.length?t[n.charAt(s)]:64;++s;const p=s<n.length?t[n.charAt(s)]:64;if(++s,i==null||d==null||m==null||p==null)throw new fz;const b=i<<2|d>>4;if(r.push(b),m!==64){const w=d<<4&240|m>>2;if(r.push(w),p!==64){const _=m<<6&192|p;r.push(_)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n<this.ENCODED_VALS.length;n++)this.byteToCharMap_[n]=this.ENCODED_VALS.charAt(n),this.charToByteMap_[this.byteToCharMap_[n]]=n,this.byteToCharMapWebSafe_[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}};
514class fz extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const mz=function(n){const e=PI(n);return OI.encodeByteArray(e,!0)},O0=function(n){return mz(n).replace(/\./g,"")},LI=function(n){try{return OI.decodeString(n,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
515 * @license
516 * Copyright 2022 Google LLC
517 *
518 * Licensed under the Apache License, Version 2.0 (the "License");
519 * you may not use this file except in compliance with the License.
520 * You may obtain a copy of the License at
521 *
522 *   http://www.apache.org/licenses/LICENSE-2.0
523 *
524 * Unless required by applicable law or agreed to in writing, software
525 * distributed under the License is distributed on an "AS IS" BASIS,
526 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
527 * See the License for the specific language governing permissions and
528 * limitations under the License.
529 */function VI(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
530 * @license
531 * Copyright 2022 Google LLC
532 *
533 * Licensed under the Apache License, Version 2.0 (the "License");
534 * you may not use this file except in compliance with the License.
535 * You may obtain a copy of the License at
536 *
537 *   http://www.apache.org/licenses/LICENSE-2.0
538 *
539 * Unless required by applicable law or agreed to in writing, software
540 * distributed under the License is distributed on an "AS IS" BASIS,
541 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
542 * See the License for the specific language governing permissions and
543 * limitations under the License.
544 */const pz=()=>VI().__FIREBASE_DEFAULTS__,gz=()=>{if(typeof process>"u"||typeof vA>"u")return;const n=vA.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},yz=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=n&&LI(n[1]);return e&&JSON.parse(e)},ky=()=>{try{return dz()||pz()||gz()||yz()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}},FI=n=>{var e,t;return(t=(e=ky())==null?void 0:e.emulatorHosts)==null?void 0:t[n]},xz=n=>{const e=FI(n);if(!e)return;const t=e.lastIndexOf(":");if(t<=0||t+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(t+1),10);return e[0]==="["?[e.substring(1,t-1),r]:[e.substring(0,t),r]},BI=()=>{var n;return(n=ky())==null?void 0:n.config},UI=n=>{var e;return(e=ky())==null?void 0:e[`_${n}`]};/**
545 * @license
546 * Copyright 2017 Google LLC
547 *
548 * Licensed under the Apache License, Version 2.0 (the "License");
549 * you may not use this file except in compliance with the License.
550 * You may obtain a copy of the License at
551 *
552 *   http://www.apache.org/licenses/LICENSE-2.0
553 *
554 * Unless required by applicable law or agreed to in writing, software
555 * distributed under the License is distributed on an "AS IS" BASIS,
556 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
557 * See the License for the specific language governing permissions and
558 * limitations under the License.
559 */class bz{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,r))}}}/**
560 * @license
561 * Copyright 2021 Google LLC
562 *
563 * Licensed under the Apache License, Version 2.0 (the "License");
564 * you may not use this file except in compliance with the License.
565 * You may obtain a copy of the License at
566 *
567 *   http://www.apache.org/licenses/LICENSE-2.0
568 *
569 * Unless required by applicable law or agreed to in writing, software
570 * distributed under the License is distributed on an "AS IS" BASIS,
571 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
572 * See the License for the specific language governing permissions and
573 * limitations under the License.
574 */function vz(n,e){if(n.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const t={alg:"none",type:"JWT"},r=e||"demo-project",s=n.iat||0,i=n.sub||n.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const l={iss:`https://securetoken.google.com/${r}`,aud:r,iat:s,exp:s+3600,auth_time:s,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}},...n};return[O0(JSON.stringify(t)),O0(JSON.stringify(l)),""].join(".")}/**
575 * @license
576 * Copyright 2017 Google LLC
577 *
578 * Licensed under the Apache License, Version 2.0 (the "License");
579 * you may not use this file except in compliance with the License.
580 * You may obtain a copy of the License at
581 *
582 *   http://www.apache.org/licenses/LICENSE-2.0
583 *
584 * Unless required by applicable law or agreed to in writing, software
585 * distributed under the License is distributed on an "AS IS" BASIS,
586 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
587 * See the License for the specific language governing permissions and
588 * limitations under the License.
589 */function Wn(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function wz(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Wn())}function zI(){var e;const n=(e=ky())==null?void 0:e.forceEnvironment;if(n==="node")return!0;if(n==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function _z(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function Tz(){const n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function Nz(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Ez(){const n=Wn();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function qI(){return!zI()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function HI(){return!zI()&&!!navigator.userAgent&&(navigator.userAgent.includes("Safari")||navigator.userAgent.includes("WebKit"))&&!navigator.userAgent.includes("Chrome")}function YI(){try{return typeof indexedDB=="object"}catch{return!1}}function Sz(){return new Promise((n,e)=>{try{let t=!0;const r="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(r);s.onsuccess=()=>{s.result.close(),t||self.indexedDB.deleteDatabase(r),n(!0)},s.onupgradeneeded=()=>{t=!1},s.onerror=()=>{var i;e(((i=s.error)==null?void 0:i.message)||"")}}catch(t){e(t)}})}/**
590 * @license
591 * Copyright 2017 Google LLC
592 *
593 * Licensed under the Apache License, Version 2.0 (the "License");
594 * you may not use this file except in compliance with the License.
595 * You may obtain a copy of the License at
596 *
597 *   http://www.apache.org/licenses/LICENSE-2.0
598 *
599 * Unless required by applicable law or agreed to in writing, software
600 * distributed under the License is distributed on an "AS IS" BASIS,
601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
602 * See the License for the specific language governing permissions and
603 * limitations under the License.
604 */const jz="FirebaseError";class Ii extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name=jz,Object.setPrototypeOf(this,Ii.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,_m.prototype.create)}}class _m{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){const r=t[0]||{},s=`${this.service}/${e}`,i=this.errors[e],l=i?Az(i,r):"Error",d=`${this.serviceName}: ${l} (${s}).`;return new Ii(s,d,r)}}function Az(n,e){return n.replace(Cz,(t,r)=>{const s=e[r];return s!=null?String(s):`<${r}?>`})}const Cz=/\{\$([^}]+)}/g;function Dz(n){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}function aa(n,e){if(n===e)return!0;const t=Object.keys(n),r=Object.keys(e);for(const s of t){if(!r.includes(s))return!1;const i=n[s],l=e[s];if(wA(i)&&wA(l)){if(!aa(i,l))return!1}else if(i!==l)return!1}for(const s of r)if(!t.includes(s))return!1;return!0}function wA(n){return n!==null&&typeof n=="object"}/**
605 * @license
606 * Copyright 2017 Google LLC
607 *
608 * Licensed under the Apache License, Version 2.0 (the "License");
609 * you may not use this file except in compliance with the License.
610 * You may obtain a copy of the License at
611 *
612 *   http://www.apache.org/licenses/LICENSE-2.0
613 *
614 * Unless required by applicable law or agreed to in writing, software
615 * distributed under the License is distributed on an "AS IS" BASIS,
616 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
617 * See the License for the specific language governing permissions and
618 * limitations under the License.
619 */function Tm(n){const e=[];for(const[t,r]of Object.entries(n))Array.isArray(r)?r.forEach(s=>{e.push(encodeURIComponent(t)+"="+encodeURIComponent(s))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function kz(n,e){const t=new Iz(n,e);return t.subscribe.bind(t)}class Iz{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Prom
vendor: 4,142 bytes, lines 619-668
619ise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,r){let s;if(e===void 0&&t===void 0&&r===void 0)throw new Error("Missing Observer.");Rz(e,["next","error","complete"])?s=e:s={next:e,error:t,complete:r},s.next===void 0&&(s.next=Fv),s.error===void 0&&(s.error=Fv),s.complete===void 0&&(s.complete=Fv);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?s.error(this.finalError):s.complete()}catch{}}),this.observers.push(s),i}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function Rz(n,e){if(typeof n!="object"||n===null)return!1;for(const t of e)if(t in n&&typeof n[t]=="function")return!0;return!1}function Fv(){}/**
620 * @license
621 * Copyright 2021 Google LLC
622 *
623 * Licensed under the Apache License, Version 2.0 (the "License");
624 * you may not use this file except in compliance with the License.
625 * You may obtain a copy of the License at
626 *
627 *   http://www.apache.org/licenses/LICENSE-2.0
628 *
629 * Unless required by applicable law or agreed to in writing, software
630 * distributed under the License is distributed on an "AS IS" BASIS,
631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
632 * See the License for the specific language governing permissions and
633 * limitations under the License.
634 */function an(n){return n&&n._delegate?n._delegate:n}/**
635 * @license
636 * Copyright 2025 Google LLC
637 *
638 * Licensed under the Apache License, Version 2.0 (the "License");
639 * you may not use this file except in compliance with the License.
640 * You may obtain a copy of the License at
641 *
642 *   http://www.apache.org/licenses/LICENSE-2.0
643 *
644 * Unless required by applicable law or agreed to in writing, software
645 * distributed under the License is distributed on an "AS IS" BASIS,
646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
647 * See the License for the specific language governing permissions and
648 * limitations under the License.
649 */function Ld(n){try{return(n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n).endsWith(".cloudworkstations.dev")}catch{return!1}}async function j_(n){return(await fetch(n,{credentials:"include"})).ok}class pc{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
650 * @license
651 * Copyright 2019 Google LLC
652 *
653 * Licensed under the Apache License, Version 2.0 (the "License");
654 * you may not use this file except in compliance with the License.
655 * You may obtain a copy of the License at
656 *
657 *   http://www.apache.org/licenses/LICENSE-2.0
658 *
659 * Unless required by applicable law or agreed to in writing, software
660 * distributed under the License is distributed on an "AS IS" BASIS,
661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
662 * See the License for the specific language governing permissions and
663 * limitations under the License.
664 */const Hl="[DEFAULT]";/**
665 * @license
666 * Copyright 2019 Google LLC
667 *
668 * Licensed under the Apache License, Version 2.0 (the "License");
669 * you may not use this file except in compliance with the License.
670 * You may obtain a copy of the License at
671 *
672 *   http://www.apache.org/licenses/LICENSE-2.0
673 *
674 * Unless required by applicable law or agreed to in writing, software
675 * distributed under the License is distributed on an "AS IS" BASIS,
676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
677 * See the License for the specific language governing permissions and
678 * limitations under the License.
679 */class Mz{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const r=new bz;if(this.instancesDeferred.set(t,r),this.isInitialized(t)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:t});s&&r.resolve(s)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){const t=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),r=(e==null?void 0:e.optional)??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(s){if(r)return null;throw s}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(Oz(e))try{this.getOrInitializeService({instanceIdentifier:Hl})}catch{}for(const[t,r]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(t);try{const i=this.getOrInitializeService({instanceIdentifier:s});r.resolve(i)}catch{}}}}clearInstance(e=Hl){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...e.filter(t=>"_delete"in t).map(t=>t._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Hl){return this.instances.has(e)}getOptions(e=Hl){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const s=this.getOrInitializeService({instanceIdentifier:r,options:t});for(const[i,l]of this.instancesDeferred.entries()){const d=this.normalizeInstanceIdentifier(i);r===d&&l.resolve(s)}return s}onInit(e,t){const r=this.normalizeInstanceIdentifier(t),s=this.onInitCallbacks.get(r)??new Set;s.add(e),this.onInitCallbacks.set(r,s);const i=this.instances.get(r);return i&&e(i,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,t){const r=this.onInitCallbacks.get(t);if(r)for(const s of r)try{s(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Pz(e),options:t}),this.instances.set(e,r),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Hl){return this.component?this.component.multipleInstances?e:Hl:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Pz(n){return n===Hl?void 0:n}function Oz(n){return n.instantiationMode==="EAGER"}/**
680 * @license
681 * Copyright 2019 Google LLC
682 *
683 * Licensed under the Apache License, Version 2.0 (the "License");
684 * you may not use this file except in compliance with the License.
685 * You may obtain a copy of the License at
686 *
687 *   http://www.apache.org/licenses/LICENSE-2.0
688 *
689 * Unless required by applicable law or agreed to in writing, softw
689are
690 * distributed under the License is distributed on an "AS IS" BASIS,
691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
692 * See the License for the specific language governing permissions and
693 * limitations under the License.
694 */class Lz{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new Mz(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}/**
695 * @license
696 * Copyright 2017 Google LLC
697 *
698 * Licensed under the Apache License, Version 2.0 (the "License");
699 * you may not use this file except in compliance with the License.
700 * You may obtain a copy of the License at
701 *
702 *   http://www.apache.org/licenses/LICENSE-2.0
703 *
704 * Unless required by applicable law or agreed to in writing, software
705 * distributed under the License is distributed on an "AS IS" BASIS,
706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
707 * See the License for the specific language governing permissions and
708 * limitations under the License.
709 */var xt;(function(n){n[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT"})(xt||(xt={}));const Vz={debug:xt.DEBUG,verbose:xt.VERBOSE,info:xt.INFO,warn:xt.WARN,error:xt.ERROR,silent:xt.SILENT},Fz=xt.INFO,Bz={[xt.DEBUG]:"log",[xt.VERBOSE]:"log",[xt.INFO]:"info",[xt.WARN]:"warn",[xt.ERROR]:"error"},Uz=(n,e,...t)=>{if(e<n.logLevel)return;const r=new Date().toISOString(),s=Bz[e];if(s)console[s](`[${r}]  ${n.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class A_{constructor(e){this.name=e,this._logLevel=Fz,this._logHandler=Uz,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in xt))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?Vz[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,xt.DEBUG,...e),this._logHandler(this,xt.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,xt.VERBOSE,...e),this._logHandler(this,xt.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,xt.INFO,...e),this._logHandler(this,xt.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,xt.WARN,...e),this._logHandler(this,xt.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,xt.ERROR,...e),this._logHandler(this,xt.ERROR,...e)}}const zz=(n,e)=>e.some(t=>n instanceof t);let _A,TA;function qz(){return _A||(_A=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Hz(){return TA||(TA=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const GI=new WeakMap,$w=new WeakMap,$I=new WeakMap,Bv=new WeakMap,C_=new WeakMap;function Yz(n){const e=new Promise((t,r)=>{const s=()=>{n.removeEventListener("success",i),n.removeEventListener("error",l)},i=()=>{t(Po(n.result)),s()},l=()=>{r(n.error),s()};n.addEventListener("success",i),n.addEventListener("error",l)});return e.then(t=>{t instanceof IDBCursor&&GI.set(t,n)}).catch(()=>{}),C_.set(e,n),e}function Gz(n){if($w.has(n))return;const e=new Promise((t,r)=>{const s=()=>{n.removeEventListener("complete",i),n.removeEventListener("error",l),n.removeEventListener("abort",l)},i=()=>{t(),s()},l=()=>{r(n.error||new DOMException("AbortError","AbortError")),s()};n.addEventListener("complete",i),n.addEventListener("error",l),n.addEventListener("abort",l)});$w.set(n,e)}let Kw={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return $w.get(n);if(e==="objectStoreNames")return n.objectStoreNames||$I.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Po(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function $z(n){Kw=n(Kw)}
vendor: 4,094 bytes, lines 709-743
709function Kz(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const r=n.call(Uv(this),e,...t);return $I.set(r,e.sort?e.sort():[e]),Po(r)}:Hz().includes(n)?function(...e){return n.apply(Uv(this),e),Po(GI.get(this))}:function(...e){return Po(n.apply(Uv(this),e))}}function Wz(n){return typeof n=="function"?Kz(n):(n instanceof IDBTransaction&&Gz(n),zz(n,qz())?new Proxy(n,Kw):n)}function Po(n){if(n instanceof IDBRequest)return Yz(n);if(Bv.has(n))return Bv.get(n);const e=Wz(n);return e!==n&&(Bv.set(n,e),C_.set(e,n)),e}const Uv=n=>C_.get(n);function Qz(n,e,{blocked:t,upgrade:r,blocking:s,terminated:i}={}){const l=indexedDB.open(n,e),d=Po(l);return r&&l.addEventListener("upgradeneeded",h=>{r(Po(l.result),h.oldVersion,h.newVersion,Po(l.transaction),h)}),t&&l.addEventListener("blocked",h=>t(h.oldVersion,h.newVersion,h)),d.then(h=>{i&&h.addEventListener("close",()=>i()),s&&h.addEventListener("versionchange",m=>s(m.oldVersion,m.newVersion,m))}).catch(()=>{}),d}const Xz=["get","getKey","getAll","getAllKeys","count"],Jz=["put","add","delete","clear"],zv=new Map;function NA(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if(zv.get(e))return zv.get(e);const t=e.replace(/FromIndex$/,""),r=e!==t,s=Jz.includes(t);if(!(t in(r?IDBIndex:IDBObjectStore).prototype)||!(s||Xz.includes(t)))return;const i=async function(l,...d){const h=this.transaction(l,s?"readwrite":"readonly");let m=h.store;return r&&(m=m.index(d.shift())),(await Promise.all([m[t](...d),s&&h.done]))[0]};return zv.set(e,i),i}$z(n=>({...n,get:(e,t,r)=>NA(e,t)||n.get(e,t,r),has:(e,t)=>!!NA(e,t)||n.has(e,t)}));/**
710 * @license
711 * Copyright 2019 Google LLC
712 *
713 * Licensed under the Apache License, Version 2.0 (the "License");
714 * you may not use this file except in compliance with the License.
715 * You may obtain a copy of the License at
716 *
717 *   http://www.apache.org/licenses/LICENSE-2.0
718 *
719 * Unless required by applicable law or agreed to in writing, software
720 * distributed under the License is distributed on an "AS IS" BASIS,
721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
722 * See the License for the specific language governing permissions and
723 * limitations under the License.
724 */class Zz{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(eq(t)){const r=t.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(t=>t).join(" ")}}function eq(n){const e=n.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Ww="@firebase/app",EA="0.14.11";/**
725 * @license
726 * Copyright 2019 Google LLC
727 *
728 * Licensed under the Apache License, Version 2.0 (the "License");
729 * you may not use this file except in compliance with the License.
730 * You may obtain a copy of the License at
731 *
732 *   http://www.apache.org/licenses/LICENSE-2.0
733 *
734 * Unless required by applicable law or agreed to in writing, software
735 * distributed under the License is distributed on an "AS IS" BASIS,
736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
737 * See the License for the specific language governing permissions and
738 * limitations under the License.
739 */const Ei=new A_("@firebase/app"),tq="@firebase/app-compat",nq="@firebase/analytics-compat",rq="@firebase/analytics",sq="@firebase/app-check-compat",aq="@firebase/app-check",iq="@firebase/auth",oq="@firebase/auth-compat",lq="@firebase/database",cq="@firebase/data-connect",uq="@firebase/database-compat",dq="@firebase/functions",hq="@firebase/functions-compat",fq="@firebase/installations",mq="@firebase/installations-compat",pq="@firebase/messaging",gq="@firebase/messaging-compat",yq="@firebase/performance",xq="@firebase/performance-compat",bq="@firebase/remote-config",vq="@firebase/remote-config-compat",wq="@firebase/storage",_q="@firebase/storage-compat",Tq="@firebase/firestore",Nq="@firebase/ai",Eq="@firebase/firestore-compat",Sq="firebase",jq="12.12.0";/**
740 * @license
741 * Copyright 2019 Google LLC
742 *
743 * Licensed under the Apache License, Version 2.0 (the "License");
744 * you may not use this file except in compliance with the License.
745 * You may obtain a copy of the License at
746 *
747 *   http://www.apache.org/licenses/LICENSE-2.0
748 *
749 * Unless required by applicable law or agreed to in writing, software
750 * distributed under the License is distributed on an "AS IS" BASIS,
751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
752 * See the License for the specific language governing permissions and
753 * limitations under the License.
754 */const L0="[DEFAULT]",Aq={[Ww]:"fire-core",[tq]:"fire-core-compat",[rq]:"fire-analytics",[nq]:"fire-analytics-compat",[aq]:"fire-app-check",[sq]:"fire-app-check-compat",[iq]:"fire-auth",[oq]:"fire-auth-compat",[lq]:"fire-rtdb",[cq]:"fire-data-connect",[uq]:"fire-rtdb-compat",[dq]:"fire-fn",[hq]:"fire-fn-compat",[fq]:"fire-iid",[mq]:"fire-iid-compat",[pq]:"fire-fcm",[gq]:"fire-fcm-compat",[yq]:"fire-perf",[xq]:"fire-perf-compat",[bq]:"fire-rc",[vq]:"fire-rc-compat",[wq]:"fire-gcs",[_q]:"fire-gcs-compat",[Tq]:"fire-fst",[Eq]:"fire-fst-compat",[Nq]:"fire-vertex","fire-js":"fire-js",[Sq]:"fire-js-all"};/**
755 * @license
756 * Copyright 2019 Google LLC
757 *
758 * Licensed under the Apache License, Version 2.0 (the "License");
759 * you may not use this file except in compliance with the License.
760 * You may obtain a copy of the License at
761 *
762 *   http://www.apache.org/licenses/LICENSE-2.0
763 *
764 * Unless required by applicable law or agreed to in writing, software
765 * distributed under the License is distributed on an "AS IS" BASIS,
766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
767 * See the License for the specific language governing permissions and
768 * limitations under the License.
769 */const V0=new Map,Cq=new Map,Qw=new Map;function SA(n,e){try{n.container.addComponent(e)}catch(t){Ei.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`,t)}}function rd(n){const e=n.name;if(Qw.has(e))return Ei.debug(`There were multiple attempts to register component ${e}.`),!1;Qw.set(e,n);for(const t of V0.values())SA(t,n);for(const t of Cq.values())SA(t,n);return!0}function Nm(n,e){const t=n.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),n.container.getProvider(e)}function Dq(n,e,t=L0){Nm(n,e).clearInstance(t)}function Qs(n){return n==null?!1:n.settings!==void 0}/**
770 * @license
771 * Copyright 2019 Google LLC
772 *
773 * Licensed under the Apache License, Version 2.0 (the "License");
774 * you may not use this file except in compliance with the License.
775 * You may obtain a copy of the License at
776 *
777 *   http://www.apache.org/licenses/LICENSE-2.0
778 *
779 * Unless required by applicable law or agreed to in writing, software
780 * distributed under the License is distributed on an "AS IS" BASIS,
781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
782 * See the License for the specific language governing permissions and
783 * limitations under the License.
784 */const kq={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
784d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Oo=new _m("app","Firebase",kq);/**
785 * @license
786 * Copyright 2019 Google LLC
787 *
788 * Licensed under the Apache License, Version 2.0 (the "License");
789 * you may not use this file except in compliance with the License.
790 * You may obtain a copy of the License at
791 *
792 *   http://www.apache.org/licenses/LICENSE-2.0
793 *
794 * Unless required by applicable law or agreed to in writing, software
795 * distributed under the License is distributed on an "AS IS" BASIS,
796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
797 * See the License for the specific language governing permissions and
798 * limitations under the License.
799 */class Iq{constructor(e,t,r){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new pc("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Oo.create("app-deleted",{appName:this._name})}}/**
800 * @license
801 * Copyright 2019 Google LLC
802 *
803 * Licensed under the Apache License, Version 2.0 (the "License");
804 * you may not use this file except in compliance with the License.
805 * You may obtain a copy of the License at
806 *
807 *   http://www.apache.org/licenses/LICENSE-2.0
808 *
809 * Unless required by applicable law or agreed to in writing, software
810 * distributed under the License is distributed on an "AS IS" BASIS,
811 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
812 * See the License for the specific language governing permissions and
813 * limitations under the License.
814 */const Vd=jq;function KI(n,e={}){let t=n;typeof e!="object"&&(e={name:e});const r={name:L0,automaticDataCollectionEnabled:!0,...e},s=r.name;if(typeof s!="string"||!s)throw Oo.create("bad-app-name",{appName:String(s)});if(t||(t=BI()),!t)throw Oo.create("no-options");const i=V0.get(s);if(i){if(aa(t,i.options)&&aa(r,i.config))return i;throw Oo.create("duplicate-app",{appName:s})}const l=new Lz(s);for(const h of Qw.values())l.addComponent(h);const d=new Iq(t,r,l);return V0.set(s,d),d}function WI(n=L0){const e=V0.get(n);if(!e&&n===L0&&BI())return KI();if(!e)throw Oo.create("no-app",{appName:n});return e}function Lo(n,e,t){let r=Aq[n]??n;t&&(r+=`-${t}`);const s=r.match(/\s|\//),i=e.match(/\s|\//);if(s||i){const l=[`Unable to register library "${r}" with version "${e}":`];s&&l.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&i&&l.push("and"),i&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Ei.warn(l.join(" "));return}rd(new pc(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}/**
815 * @license
816 * Copyright 2021 Google LLC
817 *
818 * Licensed under the Apache License, Version 2.0 (the "License");
819 * you may not use this file except in compliance with the License.
820 * You may obtain a copy of the License at
821 *
822 *   http://www.apache.org/licenses/LICENSE-2.0
823 *
824 * Unless required by applicable law or agreed to in writing, softw
824are
825 * distributed under the License is distributed on an "AS IS" BASIS,
826 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
827 * See the License for the specific language governing permissions and
828 * limitations under the License.
829 */const Rq="firebase-heartbeat-database",Mq=1,Jf="firebase-heartbeat-store";let qv=null;function QI(){return qv||(qv=Qz(Rq,Mq,{upgrade:(n,e)=>{switch(e){case 0:try{n.createObjectStore(Jf)}catch(t){console.warn(t)}}}}).catch(n=>{throw Oo.create("idb-open",{originalErrorMessage:n.message})})),qv}async function Pq(n){try{const t=(await QI()).transaction(Jf),r=await t.objectStore(Jf).get(XI(n));return await t.done,r}catch(e){if(e instanceof Ii)Ei.warn(e.message);else{const t=Oo.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Ei.warn(t.message)}}}async function jA(n,e){try{const r=(await QI()).transaction(Jf,"readwrite");await r.objectStore(Jf).put(e,XI(n)),await r.done}catch(t){if(t instanceof Ii)Ei.warn(t.message);else{const r=Oo.create("idb-set",{originalErrorMessage:t==null?void 0:t.message});Ei.warn(r.message)}}}function XI(n){return`${n.name}!${n.options.appId}`}/**
830 * @license
831 * Copyright 2021 Google LLC
832 *
833 * Licensed under the Apache License, Version 2.0 (the "License");
834 * you may not use this file except in compliance with the License.
835 * You may obtain a copy of the License at
836 *
837 *   http://www.apache.org/licenses/LICENSE-2.0
838 *
839 * Unless required by applicable law or agreed to in writing, software
840 * distributed under the License is distributed on an "AS IS" BASIS,
841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
842 * See the License for the specific language governing permissions and
843 * limitations under the License.
844 */const Oq=1024,Lq=30;class Vq{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Bq(t),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,t;try{const s=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=AA();if(((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some(l=>l.date===i))return;if(this._heartbeatsCache.heartbeats.push({date:i,agent:s}),this._heartbeatsCache.heartbeats.length>Lq){const l=Uq(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(l,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){Ei.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)==null?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const t=AA(),{heartbeatsToSend:r,unsentEntries:s}=Fq(this._heartbeatsCache.heartbeats),i=O0(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=t,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(t){return Ei.warn(t),""}}}function AA(){return new Date().toISOString().substring(0,10)}function Fq(n,e=Oq){const t=[];let r=n.slice();for(const s of n){const i=t.find(l=>l.agent===s.agent);if(i){if(i.dates.push(s.date),CA(t)>e){i.dates.pop();break}}else if(t.push({agent:s.agent,dates:[s.date]}),CA(t)>e){t.pop();break}r=r.slice(1)}return{heartbeatsToSend:t,unsentEntries:r}}class Bq{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return YI()?Sz().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const t=await Pq(this.app);return t!=null&&t.heartbeats?t:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return jA(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){const r=await this.read();return jA(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}}function CA(n){return O0(JSON.stringify({version:2,heartbeats:n})).length}function Uq(n){if(n.length===0)return-1;let e=0,t=n[0].date;for(let r=1;r<n.length;r++)n[r].date<t&&(t=n[r].date,e=r);return e}/**
845 * @license
846 * Copyright 2019 Google LLC
847 *
848 * Licensed under the Apache License, Version 2.0 (the "License");
849 * you may not use this file except in compliance with the License.
850 * You may obtain a copy of the License at
851 *
852 *   http://www.apache.org/licenses/LICENSE-2.0
853 *
854 * Unless required by applicable law or agreed to in writing, software
855 * distributed under the License is distributed on an "AS IS" BASIS,
856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
857 * See the License for the specific language governing permissions and
858 * limitations under the License.
859 */function zq(n){rd(new pc("platform-logger",e=>new Zz(e),"PRIVATE")),rd(new pc("heartbeat",e=>new Vq(e),"PRIVATE")),Lo(Ww,EA,n),Lo(Ww,EA,"esm2020"),Lo("fire-js","")}zq("");var DA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
860Copyright The Closure Library Authors.
861SPDX-License-Identifier: Apache-2.0
862*/var Vo,JI;(function(){var n;/** @license
863
864 Copyright The Closure Library Authors.
865 SPDX-License-Identifier: Apache-2.0
866*/function e(L,k){function I(){}I.prototype=k.prototype,L.F=k.prototype,L.prototype=new I,L.prototype.constructor=L,L.D=function(R,F,B){for(var V=Array(arguments.length-2),se=2;se<arguments.length;se++)V[se-2]=arguments[se];return k.prototype[F].apply(R,V)}}function t(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}e(r,t),r.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function s(L,k,I){I||(I=0);const R=Array(16);if(typeof k=="string")for(var F=0;F<16;++F)R[F]=k.charCodeAt(I++)|k.charCodeAt(I++)<<8|k.charCodeAt(I++)<<16|k.charCodeAt(I++)<<24;else for(F=0;F<16;++F)R[F]=k[I++]|k[I++]<<8|k[I++]<<16|k[I++]<<24;k=L.g[0],I=L.g[1],F=L.g[2];let B=L.g[3],V;V=k+(B^I&(F^B))+R[0]+3614090360&4294967295,k=I+(V<<7&4294967295|V>>>25),V=B+(F^k&(I^F))+R[1]+3905402710&4294967295,B=k+(V<<12&4294967295|V>>>20),V=F+(I^B&(k^I))+R[2]+606105819&4294967295,F=B+(V<<17&4294967295|V>>>15),V=I+(k^F&(B^k))+R[3]+3250441966&4294967295,I=F+(V<<22&4294967295|V>>>10),V=k+(B^I&(F^B))+R[4]+4118548399&4294967295,k=I+(V<<7&4294967295|V>>>25),V=B+(F^k&(I^F))+R[5]+1200080426&4294967295,B=k+(V<<12&4294967295|V>>>20),V=F+(I^B&(k^I))+R[6]+2821735955&4294967295,F=B+(V<<17&4294967295|V>>>15),V=I+(k^F&(B^k))+R[7]+4249261313&4294967295,I=F+(V<<22&4294967295|V>>>10),V=k+(B^I&(F^B))+R[8]+1770035416&4294967295,k=I+(V<<7&4294967295|V>>>25),V=B+(F^k&(I^F))+R[9]+2336552879&4294967295,B=k+(V<<12&4294967295|V>>>20),V=F+(I^B&(k^I))+R[10]+4294925233&4294967295,F=B+(V<<17&4294967295|V>>>15),V=I+(k^F&(B^k))+R[11]+2304563134&4294967295,I=F+(V<<22&4294967295|V>>>10),V=k+(B^I&(F^B))+R[12]+1804603682&4294967295,k=I+(V<<7&4294967295|V>>>25),V=B+(F^k&(I^F))+R[13]+4254626195&4294967295,B=k+(V<<12&4294967295|V>>>20),V=F+(I^B&(k^I))+R[14]+2792965006&4294967295,F=B+(V<<17&4294967295|V>>>15),V=I+(k^F&(B^k))+R[15]+1236535329&4294967295,I=F+(V<<22&4294967295|V>>>10),V=k+(F^B&(I^F))+R[1]+4129170786&4294967295,k=I+(V<<5&4294967295|V>>>27),V=B+(I^F&(k^I))+R[6]+3225465664&4294967295,B=k+(V<<9&4294967295|V>>>23),V=F+(k^I&(B^k))+R[11]+643717713&4294967295,F=B+(V<<14&4294967295|V>>>18),V=I+(B^k&(F^B))+R[0]+3921069994&4294967295,I=F+(V<<20&4294967295|V>>>12),V=k+(F^B&(I^F))+R[5]+3593408605&4294967295,k=I+(V<<5&4294967295|V>>>27),V=B+(I^F&(k^I))+R[10]+38016083&4294967295,B=k+(V<<9&4294967295|V>>>23),V=F+(k^I&(B^k))+R[15]+3634488961&4294967295,F=B+(V<<14&4294967295|V>>>18),V=I+(B^k&(F^B))+R[4]+3889429448&4294967295,I=F+(V<<20&4294967295|V>>>12),V=k+(F^B&(I^F))+R[9]+568446438&4294967295,k=I+(V<<5&4294967295|V>>>27),V=B+(I^F&(k^I))+R[14]+3275163606&4294967295,B=k+(V<<9&4294967295|V>>>23),V=F+(k^I&(B^k))+R[3]+4107603335&4294967295,F=B+(V<<14&4294967295|V>>>18),V=I+(B^k&(F^B))+R[8]+1163531501&4294967295,I=F+(V<<20&4294967295|V>>>12),V=k+(F^B&(I^F))+R[13]+2850285829&4294967295,k=I+(V<<5&4294967295|V>>>27),V=B+(I^F&(k^I))+R[2]+4243563512&4294967295,B=k+(V<<9&4294967295|V>>>23),V=F+(k^I&(B^k))+R[7]+1735328473&4294967295,F=B+(V<<14&4294967295|V>>>18),V=I+(B^k&(F^B))+R[12]+2368359562&4294967295,I=F+(V<<20&4294967295|V>>>12),V=k+(I^F^B)+R[5]+4294588738&4294967295,k=I+(V<<4&4294967295|V>>>28),V=B+(k^I^F)+R[8]+2272392833&4294967295,B=k+(V<<11&4294967295|V>>>21),V=F+(B^k^I)+R[11]+1839030562&4294967295,F=B+(V<<16&4294967295|V>>>16),V=I+(F^B^k)+R[14]+4259657740&4294967295,I=F+(V<<23&4294967295|V>>>9),V=k+(I^F^B)+R[1]+2763975236&4294967295,k=I+(V<<4&4294967295|V>>>28),V=B+(k^I^F)+R[4]+1272893353&4294967295,B=k+(V<<11&4294967295|V>>>21),V=F+(B^k^I)+R[7]+4139469664&4294967295,F=B+(V<<16&4294967295|V>>>16),V=I+(F^B^k)+R[10]+3200236656&4294967295,I=F+(V<<23&4294967295|V>>>9),V=k+(I^F^B)+R[13]+681279174&4294967295,k=I+(V<<4&4294967295|V>>>28),V=B+(k^I^F)+R[0]+3936430074&4294967295,B=k+(V<<11&4294967295|V>>>21),V=F+(B^k^I)+R[3]+3572445317&4294967295,F=B+(V<<16&4294967295|V>>>16),V=I+(F^B^k)+R[6]+76029189&4294967295,I=F+(V<<23&4294967295|V>>>9),V=k+(I^F^B)+R[9]+3654602809&4294967295,k=I+(V<<4&4294967295|V>>>28),V=B+(k^I^F)+R[12]+3873151461&4294967295,B=k+(V<<11&4294967295|V>>>21),V=F+(B^k^I)+R[15]+530742520&4294967295,F=B+(V<<16&4294967295|V>>>16),V=I+(F^B^k)+R[2]+3299628645&4294967295,I=F+(V<<23&4294967295|V>>>9),V=k+(F^(I|~B))+R[0]+4096336452&4294967295,k=I+(V<<6&4294967295|V>>>26),V=B+(I^(k|~F))+R[7]+1126891415&4294967295,B=k+(V<<10&4294967295|V>>>22),V=F+(k^(B|~I))+R[14]+2878612391&4294967295,F=B+(V<<15&4294967295|V>>>17),V=I+(B^(F|~k))+R[5]+4237533241&4294967295,I=F+(V<<21&4294967295|V>>>11),V=k+(F^(I|~B))+R[12]+1700485571&4294967295,k=I+(V<<6&4294967295|V>>>26),V=B+(I^(k|~F))+R[3]+2399980690&4294967295,B=k+(V<<10&4294967295|V>>>22),V=F+(k^(B|~I))+R[10]+4293915773&4294967295,F=B+(V<<15&4294967295|V>>>17),V=I+(B^(F|~k))+R[1]+2240044497&4294967295,I=F+(V<<21&4294967295|V>>>11),V=k+(F^(I|~B))+R[8]+1873313359&4294967295,k=I+(V<<6&4294967295|V>>>26),V=B+(I^(k|~F))+R[15]+4264355552&4294967295,B=k+(V<<10&4294967295|V>>>
86622),V=F+(k^(B|~I))+R[6]+2734768916&4294967295,F=B+(V<<15&4294967295|V>>>17),V=I+(B^(F|~k))+R[13]+1309151649&4294967295,I=F+(V<<21&4294967295|V>>>11),V=k+(F^(I|~B))+R[4]+4149444226&4294967295,k=I+(V<<6&4294967295|V>>>26),V=B+(I^(k|~F))+R[11]+3174756917&4294967295,B=k+(V<<10&4294967295|V>>>22),V=F+(k^(B|~I))+R[2]+718787259&4294967295,F=B+(V<<15&4294967295|V>>>17),V=I+(B^(F|~k))+R[9]+3951481745&4294967295,L.g[0]=L.g[0]+k&4294967295,L.g[1]=L.g[1]+(F+(V<<21&4294967295|V>>>11))&4294967295,L.g[2]=L.g[2]+F&4294967295,L.g[3]=L.g[3]+B&4294967295}r.prototype.v=function(L,k){k===void 0&&(k=L.length);const I=k-this.blockSize,R=this.C;let F=this.h,B=0;for(;B<k;){if(F==0)for(;B<=I;)s(this,L,B),B+=this.blockSize;if(typeof L=="string"){for(;B<k;)if(R[F++]=L.charCodeAt(B++),F==this.blockSize){s(this,R),F=0;break}}else for(;B<k;)if(R[F++]=L[B++],F==this.blockSize){s(this,R),F=0;break}}this.h=F,this.o+=k},r.prototype.A=function(){var L=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);L[0]=128;for(var k=1;k<L.length-8;++k)L[k]=0;k=this.o*8;for(var I=L.length-8;I<L.length;++I)L[I]=k&255,k/=256;for(this.v(L),L=Array(16),k=0,I=0;I<4;++I)for(let R=0;R<32;R+=8)L[k++]=this.g[I]>>>R&255;return L};function i(L,k){var I=d;return Object.prototype.hasOwnProperty.call(I,L)?I[L]:I[L]=k(L)}function l(L,k){this.h=k;const I=[];let R=!0;for(let F=L.length-1;F>=0;F--){const B=L[F]|0;R&&B==k||(I[F]=B,R=!1)}this.g=I}var d={};function h(L){return-128<=L&&L<128?i(L,function(k){return new l([k|0],k<0?-1:0)}):new l([L|0],L<0?-1:0)}function m(L){if(isNaN(L)||!isFinite(L))return p;if(L<0)return E(m(-L));const k=[];let I=1;for(let R=0;L>=I;R++)k[R]=L/I|0,I*=4294967296;return new l(k,0)}function g(L,k){if(L.length==0)throw Error("number format error: empty string");if(k=k||10,k<2||36<k)throw Error("radix out of range: "+k);if(L.charAt(0)=="-")return E(g(L.substring(1),k));if(L.indexOf("-")>=0)throw Error('number format error: interior "-" character');const I=m(Math.pow(k,8));let R=p;for(let B=0;B<L.length;B+=8){var F=Math.min(8,L.length-B);const V=parseInt(L.substring(B,B+F),k);F<8?(F=m(Math.pow(k,F)),R=R.j(F).add(m(V))):(R=R.j(I),R=R.add(m(V)))}return R}var p=h(0),b=h(1),w=h(16777216);n=l.prototype,n.m=function(){if(N(this))return-E(this).m();let L=0,k=1;for(let I=0;I<this.g.length;I++){const R=this.i(I);L+=(R>=0?R:4294967296+R)*k,k*=4294967296}return L},n.toString=function(L){if(L=L||10,L<2||36<L)throw Error("radix out of range: "+L);if(_(this))return"0";if(N(this))return"-"+E(this).toString(L);const k=m(Math.pow(L,6));var I=this;let R="";for(;;){const F=M(I,k).g;I=j(I,F.j(k));let B=((I.g.length>0?I.g[0]:I.h)>>>0).toString(L);if(I=F,_(I))return B+R;for(;B.length<6;)B="0"+B;R=B+R}},n.i=function(L){return L<0?0:L<this.g.length?this.g[L]:this.h};function _(L){if(L.h!=0)return!1;for(let k=0;k<L.g.length;k++)if(L.g[k]!=0)return!1;return!0}function N(L){return L.h==-1}n.l=function(L){return L=j(this,L),N(L)?-1:_(L)?0:1};function E(L){const k=L.g.length,I=[];for(let R=0;R<k;R++)I[R]=~L.g[R];return new l(I,~L.h).add(b)}n.abs=function(){return N(this)?E(this):this},n.add=function(L){const k=Math.max(this.g.length,L.g.length),I=[];let R=0;for(let F=0;F<=k;F++){let B=R+(this.i(F)&65535)+(L.i(F)&65535),V=(B>>>16)+(this.i(F)>>>16)+(L.i(F)>>>16);R=V>>>16,B&=65535,V&=65535,I[F]=V<<16|B}return new l(I,I[I.length-1]&-2147483648?-1:0)};function j(L,k){return L.add(E(k))}n.j=function(L){if(_(this)||_(L))return p;if(N(this))return N(L)?E(this).j(E(L)):E(E(this).j(L));if(N(L))return E(this.j(E(L)));if(this.l(w)<0&&L.l(w)<0)return m(this.m()*L.m());const k=this.g.length+L.g.length,I=[];for(var R=0;R<2*k;R++)I[R]=0;for(R=0;R<this.g.length;R++)for(let F=0;F<L.g.length;F++){const B=this.i(R)>>>16,V=this.i(R)&65535,se=L.i(F)>>>16,ye=L.i(F)&65535;I[2*R+2*F]+=V*ye,P(I,2*R+2*F),I[2*R+2*F+1]+=B*ye,P(I,2*R+2*F+1),I[2*R+2*F+1]+=V*se,P(I,2*R+2*F+1),I[2*R+2*F+2]+=B*se,P(I,2*R+2*F+2)}for(L=0;L<k;L++)I[L]=I[2*L+1]<<16|I[2*L];for(L=k;L<2*k;L++)I[L]=0;return new l(I,0)};function P(L,k){for(;(L[k]&65535)!=L[k];)L[k+1]+=L[k]>>>16,L[k]&=65535,k++}function A(L,k){this.g=L,this.h=k}function M(L,k){if(_(k))throw Error("division by zero");if(_(L))return new A(p,p);if(N(L))return k=M(E(L),k),new A(E(k.g),E(k.h));if(N(k))return k=M(L,E(k)),new A(E(k.g),k.h);if(L.g.length>
86630){if(N(L)||N(k))throw Error("slowDivide_ only works with positive integers.");for(var I=b,R=k;R.l(L)<=0;)I=O(I),R=O(R);var F=q(I,1),B=q(R,1);for(R=q(R,2),I=q(I,2);!_(R);){var V=B.add(R);V.l(L)<=0&&(F=F.add(I),B=V),R=q(R,1),I=q(I,1)}return k=j(L,F.j(k)),new A(F,k)}for(F=p;L.l(k)>=0;){for(I=Math.max(1,Math.floor(L.m()/k.m())),R=Math.ceil(Math.log(I)/Math.LN2),R=R<=48?1:Math.pow(2,R-48),B=m(I),V=B.j(k);N(V)||V.l(L)>0;)I-=R,B=m(I),V=B.j(k);_(B)&&(B=b),F=F.add(B),L=j(L,V)}return new A(F,L)}n.B=function(L){return M(this,L).h},n.and=function(L){const k=Math.max(this.g.length,L.g.length),I=[];for(let R=0;R<k;R++)I[R]=this.i(R)&L.i(R);return new l(I,this.h&L.h)},n.or=function(L){const k=Math.max(this.g.length,L.g.length),I=[];for(let R=0;R<k;R++)I[R]=this.i(R)|L.i(R);return new l(I,this.h|L.h)},n.xor=function(L){const k=Math.max(this.g.length,L.g.length),I=[];for(let R=0;R<k;R++)I[R]=this.i(R)^L.i(R);return new l(I,this.h^L.h)};function O(L){const k=L.g.length+1,I=[];for(let R=0;R<k;R++)I[R]=L.i(R)<<1|L.i(R-1)>>>31;return new l(I,L.h)}function q(L,k){const I=k>>5;k%=32;const R=L.g.length-I,F=[];for(let B=0;B<R;B++)F[B]=k>0?L.i(B+I)>>>k|L.i(B+I+1)<<32-k:L.i(B+I);return new l(F,L.h)}r.prototype.digest=r.prototype.A,r.prototype.reset=r.prototype.u,r.prototype.update=r.prototype.v,JI=r,l.prototype.add=l.prototype.add,l.prototype.multiply=l.prototype.j,l.prototype.modulo=l.prototype.B,l.prototype.compare=l.prototype.l,l.prototype.toNumber=l.prototype.m,l.prototype.toString=l.prototype.toString,l.prototype.getBits=l.prototype.i,l.fromNumber=m,l.fromString=g,Vo=l}).apply(typeof DA<"u"?DA:typeof self<"u"?self:typeof window<"u"?window:{});var wg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
867Copyright The Closure Library Authors.
868SPDX-License-Identifier: Apache-2.0
869*/var ZI,xf,eR,Qg,Xw,tR,nR,rR;(function(){var n,e=Object.defineProperty;function t(y){y=[typeof globalThis=="object"&&globalThis,y,typeof window=="object"&&window,typeof self=="object"&&self,typeof wg=="object"&&wg];for(var T=0;T<y.length;++T){var C=y[T];if(C&&C.Math==Math)return C}throw Error("Cannot find global object")}var r=t(this);function s(y,T){if(T)e:{var C=r;y=y.split(".");for(var z=0;z<y.length-1;z++){var Z=y[z];if(!(Z in C))break e;C=C[Z]}y=y[y.length-1],z=C[y],T=T(z),T!=z&&T!=null&&e(C,y,{configurable:!0,writable:!0,value:T})}}s("Symbol.dispose",function(y){return y||Symbol("Symbol.dispose")}),s("Array.prototype.values",function(y){return y||function(){return this[Symbol.iterator]()}}),s("Object.entries",function(y){return y||function(T){var C=[],z;for(z in T)Object.prototype.hasOwnProperty.call(T,z)&&C.push([z,T[z]]);return C}});/** @license
870
871 Copyright The Closure Library Authors.
872 SPDX-License-Identifier: Apache-2.0
873*/var i=i||{},l=this||self;function d(y){var T=typeof y;return T=="object"&&y!=null||T=="function"}function h(y,T,C){return y.call.apply(y.bind,arguments)}function m(y,T,C){return m=h,m.apply(null,arguments)}function g(y,T){var C=Array.prototype.slice.call(arguments,1);return function(){var z=C.slice();return z.push.apply(z,arguments),y.apply(this,z)}}function p(y,T){function C(){}C.prototype=T.prototype,y.Z=T.prototype,y.prototype=new C,y.prototype.constructor=y,y.Ob=function(z,Z,le){for(var Ne=Array(arguments.length-2),rt=2;rt<arguments.length;rt++)Ne[rt-2]=arguments[rt];return T.prototype[Z].apply(z,Ne)}}var b=typeof AsyncContext<"u"&&typeof AsyncContext.Snapshot=="function"?y=>y&&AsyncContext.Snapshot.wrap(y):y=>y;function w(y){const T=y.length;if(T>0){const C=Array(T);for(let z=0;z<T;z++)C[z]=y[z];return C}return[]}function _(y,T){for(let z=1;z<arguments.length;z++){const Z=arguments[z];var C=typeof Z;if(C=C!="object"?C:Z?Array.isArray(Z)?"array":C:"null",C=="array"||C=="object"&&typeof Z.length=="number"){C=y.length||0;const le=Z.length||0;y.length=C+le;for(let Ne=0;Ne<le;Ne++)y[C+Ne]=Z[Ne]}else y.push(Z)}}class N{constructor(T,C){this.i=T,this.j=C,this.h=0,this.g=null}get(){let T;return this.h>0?(this.h--,T=this.g,this.g=T.next,T.next=null):T=this.i(),T}}function E(y){l.setTimeout(()=>{throw y},0)}function j(){var y=L;let T=null;
873return y.g&&(T=y.g,y.g=y.g.next,y.g||(y.h=null),T.next=null),T}class P{constructor(){this.h=this.g=null}add(T,C){const z=A.get();z.set(T,C),this.h?this.h.next=z:this.g=z,this.h=z}}var A=new N(()=>new M,y=>y.reset());class M{constructor(){this.next=this.g=this.h=null}set(T,C){this.h=T,this.g=C,this.next=null}reset(){this.next=this.g=this.h=null}}let O,q=!1,L=new P,k=()=>{const y=Promise.resolve(void 0);O=()=>{y.then(I)}};function I(){for(var y;y=j();){try{y.h.call(y.g)}catch(C){E(C)}var T=A;T.j(y),T.h<100&&(T.h++,y.next=T.g,T.g=y)}q=!1}function R(){this.u=this.u,this.C=this.C}R.prototype.u=!1,R.prototype.dispose=function(){this.u||(this.u=!0,this.N())},R.prototype[Symbol.dispose]=function(){this.dispose()},R.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function F(y,T){this.type=y,this.g=this.target=T,this.defaultPrevented=!1}F.prototype.h=function(){this.defaultPrevented=!0};var B=(function(){if(!l.addEventListener||!Object.defineProperty)return!1;var y=!1,T=Object.defineProperty({},"passive",{get:function(){y=!0}});try{const C=()=>{};l.addEventListener("test",C,T),l.removeEventListener("test",C,T)}catch{}return y})();function V(y){return/^[\s\xa0]*$/.test(y)}function se(y,T){F.call(this,y?y.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,y&&this.init(y,T)}p(se,F),se.prototype.init=function(y,T){const C=this.type=y.type,z=y.changedTouches&&y.changedTouches.length?y.changedTouches[0]:null;this.target=y.target||y.srcElement,this.g=T,T=y.relatedTarget,T||(C=="mouseover"?T=y.fromElement:C=="mouseout"&&(T=y.toElement)),this.relatedTarget=T,z?(this.clientX=z.clientX!==void 0?z.clientX:z.pageX,this.clientY=z.clientY!==void 0?z.clientY:z.pageY,this.screenX=z.screenX||0,this.screenY=z.screenY||0):(this.clientX=y.clientX!==void 0?y.clientX:y.pageX,this.clientY=y.clientY!==void 0?y.clientY:y.pageY,this.screenX=y.screenX||0,this.screenY=y.screenY||0),this.button=y.button,this.key=y.key||"",this.ctrlKey=y.ctrlKey,this.altKey=y.altKey,this.shiftKey=y.shiftKey,this.metaKey=y.metaKey,this.pointerId=y.pointerId||0,this.pointerType=y.pointerType,this.state=y.state,this.i=y,y.defaultPrevented&&se.Z.h.call(this)},se.prototype.h=function(){se.Z.h.call(this);const y=this.i;y.preventDefault?y.preventDefault():y.returnValue=!1};var ye="closure_listenable_"+(Math.random()*1e6|0),W=0;function $(y,T,C,z,Z){this.listener=y,this.proxy=null,this.src=T,this.type=C,this.capture=!!z,this.ha=Z,this.key=++W,this.da=this.fa=!1}function X(y){y.da=!0,y.listener=null,y.proxy=null,y.src=null,y.ha=null}function be(y,T,C){for(const z in y)T.call(C,y[z],z,y)}function Oe(y,T){for(const C in y)T.call(void 0,y[C],C,y)}function H(y){const T={};for(const C in y)T[C]=y[C];return T}const he="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function we(y,T){let C,z;for(let Z=1;Z<arguments.length;Z++){z=arguments[Z];for(C in z)y[C]=z[C];for(let le=0;le<he.length;le++)C=he[le],Object.prototype.hasOwnProperty.call(z,C)&&(y[C]=z[C])}}function Se(y){this.src=y,this.g={},this.h=0}Se.prototype.add=function(y,T,C,z,Z){const le=y.toString();y=this.g[le],y||(y=this.g[le]=[],this.h++);const Ne=$e(y,T,z,Z);return Ne>-1?(T=y[Ne],C||(T.fa=!1)):(T=new $(T,this.src,le,!!z,Z),T.fa=C,y.push(T)),T};function Be(y,T){const C=T.type;if(C in y.g){var z=y.g[C],Z=Array.prototype.indexOf.call(z,T,void 0),le;(le=Z>=0)&&Array.prototype.splice.call(z,Z,1),le&&(X(T),y.g[C].length==0&&(delete y.g[C],y.h--))}}function $e(y,T,C,z){for(let Z=0;Z<y.length;++Z){const le=y[Z];if(!le.da&&le.listener==T&&le.capture==!!C&&le.ha==z)return Z}return-1}var Je="closure_lm_"+(Math.random()*1e6|0),wt={};function at(y,T,C,z,Z){if(Array.isArray(T)){for(let le=0;le<T.length;le++)at(y,T[le],C,z,Z);return null}return C=gs(C),y&&y[ye]?y.J(T,C,d(z)?!!z.capture:!1,Z):G(y,T,C,!1,z,Z)}function G(y,T,C,z,Z,le){if(!T)throw Error("Invalid event type");
vendor: 8,385 bytes, lines 873-877
873const Ne=d(Z)?!!Z.capture:!!Z;let rt=Yt(y);if(rt||(y[Je]=rt=new Se(y)),C=rt.add(T,C,z,Ne,le),C.proxy)return C;if(z=re(),C.proxy=z,z.src=y,z.listener=C,y.addEventListener)B||(Z=Ne),Z===void 0&&(Z=!1),y.addEventListener(T.toString(),z,Z);else if(y.attachEvent)y.attachEvent(Le(T.toString()),z);else if(y.addListener&&y.removeListener)y.addListener(z);else throw Error("addEventListener and attachEvent are unavailable.");return C}function re(){function y(C){return T.call(y.src,y.listener,C)}const T=qe;return y}function ve(y,T,C,z,Z){if(Array.isArray(T))for(var le=0;le<T.length;le++)ve(y,T[le],C,z,Z);else z=d(z)?!!z.capture:!!z,C=gs(C),y&&y[ye]?(y=y.i,le=String(T).toString(),le in y.g&&(T=y.g[le],C=$e(T,C,z,Z),C>-1&&(X(T[C]),Array.prototype.splice.call(T,C,1),T.length==0&&(delete y.g[le],y.h--)))):y&&(y=Yt(y))&&(T=y.g[T.toString()],y=-1,T&&(y=$e(T,C,z,Z)),(C=y>-1?T[y]:null)&&Re(C))}function Re(y){if(typeof y!="number"&&y&&!y.da){var T=y.src;if(T&&T[ye])Be(T.i,y);else{var C=y.type,z=y.proxy;T.removeEventListener?T.removeEventListener(C,z,y.capture):T.detachEvent?T.detachEvent(Le(C),z):T.addListener&&T.removeListener&&T.removeListener(z),(C=Yt(T))?(Be(C,y),C.h==0&&(C.src=null,T[Je]=null)):X(y)}}}function Le(y){return y in wt?wt[y]:wt[y]="on"+y}function qe(y,T){if(y.da)y=!0;else{T=new se(T,this);const C=y.listener,z=y.ha||y.src;y.fa&&Re(y),y=C.call(z,T)}return y}function Yt(y){return y=y[Je],y instanceof Se?y:null}var qn="__closure_events_fn_"+(Math.random()*1e9>>>0);function gs(y){return typeof y=="function"?y:(y[qn]||(y[qn]=function(T){return y.handleEvent(T)}),y[qn])}function Jt(){R.call(this),this.i=new Se(this),this.M=this,this.G=null}p(Jt,R),Jt.prototype[ye]=!0,Jt.prototype.removeEventListener=function(y,T,C,z){ve(this,y,T,C,z)};function Zt(y,T){var C,z=y.G;if(z)for(C=[];z;z=z.G)C.push(z);if(y=y.M,z=T.type||T,typeof T=="string")T=new F(T,y);else if(T instanceof F)T.target=T.target||y;else{var Z=T;T=new F(z,y),we(T,Z)}Z=!0;let le,Ne;if(C)for(Ne=C.length-1;Ne>=0;Ne--)le=T.g=C[Ne],Z=Dr(le,z,!0,T)&&Z;if(le=T.g=y,Z=Dr(le,z,!0,T)&&Z,Z=Dr(le,z,!1,T)&&Z,C)for(Ne=0;Ne<C.length;Ne++)le=T.g=C[Ne],Z=Dr(le,z,!1,T)&&Z}Jt.prototype.N=function(){if(Jt.Z.N.call(this),this.i){var y=this.i;for(const T in y.g){const C=y.g[T];for(let z=0;z<C.length;z++)X(C[z]);delete y.g[T],y.h--}}this.G=null},Jt.prototype.J=function(y,T,C,z){return this.i.add(String(y),T,!1,C,z)},Jt.prototype.K=function(y,T,C,z){return this.i.add(String(y),T,!0,C,z)};function Dr(y,T,C,z){if(T=y.i.g[String(T)],!T)return!0;T=T.concat();let Z=!0;for(let le=0;le<T.length;++le){const Ne=T[le];if(Ne&&!Ne.da&&Ne.capture==C){const rt=Ne.listener,_n=Ne.ha||Ne.src;Ne.fa&&Be(y.i,Ne),Z=rt.call(_n,z)!==!1&&Z}}return Z&&!z.defaultPrevented}function la(y,T){if(typeof y!="function")if(y&&typeof y.handleEvent=="function")y=m(y.handleEvent,y);else throw Error("Invalid listener argument");return Number(T)>2147483647?-1:l.setTimeout(y,T||0)}function ys(y){y.g=la(()=>{y.g=null,y.i&&(y.i=!1,ys(y))},y.l);const T=y.h;y.h=null,y.m.apply(null,T)}class kn extends R{constructor(T,C){super(),this.m=T,this.l=C,this.h=null,this.i=!1,this.g=null}j(T){this.h=arguments,this.g?this.i=!0:ys(this)}N(){super.N(),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function kr(y){R.call(this),this.h=y,this.g={}}p(kr,R);var xs=[];function Ps(y){be(y.g,function(T,C){this.g.hasOwnProperty(C)&&Re(T)},y),y.g={}}kr.prototype.N=function(){kr.Z.N.call(this),Ps(this)},kr.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Ir=l.JSON.stringify,oe=l.JSON.parse,de=class{stringify(y){return l.JSON.stringify(y,void 0)}parse(y){return l.JSON.parse(y,void 0)}};function Te(){}function St(){}var ue={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function je(){F.call(this,"d")}p(je,F);function De(){F.call(this,"c")}p(De,F);var ke={},He=null;function Xe(){return He=He||new Jt}ke.Ia="serverreachability";function mt(y){F.call(this,ke.Ia,y)}p(mt,F);function Gt(y){const T=Xe();Zt(T,new mt(T))}ke.STAT_EVENT="statevent";function wr(y,T){F.call(this,ke.STAT_EVENT,y),this.stat=T}p(wr,F);function $t(y){const T=Xe();Zt(T,new wr(T,y))}ke.Ja="timingevent";function wn(y,T){F.call(this,ke.Ja,y),this.size=T}p(wn,F);function Hn(y,T){if(typeof y!="function")throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){y()},T)}function Rr(){this.g=!0}Rr.prototype.ua=function(){this.g=!1};function Zd(y,T,C,z,Z,le){y.info(function(){if(y.g)if(le){var Ne="",rt=le.split("&");for(let jt=0;jt<rt.length;jt++){var _n=rt[jt].split("=");if(_n.length>1){const on=_n[0];_n=_n[1];const _s=on.split("_");Ne=_s.length>=2&&_s[1]=="type"?Ne+(on+"="+_n+"&"):Ne+(on+"=redacted&")}}}else Ne=null;else Ne=le;return"XMLHTTP REQ ("+z+") [attempt "+Z+"]: "+T+`
874`+C+`
875`+Ne})}function dl(y,T,C,z,Z,le,Ne){y.info(function(){return"XMLHTTP RESP ("+z+") [ attempt "+Z+"]: "+T+`
876`+C+`
877`+le+" "+Ne})}function ca(y,T,C,z){y.info(function(){return"XMLHTTP TEXT ("+T+"): "+xx(y,C)+(z?" "+z:"")})}function hl(y,T){y.info(function(){return"TIMEOUT: "+T})}Rr.prototype.info=function(){};function xx(y,T){if(!y.g)return T;if(!T)return null;try{const le=JSON.parse(T);if(le){for(y=0;y<le.length;y++)if(Array.isArray(le[y])){var C=le[y];if(!(C.length<2)){var z=C[1];if(Array.isArray(z)&&!(z.length<1)){var Z=z[0];if(Z!="noop"&&Z!="stop"&&Z!="close")for(let Ne=1;Ne<z.length;Ne++)z[Ne]=""}}}}return Ir(le)}catch{return T}}var fl={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},eh={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"},th;function ml(){}p(ml,Te),ml.prototype.g=function(){return new XMLHttpRequest},th=new ml;function Ka(y){return encodeURIComponent(String(y))}function Ym(y){var T=1;y=y.split(":");const C=[];for(;T>0&&y.length;)C.push(y.shift()),T--;return y.length&&C.push(y.join(":")),C}function Os(y,T,C,z){this.j=y,this.i=T,this.l=C,this.S=z||1,this.V=new kr(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new Ls}function Ls(){this.i=null,this.g="",this.h=!1}var In={},Jn={};function ua(y,T,C){y.M=1,y.A=pl(Mn(T)),y.u=C,y.R=!0,Lc(y,null)}function Lc(y,T){y.F=Date.now(),da(y),y.B=Mn(y.A);var C=y.B,z=y.S;Array.isArray(z)||(z=[String(z)]),Uc(C.i,"t",z),y.C=0,C=y.j.L,y.h=new Ls,y.g=ip(y.j,C?T:null,!y.u),y.P>0&&(y.O=new kn(m(y.Y,y,y.g),y.P)),T=y.V,C=y.g,z=y.ba;var Z="readystatechange";Array.isArray(Z)||(Z&&(xs[0]=Z.toString()),Z=xs);for(let le=0;le<Z.length;le++){const Ne=at(C,Z[le],z||T.handleEvent,!1,T.h||T);if(!Ne)break;T.g[Ne.key]=Ne}T=y.J?H(y.J):{},y.u?(y.v||(y.v="POST"),T["Content-Type"]="application/x-www-form-urlencoded",y.g.ea(y.B,y.v,y.u,T)):(y.v="GET",y.g.ea(y.B,y.v,null,T)),Gt(),Zd(y.i,y.v,y.B,y.l,y.S,y.u)}Os.prototype.ba=function(y){y=y.target;const T=this.O;T&&Bs(y)==3?T.j():this.Y(y)},Os.prototype.Y=function(y){try{if(y==this.g)e:{const rt=Bs(this.g),_n=this.g.ya(),jt=this.g.ca();if(!(rt<3)&&(rt!=3||this.g&&(this.h.h||this.g.la()||ir(this.g)))){this.K||rt!=4||_n==7||(_n==8||jt<=0?Gt(3):Gt(2)),ha(this);var T=this.g.ca();this.X=T;var C=bx(this);if(this.o=T==200,dl(this.i,this.v,this.B,this.l,this.S,rt,T),this.o){if(this.U&&!this.L){t:{if(this.g){var z,Z=this.g;if((z=Z.g?Z.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!V(z)){var le=z;break t}}le=null}if(y=le)ca(this.i,this.l,y,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,fa(this,y);else{this.o=!1,this.m=3,$t(12),es(this),bs(this);break e}}if(this.R){y=!0;let on;for(;!this.K&&this.C<C.length;)if(on=$m(this,C),on==Jn){rt==4&&(this.m=4,$t(14),y=!1),ca(this.i,this.l,null,"[Incomplete Response]");break}else if(on==In){this.m=4,$t(15),ca(this.i,this.l,C,"[Invalid Chunk]"),y=!1;break}else ca(this.i,this.l,on,null),fa(this,on);if(Gm(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),rt!=4||C.length!=0||this.h.h||(this.m=1,$t(16),y=!1),this.o=this.o&&y,!y)ca(this.i,this.l,C,"[Invalid Chunked Response]"),es(this),bs(this);else if(C.length>0&&!this.W){this.W=!0;var Ne=this.j;Ne.g==this&&Ne.aa&&!Ne.P&&(Ne.j.info("Great, no buffering proxy detected. Bytes received: "+C.length),gh(Ne),Ne.P=!0,$t(11))}}else ca(this.i,this.l,C,null),fa(this,C);
877rt==4&&es(this),this.o&&!this.K&&(rt==4?np(this.j,this):(this.o=!1,da(this)))}else Qa(this.g),T==400&&C.indexOf("Unknown SID")>0?(this.m=3,$t(12)):(this.m=0,$t(13)),es(this),bs(this)}}}catch{}finally{}};function bx(y){if(!Gm(y))return y.g.la();const T=ir(y.g);if(T==="")return"";let C="";const z=T.length,Z=Bs(y.g)==4;if(!y.h.i){if(typeof TextDecoder>"u")return es(y),bs(y),"";y.h.i=new l.TextDecoder}for(let le=0;le<z;le++)y.h.h=!0,C+=y.h.i.decode(T[le],{stream:!(Z&&le==z-1)});return T.length=0,y.h.g+=C,y.C=0,y.h.g}function Gm(y){return y.g?y.v=="GET"&&y.M!=2&&y.j.Aa:!1}function $m(y,T){var C=y.C,z=T.indexOf(`
878`,C);return z==-1?Jn:(C=Number(T.substring(C,z)),isNaN(C)?In:(z+=1,z+C>T.length?Jn:(T=T.slice(z,z+C),y.C=z+C,T)))}Os.prototype.cancel=function(){this.K=!0,es(this)};function da(y){y.T=Date.now()+y.H,Vc(y,y.H)}function Vc(y,T){if(y.D!=null)throw Error("WatchDog timer not null");y.D=Hn(m(y.aa,y),T)}function ha(y){y.D&&(l.clearTimeout(y.D),y.D=null)}Os.prototype.aa=function(){this.D=null;const y=Date.now();y-this.T>=0?(hl(this.i,this.B),this.M!=2&&(Gt(),$t(17)),es(this),this.m=2,bs(this)):Vc(this,this.T-y)};function bs(y){y.j.I==0||y.K||np(y.j,y)}function es(y){ha(y);var T=y.O;T&&typeof T.dispose=="function"&&T.dispose(),y.O=null,Ps(y.V),y.g&&(T=y.g,y.g=null,T.abort(),T.dispose())}function fa(y,T){try{var C=y.j;if(C.I!=0&&(C.g==y||pa(C.h,y))){if(!y.L&&pa(C.h,y)&&C.I==3){try{var z=C.Ba.g.parse(T)}catch{z=null}if(Array.isArray(z)&&z.length==3){var Z=z;if(Z[0]==0){e:if(!C.v){if(C.g)if(C.g.F+3e3<y.F)Gc(C),Gi(C);else break e;_l(C),$t(18)}}else C.xa=Z[1],0<C.xa-C.K&&Z[2]<37500&&C.F&&C.A==0&&!C.C&&(C.C=Hn(m(C.Va,C),6e3));ma(C.h)<=1&&C.ta&&(C.ta=void 0)}else wa(C,11)}else if((y.L||C.g==y)&&Gc(C),!V(T))for(Z=C.Ba.g.parse(T),T=0;T<Z.length;T++){let jt=Z[T];const on=jt[0];if(!(on<=C.K))if(C.K=on,jt=jt[1],C.I==2)if(jt[0]=="c"){C.M=jt[1],C.ba=jt[2];const _s=jt[3];_s!=null&&(C.ka=_s,C.j.info("VER="+C.ka));const _a=jt[4];_a!=null&&(C.za=_a,C.j.info("SVER="+C.za));const Us=jt[5];Us!=null&&typeof Us=="number"&&Us>0&&(z=1.5*Us,C.O=z,C.j.info("backChannelRequestTimeoutMs_="+z)),z=C;const zs=y.g;if(zs){const Tl=zs.g?zs.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Tl){var le=z.h;le.g||Tl.indexOf("spdy")==-1&&Tl.indexOf("quic")==-1&&Tl.indexOf("h2")==-1||(le.j=le.l,le.g=new Set,le.h&&(sh(le,le.h),le.h=null))}if(z.G){const $c=zs.g?zs.g.getResponseHeader("X-HTTP-Session-Id"):null;$c&&(z.wa=$c,kt(z.J,z.G,$c))}}C.I=3,C.l&&C.l.ra(),C.aa&&(C.T=Date.now()-y.F,C.j.info("Handshake RTT: "+C.T+"ms")),z=C;var Ne=y;if(z.na=ap(z,z.L?z.ba:null,z.W),Ne.L){ah(z.h,Ne);var rt=Ne,_n=z.O;_n&&(rt.H=_n),rt.D&&(ha(rt),da(rt)),z.g=Ne}else ep(z);C.i.length>0&&va(C)}else jt[0]!="stop"&&jt[0]!="close"||wa(C,7);else C.I==3&&(jt[0]=="stop"||jt[0]=="close"?jt[0]=="stop"?wa(C,7):mh(C):jt[0]!="noop"&&C.l&&C.l.qa(jt),C.A=0)}}Gt(4)}catch{}}var Rn=class{constructor(y,T){this.g=y,this.map=T}};function nh(y){this.l=y||10,l.PerformanceNavigationTiming?(y=l.performance.getEntriesByType("navigation"),y=y.length>0&&(y[0].nextHopProtocol=="hq"||y[0].nextHopProtocol=="h2")):y=!!(l.chrome&&l.chrome.loadTimes&&l.chrome.loadTimes()&&l.chrome.loadTimes().wasFetchedViaSpdy),this.j=y?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function rh(y){return y.h?!0:y.g?y.g.size>=y.j:!1}function ma(y){return y.h?1:y.g?y.g.size:0}function pa(y,T){return y.h?y.h==T:y.g?y.g.has(T):!1}function sh(y,T){y.g?y.g.add(T):y.h=T}function ah(y,T){y.h&&y.h==T?y.h=null:y.g&&y.g.has(T)&&y.g.delete(T)}nh.prototype.cancel=function(){if(this.i=ih(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const y of this.g.values())y.cancel();this.g.clear()}};function ih(y){if(y.h!=null)return y.i.concat(y.h.G);if(y.g!=null&&y.g.size!==0){let T=y.i;for(const C of y.g.values())T=T.concat(C.G);return T}return w(y.i)}var Km=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Fc(y,T){if(y){y=y.split("&");for(let C=0;C<y.length;C++){const z=y[C].indexOf("=");let Z,le=null;z>=0?(Z=y[C].substring(0,z),le=y[C].substring(z+1)):Z=y[C],T(Z,le?decodeURIComponent(le.replace(/\+/g," ")):"")}}}function ts(y){this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1;let T;y instanceof ts?(this.l=y.l,Zn(this,y.j),this.o=y.o,this.g=y.g,Fi(this,y.u),this.h=y.h,oh(this,Jm(y.i)),this.m=y.m):y&&(T=String(y).match(Km))?(this.l=!1,Zn(this,T[1]||"",!0),this.o=ga(T[2]||""),this.g=ga(T[3]||"",!0),Fi(this,T[4]),this.h=ga(T[5]||"",!0),oh(this,T[6]||"",!0),this.m=ga(T[7]||"")):(this.l=!1,this.i=new Ui(null,this.l))}ts.prototype.toString=function(){const y=[];var T=this.j;T&&y.push(gl(T,Bc,!0),":");var C=this.g;return(C||T=="file")&&(y.push("//"),(T=this.o)&&y.push(gl(T,Bc,!0),"@"),y.push(Ka(C).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),C=this.u,C!=null&&y.push(":",String(C))),(C=this.h)&&(this.g&&C.charAt(0)!="/"&&y.push("/"),y.push(gl(C,C.charAt(0)=="/"?lh:Wm,!0))),(C=this.i.toString())&&y.push("?",C),(C=this.m)&&y.push("#",gl(C,Qm)),y.join("")},ts.prototype.resolve=function(y){const T=Mn(this);let C=!!y.j;C?Zn(T,y.j):C=!!y.o,C?T.o=y.o:C=!!y.g,C?T.g=y.g:C=y.u!=null;var z=y.h;if(C)Fi(T,y.u);else if(C=!!y.h){if(z.charAt(0)!="/")if(this.g&&!this.h)z="/"+z;else{var Z=T.h.lastIndexOf("/");Z!=-1&&(z=T.h.slice(0,Z+1)+z)}if(Z=z,Z==".."||Z==".")z="";else if(Z.indexOf("./")!=-1||Z.indexOf("/.")!=-1){z=Z.lastIndexOf("/",0)==0,Z=Z.split("/");const le=[];for(let Ne=0;Ne<Z.length;){const rt=Z[Ne++];rt=="."?z&&Ne==Z.length&&le.push(""):rt==".."?((le.length>1||le.length==1&&le[0]!="")&&le.pop(),z&&Ne==Z.length&&le.push("")):(le.push(rt),z=!0)}z=le.join("/")}else z=Z}return C?T.h=z:C=y.i.toString()!=="",C?oh(T,Jm(y.i)):C=!!y.m,C&&(T.m=y.m),T};function Mn(y){return new ts(y)}function Zn(y,T,C){y.j=C?ga(T,!0):T,y.j&&(y.j=y.j.replace(/:$/,""))}function Fi(y,T){if(T){if(T=Number(T),isNaN(T)||T<0)throw Error("Bad port number "+T);y.u=T}else y.u=null}function oh(y,T,C){T instanceof Ui?(y.i=T,zc(y.i,y.l)):(C||(T=gl(T,Bi)),y.i=new Ui(T,y.l))}function kt(y,T,C){y.i.set(T,C)}function pl(y){return kt(y,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),y}function ga(y,T){return y?T?decodeURI(y.replace(/%25/g,"%2525")):decodeURIComponent(y):""}function gl(y,T,C){return typeof y=="string"?(y=encodeURI(y).replace(T,Mr),C&&(y=y.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),y):null}function Mr(y){return y=y.charCodeAt(0),"%"+(y>>4&15).toString(16)+(y&15).toString(16)}var Bc=/[#\/\?@]/g,Wm=/[#\?:]/g,lh=/[#\?]/g,Bi=/[#\?@]/g,Qm=/#/g;function Ui(y,T){this.h=this.g=null,this.i=y||null,this.j=!!T}function Pr(y){y.g||(y.g=new Map,y.h=0,y.i&&Fc(y.i,function(T,C){y.add(decodeURIComponent(T.replace(/\+/g," ")),C)}
878))}n=Ui.prototype,n.add=function(y,T){Pr(this),this.i=null,y=zi(this,y);let C=this.g.get(y);return C||this.g.set(y,C=[]),C.push(T),this.h+=1,this};function Xm(y,T){Pr(y),T=zi(y,T),y.g.has(T)&&(y.i=null,y.h-=y.g.get(T).length,y.g.delete(T))}function ch(y,T){return Pr(y),T=zi(y,T),y.g.has(T)}n.forEach=function(y,T){Pr(this),this.g.forEach(function(C,z){C.forEach(function(Z){y.call(T,Z,z,this)},this)},this)};function uh(y,T){Pr(y);let C=[];if(typeof T=="string")ch(y,T)&&(C=C.concat(y.g.get(zi(y,T))));else for(y=Array.from(y.g.values()),T=0;T<y.length;T++)C=C.concat(y[T]);return C}n.set=function(y,T){return Pr(this),this.i=null,y=zi(this,y),ch(this,y)&&(this.h-=this.g.get(y).length),this.g.set(y,[T]),this.h+=1,this},n.get=function(y,T){return y?(y=uh(this,y),y.length>0?String(y[0]):T):T};function Uc(y,T,C){Xm(y,T),C.length>0&&(y.i=null,y.g.set(zi(y,T),w(C)),y.h+=C.length)}n.toString=function(){if(this.i)return this.i;if(!this.g)return"";const y=[],T=Array.from(this.g.keys());for(let z=0;z<T.length;z++){var C=T[z];const Z=Ka(C);C=uh(this,C);for(let le=0;le<C.length;le++){let Ne=Z;C[le]!==""&&(Ne+="="+Ka(C[le])),y.push(Ne)}}return this.i=y.join("&")};function Jm(y){const T=new Ui;return T.i=y.i,y.g&&(T.g=new Map(y.g),T.h=y.h),T}function zi(y,T){return T=String(T),y.j&&(T=T.toLowerCase()),T}function zc(y,T){T&&!y.j&&(Pr(y),y.i=null,y.g.forEach(function(C,z){const Z=z.toLowerCase();z!=Z&&(Xm(this,z),Uc(this,Z,C))},y)),y.j=T}function Vs(y,T){const C=new Rr;if(l.Image){const z=new Image;z.onload=g(vs,C,"TestLoadImage: loaded",!0,T,z),z.onerror=g(vs,C,"TestLoadImage: error",!1,T,z),z.onabort=g(vs,C,"TestLoadImage: abort",!1,T,z),z.ontimeout=g(vs,C,"TestLoadImage: timeout",!1,T,z),l.setTimeout(function(){z.ontimeout&&z.ontimeout()},1e4),z.src=y}else T(!1)}function dh(y,T){const C=new Rr,z=new AbortController,Z=setTimeout(()=>{z.abort(),vs(C,"TestPingServer: timeout",!1,T)},1e4);fetch(y,{signal:z.signal}).then(le=>{clearTimeout(Z),le.ok?vs(C,"TestPingServer: ok",!0,T):vs(C,"TestPingServer: server error",!1,T)}).catch(()=>{clearTimeout(Z),vs(C,"TestPingServer: error",!1,T)})}function vs(y,T,C,z,Z){try{Z&&(Z.onload=null,Z.onerror=null,Z.onabort=null,Z.ontimeout=null),z(C)}catch{}}function qi(){this.g=new de}function ya(y){this.i=y.Sb||null,this.h=y.ab||!1}p(ya,Te),ya.prototype.g=function(){return new yl(this.i,this.h)};function yl(y,T){Jt.call(this),this.H=y,this.o=T,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}p(yl,Jt),n=yl.prototype,n.open=function(y,T){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=y,this.D=T,this.readyState=1,Fs(this)},n.send=function(y){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const T={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};y&&(T.body=y),(this.H||l).fetch(new Request(this.D,T)).then(this.Pa.bind(this),this.ga.bind(this))},n.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,Hi(this)),this.readyState=0},n.Pa=function(y){if(this.g&&(this.l=y,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=y.headers,this.readyState=2,Fs(this)),this.g&&(this.readyState=3,Fs(this),this.g)))if(this.responseType==="arraybuffer")y.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in y){if(this.j=y.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;qc(this)}else y.text().then(this.Oa.bind(this),this.ga.bind(this))};function qc(y){y.j.read().then(y.Ma.bind(y)).catch(y.ga.bind(y))}n.Ma=function(y){if(this.g){if(this.o&&y.value)this.response.push(y.value);else if(!this.o){var T=y.value?y.value:new Uint8Array(0);(T=this.B.decode(T,{stream:!y.done}))&&(this.response=this.responseText+=T)}y.done?Hi(this):Fs(this),this.readyState==3&&qc(this)}},n.Oa=function(y){this.g&&(this.response=this.responseText=y,Hi(this))},n.Na=function(y){this.g&&(this.response=y,Hi(this))},n.ga=function(){this.g&&Hi(this)};function Hi(y){y.readyState=4,y.l=null,y.j=null,y.B=null,Fs(y)}n.setRequestHeader=function(y,T){this.A.append(y,T)},n.getResponseHeader=function(y){return this.h&&this.h.get(y.toLowerCase())||""},n.getAllResponseHeaders=function(){if(!this.h)return"";const y=[],T=this.h.entries();for(var C=T.next();!C.done;)C=C.value,y.push(C[0]+": "+C[1]),C=T.next();return y.join(`\r
879`)};function Fs(y){y.onreadystatechange&&y.onreadystatechange.call(y)}Object.defineProperty(yl.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(y){this.m=y?"include":"same-origin"}});function ws(y){let T="";return be(y,function(C,z){T+=z,T+=":",T+=C,T+=`\r
880`}),T}function xl(y,T,C){e:{for(z in C){var z=!1;break e}z=!0}z||(C=ws(C),typeof y=="string"?C!=null&&Ka(C):kt(y,T,C))}function Ft(y){Jt.call(this),this.headers=new Map,this.L=y||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}p(Ft,Jt);var xa=/^https?$/i,hh=["POST","PUT"];n=Ft.prototype,n.Fa=function(y){this.H=y},n.ea=function(y,T,C,z){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+y);T=T?T.toUpperCase():"GET",this.D=y,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():th.g(),this.g.onreadystatechange=b(m(this.Ca,this));try{this.B=!0,this.g.open(T,String(y),!0),this.B=!1}catch(le){bl(this,le);return}if(y=C||"",C=new Map(this.headers),z)if(Object.getPrototypeOf(z)===Object.prototype)for(var Z in z)C.set(Z,z[Z]);else if(typeof z.keys=="function"&&typeof z.get=="function")for(const le of z.keys())C.set(le,z.get(le));else throw Error("Unknown input type for opt_headers: "+String(z));z=Array.from(C.keys()).find(le=>le.toLowerCase()=="content-type"),Z=l.FormData&&y instanceof l.FormData,!(Array.prototype.indexOf.call(hh,T,void 0)>=0)||z||Z||C.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[le,Ne]of C)this.g.setRequestHeader(le,Ne);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(y),this.v=!1}catch(le){bl(this,le)}};function bl(y,T){y.h=!1,y.g&&(y.j=!0,y.g.abort(),y.j=!1),y.l=T,y.o=5,fh(y),Wa(y)}function fh(y){y.A||(y.A=!0,Zt(y,"complete"),Zt(y,"error"))}n.abort=function(y){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=y||7,Zt(this,"complete"),Zt(this,"abort"),Wa(this))},n.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Wa(this,!0)),Ft.Z.N.call(this)}
vendor: 5,291 bytes, lines 880-881
880,n.Ca=function(){this.u||(this.B||this.v||this.j?vl(this):this.Xa())},n.Xa=function(){vl(this)};function vl(y){if(y.h&&typeof i<"u"){if(y.v&&Bs(y)==4)setTimeout(y.Ca.bind(y),0);else if(Zt(y,"readystatechange"),Bs(y)==4){y.h=!1;try{const le=y.ca();e:switch(le){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var T=!0;break e;default:T=!1}var C;if(!(C=T)){var z;if(z=le===0){let Ne=String(y.D).match(Km)[1]||null;!Ne&&l.self&&l.self.location&&(Ne=l.self.location.protocol.slice(0,-1)),z=!xa.test(Ne?Ne.toLowerCase():"")}C=z}if(C)Zt(y,"complete"),Zt(y,"success");else{y.o=6;try{var Z=Bs(y)>2?y.g.statusText:""}catch{Z=""}y.l=Z+" ["+y.ca()+"]",fh(y)}}finally{Wa(y)}}}}function Wa(y,T){if(y.g){y.m&&(clearTimeout(y.m),y.m=null);const C=y.g;y.g=null,T||Zt(y,"ready");try{C.onreadystatechange=null}catch{}}}n.isActive=function(){return!!this.g};function Bs(y){return y.g?y.g.readyState:0}n.ca=function(){try{return Bs(this)>2?this.g.status:-1}catch{return-1}},n.la=function(){try{return this.g?this.g.responseText:""}catch{return""}},n.La=function(y){if(this.g){var T=this.g.responseText;return y&&T.indexOf(y)==0&&(T=T.substring(y.length)),oe(T)}};function ir(y){try{if(!y.g)return null;if("response"in y.g)return y.g.response;switch(y.F){case"":case"text":return y.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in y.g)return y.g.mozResponseArrayBuffer}return null}catch{return null}}function Qa(y){const T={};y=(y.g&&Bs(y)>=2&&y.g.getAllResponseHeaders()||"").split(`\r
881`);for(let z=0;z<y.length;z++){if(V(y[z]))continue;var C=Ym(y[z]);const Z=C[0];if(C=C[1],typeof C!="string")continue;C=C.trim();const le=T[Z]||[];T[Z]=le,le.push(C)}Oe(T,function(z){return z.join(", ")})}n.ya=function(){return this.o},n.Ha=function(){return typeof this.l=="string"?this.l:String(this.l)};function ba(y,T,C){return C&&C.internalChannelParams&&C.internalChannelParams[y]||T}function Yi(y){this.za=0,this.i=[],this.j=new Rr,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=ba("failFast",!1,y),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=ba("baseRetryDelayMs",5e3,y),this.Za=ba("retryDelaySeedMs",1e4,y),this.Ta=ba("forwardChannelMaxRetries",2,y),this.va=ba("forwardChannelRequestTimeoutMs",2e4,y),this.ma=y&&y.xmlHttpFactory||void 0,this.Ua=y&&y.Rb||void 0,this.Aa=y&&y.useFetchStreams||!1,this.O=void 0,this.L=y&&y.supportsCrossDomainXhr||!1,this.M="",this.h=new nh(y&&y.concurrentRequestLimit),this.Ba=new qi,this.S=y&&y.fastHandshake||!1,this.R=y&&y.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=y&&y.Pb||!1,y&&y.ua&&this.j.ua(),y&&y.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&y&&y.detectBufferingProxy||!1,this.ia=void 0,y&&y.longPollingTimeout&&y.longPollingTimeout>0&&(this.ia=y.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}n=Yi.prototype,n.ka=8,n.I=1,n.connect=function(y,T,C,z){$t(0),this.W=y,this.H=T||{},C&&z!==void 0&&(this.H.OSID=C,this.H.OAID=z),this.F=this.X,this.J=ap(this,null,this.W),va(this)};function mh(y){if(Hc(y),y.I==3){var T=y.V++,C=Mn(y.J);if(kt(C,"SID",y.M),kt(C,"RID",T),kt(C,"TYPE","terminate"),wl(y,C),T=new Os(y,y.j,T),T.M=2,T.A=pl(Mn(C)),C=!1,l.navigator&&l.navigator.sendBeacon)try{C=l.navigator.sendBeacon(T.A.toString(),"")}catch{}!C&&l.Image&&(new Image().src=T.A,C=!0),C||(T.g=ip(T.j,null),T.g.ea(T.A)),T.F=Date.now(),da(T)}sp(y)}function Gi(y){y.g&&(gh(y),y.g.cancel(),y.g=null)}function Hc(y){Gi(y),y.v&&(l.clearTimeout(y.v),y.v=null),Gc(y),y.h.cancel(),y.m&&(typeof y.m=="number"&&l.clearTimeout(y.m),y.m=null)}function va(y){if(!rh(y.h)&&!y.m){y.m=!0;var T=y.Ea;O||k(),q||(O(),q=!0),L.add(T,y),y.D=0}}function Yc(y,T){return ma(y.h)>=y.h.j-(y.m?1:0)?!1:y.m?(y.i=T.G.concat(y.i),!0):y.I==1||y.I==2||y.D>=(y.Sa?0:y.Ta)?!1:(y.m=Hn(m(y.Ea,y,T),rp(y,y.D)),y.D++,!0)}n.Ea=function(y){if(this.m)if(this.m=null,this.I==1){if(!y){this.V=Math.floor(Math.random()*1e5),y=this.V++;const Z=new Os(this,this.j,y);let le=this.o;if(this.U&&(le?(le=H(le),we(le,this.U)):le=this.U),this.u!==null||this.R||(Z.J=le,le=null),this.S)e:{for(var T=0,C=0;C<this.i.length;C++){t:{var z=this.i[C];if("__data__"in z.map&&(z=z.map.__data__,typeof z=="string")){z=z.length;break t}z=void 0}if(z===void 0)break;if(T+=z,T>4096){T=C;break e}if(T===4096||C===this.i.length-1){T=C+1;break e}}T=1e3}else T=1e3;T=Zm(this,Z,T),C=Mn(this.J),kt(C,"RID",y),kt(C,"CVER",22),this.G&&kt(C,"X-HTTP-Session-Id",this.G),wl(this,C),le&&(this.R?T="headers="+Ka(ws(le))+"&"+T:this.u&&xl(C,this.u,le)),sh(this.h,Z),this.Ra&&kt(C,"TYPE","init"),this.S?(kt(C,"$req",T),kt(C,"SID","null"),Z.U=!0,ua(Z,C,null)):ua(Z,C,T),this.I=2}}else this.I==3&&(y?ph(this,y):this.i.length==0||rh(this.h)||ph(this))};function ph(y,T){var C;T?C=T.l:C=y.V++;const z=Mn(y.J);kt(z,"SID",y.M),kt(z,"RID",C),kt(z,"AID",y.K),wl(y,z),y.u&&y.o&&xl(z,y.u,y.o),C=new Os(y,y.j,C,y.D+1),y.u===null&&(C.J=y.o),T&&(y.i=T.G.concat(y.i)),T=Zm(y,C,1e3),C.H=Math.round(y.va*.5)+Math.round(y.va*.5*Math.random()),sh(y.h,C),ua(C,z,T)}function wl(y,T){y.H&&be(y.H,function(C,z){kt(T,z,C)}),y.l&&be({},function(C,z){kt(T,z,C)})}function Zm(y,T,C){C=Math.min(y.i.length,C);const z=y.l?m(y.l.Ka,y.l,y):null;e:{var Z=y.i;let rt=-1;for(;;){const _n=["count="+C];
vendor: 6,195 bytes, lines 881-885
881rt==-1?C>0?(rt=Z[0].g,_n.push("ofs="+rt)):rt=0:_n.push("ofs="+rt);let jt=!0;for(let on=0;on<C;on++){var le=Z[on].g;const _s=Z[on].map;if(le-=rt,le<0)rt=Math.max(0,Z[on].g-100),jt=!1;else try{le="req"+le+"_"||"";try{var Ne=_s instanceof Map?_s:Object.entries(_s);for(const[_a,Us]of Ne){let zs=Us;d(Us)&&(zs=Ir(Us)),_n.push(le+_a+"="+encodeURIComponent(zs))}}catch(_a){throw _n.push(le+"type="+encodeURIComponent("_badmap")),_a}}catch{z&&z(_s)}}if(jt){Ne=_n.join("&");break e}}Ne=void 0}return y=y.i.splice(0,C),T.G=y,Ne}function ep(y){if(!y.g&&!y.v){y.Y=1;var T=y.Da;O||k(),q||(O(),q=!0),L.add(T,y),y.A=0}}function _l(y){return y.g||y.v||y.A>=3?!1:(y.Y++,y.v=Hn(m(y.Da,y),rp(y,y.A)),y.A++,!0)}n.Da=function(){if(this.v=null,tp(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var y=4*this.T;this.j.info("BP detection timer enabled: "+y),this.B=Hn(m(this.Wa,this),y)}},n.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,$t(10),Gi(this),tp(this))};function gh(y){y.B!=null&&(l.clearTimeout(y.B),y.B=null)}function tp(y){y.g=new Os(y,y.j,"rpc",y.Y),y.u===null&&(y.g.J=y.o),y.g.P=0;var T=Mn(y.na);kt(T,"RID","rpc"),kt(T,"SID",y.M),kt(T,"AID",y.K),kt(T,"CI",y.F?"0":"1"),!y.F&&y.ia&&kt(T,"TO",y.ia),kt(T,"TYPE","xmlhttp"),wl(y,T),y.u&&y.o&&xl(T,y.u,y.o),y.O&&(y.g.H=y.O);var C=y.g;y=y.ba,C.M=1,C.A=pl(Mn(T)),C.u=null,C.R=!0,Lc(C,y)}n.Va=function(){this.C!=null&&(this.C=null,Gi(this),_l(this),$t(19))};function Gc(y){y.C!=null&&(l.clearTimeout(y.C),y.C=null)}function np(y,T){var C=null;if(y.g==T){Gc(y),gh(y),y.g=null;var z=2}else if(pa(y.h,T))C=T.G,ah(y.h,T),z=1;else return;if(y.I!=0){if(T.o)if(z==1){C=T.u?T.u.length:0,T=Date.now()-T.F;var Z=y.D;z=Xe(),Zt(z,new wn(z,C)),va(y)}else ep(y);else if(Z=T.m,Z==3||Z==0&&T.X>0||!(z==1&&Yc(y,T)||z==2&&_l(y)))switch(C&&C.length>0&&(T=y.h,T.i=T.i.concat(C)),Z){case 1:wa(y,5);break;case 4:wa(y,10);break;case 3:wa(y,6);break;default:wa(y,2)}}}function rp(y,T){let C=y.Qa+Math.floor(Math.random()*y.Za);return y.isActive()||(C*=2),C*T}function wa(y,T){if(y.j.info("Error code "+T),T==2){var C=m(y.bb,y),z=y.Ua;const Z=!z;z=new ts(z||"//www.google.com/images/cleardot.gif"),l.location&&l.location.protocol=="http"||Zn(z,"https"),pl(z),Z?Vs(z.toString(),C):dh(z.toString(),C)}else $t(2);y.I=0,y.l&&y.l.pa(T),sp(y),Hc(y)}n.bb=function(y){y?(this.j.info("Successfully pinged google.com"),$t(2)):(this.j.info("Failed to ping google.com"),$t(1))};function sp(y){if(y.I=0,y.ja=[],y.l){const T=ih(y.h);(T.length!=0||y.i.length!=0)&&(_(y.ja,T),_(y.ja,y.i),y.h.i.length=0,w(y.i),y.i.length=0),y.l.oa()}}function ap(y,T,C){var z=C instanceof ts?Mn(C):new ts(C);if(z.g!="")T&&(z.g=T+"."+z.g),Fi(z,z.u);else{var Z=l.location;z=Z.protocol,T=T?T+"."+Z.hostname:Z.hostname,Z=+Z.port;const le=new ts(null);z&&Zn(le,z),T&&(le.g=T),Z&&Fi(le,Z),C&&(le.h=C),z=le}return C=y.G,T=y.wa,C&&T&&kt(z,C,T),kt(z,"VER",y.ka),wl(y,z),z}function ip(y,T,C){if(T&&!y.L)throw Error("Can't create secondary domain capable XhrIo object.");return T=y.Aa&&!y.ma?new Ft(new ya({ab:C})):new Ft(y.ma),T.Fa(y.L),T}n.isActive=function(){return!!this.l&&this.l.isActive(this)};function op(){}n=op.prototype,n.ra=function(){},n.qa=function(){},n.pa=function(){},n.oa=function(){},n.isActive=function(){return!0},n.Ka=function(){};function $i(){}$i.prototype.g=function(y,T){return new _r(y,T)};function _r(y,T){Jt.call(this),this.g=new Yi(T),this.l=y,this.h=T&&T.messageUrlParams||null,y=T&&T.messageHeaders||null,T&&T.clientProtocolHeaderRequired&&(y?y["X-Client-Protocol"]="webchannel":y={"X-Client-Protocol":"webchannel"}),this.g.o=y,y=T&&T.initMessageHeaders||null,T&&T.messageContentType&&(y?y["X-WebChannel-Content-Type"]=T.messageContentType:y={"X-WebChannel-Content-Type":T.messageContentType}),T&&T.sa&&(y?y["X-WebChannel-Client-Profile"]=T.sa:y={"X-WebChannel-Client-Profile":T.sa}),this.g.U=y,(y=T&&T.Qb)&&!V(y)&&(this.g.u=y),this.A=T&&T.supportsCrossDomainXhr||!1,this.v=T&&T.sendRawJson||!1,(T=T&&T.httpSessionIdParam)&&!V(T)&&(this.g.G=T,y=this.h,y!==null&&T in y&&(y=this.h,T in y&&delete y[T])),this.j=new Xa(this)}p(_r,Jt),_r.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},_r.prototype.close=function(){mh(this.g)},_r.prototype.o=function(y){var T=this.g;if(typeof y=="string"){var C={};C.__data__=y,y=C}else this.v&&(C={},C.__data__=Ir(y),y=C);T.i.push(new Rn(T.Ya++,y)),T.I==3&&va(T)},_r.prototype.N=function(){this.g.l=null,delete this.j,mh(this.g),delete this.g,_r.Z.N.call(this)};function lp(y){je.call(this),y.__headers__&&(this.headers=y.__headers__,this.statusCode=y.__status__,delete y.__headers__,delete y.__status__);var T=y.__sm__;if(T){e:{for(const C in T){y=C;break e}y=void 0}(this.i=y)&&(y=this.i,T=T!==null&&y in T?T[y]:void 0),this.data=T}else this.data=y}p(lp,je);function cp(){De.call(this),this.status=1}p(cp,De);function Xa(y){this.g=y}p(Xa,op),Xa.prototype.ra=function(){Zt(this.g,"a")},Xa.prototype.qa=function(y){Zt(this.g,new lp(y))},Xa.prototype.pa=function(y){Zt(this.g,new cp)},Xa.prototype.oa=function(){Zt(this.g,"b")},$i.prototype.createWebChannel=$i.prototype.g,_r.prototype.send=_r.prototype.o,_r.prototype.open=_r.prototype.m,_r.prototype.close=_r.prototype.close,rR=function(){return new $i},nR=function(){return Xe()},tR=ke,Xw={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},fl.NO_ERROR=0,fl.TIMEOUT=8,fl.HTTP_ERROR=6,Qg=fl,eh.COMPLETE="complete",eR=eh,St.EventType=ue,ue.OPEN="a",ue.CLOSE="b",ue.ERROR="c",ue.MESSAGE="d",Jt.prototype.listen=Jt.prototype.J,xf=St,Ft.prototype.listenOnce=Ft.prototype.K,Ft.prototype.getLastError=Ft.prototype.Ha,Ft.prototype.getLastErrorCode=Ft.prototype.ya,Ft.prototype.getStatus=Ft.prototype.ca,Ft.prototype.getResponseJson=Ft.prototype.La,Ft.prototype.getResponseText=Ft.prototype.la,Ft.prototype.send=Ft.prototype.ea,Ft.prototype.setWithCredentials=Ft.prototype.Fa,ZI=Ft}).apply(typeof wg<"u"?wg:typeof self<"u"?self:typeof window<"u"?window:{});/**
882 * @license
883 * Copyright 2017 Google LLC
884 *
885 * Licensed under the Apache License, Version 2.0 (the "License");
886 * you may not use this file except in compliance with the License.
887 * You may obtain a copy of the License at
888 *
889 *   http://www.apache.org/licenses/LICENSE-2.0
890 *
891 * Unless required by applicable law or agreed to in writing, software
892 * distributed under the License is distributed on an "AS IS" BASIS,
893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
894 * See the License for the specific language governing permissions and
895 * limitations under the License.
896 */class nr{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}nr.UNAUTHENTICATED=new nr(null),nr.GOOGLE_CREDENTIALS=new nr("google-credentials-uid"),nr.FIRST_PARTY=new nr("first-party-uid"),nr.MOCK_USER=new nr("mock-user");/**
897 * @license
898 * Copyright 2017 Google LLC
899 *
900 * Licensed under the Apache License, Version 2.0 (the "License");
901 * you may not use this file except in compliance with the License.
902 * You may obtain a copy of the License at
903 *
904 *   http://www.apache.org/licenses/LICENSE-2.0
905 *
906 * Unless required by applicable law or agreed to in writing, software
907 * distributed under the License is distributed on an "AS IS" BASIS,
908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
909 * See the License for the specific language governing permissions and
910 * limitations under the License.
911 */let Fd="12.12.0";function qq(n){Fd=n}/**
912 * @license
913 * Copyright 2020 Google LLC
914 *
915 * Licensed under the Apache License, Version 2.0 (the "License");
916 * you may not use this file except in compliance with the License.
917 * You may obtain a copy of the License at
918 *
919 *   http://www.apache.org/licenses/LICENSE-2.0
920 *
921 * Unless required by applicable law or agreed to in writing, software
922 * distributed under the License is distributed on an "AS IS" BASIS,
923 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
924 * See the License for the specific language governing permissions and
925 * limitations under the License.
926 *//**
927 * @license
928 * Copyright 2017 Google LLC
929 *
930 * Licensed under the Apache License, Version 2.0 (the "License");
931 * you may not use this file except in compliance with the License.
932 * You may obtain a copy of the License at
933 *
934 *   http://www.apache.org/licenses/LICENSE-2.0
935 *
936 * Unless required by applicable law or agreed to in writing, software
937 * distributed under the License is distributed on an "AS IS" BASIS,
938 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
939 * See the License for the specific language governing permissions and
940 * limitations under the License.
941 */const Go=new A_("@firebase/firestore");function Ru(){return Go.logLevel}function Hq(n){Go.setLogLevel(n)}function xe(n,...e){if(Go.logLevel<=xt.DEBUG){const t=e.map(D_);Go.debug(`Firestore (${Fd}): ${n}`,...t)}}function jn(n,...e){if(Go.logLevel<=xt.ERROR){const t=e.map(D_);Go.error(`Firestore (${Fd}): ${n}`,...t)}}function Zr(n,...e){if(Go.logLevel<=xt.WARN){const t=e.map(D_);Go.warn(`Firestore (${Fd}): ${n}`,...t)}}function D_(n){if(typeof n=="string")return n;try{return(function(t){return JSON.stringify(t)})(n)}catch{return n}}/**
942 * @license
943 * Copyright 2017 Google LLC
944 *
945 * Licensed under the Apache License, Version 2.0 (the "License");
946 * you may not use this file except in compliance with the License.
947 * You may obtain a copy of the License at
948 *
949 *   http://www.apache.org/licenses/LICENSE-2.0
950 *
951 * Unless required by applicable law or agreed to in writing, software
952 * distributed under the License is distributed on an "AS IS" BASIS,
953 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
954 * See the License for the specific language governing permissions and
955 * limitations under the License.
956 */function Ie(n,e,t){let r="Unexpected state";typeof e=="string"?r=e:t=e,sR(n,r,t)}function sR(n,e,t){let r=`FIRESTORE (${Fd}) INTERNAL ASSERTION FAILED: ${e} (ID: ${n.toString(16)})`;if(t!==void 0)try{r+=" CONTEXT: "+JSON.stringify(t)}catch{r+=" CONTEXT: "+t}throw jn(r),new Error(r)}function Fe(n,e,t,r){let s="Unexpected state";
vendor: 5,891 bytes, lines 956-1001
956typeof t=="string"?s=t:r=t,n||sR(e,s,r)}function Yq(n,e){n||Ie(57014,e)}function Ee(n,e){return n}/**
957 * @license
958 * Copyright 2017 Google LLC
959 *
960 * Licensed under the Apache License, Version 2.0 (the "License");
961 * you may not use this file except in compliance with the License.
962 * You may obtain a copy of the License at
963 *
964 *   http://www.apache.org/licenses/LICENSE-2.0
965 *
966 * Unless required by applicable law or agreed to in writing, software
967 * distributed under the License is distributed on an "AS IS" BASIS,
968 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
969 * See the License for the specific language governing permissions and
970 * limitations under the License.
971 */const ne={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class pe extends Ii{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
972 * @license
973 * Copyright 2017 Google LLC
974 *
975 * Licensed under the Apache License, Version 2.0 (the "License");
976 * you may not use this file except in compliance with the License.
977 * You may obtain a copy of the License at
978 *
979 *   http://www.apache.org/licenses/LICENSE-2.0
980 *
981 * Unless required by applicable law or agreed to in writing, software
982 * distributed under the License is distributed on an "AS IS" BASIS,
983 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
984 * See the License for the specific language governing permissions and
985 * limitations under the License.
986 */class sr{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}/**
987 * @license
988 * Copyright 2017 Google LLC
989 *
990 * Licensed under the Apache License, Version 2.0 (the "License");
991 * you may not use this file except in compliance with the License.
992 * You may obtain a copy of the License at
993 *
994 *   http://www.apache.org/licenses/LICENSE-2.0
995 *
996 * Unless required by applicable law or agreed to in writing, software
997 * distributed under the License is distributed on an "AS IS" BASIS,
998 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
999 * See the License for the specific language governing permissions and
1000 * limitations under the License.
1001 */class aR{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class iR{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable((()=>t(nr.UNAUTHENTICATED)))}shutdown(){}}class Gq{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(this.token.user)))}shutdown(){this.changeListener=null}}class $q{constructor(e){this.t=e,this.currentUser=nr.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){Fe(this.o===void 0,42304);let r=this.i;const s=h=>this.i!==r?(r=this.i,t(h)):Promise.resolve();let i=new sr;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new sr,e.enqueueRetryable((()=>s(this.currentUser)))};const l=()=>{const h=i;e.enqueueRetryable((async()=>{await h.promise,await s(this.currentUser)}))},d=h=>{xe("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=h,this.o&&(this.auth.addAuthTokenListener(this.o),l())};this.t.onInit((h=>d(h))),setTimeout((()=>{if(!this.auth){const h=this.t.getImmediate({optional:!0});h?d(h):(xe("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new sr)}}),0),l()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then((r=>this.i!==e?(xe("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Fe(typeof r.accessToken=="string",31837,{l:r}),new aR(r.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return Fe(e===null||typeof e=="string",2055,{h:e}),new nr(e)}}class Kq{constructor(e,t,r){this.P=e,this.T=t,this.I=r,this.type="FirstParty",this.user=nr.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set("X-Goog-AuthUser",this.P);const e=this.A();return e&&this.R.set("Authorization",e),this.T&&this.R.set("X-Goog-Iam-Authorization-Token",this.T),this.R}}class Wq{constructor(e,t,r){this.P=e,this.T=t,this.I=r}getToken(){return Promise.resolve(new Kq(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable((()=>t(nr.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class Jw{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Qq{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,Qs(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){Fe(this.o===void 0,3512);const r=i=>{i.error!=null&&xe("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${i.error.message}`);const l=i.token!==this.m;return this.m=i.token,xe("FirebaseAppCheckTokenProvider",`Received ${l?"new":"existing"} token.`),l?t(i.token):Promise.resolve()};this.o=i=>{e.enqueueRetryable((()=>r(i)))};const s=i=>{xe("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=i,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((i=>s(i))),setTimeout((()=>
vendor: 5,191 bytes, lines 1001-1046
1001{if(!this.appCheck){const i=this.V.getImmediate({optional:!0});i?s(i):xe("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){if(this.p)return Promise.resolve(new Jw(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((t=>t?(Fe(typeof t.token=="string",44558,{tokenResult:t}),this.m=t.token,new Jw(t.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}class Xq{getToken(){return Promise.resolve(new Jw(""))}invalidateToken(){}start(e,t){}shutdown(){}}/**
1002 * @license
1003 * Copyright 2020 Google LLC
1004 *
1005 * Licensed under the Apache License, Version 2.0 (the "License");
1006 * you may not use this file except in compliance with the License.
1007 * You may obtain a copy of the License at
1008 *
1009 *   http://www.apache.org/licenses/LICENSE-2.0
1010 *
1011 * Unless required by applicable law or agreed to in writing, software
1012 * distributed under the License is distributed on an "AS IS" BASIS,
1013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1014 * See the License for the specific language governing permissions and
1015 * limitations under the License.
1016 */function Jq(n){const e=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(n);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<n;r++)t[r]=Math.floor(256*Math.random());return t}/**
1017 * @license
1018 * Copyright 2017 Google LLC
1019 *
1020 * Licensed under the Apache License, Version 2.0 (the "License");
1021 * you may not use this file except in compliance with the License.
1022 * You may obtain a copy of the License at
1023 *
1024 *   http://www.apache.org/licenses/LICENSE-2.0
1025 *
1026 * Unless required by applicable law or agreed to in writing, software
1027 * distributed under the License is distributed on an "AS IS" BASIS,
1028 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1029 * See the License for the specific language governing permissions and
1030 * limitations under the License.
1031 */class Iy{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const s=Jq(40);for(let i=0;i<s.length;++i)r.length<20&&s[i]<t&&(r+=e.charAt(s[i]%62))}return r}}function Qe(n,e){return n<e?-1:n>e?1:0}function Zw(n,e){const t=Math.min(n.length,e.length);for(let r=0;r<t;r++){const s=n.charAt(r),i=e.charAt(r);if(s!==i)return Hv(s)===Hv(i)?Qe(s,i):Hv(s)?1:-1}return Qe(n.length,e.length)}const Zq=55296,eH=57343;function Hv(n){const e=n.charCodeAt(0);return e>=Zq&&e<=eH}function sd(n,e,t){return n.length===e.length&&n.every(((r,s)=>t(r,e[s])))}function oR(n){return n+"\0"}/**
1032 * @license
1033 * Copyright 2017 Google LLC
1034 *
1035 * Licensed under the Apache License, Version 2.0 (the "License");
1036 * you may not use this file except in compliance with the License.
1037 * You may obtain a copy of the License at
1038 *
1039 *   http://www.apache.org/licenses/LICENSE-2.0
1040 *
1041 * Unless required by applicable law or agreed to in writing, software
1042 * distributed under the License is distributed on an "AS IS" BASIS,
1043 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1044 * See the License for the specific language governing permissions and
1045 * limitations under the License.
1046 */const e1="__name__";class Aa{constructor(e,t,r){t===void 0?t=0:t>e.length&&Ie(637,{offset:t,range:e.length}),r===void 0?r=e.length-t:r>e.length-t&&Ie(1746,{length:r,range:e.length-t}),this.segments=e,this.offset=t,this.len=r}get length(){return this.len}isEqual(e){return Aa.comparator(this,e)===0}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof Aa?e.forEach((r=>{t.push(r)})):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,r=this.limit();t<r;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const r=Math.min(e.length,t.length);for(let s=0;s<r;s++){const i=Aa.compareSegments(e.get(s),t.get(s));if(i!==0)return i}return Qe(e.length,t.length)}static compareSegments(e,t){const r=Aa.isNumericId(e),s=Aa.isNumericId(t);return r&&!s?-1:!r&&s?1:r&&s?Aa.extractNumericId(e).compare(Aa.extractNumericId(t)):Zw(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return Vo.fromString(e.substring(4,e.length-2))}}class ct extends Aa{construct(e,t,r){return new ct(e,t,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
1046toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const t=[];for(const r of e){if(r.indexOf("//")>=0)throw new pe(ne.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);t.push(...r.split("/").filter((s=>s.length>0)))}return new ct(t)}static emptyPath(){return new ct([])}}const tH=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class rn extends Aa{construct(e,t,r){return new rn(e,t,r)}static isValidIdentifier(e){return tH.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),rn.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===e1}static keyField(){return new rn([e1])}static fromServerFormat(e){const t=[];let r="",s=0;const i=()=>{if(r.length===0)throw new pe(ne.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(r),r=""};let l=!1;for(;s<e.length;){const d=e[s];if(d==="\\"){if(s+1===e.length)throw new pe(ne.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const h=e[s+1];if(h!=="\\"&&h!=="."&&h!=="`")throw new pe(ne.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=h,s+=2}else d==="`"?(l=!l,s++):d!=="."||l?(r+=d,s++):(i(),s++)}if(i(),l)throw new pe(ne.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new rn(t)}static emptyPath(){return new rn([])}}/**
1047 * @license
1048 * Copyright 2017 Google LLC
1049 *
1050 * Licensed under the Apache License, Version 2.0 (the "License");
1051 * you may not use this file except in compliance with the License.
1052 * You may obtain a copy of the License at
1053 *
1054 *   http://www.apache.org/licenses/LICENSE-2.0
1055 *
1056 * Unless required by applicable law or agreed to in writing, software
1057 * distributed under the License is distributed on an "AS IS" BASIS,
1058 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1059 * See the License for the specific language governing permissions and
1060 * limitations under the License.
1061 */class _e{constructor(e){this.path=e}static fromPath(e){return new _e(ct.fromString(e))}static fromName(e){return new _e(ct.fromString(e).popFirst(5))}static empty(){return new _e(ct.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&ct.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,t){return ct.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new _e(new ct(e.slice()))}}/**
1062 * @license
1063 * Copyright 2017 Google LLC
1064 *
1065 * Licensed under the Apache License, Version 2.0 (the "License");
1066 * you may not use this file except in compliance with the License.
1067 * You may obtain a copy of the License at
1068 *
1069 *   http://www.apache.org/licenses/LICENSE-2.0
1070 *
1071 * Unless required by applicable law or agreed to in writing, software
1072 * distributed under the License is distributed on an "AS IS" BASIS,
1073 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1074 * See the License for the specific language governing permissions and
1075 * limitations under the License.
1076 */function k_(n,e,t){if(!t)throw new pe(ne.INVALID_ARGUMENT,`Function ${n}() cannot be called with an empty ${e}.`)}function lR(n,e,t,r){if(e===!0&&r===!0)throw new pe(ne.INVALID_ARGUMENT,`${n} and ${t} cannot be used together.`)}function kA(n){if(!_e.isDocumentKey(n))throw new pe(ne.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${n} has ${n.length}.`)}function IA(n){if(_e.isDocumentKey(n))throw new pe(ne.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${n} has ${n.length}.`)}function cR(n){return typeof n=="object"&&n!==null&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null)}function Ry(n){if(n===void 0)return"undefined";if(n===null)return"null";if(typeof n=="string")return n.length>20&&(n=`${n.substring(0,20)}...`),JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return""+n;if(typeof n=="object"){if(n instanceof Array)return"an array";{const e=(function(r){return r.constructor?r.constructor.name:null})(n);return e?`a custom ${e} object`:"an object"}}return typeof n=="function"?"a function":Ie(12329,{type:typeof n})}function ut(n,e){if("_delegate"in n&&(n=n._delegate),!(n instanceof e)){if(e.name===n.constructor.name)throw new pe(ne.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=Ry(n);throw new pe(ne.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${t}`)}}return n}function uR(n,e){if(e<=0)throw new pe(ne.INVALID_ARGUMENT,`Function ${n}() requires a positive number, but it was: ${e}.`)}/**
1077 * @license
1078 * Copyright 2025 Google LLC
1079 *
1080 * Licensed under the Apache License, Version 2.0 (the "License");
1081 * you may not use this file except in compliance with the License.
1082 * You may obtain a copy of the License at
1083 *
1084 *   http://www.apache.org/licenses/LICENSE-2.0
1085 *
1086 * Unless required by applicable law or agreed to in writing, software
1087 * distributed under the License is distributed on an "AS IS" BASIS,
1088 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1089 * See the License for the specific language governing permissions and
1090 * limitations under the License.
1091 */function zn(n,e){const t={typeString:n};return e&&(t.value=e),t}function Cc(n,e){if(!cR(n))throw new pe(ne.INVALID_ARGUMENT,"JSON must be an object");let t;for(const r in e)if(e[r]){const s=e[r].typeString,i="value"in e[r]?{value:e[r].value}:void 0;if(!(r in n)){t=`JSON missing required field: '${r}'`;break}const l=n[r];if(s&&typeof l!==s){t=`JSON field '${r}' must be a ${s}.`;break}if(i!==void 0&&l!==i.value){t=`Expected '${r}' field to equal '${i.value}'`;break}}if(t)throw new pe(ne.INVALID_ARGUMENT,t);return!0}/**
1092 * @license
1093 * Copyright 2017 Google LLC
1094 *
1095 * Licensed under the Apache License, Version 2.0 (the "License");
1096 * you may not use this file except in compliance with the License.
1097 * You may obtain a copy of the License at
1098 *
1099 *   http://www.apache.org/licenses/LICENSE-2.0
1100 *
1101 * Unless required by applicable law or agreed to in writing, software
1102 * distributed under the License is distributed on an "AS IS" BASIS,
1103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1104 * See the License for the specific language governing permissions and
1105 * limitations under the License.
1106 */const RA=-62135596800,MA=1e6;class Dt{static now(){return Dt.fromMillis(Date.now())}static fromDate(e){return Dt.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),r=Math.floor((e-1e3*t)*MA);return new Dt(t,r)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new pe(ne.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new pe(ne.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<RA)throw new pe(ne.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new pe(ne.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/MA}_compareTo(e){return this.seconds===e.seconds?Qe(this.nanoseconds,e.nanoseconds):Qe(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:Dt._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(Cc(e,Dt._jsonSchema))return new Dt(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-RA;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}Dt._jsonSchemaVersion="firestore/timestamp/1.0",Dt._jsonSchema={type:zn("string",Dt._jsonSchemaVersion),seconds:zn("number"),nanoseconds:zn("number")};/**
1107 * @license
1108 * Copyright 2017 Google LLC
1109 *
1110 * Licensed under the Apache License, Version 2.0 (the "License");
1111 * you may not use this file except in compliance with the License.
1112 * You may obtain a copy of the License at
1113 *
1114 *   http://www.apache.org/licenses/LICENSE-2.0
1115 *
1116 * Unless required by applicable law or agreed to in writing, software
1117 * distributed under the License is distributed on an "AS IS" BASIS,
1118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1119 * See the License for the specific language governing permissions and
1120 * limitations under the License.
1121 */class Ye{static fromTimestamp(e){return new Ye(e)}static min(){return new Ye(new Dt(0,0))}static max(){return new Ye(new Dt(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
1122 * @license
1123 * Copyright 2021 Google LLC
1124 *
1125 * Licensed under the Apache License, Version 2.0 (the "License");
1126 * you may not use this file except in compliance with the License.
1127 * You may obtain a copy of the License at
1128 *
1129 *   http://www.apache.org/licenses/LICENSE-2.0
1130 *
1131 * Unless required by applicable law or agreed to in writing, software
1132 * distributed under the License is distributed on an "AS IS" BASIS,
1133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1134 * See the License for the specific language governing permissions and
1135 * limitations under the License.
1136 */const ad=-1;class id{constructor(e,t,r,s){this.indexId=e,this.collectionGroup=t,this.fields=r,this.indexState=s}}function t1(n){return n.fields.find((e=>e.kind===2))}function Yl(n){return n.fields.filter((e=>e.kind!==2))}function nH(n,e){let t=Qe(n.collectionGroup,e.collectionGroup);if(t!==0)return t;for(let r=0;r<Math.min(n.fields.length,e.fields.length);++r)if(t=rH(n.fields[r],e.fields[r]),t!==0)return t;return Qe(n.fields.length,e.fields.length)}id.UNKNOWN_ID=-1;class lc{constructor(e,t){this.fieldPath=e,this.kind=t}}function rH(n,e){const t=rn.comparator(n.fieldPath,e.fieldPath);return t!==0?t:Qe(n.kind,e.kind)}class od{constructor(e,t){this.sequenceNumber=e,this.offset=t}static empty(){return new od(0,fs.min())}}function dR(n,e){const t=n.toTimestamp().seconds,r=n.toTimestamp().nanoseconds+1,s=Ye.fromTimestamp(r===1e9?new Dt(t+1,0):new Dt(t,r));return new fs(s,_e.empty(),e)}function hR(n){return new fs(n.readTime,n.key,ad)}class fs{constructor(e,t,r){this.readTime=e,this.documentKey=t,this.largestBatchId=r}static min(){return new fs(Ye.min(),_e.empty(),ad)}static max(){return new fs(Ye.max(),_e.empty(),ad)}}function I_(n,e){let t=n.readTime.compareTo(e.readTime);return t!==0?t:(t=_e.comparator(n.documentKey,e.documentKey),t!==0?t:Qe(n.largestBatchId,e.largestBatchId))}/**
1137 * @license
1138 * Copyright 2020 Google LLC
1139 *
1140 * Licensed under the Apache License, Version 2.0 (the "License");
1141 * you may not use this file except in compliance with the License.
1142 * You may obtain a copy of the License at
1143 *
1144 *   http://www.apache.org/licenses/LICENSE-2.0
1145 *
1146 * Unless required by applicable law or agreed to in writing, software
1147 * distributed under the License is distributed on an "AS IS" BASIS,
1148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1149 * See the License for the specific language governing permissions and
1150 * limitations under the License.
1151 */const fR="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class mR{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}/**
1152 * @license
1153 * Copyright 2017 Google LLC
1154 *
1155 * Licensed under the Apache License, Version 2.0 (the "License");
1156 * you may not use this file except in compliance with the License.
1157 * You may obtain a copy of the License at
1158 *
1159 *   http://www.apache.org/licenses/LICENSE-2.0
1160 *
1161 * Unless required by applicable law or agreed to in writing, software
1162 * distributed under the License is distributed on an "AS IS" BASIS,
1163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1164 * See the License for the specific language governing permissions and
1165 * limitations under the License.
1166 */async function rl(n){if(n.code!==ne.FAILED_PRECONDITION||n.message!==fR)throw n;xe("LocalStore","Unexpectedly lost primary lease")}/**
1167 * @license
1168 * Copyright 2017 Google LLC
1169 *
1170 * Licensed under the Apache License, Version 2.0 (the "License");
1171 * you may not use this file except in compliance with the License.
1172 * You may obtain a copy of the License at
1173 *
1174 *   http://www.apache.org/licenses/LICENSE-2.0
1175 *
1176 * Unless required by applicable law or agreed to in writing, software
1177 * distributed under the License is distributed on an "AS IS" BASIS,
1178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1179 * See the License for the specific language governing permissions and
1180 * limitations under the License.
1181 */class J{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)}),(t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)}))}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&Ie(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new J(((r,s)=>{this.nextCallback=i=>{this.wrapSuccess(e,i).next(r,s)},this.catchCallback=i=>{this.wrapFailure(t,i).next(r,s)}}))}toPromise(){return new Promise(((e,t)=>{this.next(e,t)}))}wrapUserFunction(e){try{const t=e();return t instanceof J?t:J.resolve(t)}catch(t){return J.reject(t)}}wrapSuccess(e,t){return e?this.wrapUserFunction((()=>e(t))):J.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction((()=>e(t))):J.reject(t)}
vendor: 9,293 bytes, lines 1181-1196
1181static resolve(e){return new J(((t,r)=>{t(e)}))}static reject(e){return new J(((t,r)=>{r(e)}))}static waitFor(e){return new J(((t,r)=>{let s=0,i=0,l=!1;e.forEach((d=>{++s,d.next((()=>{++i,l&&i===s&&t()}),(h=>r(h)))})),l=!0,i===s&&t()}))}static or(e){let t=J.resolve(!1);for(const r of e)t=t.next((s=>s?J.resolve(s):r()));return t}static forEach(e,t){const r=[];return e.forEach(((s,i)=>{r.push(t.call(this,s,i))})),this.waitFor(r)}static mapArray(e,t){return new J(((r,s)=>{const i=e.length,l=new Array(i);let d=0;for(let h=0;h<i;h++){const m=h;t(e[m]).next((g=>{l[m]=g,++d,d===i&&r(l)}),(g=>s(g)))}}))}static doWhile(e,t){return new J(((r,s)=>{const i=()=>{e()===!0?t().next((()=>{i()}),s):r()};i()}))}}/**
1182 * @license
1183 * Copyright 2017 Google LLC
1184 *
1185 * Licensed under the Apache License, Version 2.0 (the "License");
1186 * you may not use this file except in compliance with the License.
1187 * You may obtain a copy of the License at
1188 *
1189 *   http://www.apache.org/licenses/LICENSE-2.0
1190 *
1191 * Unless required by applicable law or agreed to in writing, software
1192 * distributed under the License is distributed on an "AS IS" BASIS,
1193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1194 * See the License for the specific language governing permissions and
1195 * limitations under the License.
1196 */const us="SimpleDb";class My{static open(e,t,r,s){try{return new My(t,e.transaction(s,r))}catch(i){throw new Df(t,i)}}constructor(e,t){this.action=e,this.transaction=t,this.aborted=!1,this.S=new sr,this.transaction.oncomplete=()=>{this.S.resolve()},this.transaction.onabort=()=>{t.error?this.S.reject(new Df(e,t.error)):this.S.resolve()},this.transaction.onerror=r=>{const s=R_(r.target.error);this.S.reject(new Df(e,s))}}get D(){return this.S.promise}abort(e){e&&this.S.reject(e),this.aborted||(xe(us,"Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}C(){const e=this.transaction;this.aborted||typeof e.commit!="function"||e.commit()}store(e){const t=this.transaction.objectStore(e);return new aH(t)}}class Ba{static delete(e){return xe(us,"Removing database:",e),Wl(VI().indexedDB.deleteDatabase(e)).toPromise()}static v(){if(!YI())return!1;if(Ba.F())return!0;const e=Wn(),t=Ba.M(e),r=0<t&&t<10,s=pR(e),i=0<s&&s<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||r||i)}static F(){var e;return typeof process<"u"&&((e=process.__PRIVATE_env)==null?void 0:e.__PRIVATE_USE_MOCK_PERSISTENCE)==="YES"}static O(e,t){return e.store(t)}static M(e){const t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),r=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(r)}constructor(e,t,r){this.name=e,this.version=t,this.N=r,this.B=null,Ba.M(Wn())===12.2&&jn("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}async L(e){return this.db||(xe(us,"Opening database:",this.name),this.db=await new Promise(((t,r)=>{const s=indexedDB.open(this.name,this.version);s.onsuccess=i=>{const l=i.target.result;t(l)},s.onblocked=()=>{r(new Df(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},s.onerror=i=>{const l=i.target.error;l.name==="VersionError"?r(new pe(ne.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):l.name==="InvalidStateError"?r(new pe(ne.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+l)):r(new Df(e,l))},s.onupgradeneeded=i=>{xe(us,'Database "'+this.name+'" requires upgrade from version:',i.oldVersion);const l=i.target.result;this.N.k(l,s.transaction,i.oldVersion,this.version).next((()=>{xe(us,"Database upgrade to version "+this.version+" complete")}))}}))),this.q&&(this.db.onversionchange=t=>this.q(t)),this.db}K(e){this.q=e,this.db&&(this.db.onversionchange=t=>e(t))}async runTransaction(e,t,r,s){const i=t==="readonly";let l=0;for(;;){++l;try{this.db=await this.L(e);const d=My.open(this.db,e,i?"readonly":"readwrite",r),h=s(d).next((m=>(d.C(),m))).catch((m=>(d.abort(m),J.reject(m)))).toPromise();return h.catch((()=>{})),await d.D,h}catch(d){const h=d,m=h.name!=="FirebaseError"&&l<3;if(xe(us,"Transaction failed with error:",h.message,"Retrying:",m),this.close(),!m)return Promise.reject(h)}}}close(){this.db&&this.db.close(),this.db=void 0}}function pR(n){const e=n.match(/Android ([\d.]+)/i),t=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(t)}class sH{constructor(e){this.U=e,this.$=!1,this.W=null}get isDone(){return this.$}get G(){return this.W}set cursor(e){this.U=e}done(){this.$=!0}j(e){this.W=e}delete(){return Wl(this.U.delete())}}class Df extends pe{constructor(e,t){super(ne.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${t}`),this.name="IndexedDbTransactionError"}}function sl(n){return n.name==="IndexedDbTransactionError"}class aH{constructor(e){this.store=e}put(e,t){let r;return t!==void 0?(xe(us,"PUT",this.store.name,e,t),r=this.store.put(t,e)):(xe(us,"PUT",this.store.name,"<auto-key>",e),r=this.store.put(e)),Wl(r)}add(e){return xe(us,"ADD",this.store.name,e,e),Wl(this.store.add(e))}get(e){return Wl(this.store.get(e)).next((t=>(t===void 0&&(t=null),xe(us,"GET",this.store.name,e,t),t)))}delete(e){return xe(us,"DELETE",this.store.name,e),Wl(this.store.delete(e))}count(){return xe(us,"COUNT",this.store.name),Wl(this.store.count())}J(e,t){const r=this.options(e,t),s=r.index?this.store.index(r.index):this.store;if(typeof s.getAll=="function"){const i=s.getAll(r.range);return new J(((l,d)=>{i.onerror=h=>{d(h.target.error)},i.onsuccess=h=>{l(h.target.result)}}))}{const i=this.cursor(r),l=[];return this.H(i,((d,h)=>{l.push(h)})).next((()=>l))}}Z(e,t){const r=this.store.getAll(e,t===null?void 0:t);return new J(((s,i)=>{r.onerror=l=>{i(l.target.error)},r.onsuccess=l=>{s(l.target.result)}}))}X(e,t){xe(us,"DELETE ALL",this.store.name);const r=this.options(e,t);r.Y=!1;const s=this.cursor(r);return this.H(s,((i,l,d)=>d.delete()))}ee(e,t){let r;t?r=e:(r={},t=e);const s=this.cursor(r);return this.H(s,t)}te(e){const t=this.cursor({});return new J(((r,s)=>{t.onerror=i=>{const l=R_(i.target.error);s(l)},t.onsuccess=i=>{const l=i.target.result;l?e(l.primaryKey,l.value).next((d=>{d?l.continue():r()})):r()}}))}H(e,t){const r=[];return new J(((s,i)=>{e.onerror=l=>{i(l.target.error)},e.onsuccess=l=>{const d=l.target.result;if(!d)return void s();const h=new sH(d),m=t(d.primaryKey,d.value,h);if(m instanceof J){const g=m.catch((p=>(h.done(),J.reject(p))));r.push(g)}h.isDone?s():h.G===null?d.continue():d.continue(h.G)}})).next((()=>J.waitFor(r)))}options(e,t){let r;return e!==void 0&&(typeof e=="string"?r=e:t=e),{index:r,range:t}}cursor(e){let t="next";if(e.reverse&&(t="prev"),e.index){const r=this.store.index(e.index);return e.Y?r.openKeyCursor(e.range,t):r.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}function Wl(n){return new J(((e,t)=>{n.onsuccess=r=>{const s=r.target.result;e(s)},n.onerror=r=>{const s=R_(r.target.error);t(s)}}))}let PA=!1;function R_(n){const e=Ba.M(Wn());if(e>=12.2&&e<13){const t="An internal error was encountered in the Indexed Database server";if(n.message.indexOf(t)>=0){const r=new pe("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${t}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return PA||(PA=!0,setTimeout((()=>{throw r}),0)),r}}return n}const kf="IndexBackfiller";class iH{constructor(e,t){this.asyncQueue=e,this.ne=t,this.task=null}start(){this.re(15e3)}stop(){this.task&&(this.task.cancel(),this.task=null)}get started(){return this.task!==null}re(e){xe(kf,`Scheduled in ${e}ms`),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,(async()=>{this.task=null;try{const t=await this.ne.ie();xe(kf,`Documents written: ${t}`)}catch(t){sl(t)?xe(kf,"Ignoring IndexedDB error during index backfill: ",t):await rl(t)}await this.re(6e4)}))}}class oH{constructor(e,t){this.localStore=e,this.persistence=t}async ie(e=50){return this.persistence.runTransaction("Backfill Indexes","readwrite-primary",(t=>this.se(t,e)))}se(e,t){const r=new Set;let s=t,i=!0;return J.doWhile((()=>i===!0&&s>0),(()=>this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next((l=>{if(l!==null&&!r.has(l))return xe(kf,`Processing collection: ${l}`),this.oe(e,l,s).next((d=>{s-=d,r.add(l)}));i=!1})))).next((()=>t-s))}oe(e,t,r){return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,t).next((s=>this.localStore.localDocuments.getNextDocuments(e,t,s,r).next((i=>{const l=i.changes;return this.localStore.indexManager.updateIndexEntries(e,l).next((()=>this._e(s,i))).next((d=>(xe(kf,`Updating offset: ${d}`),this.localStore.indexManager.updateCollectionGroup(e,t,d)))).next((()=>l.size))}))))}_e(e,t){let r=e;
1196return t.changes.forEach(((s,i)=>{const l=hR(i);I_(l,r)>0&&(r=l)})),new fs(r.readTime,r.documentKey,Math.max(t.batchId,e.largestBatchId))}}/**
1197 * @license
1198 * Copyright 2018 Google LLC
1199 *
1200 * Licensed under the Apache License, Version 2.0 (the "License");
1201 * you may not use this file except in compliance with the License.
1202 * You may obtain a copy of the License at
1203 *
1204 *   http://www.apache.org/licenses/LICENSE-2.0
1205 *
1206 * Unless required by applicable law or agreed to in writing, software
1207 * distributed under the License is distributed on an "AS IS" BASIS,
1208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1209 * See the License for the specific language governing permissions and
1210 * limitations under the License.
1211 */class Yr{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=r=>this.ae(r),this.ue=r=>t.writeSequenceNumber(r))}ae(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ue&&this.ue(e),e}}Yr.ce=-1;/**
1212 * @license
1213 * Copyright 2017 Google LLC
1214 *
1215 * Licensed under the Apache License, Version 2.0 (the "License");
1216 * you may not use this file except in compliance with the License.
1217 * You may obtain a copy of the License at
1218 *
1219 *   http://www.apache.org/licenses/LICENSE-2.0
1220 *
1221 * Unless required by applicable law or agreed to in writing, software
1222 * distributed under the License is distributed on an "AS IS" BASIS,
1223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1224 * See the License for the specific language governing permissions and
1225 * limitations under the License.
1226 */const Fo=-1;function Em(n){return n==null}function Zf(n){return n===0&&1/n==-1/0}function gR(n){return typeof n=="number"&&Number.isInteger(n)&&!Zf(n)&&n<=Number.MAX_SAFE_INTEGER&&n>=Number.MIN_SAFE_INTEGER}/**
1227 * @license
1228 * Copyright 2017 Google LLC
1229 *
1230 * Licensed under the Apache License, Version 2.0 (the "License");
1231 * you may not use this file except in compliance with the License.
1232 * You may obtain a copy of the License at
1233 *
1234 *   http://www.apache.org/licenses/LICENSE-2.0
1235 *
1236 * Unless required by applicable law or agreed to in writing, software
1237 * distributed under the License is distributed on an "AS IS" BASIS,
1238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1239 * See the License for the specific language governing permissions and
1240 * limitations under the License.
1241 */const F0="�";function br(n){let e="";for(let t=0;t<n.length;t++)e.length>0&&(e=OA(e)),e=lH(n.get(t),e);return OA(e)}function lH(n,e){let t=e;const r=n.length;for(let s=0;s<r;s++){const i=n.charAt(s);switch(i){case"\0":t+="��";break;case F0:t+="��";break;default:t+=i}}return t}function OA(n){return n+F0+"�"}function Pa(n){const e=n.length;if(Fe(e>=2,64408,{path:n}),e===2)return Fe(n.charAt(0)===F0&&n.charAt(1)==="�",56145,{path:n}),ct.emptyPath();const t=e-2,r=[];let s="";for(let i=0;i<e;){const l=n.indexOf(F0,i);switch((l<0||l>t)&&Ie(50515,{path:n}),n.charAt(l+1)){case"�":const d=n.substring(i,l);let h;s.length===0?h=d:(s+=d,h=s,s=""),r.push(h);break;case"�":s+=n.substring(i,l),s+="\0";break;case"�":s+=n.substring(i,l+1);break;default:Ie(61167,{path:n})}i=l+2}return new ct(r)}/**
1242 * @license
1243 * Copyright 2022 Google LLC
1244 *
1245 * Licensed under the Apache License, Version 2.0 (the "License");
1246 * you may not use this file except in compliance with the License.
1247 * You may obtain a copy of the License at
1248 *
1249 *   http://www.apache.org/licenses/LICENSE-2.0
1250 *
1251 * Unless required by applicable law or agreed to in writing, software
1252 * distributed under the License is distributed on an "AS IS" BASIS,
1253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1254 * See the License for the specific language governing permissions and
1255 * limitations under the License.
1256 */const Gl="remoteDocuments",Sm="owner",Tu="owner",em="mutationQueues",cH="userId",Ws="mutations",LA="batchId",tc="userMutationsIndex",VA=["userId","batchId"];/**
1257 * @license
1258 * Copyright 2022 Google LLC
1259 *
1260 * Licensed under the Apache License, Version 2.0 (the "License");
1261 * you may not use this file except in compliance with the License.
1262 * You may obtain a copy of the License at
1263 *
1264 *   http://www.apache.org/licenses/LICENSE-2.0
1265 *
1266 * Unless required by applicable law or agreed to in writing, software
1267 * distributed under the License is distributed on an "AS IS" BASIS,
1268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1269 * See the License for the specific language governing permissions and
1270 * limitations under the License.
1271 */function Xg(n,e){return[n,br(e)]}function yR(n,e,t){return[n,br(e),t]}const uH={},ld="documentMutations",B0="remoteDocumentsV14",dH=["prefixPath","collectionGroup","readTime","documentId"],Jg="documentKeyIndex",hH=["prefixPath","collectionGroup","documentId"],xR="collectionGroupIndex",fH=["collectionGroup","readTime","prefixPath","documentId"],tm="remoteDocumentGlobal",n1="remoteDocumentGlobalKey",cd="targets",bR="queryTargetsIndex",mH=["canonicalId","targetId"],ud="targetDocuments",pH=["targetId","path"],M_="documentTargetsIndex",gH=["path","targetId"],U0="targetGlobalKey",cc="targetGlobal",nm="collectionParents",yH=["collectionId","parent"],dd="clientMetadata",xH="clientId",Py="bundles",bH="bundleId",Oy="namedQueries",vH="name",P_="indexConfiguration",wH="indexId",r1="collectionGroupIndex",_H="collectionGroup",If="indexState",TH=["indexId","uid"],vR="sequenceNumberIndex",NH=["uid","sequenceNumber"],Rf="indexEntries",EH=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],wR="documentKeyIndex",SH=["indexId","uid","orderedDocumentKey"],Ly="documentOverlays",jH=["userId","collectionPath","documentId"],s1="collectionPathOverlayIndex",AH=["userId","collectionPath","largestBatchId"],_R="collectionGroupOverlayIndex",CH=["userId","collectionGroup","largestBatchId"],O_="globals",DH="name",TR=[em,Ws,ld,Gl,cd,Sm,cc,ud,dd,tm,nm,Py,Oy],kH=[...TR,Ly],NR=[em,Ws,ld,B0,cd,Sm,cc,ud,dd,tm,nm,Py,Oy,Ly],ER=NR,L_=[...ER,P_,If,Rf],IH=L_,SR=[...L_,O_],RH=SR;/**
1272 * @license
1273 * Copyright 2020 Google LLC
1274 *
1275 * Licensed under the Apache License, Version 2.0 (the "License");
1276 * you may not use this file except in compliance with the License.
1277 * You may obtain a copy of the License at
1278 *
1279 *   http://www.apache.org/licenses/LICENSE-2.0
1280 *
1281 * Unless required by applicable law or agreed to in writing, software
1282 * distributed under the License is distributed on an "AS IS" BASIS,
1283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1284 * See the License for the specific language governing permissions and
1285 * limitations under the License.
1286 */class a1 extends mR{constructor(e,t){super(),this.le=e,this.currentSequenceNumber=t}}function Xn(n,e){const t=Ee(n);return Ba.O(t.le,e)}/**
1287 * @license
1288 * Copyright 2017 Google LLC
1289 *
1290 * Licensed under the Apache License, Version 2.0 (the "License");
1291 * you may not use this file except in compliance with the License.
1292 * You may obtain a copy of the License at
1293 *
1294 *   http://www.apache.org/licenses/LICENSE-2.0
1295 *
1296 * Unless required by applicable law or agreed to in writing, software
1297 * distributed under the License is distributed on an "AS IS" BASIS,
1298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1299 * See the License for the specific language governing permissions and
1300 * limitations under the License.
1301 */function FA(n){let e=0;for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e++;return e}function al(n,e){for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e(t,n[t])}function jR(n,e){const t=[];for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.push(e(n[r],r,n));return t}function AR(n){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}/**
1302 * @license
1303 * Copyright 2017 Google LLC
1304 *
1305 * Licensed under the Apache License, Version 2.0 (the "License");
1306 * you may not use this file except in compliance with the License.
1307 * You may obtain a copy of the License at
1308 *
1309 *   http://www.apache.org/licenses/LICENSE-2.0
1310 *
1311 * Unless required by applicable law or agreed to in writing, software
1312 * distributed under the License is distributed on an "AS IS" BASIS,
1313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1314 * See the License for the specific language governing permissions and
1315 * limitations under the License.
1316 */class Xt{constructor(e,t){this.comparator=e,this.root=t||hr.EMPTY}insert(e,t){return new Xt(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,hr.BLACK,null,
vendor: 4,548 bytes, line 1316
1316null))}remove(e){return new Xt(this.comparator,this.root.remove(e,this.comparator).copy(null,null,hr.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const r=this.comparator(e,t.key);if(r===0)return t.value;r<0?t=t.left:r>0&&(t=t.right)}return null}indexOf(e){let t=0,r=this.root;for(;!r.isEmpty();){const s=this.comparator(e,r.key);if(s===0)return t+r.left.size;s<0?r=r.left:(t+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((t,r)=>(e(t,r),!1)))}toString(){const e=[];return this.inorderTraversal(((t,r)=>(e.push(`${t}:${r}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new _g(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new _g(this.root,e,this.comparator,!1)}getReverseIterator(){return new _g(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new _g(this.root,e,this.comparator,!0)}}class _g{constructor(e,t,r,s){this.isReverse=s,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?r(e.key,t):1,t&&s&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(i===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class hr{constructor(e,t,r,s,i){this.key=e,this.value=t,this.color=r??hr.RED,this.left=s??hr.EMPTY,this.right=i??hr.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,r,s,i){return new hr(e??this.key,t??this.value,r??this.color,s??this.left,i??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let s=this;const i=r(e,s.key);return s=i<0?s.copy(null,null,null,s.left.insert(e,t,r),null):i===0?s.copy(null,t,null,null,null):s.copy(null,null,null,null,s.right.insert(e,t,r)),s.fixUp()}removeMin(){if(this.left.isEmpty())return hr.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let r,s=this;if(t(e,s.key)<0)s.left.isEmpty()||s.left.isRed()||s.left.left.isRed()||(s=s.moveRedLeft()),s=s.copy(null,null,null,s.left.remove(e,t),null);else{if(s.left.isRed()&&(s=s.rotateRight()),s.right.isEmpty()||s.right.isRed()||s.right.left.isRed()||(s=s.moveRedRight()),t(e,s.key)===0){if(s.right.isEmpty())return hr.EMPTY;r=s.right.min(),s=s.copy(r.key,r.value,null,null,s.right.removeMin())}s=s.copy(null,null,null,null,s.right.remove(e,t))}return s.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,hr.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,hr.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw Ie(43730,{key:this.key,value:this.value});if(this.right.isRed())throw Ie(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw Ie(27949);return e+(this.isRed()?0:1)}}hr.EMPTY=null,hr.RED=!0,hr.BLACK=!1;
vendor: 4,285 bytes, lines 1316-1360
1316hr.EMPTY=new class{constructor(){this.size=0}get key(){throw Ie(57766)}get value(){throw Ie(16141)}get color(){throw Ie(16727)}get left(){throw Ie(29726)}get right(){throw Ie(36894)}copy(e,t,r,s,i){return this}insert(e,t,r){return new hr(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/**
1317 * @license
1318 * Copyright 2017 Google LLC
1319 *
1320 * Licensed under the Apache License, Version 2.0 (the "License");
1321 * you may not use this file except in compliance with the License.
1322 * You may obtain a copy of the License at
1323 *
1324 *   http://www.apache.org/licenses/LICENSE-2.0
1325 *
1326 * Unless required by applicable law or agreed to in writing, software
1327 * distributed under the License is distributed on an "AS IS" BASIS,
1328 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1329 * See the License for the specific language governing permissions and
1330 * limitations under the License.
1331 */class Lt{constructor(e){this.comparator=e,this.data=new Xt(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((t,r)=>(e(t),!1)))}forEachInRange(e,t){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const s=r.getNext();if(this.comparator(s.key,e[1])>=0)return;t(s.key)}}forEachWhile(e,t){let r;for(r=t!==void 0?this.data.getIteratorFrom(t):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new BA(this.data.getIterator())}getIteratorFrom(e){return new BA(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach((r=>{t=t.add(r)})),t}isEqual(e){if(!(e instanceof Lt)||this.size!==e.size)return!1;const t=this.data.getIterator(),r=e.data.getIterator();for(;t.hasNext();){const s=t.getNext().key,i=r.getNext().key;if(this.comparator(s,i)!==0)return!1}return!0}toArray(){const e=[];return this.forEach((t=>{e.push(t)})),e}toString(){const e=[];return this.forEach((t=>e.push(t))),"SortedSet("+e.toString()+")"}copy(e){const t=new Lt(this.comparator);return t.data=e,t}}class BA{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}function Nu(n){return n.hasNext()?n.getNext():void 0}/**
1332 * @license
1333 * Copyright 2020 Google LLC
1334 *
1335 * Licensed under the Apache License, Version 2.0 (the "License");
1336 * you may not use this file except in compliance with the License.
1337 * You may obtain a copy of the License at
1338 *
1339 *   http://www.apache.org/licenses/LICENSE-2.0
1340 *
1341 * Unless required by applicable law or agreed to in writing, software
1342 * distributed under the License is distributed on an "AS IS" BASIS,
1343 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344 * See the License for the specific language governing permissions and
1345 * limitations under the License.
1346 */class Gr{constructor(e){this.fields=e,e.sort(rn.comparator)}static empty(){return new Gr([])}unionWith(e){let t=new Lt(rn.comparator);for(const r of this.fields)t=t.add(r);for(const r of e)t=t.add(r);return new Gr(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return sd(this.fields,e.fields,((t,r)=>t.isEqual(r)))}}/**
1347 * @license
1348 * Copyright 2023 Google LLC
1349 *
1350 * Licensed under the Apache License, Version 2.0 (the "License");
1351 * you may not use this file except in compliance with the License.
1352 * You may obtain a copy of the License at
1353 *
1354 *   http://www.apache.org/licenses/LICENSE-2.0
1355 *
1356 * Unless required by applicable law or agreed to in writing, software
1357 * distributed under the License is distributed on an "AS IS" BASIS,
1358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1359 * See the License for the specific language governing permissions and
1360 * limitations under the License.
1361 */class CR extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
1362 * @license
1363 * Copyright 2020 Google LLC
1364 *
1365 * Licensed under the Apache License, Version 2.0 (the "License");
1366 * you may not use this file except in compliance with the License.
1367 * You may obtain a copy of the License at
1368 *
1369 *   http://www.apache.org/licenses/LICENSE-2.0
1370 *
1371 * Unless required by applicable law or agreed to in writing, software
1372 * distributed under the License is distributed on an "AS IS" BASIS,
1373 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1374 * See the License for the specific language governing permissions and
1375 * limitations under the License.
1376 */function MH(){return typeof atob<"u"}/**
1377 * @license
1378 * Copyright 2020 Google LLC
1379 *
1380 * Licensed under the Apache License, Version 2.0 (the "License");
1381 * you may not use this file except in compliance with the License.
1382 * You may obtain a copy of the License at
1383 *
1384 *   http://www.apache.org/licenses/LICENSE-2.0
1385 *
1386 * Unless required by applicable law or agreed to in writing, software
1387 * distributed under the License is distributed on an "AS IS" BASIS,
1388 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1389 * See the License for the specific language governing permissions and
1390 * limitations under the License.
1391 */class pn{constructor(e){this.binaryString=e}static fromBase64String(e){const t=(function(s){try{return atob(s)}catch(i){throw typeof DOMException<"u"&&i instanceof DOMException?new CR("Invalid base64 string: "+i):i}})(e);return new pn(t)}static fromUint8Array(e){const t=(function(s){let i="";for(let l=0;l<s.length;++l)i+=String.fromCharCode(s[l]);return i})(e);return new pn(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return(function(t){return btoa(t)})(this.binaryString)}toUint8Array(){return(function(t){const r=new Uint8Array(t.length);for(let s=0;s<t.length;s++)r[s]=t.charCodeAt(s);return r})(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Qe(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}pn.EMPTY_BYTE_STRING=new pn("");const PH=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Si(n){if(Fe(!!n,39018),typeof n=="string"){let e=0;const t=PH.exec(n);if(Fe(!!t,46558,{timestamp:n}),t[1]){let s=t[1];s=(s+"000000000").substr(0,9),e=Number(s)}const r=new Date(n);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:cn(n.seconds),nanos:cn(n.nanos)}}function cn(n){return typeof n=="number"?n:typeof n=="string"?Number(n):0}function ji(n){return typeof n=="string"?pn.fromBase64String(n):pn.fromUint8Array(n)}/**
1392 * @license
1393 * Copyright 2020 Google LLC
1394 *
1395 * Licensed under the Apache License, Version 2.0 (the "License");
1396 * you may not use this file except in compliance with the License.
1397 * You may obtain a copy of the License at
1398 *
1399 *   http://www.apache.org/licenses/LICENSE-2.0
1400 *
1401 * Unless required by applicable law or agreed to in writing, software
1402 * distributed under the License is distributed on an "AS IS" BASIS,
1403 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1404 * See the License for the specific language governing permissions and
1405 * limitations under the License.
1406 */const DR="server_timestamp",kR="__type__",IR="__previous_value__",RR="__local_write_time__";function Vy(n){var t,r;return((r=(((t=n==null?void 0:n.mapValue)==null?void 0:t.fields)||{})[kR])==null?void 0:r.stringValue)===DR}function Fy(n){const e=n.mapValue.fields[IR];return Vy(e)?Fy(e):e}function rm(n){const e=Si(n.mapValue.fields[RR].timestampValue);return new Dt(e.seconds,e.nanos)}/**
1407 * @license
1408 * Copyright 2017 Google LLC
1409 *
1410 * Licensed under the Apache License, Version 2.0 (the "License");
1411 * you may not use this file except in compliance with the License.
1412 * You may obtain a copy of the License at
1413 *
1414 *   http://www.apache.org/licenses/LICENSE-2.0
1415 *
1416 * Unless required by applicable law or agreed to in writing, softw
1416are
1417 * distributed under the License is distributed on an "AS IS" BASIS,
1418 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1419 * See the License for the specific language governing permissions and
1420 * limitations under the License.
1421 */class OH{constructor(e,t,r,s,i,l,d,h,m,g,p){this.databaseId=e,this.appId=t,this.persistenceKey=r,this.host=s,this.ssl=i,this.forceLongPolling=l,this.autoDetectLongPolling=d,this.longPollingOptions=h,this.useFetchStreams=m,this.isUsingEmulator=g,this.apiKey=p}}const sm="(default)";class $o{constructor(e,t){this.projectId=e,this.database=t||sm}static empty(){return new $o("","")}get isDefaultDatabase(){return this.database===sm}isEqual(e){return e instanceof $o&&e.projectId===this.projectId&&e.database===this.database}}function LH(n,e){if(!Object.prototype.hasOwnProperty.apply(n.options,["projectId"]))throw new pe(ne.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new $o(n.options.projectId,e)}/**
1422 * @license
1423 * Copyright 2020 Google LLC
1424 *
1425 * Licensed under the Apache License, Version 2.0 (the "License");
1426 * you may not use this file except in compliance with the License.
1427 * You may obtain a copy of the License at
1428 *
1429 *   http://www.apache.org/licenses/LICENSE-2.0
1430 *
1431 * Unless required by applicable law or agreed to in writing, software
1432 * distributed under the License is distributed on an "AS IS" BASIS,
1433 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1434 * See the License for the specific language governing permissions and
1435 * limitations under the License.
1436 */const V_="__type__",MR="__max__",Io={mapValue:{fields:{__type__:{stringValue:MR}}}},F_="__vector__",hd="value",Zg={nullValue:"NULL_VALUE"};function Ko(n){return"nullValue"in n?0:"booleanValue"in n?1:"integerValue"in n||"doubleValue"in n?2:"timestampValue"in n?3:"stringValue"in n?5:"bytesValue"in n?6:"referenceValue"in n?7:"geoPointValue"in n?8:"arrayValue"in n?9:"mapValue"in n?Vy(n)?4:PR(n)?9007199254740991:By(n)?10:11:Ie(28295,{value:n})}function Ga(n,e){if(n===e)return!0;const t=Ko(n);if(t!==Ko(e))return!1;switch(t){case 0:case 9007199254740991:return!0;case 1:return n.booleanValue===e.booleanValue;case 4:return rm(n).isEqual(rm(e));case 3:return(function(s,i){if(typeof s.timestampValue=="string"&&typeof i.timestampValue=="string"&&s.timestampValue.length===i.timestampValue.length)return s.timestampValue===i.timestampValue;const l=Si(s.timestampValue),d=Si(i.timestampValue);return l.seconds===d.seconds&&l.nanos===d.nanos})(n,e);case 5:return n.stringValue===e.stringValue;case 6:return(function(s,i){return ji(s.bytesValue).isEqual(ji(i.bytesValue))})(n,e);case 7:return n.referenceValue===e.referenceValue;case 8:return(function(s,i){return cn(s.geoPointValue.latitude)===cn(i.geoPointValue.latitude)&&cn(s.geoPointValue.longitude)===cn(i.geoPointValue.longitude)})(n,e);case 2:return(function(s,i){if("integerValue"in s&&"integerValue"in i)return cn(s.integerValue)===cn(i.integerValue);if("doubleValue"in s&&"doubleValue"in i){const l=cn(s.doubleValue),d=cn(i.doubleValue);return l===d?Zf(l)===Zf(d):isNaN(l)&&isNaN(d)}return!1})(n,e);case 9:return sd(n.arrayValue.values||[],e.arrayValue.values||[],Ga);case 10:case 11:return(function(s,i){const l=s.mapValue.fields||{},d=i.mapValue.fields||{};if(FA(l)!==FA(d))return!1;for(const h in l)if(l.hasOwnProperty(h)&&(d[h]===void 0||!Ga(l[h],d[h])))return!1;return!0})(n,e);default:return Ie(52216,{left:n})}}function am(n,e){return(n.values||[]).find((t=>Ga(t,e)))!==void 0}function Wo(n,e){if(n===e)return 0;const t=Ko(n),r=Ko(e);if(t!==r)return Qe(t,r);switch(t){case 0:case 9007199254740991:return 0;case 1:return Qe(n.booleanValue,e.booleanValue);case 2:return(function(i,l){const d=cn(i.integerValue||i.doubleValue),h=cn(l.integerValue||l.doubleValue);return d<h?-1:d>h?1:d===h?0:isNaN(d)?isNaN(h)?0:-1:1})(n,e);case 3:return UA(n.timestampValue,e.timestampValue);case 4:return UA(rm(n),rm(e));case 5:return Zw(n.stringValue,e.stringValue);case 6:return(function(i,l){const d=ji(i),h=ji(l);return d.compareTo(h)})(n.bytesValue,e.bytesValue);case 7:return(function(i,l){const d=i.split("/"),h=l.split("/");for(let m=0;m<d.length&&m<h.length;m++){const g=Qe(d[m],h[m]);if(g!==0)return g}return Qe(d.length,h.length)})(n.referenceValue,e.referenceValue);case 8:return(function(i,l){const d=Qe(cn(i.latitude),cn(l.latitude));return d!==0?d:Qe(cn(i.longitude),cn(l.longitude))})(n.geoPointValue,e.geoPointValue);case 9:return zA(n.arrayValue,e.arrayValue);case 10:return(function(i,l){var b,w,_,N;const d=i.fields||{},h=l.fields||{},m=(b=d[hd])==null?void 0:b.arrayValue,g=(w=h[hd])==null?void 0:w.arrayValue,p=Qe(((_=m==null?void 0:m.values)==null?void 0:_.length)||0,((N=g==null?void 0:g.values)==null?void 0:N.length)||0);return p!==0?p:zA(m,g)})(n.mapValue,e.mapValue);case 11:return(function(i,l){if(i===Io.mapValue&&l===Io.mapValue)return 0;if(i===Io.mapValue)return 1;if(l===Io.mapValue)return-1;const d=i.fields||{},h=Object.keys(d),m=l.fields||{},g=Object.keys(m);h.sort(),g.sort();for(let p=0;p<h.length&&p<g.length;++p){const b=Zw(h[p],g[p]);if(b!==0)return b;const w=Wo(d[h[p]],m[g[p]]);if(w!==0)return w}return Qe(h.length,g.length)})(n.mapValue,e.mapValue);default:throw Ie(23264,{he:t})}}function UA(n,e){if(typeof n=="string"&&typeof e=="string"&&n.length===e.length)return Qe(n,e);const t=Si(n),r=Si(e),s=Qe(t.seconds,r.seconds);return s!==0?s:Qe(t.nanos,r.nanos)}function zA(n,e){const t=n.values||[],r=e.values||[];for(let s=0;s<t.length&&s<r.length;++s){const i=Wo(t[s],r[s]);if(i)return i}return Qe(t.length,r.length)}function fd(n){return i1(n)}function i1(n){return"nullValue"in n?"null":"booleanValue"in n?""+n.booleanValue:"integerValue"in n?""+n.integerValue:"doubleValue"in n?""+n.doubleValue:"timestampValue"in n?(function(t){const r=Si(t);return`time(${r.seconds},${r.nanos})`})(n.timestampValue):"stringValue"in n?n.stringValue:"bytesValue"in n?(function(t){return ji(t).toBase64()})(n.bytesValue):"referenceValue"in n?(function(t){return _e.fromName(t).toString()})(n.referenceValue):"geoPointValue"in n?(function(t){return`geo(${t.latitude},${t.longitude})`})(n.geoPointValue):"arrayValue"in n?(function(t){let r="[",s=!0;for(const i of t.values||[])s?s=!1:r+=",",r+=i1(i);return r+"]"})(n.arrayValue):"mapValue"in n?(function(t){const r=Object.keys(t.fields||{}).sort();let s="{",i=!0;for(const l of r)i?i=!1:s+=",",s+=`${l}:${i1(t.fields[l])}`;return s+"}"})(n.mapValue):Ie(61005,{value:n})}function e0(n){switch(Ko(n)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=Fy(n);return e?16+e0(e):16;case 5:return 2*n.stringValue.length;case 6:return ji(n.bytesValue).approximateByteSize();case 7:return n.referenceValue.length;case 9:return(function(r){return(r.values||[]).reduce(((s,i)=>s+e0(i)),0)})(n.arrayValue);case 10:case 11:return(function(r){let s=0;return al(r.fields,((i,l)=>{s+=i.length+e0(l)})),s})(n.mapValue);default:throw Ie(13486,{value:n})}}function gc(n,e){return{referenceValue:`projects/${n.projectId}/databases/${n.database}/documents/${e.path.canonicalString()}`}}function o1(n){return!!n&&"integerValue"in n}function im(n){return!!n&&"arrayValue"in n}function qA(n){return!!n&&"nullValue"in n}function HA(n){return!!n&&"doubleValue"in n&&isNaN(Number(n.doubleValue))}function t0(n){return!!n&&"mapValue"in n}function By(n){var t,r;return((r=(((t=n==null?void 0:n.mapValue)==null?void 0:t.fields)||{})[V_])==null?void 0:r.stringValue)===F_}function Mf(n){if(n.geoPointValue)return{geoPointValue:{...n.geoPointValue}};if(n.timestampValue&&typeof n.timestampValue=="object")return{timestampValue:{...n.timestampValue}};if(n.mapValue){const e={mapValue:{fields:{}}};return al(n.mapValue.fields,((t,r)=>e.mapValue.fields[t]=Mf(r))),e}if(n.arrayValue){const e={arrayValue:{values:[]}};for(let t=0;t<(n.arrayValue.values||[]).length;++t)e.arrayValue.values[t]=Mf(n.arrayValue.values[t]);return e}return{...n}}function PR(n){return(((n.mapValue||{}).fields||{}).__type__||{}).stringValue===MR}const OR={mapValue:{fields:{[V_]:{stringValue:F_},[hd]:{arrayValue:{}}}}};function VH(n){return"nullValue"in n?Zg:"booleanValue"in n?{booleanValue:!1}:"integerValue"in n||"doubleValue"in n?{doubleValue:NaN}:"timestampValue"in n?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in n?{stringValue:""}
vendor: 2,809 bytes, lines 1436-1451
1436:"bytesValue"in n?{bytesValue:""}:"referenceValue"in n?gc($o.empty(),_e.empty()):"geoPointValue"in n?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in n?{arrayValue:{}}:"mapValue"in n?By(n)?OR:{mapValue:{}}:Ie(35942,{value:n})}function FH(n){return"nullValue"in n?{booleanValue:!1}:"booleanValue"in n?{doubleValue:NaN}:"integerValue"in n||"doubleValue"in n?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in n?{stringValue:""}:"stringValue"in n?{bytesValue:""}:"bytesValue"in n?gc($o.empty(),_e.empty()):"referenceValue"in n?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in n?{arrayValue:{}}:"arrayValue"in n?OR:"mapValue"in n?By(n)?{mapValue:{}}:Io:Ie(61959,{value:n})}function YA(n,e){const t=Wo(n.value,e.value);return t!==0?t:n.inclusive&&!e.inclusive?-1:!n.inclusive&&e.inclusive?1:0}function GA(n,e){const t=Wo(n.value,e.value);return t!==0?t:n.inclusive&&!e.inclusive?1:!n.inclusive&&e.inclusive?-1:0}/**
1437 * @license
1438 * Copyright 2017 Google LLC
1439 *
1440 * Licensed under the Apache License, Version 2.0 (the "License");
1441 * you may not use this file except in compliance with the License.
1442 * You may obtain a copy of the License at
1443 *
1444 *   http://www.apache.org/licenses/LICENSE-2.0
1445 *
1446 * Unless required by applicable law or agreed to in writing, software
1447 * distributed under the License is distributed on an "AS IS" BASIS,
1448 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1449 * See the License for the specific language governing permissions and
1450 * limitations under the License.
1451 */class rr{constructor(e){this.value=e}static empty(){return new rr({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let r=0;r<e.length-1;++r)if(t=(t.mapValue.fields||{})[e.get(r)],!t0(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Mf(t)}setAll(e){let t=rn.emptyPath(),r={},s=[];e.forEach(((l,d)=>{if(!t.isImmediateParentOf(d)){const h=this.getFieldsMap(t);this.applyChanges(h,r,s),r={},s=[],t=d.popLast()}l?r[d.lastSegment()]=Mf(l):s.push(d.lastSegment())}));const i=this.getFieldsMap(t);this.applyChanges(i,r,s)}delete(e){const t=this.field(e.popLast());t0(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return Ga(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let r=0;r<e.length;++r){let s=t.mapValue.fields[e.get(r)];t0(s)&&s.mapValue.fields||(s={mapValue:{fields:{}}},t.mapValue.fields[e.get(r)]=s),t=s}return t.mapValue.fields}applyChanges(e,t,r){al(t,((s,i)=>e[s]=i));for(const s of r)delete e[s]}clone(){return new rr(Mf(this.value))}}function LR(n){const e=[];return al(n.fields,((t,r)=>{const s=new rn([t]);if(t0(r)){const i=LR(r.mapValue).fields;
vendor: 4,181 bytes, lines 1451-1491
1451if(i.length===0)e.push(s);else for(const l of i)e.push(s.child(l))}else e.push(s)})),new Gr(e)}/**
1452 * @license
1453 * Copyright 2017 Google LLC
1454 *
1455 * Licensed under the Apache License, Version 2.0 (the "License");
1456 * you may not use this file except in compliance with the License.
1457 * You may obtain a copy of the License at
1458 *
1459 *   http://www.apache.org/licenses/LICENSE-2.0
1460 *
1461 * Unless required by applicable law or agreed to in writing, software
1462 * distributed under the License is distributed on an "AS IS" BASIS,
1463 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1464 * See the License for the specific language governing permissions and
1465 * limitations under the License.
1466 */class nn{constructor(e,t,r,s,i,l,d){this.key=e,this.documentType=t,this.version=r,this.readTime=s,this.createTime=i,this.data=l,this.documentState=d}static newInvalidDocument(e){return new nn(e,0,Ye.min(),Ye.min(),Ye.min(),rr.empty(),0)}static newFoundDocument(e,t,r,s){return new nn(e,1,t,Ye.min(),r,s,0)}static newNoDocument(e,t){return new nn(e,2,t,Ye.min(),Ye.min(),rr.empty(),0)}static newUnknownDocument(e,t){return new nn(e,3,t,Ye.min(),Ye.min(),rr.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(Ye.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=rr.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=rr.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ye.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof nn&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new nn(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/**
1467 * @license
1468 * Copyright 2022 Google LLC
1469 *
1470 * Licensed under the Apache License, Version 2.0 (the "License");
1471 * you may not use this file except in compliance with the License.
1472 * You may obtain a copy of the License at
1473 *
1474 *   http://www.apache.org/licenses/LICENSE-2.0
1475 *
1476 * Unless required by applicable law or agreed to in writing, software
1477 * distributed under the License is distributed on an "AS IS" BASIS,
1478 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1479 * See the License for the specific language governing permissions and
1480 * limitations under the License.
1481 */class Qo{constructor(e,t){this.position=e,this.inclusive=t}}function $A(n,e,t){let r=0;for(let s=0;s<n.position.length;s++){const i=e[s],l=n.position[s];if(i.field.isKeyField()?r=_e.comparator(_e.fromName(l.referenceValue),t.key):r=Wo(l,t.data.field(i.field)),i.dir==="desc"&&(r*=-1),r!==0)break}return r}function KA(n,e){if(n===null)return e===null;if(e===null||n.inclusive!==e.inclusive||n.position.length!==e.position.length)return!1;for(let t=0;t<n.position.length;t++)if(!Ga(n.position[t],e.position[t]))return!1;return!0}/**
1482 * @license
1483 * Copyright 2022 Google LLC
1484 *
1485 * Licensed under the Apache License, Version 2.0 (the "License");
1486 * you may not use this file except in compliance with the License.
1487 * You may obtain a copy of the License at
1488 *
1489 *   http://www.apache.org/licenses/LICENSE-2.0
1490 *
1491 * Unless required by applicable law or agreed to in writing, softw
1491are
1492 * distributed under the License is distributed on an "AS IS" BASIS,
1493 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1494 * See the License for the specific language governing permissions and
1495 * limitations under the License.
1496 */class om{constructor(e,t="asc"){this.field=e,this.dir=t}}function BH(n,e){return n.dir===e.dir&&n.field.isEqual(e.field)}/**
1497 * @license
1498 * Copyright 2022 Google LLC
1499 *
1500 * Licensed under the Apache License, Version 2.0 (the "License");
1501 * you may not use this file except in compliance with the License.
1502 * You may obtain a copy of the License at
1503 *
1504 *   http://www.apache.org/licenses/LICENSE-2.0
1505 *
1506 * Unless required by applicable law or agreed to in writing, software
1507 * distributed under the License is distributed on an "AS IS" BASIS,
1508 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1509 * See the License for the specific language governing permissions and
1510 * limitations under the License.
1511 */class VR{}class bt extends VR{constructor(e,t,r){super(),this.field=e,this.op=t,this.value=r}static create(e,t,r){return e.isKeyField()?t==="in"||t==="not-in"?this.createKeyFieldInFilter(e,t,r):new UH(e,t,r):t==="array-contains"?new HH(e,r):t==="in"?new HR(e,r):t==="not-in"?new YH(e,r):t==="array-contains-any"?new GH(e,r):new bt(e,t,r)}static createKeyFieldInFilter(e,t,r){return t==="in"?new zH(e,r):new qH(e,r)}matches(e){const t=e.data.field(this.field);return this.op==="!="?t!==null&&t.nullValue===void 0&&this.matchesComparison(Wo(t,this.value)):t!==null&&Ko(this.value)===Ko(t)&&this.matchesComparison(Wo(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return Ie(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class Pt extends VR{constructor(e,t){super(),this.filters=e,this.op=t,this.Pe=null}static create(e,t){return new Pt(e,t)}matches(e){return md(this)?this.filters.find((t=>!t.matches(e)))===void 0:this.filters.find((t=>t.matches(e)))!==void 0}getFlattenedFilters(){return this.Pe!==null||(this.Pe=this.filters.reduce(((e,t)=>e.concat(t.getFlattenedFilters())),[])),this.Pe}getFilters(){return Object.assign([],this.filters)}}function md(n){return n.op==="and"}function l1(n){return n.op==="or"}function B_(n){return FR(n)&&md(n)}function FR(n){for(const e of n.filters)if(e instanceof Pt)return!1;return!0}function c1(n){if(n instanceof bt)return n.field.canonicalString()+n.op.toString()+fd(n.value);if(B_(n))return n.filters.map((e=>c1(e))).join(",");{const e=n.filters.map((t=>c1(t))).join(",");return`${n.op}(${e})`}}function BR(n,e){return n instanceof bt?(function(r,s){return s instanceof bt&&r.op===s.op&&r.field.isEqual(s.field)&&Ga(r.value,s.value)})(n,e):n instanceof Pt?(function(r,s){return s instanceof Pt&&r.op===s.op&&r.filters.length===s.filters.length?r.filters.reduce(((i,l,d)=>i&&BR(l,s.filters[d])),!0):!1})(n,e):void Ie(19439)}function UR(n,e){const t=n.filters.concat(e);return Pt.create(t,n.op)}function zR(n){return n instanceof bt?(function(t){return`${t.field.canonicalString()} ${t.op} ${fd(t.value)}`})(n):n instanceof Pt?(function(t){return t.op.toString()+" {"+t.getFilters().map(zR).join(" ,")+"}"})(n):"Filter"}class UH extends bt{constructor(e,t,r){super(e,t,r),this.key=_e.fromName(r.referenceValue)}matches(e){const t=_e.comparator(e.key,this.key);return this.matchesComparison(t)}}class zH extends bt{constructor(e,t){super(e,"in",t),this.keys=qR("in",t)}matches(e){return this.keys.some((t=>t.isEqual(e.key)))}}class qH extends bt{constructor(e,t){super(e,"not-in",t),this.keys=qR("not-in",t)}matches(e){return!this.keys.some((t=>t.isEqual(e.key)))}}function qR(n,e){var t;return(((t=e.arrayValue)==null?void 0:t.values)||[]).map((r=>_e.fromName(r.referenceValue)))}class HH extends bt{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return im(t)&&am(t.arrayValue,this.value)}}class HR extends bt{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return t!==null&&am(this.value.arrayValue,t)}}class YH extends bt{constructor(e,t){super(e,"not-in",t)}matches(e){if(am(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return t!==null&&t.nullValue===void 0&&!am(this.value.arrayValue,t)}}class GH extends bt{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!im(t)||!t.arrayValue.values)&&t.arrayValue.values.some((r=>am(this.value.arrayValue,r)))}}/**
1512 * @license
1513 * Copyright 2019 Google LLC
1514 *
1515 * Licensed under the Apache License, Version 2.0 (the "License");
1516 * you may not use this file except in compliance with the License.
1517 * You may obtain a copy of the License at
1518 *
1519 *   http://www.apache.org/licenses/LICENSE-2.0
1520 *
1521 * Unless required by applicable law or agreed to in writing, software
1522 * distributed under the License is distributed on an "AS IS" BASIS,
1523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1524 * See the License for the specific language governing permissions and
1525 * limitations under the License.
1526 */class $H{constructor(e,t=null,r=[],s=[],i=null,l=null,d=null){this.path=e,this.collectionGroup=t,this.orderBy=r,this.filters=s,this.limit=i,this.startAt=l,this.endAt=d,this.Te=null}}function u1(n,e=null,t=[],r=[],s=null,i=null,l=null){return new $H(n,e,t,r,s,i,l)}function yc(n){const e=Ee(n);if(e.Te===null){let t=e.path.canonicalString();e.collectionGroup!==null&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map((r=>c1(r))).join(","),t+="|ob:",t+=e.orderBy.map((r=>(function(i){return i.field.canonicalString()+i.dir})(r))).join(","),Em(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((r=>fd(r))).join(",")),e.endAt&&(t+="|ub:",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((r=>fd(r))).join(",")),e.Te=t}return e.Te}function jm(n,e){if(n.limit!==e.limit||n.orderBy.length!==e.orderBy.length)return!1;for(let t=0;t<n.orderBy.length;t++)if(!BH(n.orderBy[t],e.orderBy[t]))return!1;if(n.filters.length!==e.filters.length)return!1;for(let t=0;t<n.filters.length;t++)if(!BR(n.filters[t],e.filters[t]))return!1;return n.collectionGroup===e.collectionGroup&&!!n.path.isEqual(e.path)&&!!KA(n.startAt,e.startAt)&&KA(n.endAt,e.endAt)}function z0(n){return _e.isDocumentKey(n.path)&&n.collectionGroup===null&&n.filters.length===0}function q0(n,e){return n.filters.filter((t=>t instanceof bt&&t.field.isEqual(e)))}function WA(n,e,t){let r=Zg,s=!0;for(const i of q0(n,e)){let l=Zg,d=!0;switch(i.op){case"<":case"<=":l=VH(i.value);break;case"==":case"in":case">=":l=i.value;break;case">":l=i.value,d=!1;break;case"!=":case"not-in":l=Zg}YA({value:r,inclusive:s},{value:l,inclusive:d})<0&&(r=l,s=d)}if(t!==null){for(let i=0;i<n.orderBy.length;++i)if(n.orderBy[i].field.isEqual(e)){const l=t.position[i];YA({value:r,inclusive:s},{value:l,inclusive:t.inclusive})<0&&(r=l,s=t.inclusive);break}}return{value:r,inclusive:s}}function QA(n,e,t){let r=Io,s=!0;for(const i of q0(n,e)){let l=Io,d=!0;switch(i.op){case">=":case">":l=FH(i.value),d=!1;break;case"==":case"in":case"<=":l=i.value;break;case"<":l=i.value,d=!1;break;case"!=":case"not-in":l=Io}GA({value:r,inclusive:s},{value:l,inclusive:d})>0&&(r=l,s=d)}if(t!==null){for(let i=0;i<n.orderBy.length;++i)if(n.orderBy[i].field.isEqual(e)){const l=t.position[i];GA({value:r,inclusive:s},{value:l,inclusive:t.inclusive})>0&&(r=l,s=t.inclusive);break}}return{value:r,inclusive:s}}/**
1527 * @license
1528 * Copyright 2017 Google LLC
1529 *
1530 * Licensed under the Apache License, Version 2.0 (the "License");
1531 * you may not use this file except in compliance with the License.
1532 * You may obtain a copy of the License at
1533 *
1534 *   http://www.apache.org/licenses/LICENSE-2.0
1535 *
1536 * Unless required by applicable law or agreed to in writing, software
1537 * distributed under the License is distributed on an "AS IS" BASIS,
1538 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1539 * See the License for the specific language governing permissions and
1540 * limitations under the License.
1541 */class Ri{constructor(e,t=null,r=[],s=[],i=null,l="F",d=null,h=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=r,this.filters=s,this.limit=i,this.limitType=l,this.startAt=d,this.endAt=h,this.Ee=null,this.Ie=null,this.Re=null,this.startAt,this.endAt}}function YR(n,e,t,r,s,i,l,d){return new Ri(n,e,t,r,s,i,l,d)}function Bd(n){return new Ri(n)}function XA(n){return n.filters.length===0&&n.limit===null&&n.startAt==null&&n.endAt==null&&(n.explicitOrderBy.length===0||n.explicitOrderBy.length===1&&n.explicitOrderBy[0].field.isKeyField())}function KH(n){return _e.isDocumentKey(n.path)&&n.collectionGroup===null&&n.filters.length===0}function U_(n){return n.collectionGroup!==null}function qu(n){const e=Ee(n);if(e.Ee===null){e.Ee=[];const t=new Set;for(const i of e.explicitOrderBy)e.Ee.push(i),t.add(i.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(l){let d=new Lt(rn.comparator);
1541return l.filters.forEach((h=>{h.getFlattenedFilters().forEach((m=>{m.isInequality()&&(d=d.add(m.field))}))})),d})(e).forEach((i=>{t.has(i.canonicalString())||i.isKeyField()||e.Ee.push(new om(i,r))})),t.has(rn.keyField().canonicalString())||e.Ee.push(new om(rn.keyField(),r))}return e.Ee}function vr(n){const e=Ee(n);return e.Ie||(e.Ie=$R(e,qu(n))),e.Ie}function GR(n){const e=Ee(n);return e.Re||(e.Re=$R(e,n.explicitOrderBy)),e.Re}function $R(n,e){if(n.limitType==="F")return u1(n.path,n.collectionGroup,e,n.filters,n.limit,n.startAt,n.endAt);{e=e.map((s=>{const i=s.dir==="desc"?"asc":"desc";return new om(s.field,i)}));const t=n.endAt?new Qo(n.endAt.position,n.endAt.inclusive):null,r=n.startAt?new Qo(n.startAt.position,n.startAt.inclusive):null;return u1(n.path,n.collectionGroup,e,n.filters,n.limit,t,r)}}function d1(n,e){const t=n.filters.concat([e]);return new Ri(n.path,n.collectionGroup,n.explicitOrderBy.slice(),t,n.limit,n.limitType,n.startAt,n.endAt)}function WH(n,e){const t=n.explicitOrderBy.concat([e]);return new Ri(n.path,n.collectionGroup,t,n.filters.slice(),n.limit,n.limitType,n.startAt,n.endAt)}function H0(n,e,t){return new Ri(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),e,t,n.startAt,n.endAt)}function QH(n,e){return new Ri(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),n.limit,n.limitType,e,n.endAt)}function XH(n,e){return new Ri(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),n.limit,n.limitType,n.startAt,e)}function Am(n,e){return jm(vr(n),vr(e))&&n.limitType===e.limitType}function KR(n){return`${yc(vr(n))}|lt:${n.limitType}`}function Mu(n){return`Query(target=${(function(t){let r=t.path.canonicalString();return t.collectionGroup!==null&&(r+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(r+=`, filters: [${t.filters.map((s=>zR(s))).join(", ")}]`),Em(t.limit)||(r+=", limit: "+t.limit),t.orderBy.length>0&&(r+=`, orderBy: [${t.orderBy.map((s=>(function(l){return`${l.field.canonicalString()} (${l.dir})`})(s))).join(", ")}]`),t.startAt&&(r+=", startAt: ",r+=t.startAt.inclusive?"b:":"a:",r+=t.startAt.position.map((s=>fd(s))).join(",")),t.endAt&&(r+=", endAt: ",r+=t.endAt.inclusive?"a:":"b:",r+=t.endAt.position.map((s=>fd(s))).join(",")),`Target(${r})`})(vr(n))}; limitType=${n.limitType})`}function Cm(n,e){return e.isFoundDocument()&&(function(r,s){const i=s.key.path;return r.collectionGroup!==null?s.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(i):_e.isDocumentKey(r.path)?r.path.isEqual(i):r.path.isImmediateParentOf(i)})(n,e)&&(function(r,s){for(const i of qu(r))if(!i.field.isKeyField()&&s.data.field(i.field)===null)return!1;return!0})(n,e)&&(function(r,s){for(const i of r.filters)if(!i.matches(s))return!1;return!0})(n,e)&&(function(r,s){return!(r.startAt&&!(function(l,d,h){const m=$A(l,d,h);return l.inclusive?m<=0:m<0})(r.startAt,qu(r),s)||r.endAt&&!(function(l,d,h){const m=$A(l,d,h);return l.inclusive?m>=0:m>0})(r.endAt,qu(r),s))})(n,e)}function WR(n){return n.collectionGroup||(n.path.length%2==1?n.path.lastSegment():n.path.get(n.path.length-2))}function QR(n){return(e,t)=>{let r=!1;for(const s of qu(n)){const i=JH(s,e,t);if(i!==0)return i;r=r||s.field.isKeyField()}return 0}}function JH(n,e,t){const r=n.field.isKeyField()?_e.comparator(e.key,t.key):(function(i,l,d){const h=l.data.field(i),m=d.data.field(i);return h!==null&&m!==null?Wo(h,m):Ie(42886)})(n.field,e,t);switch(n.dir){case"asc":return r;case"desc":return-1*r;default:return Ie(19790,{direction:n.dir})}}/**
1542 * @license
1543 * Copyright 2017 Google LLC
1544 *
1545 * Licensed under the Apache License, Version 2.0 (the "License");
1546 * you may not use this file except in compliance with the License.
1547 * You may obtain a copy of the License at
1548 *
1549 *   http://www.apache.org/licenses/LICENSE-2.0
1550 *
1551 * Unless required by applicable law or agreed to in writing, software
1552 * distributed under the License is distributed on an "AS IS" BASIS,
1553 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1554 * See the License for the specific language governing permissions and
1555 * limitations under the License.
1556 */class Mi{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){const t=this.mapKeyFn(e),r=this.inner[t];if(r!==void 0){for(const[s,i]of r)if(this.equalsFn(s,e))return i}}has(e){return this.get(e)!==void 0}set(e,t){const r=this.mapKeyFn(e),s=this.inner[r];if(s===void 0)return this.inner[r]=[[e,t]],void this.innerSize++;for(let i=0;i<s.length;i++)if(this.equalsFn(s[i][0],e))return void(s[i]=[e,t]);s.push([e,t]),this.innerSize++}delete(e){const t=this.mapKeyFn(e),r=this.inner[t];if(r===void 0)return!1;for(let s=0;s<r.length;s++)if(this.equalsFn(r[s][0],e))return r.length===1?delete this.inner[t]:r.splice(s,1),this.innerSize--,!0;return!1}forEach(e){al(this.inner,((t,r)=>{for(const[s,i]of r)e(s,i)}))}isEmpty(){return AR(this.inner)}size(){return this.innerSize}}/**
1557 * @license
1558 * Copyright 2017 Google LLC
1559 *
1560 * Licensed under the Apache License, Version 2.0 (the "License");
1561 * you may not use this file except in compliance with the License.
1562 * You may obtain a copy of the License at
1563 *
1564 *   http://www.apache.org/licenses/LICENSE-2.0
1565 *
1566 * Unless required by applicable law or agreed to in writing, software
1567 * distributed under the License is distributed on an "AS IS" BASIS,
1568 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1569 * See the License for the specific language governing permissions and
1570 * limitations under the License.
1571 */const ZH=new Xt(_e.comparator);function $r(){return ZH}const XR=new Xt(_e.comparator);function bf(...n){let e=XR;for(const t of n)e=e.insert(t.key,t);return e}function JR(n){let e=XR;return n.forEach(((t,r)=>e=e.insert(t,r.overlayedDocument))),e}function Oa(){return Pf()}function ZR(){return Pf()}function Pf(){return new Mi((n=>n.toString()),((n,e)=>n.isEqual(e)))}const eY=new Xt(_e.comparator),tY=new Lt(_e.comparator);function nt(...n){let e=tY;for(const t of n)e=e.add(t);return e}const nY=new Lt(Qe);function z_(){return nY}/**
1572 * @license
1573 * Copyright 2020 Google LLC
1574 *
1575 * Licensed under the Apache License, Version 2.0 (the "License");
1576 * you may not use this file except in compliance with the License.
1577 * You may obtain a copy of the License at
1578 *
1579 *   http://www.apache.org/licenses/LICENSE-2.0
1580 *
1581 * Unless required by applicable law or agreed to in writing, software
1582 * distributed under the License is distributed on an "AS IS" BASIS,
1583 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1584 * See the License for the specific language governing permissions and
1585 * limitations under the License.
1586 */function q_(n,e){if(n.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Zf(e)?"-0":e}}function e4(n){return{integerValue:""+n}}function t4(n,e){return gR(e)?e4(e):q_(n,e)}/**
1587 * @license
1588 * Copyright 2018 Google LLC
1589 *
1590 * Licensed under the Apache License, Version 2.0 (the "License");
1591 * you may not use this file except in compliance with the License.
1592 * You may obtain a copy of the License at
1593 *
1594 *   http://www.apache.org/licenses/LICENSE-2.0
1595 *
1596 * Unless required by applicable law or agreed to in writing, software
1597 * distributed under the License is distributed on an "AS IS" BASIS,
1598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1599 * See the License for the specific language governing permissions and
1600 * limitations under the License.
1601 */class Uy{constructor(){this._=void 0}}function rY(n,e,t){return n instanceof pd?(function(s,i){const l={fields:{[kR]:{stringValue:DR},[RR]:{timestampValue:{seconds:s.seconds,nanos:s.nanoseconds}}}};return i&&Vy(i)&&(i=Fy(i)),i&&(l.fields[IR]=i),{mapValue:l}})(t,e):n instanceof xc?r4(n,e):n instanceof bc?s4(n,e):(function(s,i){const l=n4(s,i),d=JA(l)+JA(s.Ae);return o1(l)&&o1(s.Ae)?e4(d):q_(s.serializer,d)})(n,e)}function sY(n,e,t){return n instanceof xc?r4(n,e):n instanceof bc?s4(n,e):t}function n4(n,e){return n instanceof gd?(function(r){return o1(r)||(function(i){return!!i&&"doubleValue"in i})(r)})(e)?e:{integerValue:0}:null}class pd extends Uy{}class xc extends Uy{constructor(e){super(),this.elements=e}}function r4(n,e){const t=a4(e);for(const r of n.elements)t.some((s=>Ga(s,r)))||t.push(r);return{arrayValue:{values:t}}}class bc extends Uy{constructor(e){super(),this.elements=e}}function s4(n,e){let t=a4(e);for(const r of n.elements)t=t.filter((s=>!Ga(s,r)));return{arrayValue:{values:t}}}class gd extends Uy{constructor(e,t){super(),this.serializer=e,this.Ae=t}}function JA(n){return cn(n.integerValue||n.doubleValue)}function a4(n){return im(n)&&n.arrayValue.values?n.arrayValue.values.slice():[]}/**
1602 * @license
1603 * Copyright 2017 Google LLC
1604 *
1605 * Licensed under the Apache License, Version 2.0 (the "License");
1606 * you may not use this file except in compliance with the License.
1607 * You may obtain a copy of the License at
1608 *
1609 *   http://www.apache.org/licenses/LICENSE-2.0
1610 *
1611 * Unless required by applicable law or agreed to in writing, software
1612 * distributed under the License is distributed on an "AS IS" BASIS,
1613 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1614 * See the License for the specific language governing permissions and
1615 * limitations under the License.
1616 */class Dm{constructor(e,t){this.field=e,this.transform=t}}function aY(n,e){return n.field.isEqual(e.field)&&(function(r,s){return r instanceof xc&&s instanceof xc||r instanceof bc&&s instanceof bc?sd(r.elements,s.elements,Ga):r instanceof gd&&s instanceof gd?Ga(r.Ae,s.Ae):r instanceof pd&&s instanceof pd})(n.transform,e.transform)}class iY{constructor(e,t){this.version=e,this.transformResults=t}}class un{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new un}static exists(e){return new un(void 0,e)}static updateTime(e){return new un(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function n0(n,e){return n.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(n.updateTime):n.exists===void 0||n.exists===e.isFoundDocument()}class zy{}function i4(n,e){if(!n.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return n.isNoDocument()?new zd(n.key,un.none()):new Ud(n.key,n.data,un.none());{const t=n.data,r=rr.empty();let s=new Lt(rn.comparator);for(let i of e.fields)if(!s.has(i)){let l=t.field(i);l===null&&i.length>1&&(i=i.popLast(),l=t.field(i)),l===null?r.delete(i):r.set(i,l),s=s.add(i)}return new Pi(n.key,r,new Gr(s.toArray()),un.none())}}function oY(n,e,t){n instanceof Ud?(function(s,i,l){const d=s.value.clone(),h=eC(s.fieldTransforms,i,l.transformResults);d.setAll(h),i.convertToFoundDocument(l.version,d).setHasCommittedMutations()})(n,e,t):n instanceof Pi?(function(s,i,l){if(!n0(s.precondition,i))return void i.convertToUnknownDocument(l.version);const d=eC(s.fieldTransforms,i,l.transformResults),h=i.data;h.setAll(o4(s)),h.setAll(d),i.convertToFoundDocument(l.version,h).setHasCommittedMutations()})(n,e,t):(function(s,i,l){i.convertToNoDocument(l.version).setHasCommittedMutations()})(0,e,t)}function Of(n,e,t,r){return n instanceof Ud?(function(i,l,d,h){if(!n0(i.precondition,l))return d;const m=i.value.clone(),g=tC(i.fieldTransforms,h,l);return m.setAll(g),l.convertToFoundDocument(l.version,m).setHasLocalMutations(),null})(n,e,t,r):n instanceof Pi?(function(i,l,d,h){if(!n0(i.precondition,l))return d;const m=tC(i.fieldTransforms,h,l),g=l.data;return g.setAll(o4(i)),g.setAll(m),l.convertToFoundDocument(l.version,g).setHasLocalMutations(),d===null?null:d.unionWith(i.fieldMask.fields).unionWith(i.fieldTransforms.map((p=>p.field)))})(n,e,t,r):(function(i,l,d){return n0(i.precondition,l)?(l.convertToNoDocument(l.version).setHasLocalMutations(),null):d})(n,e,t)}function lY(n,e){let t=null;for(const r of n.fieldTransforms){const s=e.data.field(r.field),i=n4(r.transform,s||null);i!=null&&(t===null&&(t=rr.empty()),t.set(r.field,i))}return t||null}function ZA(n,e){return n.type===e.type&&!!n.key.isEqual(e.key)&&!!n.prec
1616ondition.isEqual(e.precondition)&&!!(function(r,s){return r===void 0&&s===void 0||!(!r||!s)&&sd(r,s,((i,l)=>aY(i,l)))})(n.fieldTransforms,e.fieldTransforms)&&(n.type===0?n.value.isEqual(e.value):n.type!==1||n.data.isEqual(e.data)&&n.fieldMask.isEqual(e.fieldMask))}class Ud extends zy{constructor(e,t,r,s=[]){super(),this.key=e,this.value=t,this.precondition=r,this.fieldTransforms=s,this.type=0}getFieldMask(){return null}}class Pi extends zy{constructor(e,t,r,s,i=[]){super(),this.key=e,this.data=t,this.fieldMask=r,this.precondition=s,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function o4(n){const e=new Map;return n.fieldMask.fields.forEach((t=>{if(!t.isEmpty()){const r=n.data.field(t);e.set(t,r)}})),e}function eC(n,e,t){const r=new Map;Fe(n.length===t.length,32656,{Ve:t.length,de:n.length});for(let s=0;s<t.length;s++){const i=n[s],l=i.transform,d=e.data.field(i.field);r.set(i.field,sY(l,d,t[s]))}return r}function tC(n,e,t){const r=new Map;for(const s of n){const i=s.transform,l=t.data.field(s.field);r.set(s.field,rY(i,l,e))}return r}class zd extends zy{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class H_ extends zy{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
1617 * @license
1618 * Copyright 2017 Google LLC
1619 *
1620 * Licensed under the Apache License, Version 2.0 (the "License");
1621 * you may not use this file except in compliance with the License.
1622 * You may obtain a copy of the License at
1623 *
1624 *   http://www.apache.org/licenses/LICENSE-2.0
1625 *
1626 * Unless required by applicable law or agreed to in writing, software
1627 * distributed under the License is distributed on an "AS IS" BASIS,
1628 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1629 * See the License for the specific language governing permissions and
1630 * limitations under the License.
1631 */class Y_{constructor(e,t,r,s){this.batchId=e,this.localWriteTime=t,this.baseMutations=r,this.mutations=s}applyToRemoteDocument(e,t){const r=t.mutationResults;for(let s=0;s<this.mutations.length;s++){const i=this.mutations[s];i.key.isEqual(e.key)&&oY(i,e,r[s])}}applyToLocalView(e,t){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(t=Of(r,e,t,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(t=Of(r,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const r=ZR();return this.mutations.forEach((s=>{const i=e.get(s.key),l=i.overlayedDocument;let d=this.applyToLocalView(l,i.mutatedFields);d=t.has(s.key)?null:d;const h=i4(l,d);h!==null&&r.set(s.key,h),l.isValidDocument()||l.convertToNoDocument(Ye.min())})),r}keys(){return this.mutations.reduce(((e,t)=>e.add(t.key)),nt())}isEqual(e){return this.batchId===e.batchId&&sd(this.mutations,e.mutations,((t,r)=>ZA(t,r)))&&sd(this.baseMutations,e.baseMutations,((t,r)=>ZA(t,r)))}}class G_{constructor(e,t,r,s){this.batch=e,this.commitVersion=t,this.mutationResults=r,this.docVersions=s}static from(e,t,r){Fe(e.mutations.length===r.length,58842,{me:e.mutations.length,fe:r.length});let s=(function(){return eY})();const i=e.mutations;for(let l=0;l<i.length;l++)s=s.insert(i[l].key,r[l].version);return new G_(e,t,r,s)}}/**
1632 * @license
1633 * Copyright 2022 Google LLC
1634 *
1635 * Licensed under the Apache License, Version 2.0 (the "License");
1636 * you may not use this file except in compliance with the License.
1637 * You may obtain a copy of the License at
1638 *
1639 *   http://www.apache.org/licenses/LICENSE-2.0
1640 *
1641 * Unless required by applicable law or agreed to in writing, software
1642 * distributed under the License is distributed on an "AS IS" BASIS,
1643 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1644 * See the License for the specific language governing permissions and
1645 * limitations under the License.
1646 */class $_{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{
1647      largestBatchId: ${this.largestBatchId},
1648      mutation: ${this.mutation.toString()}
1649    }`}}/**
1650 * @license
1651 * Copyright 2023 Google LLC
1652 *
1653 * Licensed under the Apache License, Version 2.0 (the "License");
1654 * you may not use this file except in compliance with the License.
1655 * You may obtain a copy of the License at
1656 *
1657 *   http://www.apache.org/licenses/LICENSE-2.0
1658 *
1659 * Unless required by applicable law or agreed to in writing, software
1660 * distributed under the License is distributed on an "AS IS" BASIS,
1661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1662 * See the License for the specific language governing permissions and
1663 * limitations under the License.
1664 */class l4{constructor(e,t,r){this.alias=e,this.aggregateType=t,this.fieldPath=r}}/**
1665 * @license
1666 * Copyright 2017 Google LLC
1667 *
1668 * Licensed under the Apache License, Version 2.0 (the "License");
1669 * you may not use this file except in compliance with the License.
1670 * You may obtain a copy of the License at
1671 *
1672 *   http://www.apache.org/licenses/LICENSE-2.0
1673 *
1674 * Unless required by applicable law or agreed to in writing, software
1675 * distributed under the License is distributed on an "AS IS" BASIS,
1676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1677 * See the License for the specific language governing permissions and
1678 * limitations under the License.
1679 */class cY{constructor(e,t){this.count=e,this.unchangedNames=t}}/**
1680 * @license
1681 * Copyright 2017 Google LLC
1682 *
1683 * Licensed under the Apache License, Version 2.0 (the "License");
1684 * you may not use this file except in compliance with the License.
1685 * You may obtain a copy of the License at
1686 *
1687 *   http://www.apache.org/licenses/LICENSE-2.0
1688 *
1689 * Unless required by applicable law or agreed to in writing, software
1690 * distributed under the License is distributed on an "AS IS" BASIS,
1691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1692 * See the License for the specific language governing permissions and
1693 * limitations under the License.
1694 */var Fn,_t;function c4(n){switch(n){case ne.OK:return Ie(64938);case ne.CANCELLED:case ne.UNKNOWN:case ne.DEADLINE_EXCEEDED:case ne.RESOURCE_EXHAUSTED:case ne.INTERNAL:case ne.UNAVAILABLE:case ne.UNAUTHENTICATED:return!1;case ne.INVALID_ARGUMENT:case ne.NOT_FOUND:case ne.ALREADY_EXISTS:case ne.PERMISSION_DENIED:case ne.FAILED_PRECONDITION:case ne.ABORTED:case ne.OUT_OF_RANGE:case ne.UNIMPLEMENTED:case ne.DATA_LOSS:return!0;default:return Ie(15467,{code:n})}}function u4(n){if(n===void 0)return jn("GRPC error has no .code"),ne.UNKNOWN;switch(n){case Fn.OK:return ne.OK;case Fn.CANCELLED:return ne.CANCELLED;case Fn.UNKNOWN:return ne.UNKNOWN;case Fn.DEADLINE_EXCEEDED:return ne.DEADLINE_EXCEEDED;case Fn.RESOURCE_EXHAUSTED:return ne.RESOURCE_EXHAUSTED;case Fn.INTERNAL:return ne.INTERNAL;case Fn.UNAVAILABLE:return ne.UNAVAILABLE;case Fn.UNAUTHENTICATED:return ne.UNAUTHENTICATED;case Fn.INVALID_ARGUMENT:return ne.INVALID_ARGUMENT;case Fn.NOT_FOUND:return ne.NOT_FOUND;case Fn.ALREADY_EXISTS:return ne.ALREADY_EXISTS;case Fn.PERMISSION_DENIED:return ne.PERMISSION_DENIED;case Fn.FAILED_PRECONDITION:return ne.FAILED_PRECONDITION;case Fn.ABORTED:return ne.ABORTED;case Fn.OUT_OF_RANGE:return ne.OUT_OF_RANGE;case Fn.UNIMPLEMENTED:return ne.UNIMPLEMENTED;case Fn.DATA_LOSS:return ne.DATA_LOSS;default:return Ie(39323,{code:n})}}(_t=Fn||(Fn={}))[_t.OK=0]="OK",_t[_t.CANCELLED=1]="CANCELLED",_t[_t.UNKNOWN=2]="UNKNOWN",_t[_t.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",_t[_t.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",_t[_t.NOT_FOUND=5]="NOT_FOUND",_t[_t.ALREADY_EXISTS=6]="ALREADY_EXISTS",_t[_t.PERMISSION_DENIED=7]="PERMISSION_DENIED",_t[_t.UNAUTHENTICATED=16]="UNAUTHENTICATED",_t[_t.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",_t[_t.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",_t[_t.ABORTED=10]="ABORTED",_t[_t.OUT_OF_RANGE=11]="OUT_OF_RANGE",_t[_t.UNIMPLEMENTED=12]="UNIMPLEMENTED",_t[_t.INTERNAL=13]="INTERNAL",_t[_t.UNAVAILABLE=14]="UNAVAILABLE",_t[_t.DATA_LOSS=15]="DATA_LOSS";/**
1695 * @license
1696 * Copyright 2023 Google LLC
1697 *
1698 * Licensed under the Apache License, Version 2.0 (the "License");
1699 * you may not use this file except in compliance with the License.
1700 * You may obtain a copy of the License at
1701 *
1702 *   http://www.apache.org/licenses/LICENSE-2.0
1703 *
1704 * Unless required by applicable law or agreed to in writing, softw
1704are
1705 * distributed under the License is distributed on an "AS IS" BASIS,
1706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1707 * See the License for the specific language governing permissions and
1708 * limitations under the License.
1709 */let Lf=null;function uY(n){if(Lf)throw new Error("a TestingHooksSpi instance is already set");Lf=n}/**
1710 * @license
1711 * Copyright 2023 Google LLC
1712 *
1713 * Licensed under the Apache License, Version 2.0 (the "License");
1714 * you may not use this file except in compliance with the License.
1715 * You may obtain a copy of the License at
1716 *
1717 *   http://www.apache.org/licenses/LICENSE-2.0
1718 *
1719 * Unless required by applicable law or agreed to in writing, software
1720 * distributed under the License is distributed on an "AS IS" BASIS,
1721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1722 * See the License for the specific language governing permissions and
1723 * limitations under the License.
1724 */function d4(){return new TextEncoder}/**
1725 * @license
1726 * Copyright 2022 Google LLC
1727 *
1728 * Licensed under the Apache License, Version 2.0 (the "License");
1729 * you may not use this file except in compliance with the License.
1730 * You may obtain a copy of the License at
1731 *
1732 *   http://www.apache.org/licenses/LICENSE-2.0
1733 *
1734 * Unless required by applicable law or agreed to in writing, software
1735 * distributed under the License is distributed on an "AS IS" BASIS,
1736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1737 * See the License for the specific language governing permissions and
1738 * limitations under the License.
1739 */const dY=new Vo([4294967295,4294967295],0);function nC(n){const e=d4().encode(n),t=new JI;return t.update(e),new Uint8Array(t.digest())}function rC(n){const e=new DataView(n.buffer),t=e.getUint32(0,!0),r=e.getUint32(4,!0),s=e.getUint32(8,!0),i=e.getUint32(12,!0);return[new Vo([t,r],0),new Vo([s,i],0)]}class K_{constructor(e,t,r){if(this.bitmap=e,this.padding=t,this.hashCount=r,t<0||t>=8)throw new vf(`Invalid padding: ${t}`);if(r<0)throw new vf(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new vf(`Invalid hash count: ${r}`);if(e.length===0&&t!==0)throw new vf(`Invalid padding when bitmap length is 0: ${t}`);this.ge=8*e.length-t,this.pe=Vo.fromNumber(this.ge)}ye(e,t,r){let s=e.add(t.multiply(Vo.fromNumber(r)));return s.compare(dY)===1&&(s=new Vo([s.getBits(0),s.getBits(1)],0)),s.modulo(this.pe).toNumber()}we(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(this.ge===0)return!1;const t=nC(e),[r,s]=rC(t);for(let i=0;i<this.hashCount;i++){const l=this.ye(r,s,i);if(!this.we(l))return!1}return!0}static create(e,t,r){const s=e%8==0?0:8-e%8,i=new Uint8Array(Math.ceil(e/8)),l=new K_(i,s,t);return r.forEach((d=>l.insert(d))),l}insert(e){if(this.ge===0)return;const t=nC(e),[r,s]=rC(t);for(let i=0;i<this.hashCount;i++){const l=this.ye(r,s,i);this.Se(l)}}Se(e){const t=Math.floor(e/8),r=e%8;this.bitmap[t]|=1<<r}}class vf extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
1740 * @license
1741 * Copyright 2017 Google LLC
1742 *
1743 * Licensed under the Apache License, Version 2.0 (the "License");
1744 * you may not use this file except in compliance with the License.
1745 * You may obtain a copy of the License at
1746 *
1747 *   http://www.apache.org/licenses/LICENSE-2.0
1748 *
1749 * Unless required by applicable law or agreed to in writing, software
1750 * distributed under the License is distributed on an "AS IS" BASIS,
1751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1752 * See the License for the specific language governing permissions and
1753 * limitations under the License.
1754 */class km{constructor(e,t,r,s,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=r,this.documentUpdates=s,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,r){const s=new Map;return s.set(e,Im.createSynthesizedTargetChangeForCurrentChange(e,t,r)),new km(Ye.min(),s,new Xt(Qe),$r(),nt())}}class Im{constructor(e,t,r,s,i){this.resumeToken=e,this.current=t,this.addedDocuments=r,this.modifiedDocuments=s,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,r){return new Im(r,t,nt(),nt(),nt())}}/**
1755 * @license
1756 * Copyright 2017 Google LLC
1757 *
1758 * Licensed under the Apache License, Version 2.0 (the "License");
1759 * you may not use this file except in compliance with the License.
1760 * You may obtain a copy of the License at
1761 *
1762 *   http://www.apache.org/licenses/LICENSE-2.0
1763 *
1764 * Unless required by applicable law or agreed to in writing, software
1765 * distributed under the License is distributed on an "AS IS" BASIS,
1766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1767 * See the License for the specific language governing permissions and
1768 * limitations under the License.
1769 */class r0{constructor(e,t,r,s){this.be=e,this.removedTargetIds=t,this.key=r,this.De=s}}class h4{constructor(e,t){this.targetId=e,this.Ce=t}}class f4{constructor(e,t,r=pn.EMPTY_BYTE_STRING,s=null){this.state=e,this.targetIds=t,this.resumeToken=r,this.cause=s}}class sC{constructor(){this.ve=0,this.Fe=aC(),this.Me=pn.EMPTY_BYTE_STRING,this.xe=!1,this.Oe=!0}get current(){return this.xe}get resumeToken(){return this.Me}get Ne(){return this.ve!==0}get Be(){return this.Oe}Le(e){e.approximateByteSize()>0&&(this.Oe=!0,this.Me=e)}ke(){let e=nt(),t=nt(),r=nt();return this.Fe.forEach(((s,i)=>{switch(i){case 0:e=e.add(s);break;case 2:t=t.add(s);break;case 1:r=r.add(s);break;default:Ie(38017,{changeType:i})}})),new Im(this.Me,this.xe,e,t,r)}qe(){this.Oe=!1,this.Fe=aC()}Ke(e,t){this.Oe=!0,this.Fe=this.Fe.insert(e,t)}Ue(e){this.Oe=!0,this.Fe=this.Fe.remove(e)}$e(){this.ve+=1}We(){this.ve-=1,Fe(this.ve>=0,3241,{ve:this.ve})}Qe(){this.Oe=!0,this.xe=!0}}class hY{constructor(e){this.Ge=e,this.ze=new Map,this.je=$r(),this.Je=Tg(),this.He=Tg(),this.Ze=new Xt(Qe)}Xe(e){for(const t of e.be)e.De&&e.De.isFoundDocument()?this.Ye(t,e.De):this.et(t,e.key,e.De);for(const t of e.removedTargetIds)this.et(t,e.key,e.De)}tt(e){this.forEachTarget(e,(t=>{const r=this.nt(t);switch(e.state){case 0:this.rt(t)&&r.Le(e.resumeToken);break;case 1:r.We(),r.Ne||r.qe(),r.Le(e.resumeToken);break;case 2:r.We(),r.Ne||this.removeTarget(t);break;case 3:this.rt(t)&&(r.Qe(),r.Le(e.resumeToken));break;case 4:this.rt(t)&&(this.it(t),r.Le(e.resumeToken));break;default:Ie(56790,{state:e.state})}}))}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.ze.forEach(((r,s)=>{this.rt(s)&&t(s)}))}st(e){const t=e.targetId,r=e.Ce.count,s=this.ot(t);if(s){const i=s.target;if(z0(i))if(r===0){const l=new _e(i.path);this.et(t,l,nn.newNoDocument(l,Ye.min()))}else Fe(r===1,20013,{expectedCount:r});else{const l=this._t(t);if(l!==r){const d=this.ut(e),h=d?this.ct(d,e,l):1;if(h!==0){this.it(t);const m=h===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ze=this.Ze.insert(t,m)}Lf==null||Lf.o((function(g,p,b,w,_){var j,P,A;const N={localCacheCount:g,existenceFilterCount:p.count,databaseId:b.database,projectId:b.projectId},E=p.unchangedNames;return E&&(N.bloomFilter={applied:_===0,hashCount:(E==null?void 0:E.hashCount)??0,bitmapLength:((P=(j=E==null?void 0:E.bits)==null?void 0:j.bitmap)==null?void 0:P.length)??0,padding:((A=E==null?void 0:E.bits)==null?void 0:A.padding)??0,mightContain:M=>(w==null?void 0:w.mightContain(M))??!1}),N})(l,e.Ce,this.Ge.ht(),d,h))}}}}ut(e){const t=e.Ce.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:r="",padding:s=0},hashCount:i=0}=t;let l,d;try{l=ji(r).toUint8Array()}catch(h){if(h instanceof CR)return Zr("Decoding the base64 bloom filter in existence filter failed ("+h.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw h}try{d=new K_(l,s,i)}catch(h){return Zr(h instanceof vf?"BloomFilter error: ":"Applying bloom filter failed: ",h),null}return d.ge===0?null:d}ct(e,t,r){return t.Ce.count===r-this.Pt(e,t.targetId)?0:2}Pt(e,t){const r=this.Ge.getRemoteKeysForTarget(t);let s=0;return r.forEach((i=>{const l=this.Ge.ht(),d=`projects/${l.projectId}/databases/${l.database}/documents/${i.path.canonicalString()}`;e.mightContain(d)||(this.et(t,i,null),s++)})),s}Tt(e){const t=new Map;this.ze.forEach(((i,l)=>{const d=this.ot(l);if(d){if(i.current&&z0(d.target)){const h=new _e(d.target.path);this.Et(h).has(l)||this.It(l,h)||this.et(l,h,nn.newNoDocument(h,e))}i.Be&&(t.set(l,i.ke()),i.qe())}}));let r=nt();this.He.forEach(((i,l)=>{let d=!0;l.forEachWhile((h=>{const m=this.ot(h);return!m||m.purpose==="TargetPurposeLimboResolution"||(d=!1,!1)})),d&&(r=r.add(i))})),this.je.forEach(((i,l)=>l.setReadTime(e)));const s=new km(e,t,this.Ze,this.je,r);return this.je=$r(),this.Je=Tg(),this.He=Tg(),this.Ze=new Xt(Qe),s}Ye(e,t){if(!this.rt(e))return;
vendor: 5,418 bytes, line 1769
1769const r=this.It(e,t.key)?2:0;this.nt(e).Ke(t.key,r),this.je=this.je.insert(t.key,t),this.Je=this.Je.insert(t.key,this.Et(t.key).add(e)),this.He=this.He.insert(t.key,this.Rt(t.key).add(e))}et(e,t,r){if(!this.rt(e))return;const s=this.nt(e);this.It(e,t)?s.Ke(t,1):s.Ue(t),this.He=this.He.insert(t,this.Rt(t).delete(e)),this.He=this.He.insert(t,this.Rt(t).add(e)),r&&(this.je=this.je.insert(t,r))}removeTarget(e){this.ze.delete(e)}_t(e){const t=this.nt(e).ke();return this.Ge.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}$e(e){this.nt(e).$e()}nt(e){let t=this.ze.get(e);return t||(t=new sC,this.ze.set(e,t)),t}Rt(e){let t=this.He.get(e);return t||(t=new Lt(Qe),this.He=this.He.insert(e,t)),t}Et(e){let t=this.Je.get(e);return t||(t=new Lt(Qe),this.Je=this.Je.insert(e,t)),t}rt(e){const t=this.ot(e)!==null;return t||xe("WatchChangeAggregator","Detected inactive target",e),t}ot(e){const t=this.ze.get(e);return t&&t.Ne?null:this.Ge.At(e)}it(e){this.ze.set(e,new sC),this.Ge.getRemoteKeysForTarget(e).forEach((t=>{this.et(e,t,null)}))}It(e,t){return this.Ge.getRemoteKeysForTarget(e).has(t)}}function Tg(){return new Xt(_e.comparator)}function aC(){return new Xt(_e.comparator)}const fY={asc:"ASCENDING",desc:"DESCENDING"},mY={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},pY={and:"AND",or:"OR"};class gY{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function h1(n,e){return n.useProto3Json||Em(e)?e:{value:e}}function yd(n,e){return n.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function m4(n,e){return n.useProto3Json?e.toBase64():e.toUint8Array()}function yY(n,e){return yd(n,e.toTimestamp())}function Dn(n){return Fe(!!n,49232),Ye.fromTimestamp((function(t){const r=Si(t);return new Dt(r.seconds,r.nanos)})(n))}function W_(n,e){return f1(n,e).canonicalString()}function f1(n,e){const t=(function(s){return new ct(["projects",s.projectId,"databases",s.database])})(n).child("documents");return e===void 0?t:t.child(e)}function p4(n){const e=ct.fromString(n);return Fe(N4(e),10190,{key:e.toString()}),e}function lm(n,e){return W_(n.databaseId,e.path)}function Ua(n,e){const t=p4(e);if(t.get(1)!==n.databaseId.projectId)throw new pe(ne.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+n.databaseId.projectId);if(t.get(3)!==n.databaseId.database)throw new pe(ne.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+n.databaseId.database);return new _e(x4(t))}function g4(n,e){return W_(n.databaseId,e)}function y4(n){const e=p4(n);return e.length===4?ct.emptyPath():x4(e)}function m1(n){return new ct(["projects",n.databaseId.projectId,"databases",n.databaseId.database]).canonicalString()}function x4(n){return Fe(n.length>4&&n.get(4)==="documents",29091,{key:n.toString()}),n.popFirst(5)}function iC(n,e,t){return{name:lm(n,e),fields:t.value.mapValue.fields}}function qy(n,e,t){const r=Ua(n,e.name),s=Dn(e.updateTime),i=e.createTime?Dn(e.createTime):Ye.min(),l=new rr({mapValue:{fields:e.fields}}),d=nn.newFoundDocument(r,s,i,l);return t&&d.setHasCommittedMutations(),t?d.setHasCommittedMutations():d}function xY(n,e){return"found"in e?(function(r,s){Fe(!!s.found,43571),s.found.name,s.found.updateTime;const i=Ua(r,s.found.name),l=Dn(s.found.updateTime),d=s.found.createTime?Dn(s.found.createTime):Ye.min(),h=new rr({mapValue:{fields:s.found.fields}});return nn.newFoundDocument(i,l,d,h)})(n,e):"missing"in e?(function(r,s){Fe(!!s.missing,3894),Fe(!!s.readTime,22933);const i=Ua(r,s.missing),l=Dn(s.readTime);return nn.newNoDocument(i,l)})(n,e):Ie(7234,{result:e})}function bY(n,e){let t;if("targetChange"in e){e.targetChange;const r=(function(m){return m==="NO_CHANGE"?0:m==="ADD"?1:m==="REMOVE"?2:m==="CURRENT"?3:m==="RESET"?4:Ie(39313,{state:m})})(e.targetChange.targetChangeType||"NO_CHANGE"),s=e.targetChange.targetIds||[],i=(function(m,g){return m.useProto3Json?(Fe(g===void 0||typeof g=="string",58123),pn.fromBase64String(g||"")):(Fe(g===void 0||g instanceof Buffer||g instanceof Uint8Array,16193),pn.fromUint8Array(g||new Uint8Array))})(n,e.targetChange.resumeToken),l=e.targetChange.cause,d=l&&(function(m){const g=m.code===void 0?ne.UNKNOWN:u4(m.code);return new pe(g,m.message||"")})(l);t=new f4(r,s,i,d||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const s=Ua(n,r.document.name),i=Dn(r.document.updateTime),l=r.document.createTime?Dn(r.document.createTime):Ye.min(),d=new rr({mapValue:{fields:r.document.fields}}),h=nn.newFoundDocument(s,i,l,d),m=r.targetIds||[],g=r.removedTargetIds||[];t=new r0(m,g,h.key,h)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const s=Ua(n,r.document),i=r.readTime?Dn(r.readTime):Ye.min(),l=nn.newNoDocument(s,i),d=r.removedTargetIds||[];t=new r0([],d,l.key,l)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const s=Ua(n,r.document),i=r.removedTargetIds||[];t=new r0([],i,s,null)}else{if(!("filter"in e))return Ie(11601,{Vt:e});{e.filter;const r=e.filter;r.targetId;const{count:s=0,unchangedNames:i}
1769=r,l=new cY(s,i),d=r.targetId;t=new h4(d,l)}}return t}function cm(n,e){let t;if(e instanceof Ud)t={update:iC(n,e.key,e.value)};else if(e instanceof zd)t={delete:lm(n,e.key)};else if(e instanceof Pi)t={update:iC(n,e.key,e.data),updateMask:EY(e.fieldMask)};else{if(!(e instanceof H_))return Ie(16599,{dt:e.type});t={verify:lm(n,e.key)}}return e.fieldTransforms.length>0&&(t.updateTransforms=e.fieldTransforms.map((r=>(function(i,l){const d=l.transform;if(d instanceof pd)return{fieldPath:l.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(d instanceof xc)return{fieldPath:l.field.canonicalString(),appendMissingElements:{values:d.elements}};if(d instanceof bc)return{fieldPath:l.field.canonicalString(),removeAllFromArray:{values:d.elements}};if(d instanceof gd)return{fieldPath:l.field.canonicalString(),increment:d.Ae};throw Ie(20930,{transform:l.transform})})(0,r)))),e.precondition.isNone||(t.currentDocument=(function(s,i){return i.updateTime!==void 0?{updateTime:yY(s,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:Ie(27497)})(n,e.precondition)),t}function p1(n,e){const t=e.currentDocument?(function(i){return i.updateTime!==void 0?un.updateTime(Dn(i.updateTime)):i.exists!==void 0?un.exists(i.exists):un.none()})(e.currentDocument):un.none(),r=e.updateTransforms?e.updateTransforms.map((s=>(function(l,d){let h=null;if("setToServerValue"in d)Fe(d.setToServerValue==="REQUEST_TIME",16630,{proto:d}),h=new pd;else if("appendMissingElements"in d){const g=d.appendMissingElements.values||[];h=new xc(g)}else if("removeAllFromArray"in d){const g=d.removeAllFromArray.values||[];h=new bc(g)}else"increment"in d?h=new gd(l,d.increment):Ie(16584,{proto:d});const m=rn.fromServerFormat(d.fieldPath);return new Dm(m,h)})(n,s))):[];if(e.update){e.update.name;const s=Ua(n,e.update.name),i=new rr({mapValue:{fields:e.update.fields}});if(e.updateMask){const l=(function(h){const m=h.fieldPaths||[];return new Gr(m.map((g=>rn.fromServerFormat(g))))})(e.updateMask);return new Pi(s,i,l,t,r)}return new Ud(s,i,t,r)}if(e.delete){const s=Ua(n,e.delete);return new zd(s,t)}if(e.verify){const s=Ua(n,e.verify);return new H_(s,t)}return Ie(1463,{proto:e})}function vY(n,e){return n&&n.length>0?(Fe(e!==void 0,14353),n.map((t=>(function(s,i){let l=s.updateTime?Dn(s.updateTime):Dn(i);return l.isEqual(Ye.min())&&(l=Dn(i)),new iY(l,s.transformResults||[])})(t,e)))):[]}function b4(n,e){return{documents:[g4(n,e.path)]}}function Hy(n,e){const t={structuredQuery:{}},r=e.path;let s;e.collectionGroup!==null?(s=r,t.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(s=r.popLast(),t.structuredQuery.from=[{collectionId:r.lastSegment()}]),t.parent=g4(n,s);const i=(function(m){if(m.length!==0)return T4(Pt.create(m,"and"))})(e.filters);i&&(t.structuredQuery.where=i);const l=(function(m){if(m.length!==0)return m.map((g=>(function(b){return{field:Eo(b.field),direction:_Y(b.dir)}})(g)))})(e.orderBy);l&&(t.structuredQuery.orderBy=l);const d=h1(n,e.limit);return d!==null&&(t.structuredQuery.limit=d),e.startAt&&(t.structuredQuery.startAt=(function(m){return{before:m.inclusive,values:m.position}})(e.startAt)),e.endAt&&(t.structuredQuery.endAt=(function(m){return{before:!m.inclusive,values:m.position}})(e.endAt)),{ft:t,parent:s}}function v4(n,e,t,r){const{ft:s,parent:i}=Hy(n,e),l={},d=[];let h=0;return t.forEach((m=>{const g=r?m.alias:"aggregate_"+h++;l[g]=m.alias,m.aggregateType==="count"?d.push({alias:g,count:{}}):m.aggregateType==="avg"?d.push({alias:g,avg:{field:Eo(m.fieldPath)}}):m.aggregateType==="sum"&&d.push({alias:g,sum:{field:Eo(m.fieldPath)}})})),{request:{structuredAggregationQuery:{aggregations:d,structuredQuery:s.structuredQuery},parent:s.parent},gt:l,parent:i}}function w4(n){let e=y4(n.parent);const t=n.structuredQuery,r=t.from?t.from.length:0;let s=null;if(r>0){Fe(r===1,65062);const g=t.from[0];g.allDescendants?s=g.collectionId:e=e.child(g.collectionId)}let i=[];t.where&&(i=(function(p){const b=_4(p);return b instanceof Pt&&B_(b)?b.getFilters():[b]})(t.where));let l=[];t.orderBy&&(l=(function(p){return p.map((b=>(function(_){return new om(Pu(_.field),(function(E){switch(E){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}})(_.direction))})(b)))})(t.orderBy));let d=null;t.limit&&(d=(function(p){let b;return b=typeof p=="object"?p.value:p,Em(b)?null:b})(t.limit));let h=null;t.startAt&&(h=(function(p){const b=!!p.before,w=p.values||[];return new Qo(w,b)})(t.startAt));let m=null;return t.endAt&&(m=(function(p){const b=!p.before,w=p.values||[];return new Qo(w,b)})(t.endAt)),YR(e,s,l,i,d,"F",h,m)}function wY(n,e){const t=(function(s){switch(s){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Ie(28987,{purpose:s})}})(e.purpose);return t==null?null:{"goog-listen-tags":t}}function _4(n){return n.unaryFilter!==void 0?(function(t){switch(t.unaryFilter.op){case"IS_NAN":const r=Pu(t.unaryFilter.field);return bt.create(r,"==",{doubleValue:NaN});case"IS_NULL":const s=Pu(t.unaryFilter.field);return bt.create(s,"==",{nullValue:"NULL_VALUE"});
1769case"IS_NOT_NAN":const i=Pu(t.unaryFilter.field);return bt.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const l=Pu(t.unaryFilter.field);return bt.create(l,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return Ie(61313);default:return Ie(60726)}})(n):n.fieldFilter!==void 0?(function(t){return bt.create(Pu(t.fieldFilter.field),(function(s){switch(s){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return Ie(58110);default:return Ie(50506)}})(t.fieldFilter.op),t.fieldFilter.value)})(n):n.compositeFilter!==void 0?(function(t){return Pt.create(t.compositeFilter.filters.map((r=>_4(r))),(function(s){switch(s){case"AND":return"and";case"OR":return"or";default:return Ie(1026)}})(t.compositeFilter.op))})(n):Ie(30097,{filter:n})}function _Y(n){return fY[n]}function TY(n){return mY[n]}function NY(n){return pY[n]}function Eo(n){return{fieldPath:n.canonicalString()}}function Pu(n){return rn.fromServerFormat(n.fieldPath)}function T4(n){return n instanceof bt?(function(t){if(t.op==="=="){if(HA(t.value))return{unaryFilter:{field:Eo(t.field),op:"IS_NAN"}};if(qA(t.value))return{unaryFilter:{field:Eo(t.field),op:"IS_NULL"}}}else if(t.op==="!="){if(HA(t.value))return{unaryFilter:{field:Eo(t.field),op:"IS_NOT_NAN"}};if(qA(t.value))return{unaryFilter:{field:Eo(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Eo(t.field),op:TY(t.op),value:t.value}}})(n):n instanceof Pt?(function(t){const r=t.getFilters().map((s=>T4(s)));return r.length===1?r[0]:{compositeFilter:{op:NY(t.op),filters:r}}})(n):Ie(54877,{filter:n})}function EY(n){const e=[];return n.fields.forEach((t=>e.push(t.canonicalString()))),{fieldPaths:e}}function N4(n){return n.length>=4&&n.get(0)==="projects"&&n.get(2)==="databases"}function E4(n){return!!n&&typeof n._toProto=="function"&&n._protoValueType==="ProtoValue"}/**
1770 * @license
1771 * Copyright 2017 Google LLC
1772 *
1773 * Licensed under the Apache License, Version 2.0 (the "License");
1774 * you may not use this file except in compliance with the License.
1775 * You may obtain a copy of the License at
1776 *
1777 *   http://www.apache.org/licenses/LICENSE-2.0
1778 *
1779 * Unless required by applicable law or agreed to in writing, software
1780 * distributed under the License is distributed on an "AS IS" BASIS,
1781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1782 * See the License for the specific language governing permissions and
1783 * limitations under the License.
1784 */class gi{constructor(e,t,r,s,i=Ye.min(),l=Ye.min(),d=pn.EMPTY_BYTE_STRING,h=null){this.target=e,this.targetId=t,this.purpose=r,this.sequenceNumber=s,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=l,this.resumeToken=d,this.expectedCount=h}withSequenceNumber(e){return new gi(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new gi(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new gi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new gi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/**
1785 * @license
1786 * Copyright 2017 Google LLC
1787 *
1788 * Licensed under the Apache License, Version 2.0 (the "License");
1789 * you may not use this file except in compliance with the License.
1790 * You may obtain a copy of the License at
1791 *
1792 *   http://www.apache.org/licenses/LICENSE-2.0
1793 *
1794 * Unless required by applicable law or agreed to in writing, software
1795 * distributed under the License is distributed on an "AS IS" BASIS,
1796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1797 * See the License for the specific language governing permissions and
1798 * limitations under the License.
1799 */class S4{constructor(e){this.yt=e}}function SY(n,e){let t;if(e.document)t=qy(n.yt,e.document,!!e.hasCommittedMutations);else if(e.noDocument){const r=_e.fromSegments(e.noDocument.path),s=wc(e.noDocument.readTime);t=nn.newNoDocument(r,s),e.hasCommittedMutations&&t.setHasCommittedMutations()}else{if(!e.unknownDocument)return Ie(56709);{const r=_e.fromSegments(e.unknownDocument.path),s=wc(e.unknownDocument.version);t=nn.newUnknownDocument(r,s)}}return e.readTime&&t.setReadTime((function(s){const i=new Dt(s[0],s[1]);return Ye.fromTimestamp(i)})(e.readTime)),t}function oC(n,e){const t=e.key,r={prefixPath:t.getCollectionPath().popLast().toArray(),collectionGroup:t.collectionGroup,documentId:t.path.lastSegment(),readTime:Y0(e.readTime),hasCommittedMutations:e.hasCommittedMutations};if(e.isFoundDocument())r.document=(function(i,l){return{name:lm(i,l.key),fields:l.data.value.mapValue.fields,updateTime:yd(i,l.version.toTimestamp()),createTime:yd(i,l.createTime.toTimestamp())}})(n.yt,e);else if(e.isNoDocument())r.noDocument={path:t.path.toArray(),readTime:vc(e.version)};else{if(!e.isUnknownDocument())return Ie(57904,{document:e});r.unknownDocument={path:t.path.toArray(),version:vc(e.version)}}return r}function Y0(n){const e=n.toTimestamp();return[e.seconds,e.nanoseconds]}function vc(n){const e=n.toTimestamp();return{seconds:e.seconds,nanoseconds:e.nanoseconds}}function wc(n){const e=new Dt(n.seconds,n.nanoseconds);return Ye.fromTimestamp(e)}function Ql(n,e){const t=(e.baseMutations||[]).map((i=>p1(n.yt,i)));for(let i=0;i<e.mutations.length-1;++i){const l=e.mutations[i];if(i+1<e.mutations.length&&e.mutations[i+1].transform!==void 0){const d=e.mutations[i+1];l.updateTransforms=d.transform.fieldTransforms,e.mutations.splice(i+1,1),++i}}const r=e.mutations.map((i=>p1(n.yt,i))),s=Dt.fromMillis(e.localWriteTimeMs);return new Y_(e.batchId,s,t,r)}function wf(n){const e=wc(n.readTime),t=n.lastLimboFreeSnapshotVersion!==void 0?wc(n.lastLimboFreeSnapshotVersion):Ye.min();let r;return r=(function(i){return i.documents!==void 0})(n.query)?(function(i){const l=i.documents.length;return Fe(l===1,1966,{count:l}),vr(Bd(y4(i.documents[0])))})(n.query):(function(i){return vr(w4(i))})(n.query),new gi(r,n.targetId,"TargetPurposeListen",n.lastListenSequenceNumber,e,t,pn.fromBase64String(n.resumeToken))}function j4(n,e){const t=vc(e.snapshotVersion),r=vc(e.lastLimboFreeSnapshotVersion);let s;s=z0(e.target)?b4(n.yt,e.target):Hy(n.yt,e.target).ft;const i=e.resumeToken.toBase64();return{targetId:e.targetId,canonicalId:yc(e.target),readTime:t,resumeToken:i,lastListenSequenceNumber:e.sequenceNumber,lastLimboFreeSnapshotVersion:r,query:s}}
1799function Yy(n){const e=w4({parent:n.parent,structuredQuery:n.structuredQuery});return n.limitType==="LAST"?H0(e,e.limit,"L"):e}function Yv(n,e){return new $_(e.largestBatchId,p1(n.yt,e.overlayMutation))}function lC(n,e){const t=e.path.lastSegment();return[n,br(e.path.popLast()),t]}function cC(n,e,t,r){return{indexId:n,uid:e,sequenceNumber:t,readTime:vc(r.readTime),documentKey:br(r.documentKey.path),largestBatchId:r.largestBatchId}}/**
1800 * @license
1801 * Copyright 2020 Google LLC
1802 *
1803 * Licensed under the Apache License, Version 2.0 (the "License");
1804 * you may not use this file except in compliance with the License.
1805 * You may obtain a copy of the License at
1806 *
1807 *   http://www.apache.org/licenses/LICENSE-2.0
1808 *
1809 * Unless required by applicable law or agreed to in writing, software
1810 * distributed under the License is distributed on an "AS IS" BASIS,
1811 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1812 * See the License for the specific language governing permissions and
1813 * limitations under the License.
1814 */class jY{getBundleMetadata(e,t){return uC(e).get(t).next((r=>{if(r)return(function(i){return{id:i.bundleId,createTime:wc(i.createTime),version:i.version}})(r)}))}saveBundleMetadata(e,t){return uC(e).put((function(s){return{bundleId:s.id,createTime:vc(Dn(s.createTime)),version:s.version}})(t))}getNamedQuery(e,t){return dC(e).get(t).next((r=>{if(r)return(function(i){return{name:i.name,query:Yy(i.bundledQuery),readTime:wc(i.readTime)}})(r)}))}saveNamedQuery(e,t){return dC(e).put((function(s){return{name:s.name,readTime:vc(Dn(s.readTime)),bundledQuery:s.bundledQuery}})(t))}}function uC(n){return Xn(n,Py)}function dC(n){return Xn(n,Oy)}/**
1815 * @license
1816 * Copyright 2022 Google LLC
1817 *
1818 * Licensed under the Apache License, Version 2.0 (the "License");
1819 * you may not use this file except in compliance with the License.
1820 * You may obtain a copy of the License at
1821 *
1822 *   http://www.apache.org/licenses/LICENSE-2.0
1823 *
1824 * Unless required by applicable law or agreed to in writing, software
1825 * distributed under the License is distributed on an "AS IS" BASIS,
1826 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1827 * See the License for the specific language governing permissions and
1828 * limitations under the License.
1829 */class Gy{constructor(e,t){this.serializer=e,this.userId=t}static wt(e,t){const r=t.uid||"";return new Gy(e,r)}getOverlay(e,t){return rf(e).get(lC(this.userId,t)).next((r=>r?Yv(this.serializer,r):null))}getOverlays(e,t){const r=Oa();return J.forEach(t,(s=>this.getOverlay(e,s).next((i=>{i!==null&&r.set(s,i)})))).next((()=>r))}saveOverlays(e,t,r){const s=[];return r.forEach(((i,l)=>{const d=new $_(t,l);s.push(this.St(e,d))})),J.waitFor(s)}removeOverlaysForBatchId(e,t,r){const s=new Set;t.forEach((l=>s.add(br(l.getCollectionPath()))));const i=[];return s.forEach((l=>{const d=IDBKeyRange.bound([this.userId,l,r],[this.userId,l,r+1],!1,!0);i.push(rf(e).X(s1,d))})),J.waitFor(i)}getOverlaysForCollection(e,t,r){const s=Oa(),i=br(t),l=IDBKeyRange.bound([this.userId,i,r],[this.userId,i,Number.POSITIVE_INFINITY],!0);return rf(e).J(s1,l).next((d=>{for(const h of d){const m=Yv(this.serializer,h);s.set(m.getKey(),m)}return s}))}getOverlaysForCollectionGroup(e,t,r,s){const i=Oa();let l;const d=IDBKeyRange.bound([this.userId,t,r],[this.userId,t,Number.POSITIVE_INFINITY],!0);return rf(e).ee({index:_R,range:d},((h,m,g)=>{const p=Yv(this.serializer,m);i.size()<s||p.largestBatchId===l?(i.set(p.getKey(),p),l=p.largestBatchId):g.done()})).next((()=>i))}St(e,t){return rf(e).put((function(s,i,l){const[d,h,m]=lC(i,l.mutation.key);return{userId:i,collectionPath:h,documentId:m,collectionGroup:l.mutation.key.getCollectionGroup(),largestBatchId:l.largestBatchId,overlayMutation:cm(s.yt,l.mutation)}})(this.serializer,this.userId,t))}}function rf(n){return Xn(n,Ly)}/**
1830 * @license
1831 * Copyright 2024 Google LLC
1832 *
1833 * Licensed under the Apache License, Version 2.0 (the "License");
1834 * you may not use this file except in compliance with the License.
1835 * You may obtain a copy of the License at
1836 *
1837 *   http://www.apache.org/licenses/LICENSE-2.0
1838 *
1839 * Unless required by applicable law or agreed to in writing, softw
1839are
1840 * distributed under the License is distributed on an "AS IS" BASIS,
1841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1842 * See the License for the specific language governing permissions and
1843 * limitations under the License.
1844 */class AY{bt(e){return Xn(e,O_)}getSessionToken(e){return this.bt(e).get("sessionToken").next((t=>{const r=t==null?void 0:t.value;return r?pn.fromUint8Array(r):pn.EMPTY_BYTE_STRING}))}setSessionToken(e,t){return this.bt(e).put({name:"sessionToken",value:t.toUint8Array()})}}/**
1845 * @license
1846 * Copyright 2021 Google LLC
1847 *
1848 * Licensed under the Apache License, Version 2.0 (the "License");
1849 * you may not use this file except in compliance with the License.
1850 * You may obtain a copy of the License at
1851 *
1852 *   http://www.apache.org/licenses/LICENSE-2.0
1853 *
1854 * Unless required by applicable law or agreed to in writing, software
1855 * distributed under the License is distributed on an "AS IS" BASIS,
1856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1857 * See the License for the specific language governing permissions and
1858 * limitations under the License.
1859 */class Xl{constructor(){}Dt(e,t){this.Ct(e,t),t.vt()}Ct(e,t){if("nullValue"in e)this.Ft(t,5);else if("booleanValue"in e)this.Ft(t,10),t.Mt(e.booleanValue?1:0);else if("integerValue"in e)this.Ft(t,15),t.Mt(cn(e.integerValue));else if("doubleValue"in e){const r=cn(e.doubleValue);isNaN(r)?this.Ft(t,13):(this.Ft(t,15),Zf(r)?t.Mt(0):t.Mt(r))}else if("timestampValue"in e){let r=e.timestampValue;this.Ft(t,20),typeof r=="string"&&(r=Si(r)),t.xt(`${r.seconds||""}`),t.Mt(r.nanos||0)}else if("stringValue"in e)this.Ot(e.stringValue,t),this.Nt(t);else if("bytesValue"in e)this.Ft(t,30),t.Bt(ji(e.bytesValue)),this.Nt(t);else if("referenceValue"in e)this.Lt(e.referenceValue,t);else if("geoPointValue"in e){const r=e.geoPointValue;this.Ft(t,45),t.Mt(r.latitude||0),t.Mt(r.longitude||0)}else"mapValue"in e?PR(e)?this.Ft(t,Number.MAX_SAFE_INTEGER):By(e)?this.kt(e.mapValue,t):(this.qt(e.mapValue,t),this.Nt(t)):"arrayValue"in e?(this.Kt(e.arrayValue,t),this.Nt(t)):Ie(19022,{Ut:e})}Ot(e,t){this.Ft(t,25),this.$t(e,t)}$t(e,t){t.xt(e)}qt(e,t){const r=e.fields||{};this.Ft(t,55);for(const s of Object.keys(r))this.Ot(s,t),this.Ct(r[s],t)}kt(e,t){var l,d;const r=e.fields||{};this.Ft(t,53);const s=hd,i=((d=(l=r[s].arrayValue)==null?void 0:l.values)==null?void 0:d.length)||0;this.Ft(t,15),t.Mt(cn(i)),this.Ot(s,t),this.Ct(r[s],t)}Kt(e,t){const r=e.values||[];this.Ft(t,50);for(const s of r)this.Ct(s,t)}Lt(e,t){this.Ft(t,37),_e.fromName(e).path.forEach((r=>{this.Ft(t,60),this.$t(r,t)}))}Ft(e,t){e.Mt(t)}Nt(e){e.Mt(2)}}Xl.Wt=new Xl;/**
1860 * @license
1861 * Copyright 2021 Google LLC
1862 *
1863 * Licensed under the Apache License, Version 2.0 (the "License");
1864 * you may not use this file except in compliance with the License.
1865 * You may obtain a copy of the License at
1866 *
1867 *   http://www.apache.org/licenses/LICENSE-2.0
1868 *
1869 * Unless required by applicable law | agreed to in writing, software
1870 * distributed under the License is distributed on an "AS IS" BASIS,
1871 * WITHOUT WARRANTIES | CONDITIONS OF ANY KIND, either express | implied.
1872 * See the License for the specific language governing permissions and
1873 * limitations under the License.
1874 */const Eu=255;function CY(n){if(n===0)return 8;let e=0;return n>>4||(e+=4,n<<=4),n>>6||(e+=2,n<<=2),n>>7||(e+=1),e}function hC(n){const e=64-(function(r){let s=0;for(let i=0;i<8;++i){const l=CY(255&r[i]);if(s+=l,l!==8)break}return s})(n);return Math.ceil(e/8)}class DY{constructor(){this.buffer=new Uint8Array(1024),this.position=0}Qt(e){const t=e[Symbol.iterator]();let r=t.next();for(;!r.done;)this.Gt(r.value),r=t.next();this.zt()}jt(e){const t=e[Symbol.iterator]();let r=t.next();for(;!r.done;)this.Jt(r.value),r=t.next();this.Ht()}Zt(e){for(const t of e){const r=t.charCodeAt(0);if(r<128)this.Gt(r);else if(r<2048)this.Gt(960|r>>>6),this.Gt(128|63&r);else if(t<"\uD800"||"\uDBFF"<t)this.Gt(480|r>>>12),this.Gt(128|63&r>>>6),this.Gt(128|63&r);else{const s=t.codePointAt(0);this.Gt(240|s>>>18),this.Gt(128|63&s>>>12),this.Gt(128|63&s>>>6),this.Gt(128|63&s)}}this.zt()}Xt(e){for(const t of e){const r=t.charCodeAt(0);if(r<128)this.Jt(r);else if(r<2048)this.Jt(960|r>>>6),this.Jt(128|63&r);else if(t<"\uD800"||"\uDBFF"<t)this.Jt(480|r>>>12),this.Jt(128|63&r>>>6),this.Jt(128|63&r);else{const s=t.codePointAt(0);this.Jt(240|s>>>18),this.Jt(128|63&s>>>12),this.Jt(128|63&s>>>6),this.Jt(128|63&s)}}this.Ht()}Yt(e){const t=this.en(e),r=hC(t);this.tn(1+r),this.buffer[this.position++]=255&r;for(let s=t.length-r;s<t.length;++s)this.buffer[this.position++]=255&t[s]}nn(e){const t=this.en(e),r=hC(t);this.tn(1+r),this.buffer[this.position++]=~(255&r);for(let s=t.length-r;s<t.length;++s)this.buffer[this.position++]=~(255&t[s])}rn(){this.sn(Eu),this.sn(255)}_n(){this.an(Eu),this.an(255)}reset(){this.position=0}seed(e){this.tn(e.length),this.buffer.set(e,this.position),this.position+=e.length}un(){return this.buffer.slice(0,this.position)}en(e){const t=(function(i){const l=new DataView(new ArrayBuffer(8));return l.setFloat64(0,i,!1),new Uint8Array(l.buffer)})(e),r=!!(128&t[0]);t[0]^=r?255:128;for(let s=1;s<t.length;++s)t[s]^=r?255:0;return t}Gt(e){const t=255&e;t===0?(this.sn(0),this.sn(255)):t===Eu?(this.sn(Eu),this.sn(0)):this.sn(t)}Jt(e){const t=255&e;t===0?(this.an(0),this.an(255)):t===Eu?(this.an(Eu),this.an(0)):this.an(e)}zt(){this.sn(0),this.sn(1)}Ht(){this.an(0),this.an(1)}sn(e){this.tn(1),this.buffer[this.position++]=e}an(e){this.tn(1),this.buffer[this.position++]=~e}tn(e){const t=e+this.position;if(t<=this.buffer.length)return;let r=2*this.buffer.length;r<t&&(r=t);const s=new Uint8Array(r);s.set(this.buffer),this.buffer=s}}class kY{constructor(e){this.cn=e}Bt(e){this.cn.Qt(e)}xt(e){this.cn.Zt(e)}Mt(e){this.cn.Yt(e)}vt(){this.cn.rn()}}class IY{constructor(e){this.cn=e}Bt(e){this.cn.jt(e)}xt(e){this.cn.Xt(e)}Mt(e){this.cn.nn(e)}vt(){this.cn._n()}}class sf{constructor(){this.cn=new DY,this.ascending=new kY(this.cn),this.descending=new IY(this.cn)}seed(e){this.cn.seed(e)}ln(e){return e===0?this.ascending:this.descending}un(){return this.cn.un()}reset(){this.cn.reset()}}/**
1875 * @license
1876 * Copyright 2022 Google LLC
1877 *
1878 * Licensed under the Apache License, Version 2.0 (the "License");
1879 * you may not use this file except in compliance with the License.
1880 * You may obtain a copy of the License at
1881 *
1882 *   http://www.apache.org/licenses/LICENSE-2.0
1883 *
1884 * Unless required by applicable law or agreed to in writing, software
1885 * distributed under the License is distributed on an "AS IS" BASIS,
1886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1887 * See the License for the specific language governing permissions and
1888 * limitations under the License.
1889 */class Jl{constructor(e,t,r,s){this.hn=e,this.Pn=t,this.Tn=r,this.En=s}In(){const e=this.En.length,t=e===0||this.En[e-1]===255?e+1:e,r=new Uint8Array(t);return r.set(this.En,0),t!==e?r.set([0],this.En.length):++r[r.length-1],new Jl(this.hn,this.Pn,this.Tn,r)}Rn(e,t,r){return{indexId:this.hn,uid:e,arrayValue:s0(this.Tn),directionalValue:s0(this.En),orderedDocumentKey:s0(t),documentKey:r.path.toArray()}}An(e,t,r){const s=this.Rn(e,t,r);return[s.indexId,s.uid,s.arrayValue,s.directionalValue,s.orderedDocumentKey,s.documentKey]}}function yo(n,e){let t=n.hn-e.hn;return t!==0?t:(t=fC(n.Tn,e.Tn),t!==0?t:(t=fC(n.En,e.En),t!==0?t:_e.comparator(n.Pn,e.Pn)))}function fC(n,e){for(let t=0;t<n.length&&t<e.length;++t){const r=n[t]-e[t];if(r!==0)return r}return n.length-e.length}function s0(n){return HI()?(function(t){let r="";for(let s=0;s<t.length;s++)r+=String.fromCharCode(t[s]);return r})(n):n}function mC(n){return typeof n!="string"?n:(function(t){const r=new Uint8Array(t.length);for(let s=0;s<t.length;s++)r[s]=t.charCodeAt(s);return r})(n)}class pC{constructor(e){this.Vn=new Lt(((t,r)=>rn.comparator(t.field,r.field))),this.collectionId=e.collectionGroup!=null?e.collectionGroup:e.path.lastSegment(),this.dn=e.orderBy,this.mn=[];for(const t of e.filters){const r=t;r.isInequality()?this.Vn=this.Vn.add(r):this.mn.push(r)}}get fn(){return this.Vn.size>1}gn(e){if(Fe(e.collectionGroup===this.collectionId,49279),this.fn)return!1;const t=t1(e);if(t!==void 0&&!this.pn(t))return!1;const r=Yl(e);let s=new Set,i=0,l=0;for(;i<r.length&&this.pn(r[i]);++i)s=s.add(r[i].fieldPath.canonicalString());if(i===r.length)return!0;if(this.Vn.size>0){const d=this.Vn.getIterator().getNext();if(!s.has(d.field.canonicalString())){const h=r[i];if(!this.yn(d,h)||!this.wn(this.dn[l++],h))return!1}++i}for(;i<r.length;++i){const d=r[i];if(l>=this.dn.length||!this.wn(this.dn[l++],d))return!1}return!0}Sn(){if(this.fn)return null;let e=new Lt(rn.comparator);const t=[];for(const r of this.mn)if(!r.field.isKeyField())if(r.op==="array-contains"||r.op==="array-contains-any")t.push(new lc(r.field,2));else{if(e.has(r.field))continue;e=e.add(r.field),t.push(new lc(r.field,0))}for(const r of this.dn)r.field.isKeyField()||e.has(r.field)||(e=e.add(r.field),t.push(new lc(r.field,r.dir==="asc"?0:1)));return new id(id.UNKNOWN_ID,this.collectionId,t,od.empty())}pn(e){for(const t of this.mn)if(this.yn(t,e))return!0;return!1}yn(e,t){if(e===void 0||!e.field.isEqual(t.fieldPath))return!1;const r=e.op==="array-contains"||e.op==="array-contains-any";return t.kind===2===r}wn(e,t){return!!e.field.isEqual(t.fieldPath)&&(t.kind===0&&e.dir==="asc"||t.kind===1&&e.dir==="desc")}}/**
1890 * @license
1891 * Copyright 2022 Google LLC
1892 *
1893 * Licensed under the Apache License, Version 2.0 (the "License");
1894 * you may not use this file except in compliance with the License.
1895 * You may obtain a copy of the License at
1896 *
1897 *   http://www.apache.org/licenses/LICENSE-2.0
1898 *
1899 * Unless required by applicable law or agreed to in writing, software
1900 * distributed under the License is distributed on an "AS IS" BASIS,
1901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1902 * See the License for the specific language governing permissions and
1903 * limitations under the License.
1904 */function A4(n){var t,r;if(Fe(n instanceof bt||n instanceof Pt,20012),n instanceof bt){if(n instanceof HR){const s=((r=(t=n.value.arrayValue)==null?void 0:t.values)==null?void 0:r.map((i=>bt.create(n.field,"==",i))))||[];return Pt.create(s,"or")}return n}const e=n.filters.map((s=>A4(s)));return Pt.create(e,n.op)}function RY(n){if(n.getFilters().length===0)return[];const e=x1(A4(n));return Fe(C4(e),7391),g1(e)||y1(e)?[e]:e.getFilters()}function g1(n){return n instanceof bt}function y1(n){return n instanceof Pt&&B_(n)}function C4(n){return g1(n)||y1(n)||(function(t){if(t instanceof Pt&&l1(t)){for(const r of t.getFilters())if(!g1(r)&&!y1(r))return!1;return!0}return!1})(n)}function x1(n){if(Fe(n instanceof bt||n instanceof Pt,34018),n instanceof bt)return n;if(n.filters.length===1)return x1(n.filters[0]);const e=n.filters.map((r=>x1(r)));let t=Pt.create(e,n.op);return t=G0(t),C4(t)?t:(Fe(t instanceof Pt,64498),Fe(md(t),40251),Fe(t.filters.length>1,57927),t.filters.reduce(((r,s)=>Q_(r,s))))}function Q_(n,e){let t;return Fe(n instanceof bt||n instanceof Pt,38388),Fe(e instanceof bt||e instanceof Pt,25473),t=n instanceof bt?e instanceof bt?(function(s,i){return Pt.create([s,i],"and")}
vendor: 4,556 bytes, lines 1904-1934
1904)(n,e):gC(n,e):e instanceof bt?gC(e,n):(function(s,i){if(Fe(s.filters.length>0&&i.filters.length>0,48005),md(s)&&md(i))return UR(s,i.getFilters());const l=l1(s)?s:i,d=l1(s)?i:s,h=l.filters.map((m=>Q_(m,d)));return Pt.create(h,"or")})(n,e),G0(t)}function gC(n,e){if(md(e))return UR(e,n.getFilters());{const t=e.filters.map((r=>Q_(n,r)));return Pt.create(t,"or")}}function G0(n){if(Fe(n instanceof bt||n instanceof Pt,11850),n instanceof bt)return n;const e=n.getFilters();if(e.length===1)return G0(e[0]);if(FR(n))return n;const t=e.map((s=>G0(s))),r=[];return t.forEach((s=>{s instanceof bt?r.push(s):s instanceof Pt&&(s.op===n.op?r.push(...s.filters):r.push(s))})),r.length===1?r[0]:Pt.create(r,n.op)}/**
1905 * @license
1906 * Copyright 2019 Google LLC
1907 *
1908 * Licensed under the Apache License, Version 2.0 (the "License");
1909 * you may not use this file except in compliance with the License.
1910 * You may obtain a copy of the License at
1911 *
1912 *   http://www.apache.org/licenses/LICENSE-2.0
1913 *
1914 * Unless required by applicable law or agreed to in writing, software
1915 * distributed under the License is distributed on an "AS IS" BASIS,
1916 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1917 * See the License for the specific language governing permissions and
1918 * limitations under the License.
1919 */class MY{constructor(){this.bn=new X_}addToCollectionParentIndex(e,t){return this.bn.add(t),J.resolve()}getCollectionParents(e,t){return J.resolve(this.bn.getEntries(t))}addFieldIndex(e,t){return J.resolve()}deleteFieldIndex(e,t){return J.resolve()}deleteAllFieldIndexes(e){return J.resolve()}createTargetIndexes(e,t){return J.resolve()}getDocumentsMatchingTarget(e,t){return J.resolve(null)}getIndexType(e,t){return J.resolve(0)}getFieldIndexes(e,t){return J.resolve([])}getNextCollectionGroupToUpdate(e){return J.resolve(null)}getMinOffset(e,t){return J.resolve(fs.min())}getMinOffsetFromCollectionGroup(e,t){return J.resolve(fs.min())}updateCollectionGroup(e,t,r){return J.resolve()}updateIndexEntries(e,t){return J.resolve()}}class X_{constructor(){this.index={}}add(e){const t=e.lastSegment(),r=e.popLast(),s=this.index[t]||new Lt(ct.comparator),i=!s.has(r);return this.index[t]=s.add(r),i}has(e){const t=e.lastSegment(),r=e.popLast(),s=this.index[t];return s&&s.has(r)}getEntries(e){return(this.index[e]||new Lt(ct.comparator)).toArray()}}/**
1920 * @license
1921 * Copyright 2019 Google LLC
1922 *
1923 * Licensed under the Apache License, Version 2.0 (the "License");
1924 * you may not use this file except in compliance with the License.
1925 * You may obtain a copy of the License at
1926 *
1927 *   http://www.apache.org/licenses/LICENSE-2.0
1928 *
1929 * Unless required by applicable law or agreed to in writing, software
1930 * distributed under the License is distributed on an "AS IS" BASIS,
1931 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1932 * See the License for the specific language governing permissions and
1933 * limitations under the License.
1934 */const yC="IndexedDbIndexManager",Ng=new Uint8Array(0);class PY{constructor(e,t){this.databaseId=t,this.Dn=new X_,this.Cn=new Mi((r=>yc(r)),((r,s)=>jm(r,s))),this.uid=e.uid||""}addToCollectionParentIndex(e,t){if(!this.Dn.has(t)){const r=t.lastSegment(),s=t.popLast();e.addOnCommittedListener((()=>{this.Dn.add(t)}));const i={collectionId:r,parent:br(s)};return xC(e).put(i)}return J.resolve()}getCollectionParents(e,t){const r=[],s=IDBKeyRange.bound([t,""],[oR(t),""],!1,!0);return xC(e).J(s).next((i=>{for(const l of i){if(l.collectionId!==t)break;r.push(Pa(l.parent))}return r}))}addFieldIndex(e,t){const r=af(e),s=(function(d){return{indexId:d.indexId,collectionGroup:d.collectionGroup,fields:d.fields.map((h=>[h.fieldPath.canonicalString(),h.kind]))}})(t);delete s.indexId;const i=r.add(s);if(t.indexState){const l=ju(e);return i.next((d=>{l.put(cC(d,this.uid,t.indexState.sequenceNumber,t.indexState.offset))}))}return i.next()}deleteFieldIndex(e,t){const r=af(e),s=ju(e),i=Su(e);return r.delete(t.indexId).next((()=>s.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0)))).next((()=>i.delete(IDBKeyRange.bound([t.indexId],[t.indexId+1],!1,!0))))}deleteAllFieldIndexes(e){const t=af(e),r=Su(e),s=ju(e);return t.X().next((()=>r.X())).next((()=>s.X()))}createTargetIndexes(e,t){return J.forEach(this.vn(t),(r=>this.getIndexType(e,r).next((s=>{if(s===0||s===1){const i=new pC(r).Sn();if(i!=null)return this.addFieldIndex(e,i)}}))))}getDocumentsMatchingTarget(e,t){const r=Su(e);let s=!0;const i=new Map;return J.forEach(this.vn(t),(l=>this.Fn(e,l).next((d=>{s&&(s=!!d),i.set(l,d)})))).next((()=>
1934{if(s){let l=nt();const d=[];return J.forEach(i,((h,m)=>{xe(yC,`Using index ${(function(A){return`id=${A.indexId}|cg=${A.collectionGroup}|f=${A.fields.map((M=>`${M.fieldPath}:${M.kind}`)).join(",")}`})(h)} to execute ${yc(t)}`);const g=(function(A,M){const O=t1(M);if(O===void 0)return null;for(const q of q0(A,O.fieldPath))switch(q.op){case"array-contains-any":return q.value.arrayValue.values||[];case"array-contains":return[q.value]}return null})(m,h),p=(function(A,M){const O=new Map;for(const q of Yl(M))for(const L of q0(A,q.fieldPath))switch(L.op){case"==":case"in":O.set(q.fieldPath.canonicalString(),L.value);break;case"not-in":case"!=":return O.set(q.fieldPath.canonicalString(),L.value),Array.from(O.values())}return null})(m,h),b=(function(A,M){const O=[];let q=!0;for(const L of Yl(M)){const k=L.kind===0?WA(A,L.fieldPath,A.startAt):QA(A,L.fieldPath,A.startAt);O.push(k.value),q&&(q=k.inclusive)}return new Qo(O,q)})(m,h),w=(function(A,M){const O=[];let q=!0;for(const L of Yl(M)){const k=L.kind===0?QA(A,L.fieldPath,A.endAt):WA(A,L.fieldPath,A.endAt);O.push(k.value),q&&(q=k.inclusive)}return new Qo(O,q)})(m,h),_=this.Mn(h,m,b),N=this.Mn(h,m,w),E=this.xn(h,m,p),j=this.On(h.indexId,g,_,b.inclusive,N,w.inclusive,E);return J.forEach(j,(P=>r.Z(P,t.limit).next((A=>{A.forEach((M=>{const O=_e.fromSegments(M.documentKey);l.has(O)||(l=l.add(O),d.push(O))}))}))))})).next((()=>d))}return J.resolve(null)}))}vn(e){let t=this.Cn.get(e);return t||(e.filters.length===0?t=[e]:t=RY(Pt.create(e.filters,"and")).map((r=>u1(e.path,e.collectionGroup,e.orderBy,r.getFilters(),e.limit,e.startAt,e.endAt))),this.Cn.set(e,t),t)}On(e,t,r,s,i,l,d){const h=(t!=null?t.length:1)*Math.max(r.length,i.length),m=h/(t!=null?t.length:1),g=[];for(let p=0;p<h;++p){const b=t?this.Nn(t[p/m]):Ng,w=this.Bn(e,b,r[p%m],s),_=this.Ln(e,b,i[p%m],l),N=d.map((E=>this.Bn(e,b,E,!0)));g.push(...this.createRange(w,_,N))}return g}Bn(e,t,r,s){const i=new Jl(e,_e.empty(),t,r);return s?i:i.In()}Ln(e,t,r,s){const i=new Jl(e,_e.empty(),t,r);return s?i.In():i}Fn(e,t){const r=new pC(t),s=t.collectionGroup!=null?t.collectionGroup:t.path.lastSegment();return this.getFieldIndexes(e,s).next((i=>{let l=null;for(const d of i)r.gn(d)&&(!l||d.fields.length>l.fields.length)&&(l=d);return l}))}getIndexType(e,t){let r=2;const s=this.vn(t);return J.forEach(s,(i=>this.Fn(e,i).next((l=>{l?r!==0&&l.fields.length<(function(h){let m=new Lt(rn.comparator),g=!1;for(const p of h.filters)for(const b of p.getFlattenedFilters())b.field.isKeyField()||(b.op==="array-contains"||b.op==="array-contains-any"?g=!0:m=m.add(b.field));for(const p of h.orderBy)p.field.isKeyField()||(m=m.add(p.field));return m.size+(g?1:0)})(i)&&(r=1):r=0})))).next((()=>(function(l){return l.limit!==null})(t)&&s.length>1&&r===2?1:r))}kn(e,t){const r=new sf;for(const s of Yl(e)){const i=t.data.field(s.fieldPath);if(i==null)return null;const l=r.ln(s.kind);Xl.Wt.Dt(i,l)}return r.un()}Nn(e){const t=new sf;return Xl.Wt.Dt(e,t.ln(0)),t.un()}qn(e,t){const r=new sf;return Xl.Wt.Dt(gc(this.databaseId,t),r.ln((function(i){const l=Yl(i);return l.length===0?0:l[l.length-1].kind})(e))),r.un()}xn(e,t,r){if(r===null)return[];let s=[];s.push(new sf);let i=0;for(const l of Yl(e)){const d=r[i++];for(const h of s)if(this.Kn(t,l.fieldPath)&&im(d))s=this.Un(s,l,d);else{const m=h.ln(l.kind);Xl.Wt.Dt(d,m)}}return this.$n(s)}Mn(e,t,r){return this.xn(e,t,r.position)}$n(e){const t=[];for(let r=0;r<e.length;++r)t[r]=e[r].un();return t}Un(e,t,r){const s=[...e],i=[];for(const l of r.arrayValue.values||[])for(const d of s){const h=new sf;h.seed(d.un()),Xl.Wt.Dt(l,h.ln(t.kind)),i.push(h)}return i}Kn(e,t){return!!e.filters.find((r=>r instanceof bt&&r.field.isEqual(t)&&(r.op==="in"||r.op==="not-in")))}getFieldIndexes(e,t){const r=af(e),s=ju(e);return(t?r.J(r1,IDBKeyRange.bound(t,t)):r.J()).next((i=>{const l=[];return J.forEach(i,(d=>s.get([d.indexId,this.uid]).next((h=>{l.push((function(g,p){const b=p?new od(p.sequenceNumber,new fs(wc(p.readTime),new _e(Pa(p.documentKey)),p.largestBatchId)):od.empty(),w=g.fields.map((([_,N])=>new lc(rn.fromServerFormat(_),N)));return new id(g.indexId,g.collectionGroup,w,b)})(d,h))})))).next((()=>l))}))}getNextCollectionGroupToUpdate(e){return this.getFieldIndexes(e).next((t=>t.length===0?null:(t.sort(((r,s)=>{const i=r.indexState.sequenceNumber-s.indexState.sequenceNumber;return i!==0?i:Qe(r.collectionGroup,s.collectionGroup)})),t[0].collectionGroup)))}updateCollectionGroup(e,t,r){const s=af(e),i=ju(e);return this.Wn(e).next((l=>s.J(r1,IDBKeyRange.bound(t,t)).next((d=>J.forEach(d,(h=>
vendor: 16,899 bytes, lines 1934-2024
1934i.put(cC(h.indexId,this.uid,l,r))))))))}updateIndexEntries(e,t){const r=new Map;return J.forEach(t,((s,i)=>{const l=r.get(s.collectionGroup);return(l?J.resolve(l):this.getFieldIndexes(e,s.collectionGroup)).next((d=>(r.set(s.collectionGroup,d),J.forEach(d,(h=>this.Qn(e,s,h).next((m=>{const g=this.Gn(i,h);return m.isEqual(g)?J.resolve():this.zn(e,i,h,m,g)})))))))}))}jn(e,t,r,s){return Su(e).put(s.Rn(this.uid,this.qn(r,t.key),t.key))}Jn(e,t,r,s){return Su(e).delete(s.An(this.uid,this.qn(r,t.key),t.key))}Qn(e,t,r){const s=Su(e);let i=new Lt(yo);return s.ee({index:wR,range:IDBKeyRange.only([r.indexId,this.uid,s0(this.qn(r,t))])},((l,d)=>{i=i.add(new Jl(r.indexId,t,mC(d.arrayValue),mC(d.directionalValue)))})).next((()=>i))}Gn(e,t){let r=new Lt(yo);const s=this.kn(t,e);if(s==null)return r;const i=t1(t);if(i!=null){const l=e.data.field(i.fieldPath);if(im(l))for(const d of l.arrayValue.values||[])r=r.add(new Jl(t.indexId,e.key,this.Nn(d),s))}else r=r.add(new Jl(t.indexId,e.key,Ng,s));return r}zn(e,t,r,s,i){xe(yC,"Updating index entries for document '%s'",t.key);const l=[];return(function(h,m,g,p,b){const w=h.getIterator(),_=m.getIterator();let N=Nu(w),E=Nu(_);for(;N||E;){let j=!1,P=!1;if(N&&E){const A=g(N,E);A<0?P=!0:A>0&&(j=!0)}else N!=null?P=!0:j=!0;j?(p(E),E=Nu(_)):P?(b(N),N=Nu(w)):(N=Nu(w),E=Nu(_))}})(s,i,yo,(d=>{l.push(this.jn(e,t,r,d))}),(d=>{l.push(this.Jn(e,t,r,d))})),J.waitFor(l)}Wn(e){let t=1;return ju(e).ee({index:vR,reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},((r,s,i)=>{i.done(),t=s.sequenceNumber+1})).next((()=>t))}createRange(e,t,r){r=r.sort(((l,d)=>yo(l,d))).filter(((l,d,h)=>!d||yo(l,h[d-1])!==0));const s=[];s.push(e);for(const l of r){const d=yo(l,e),h=yo(l,t);if(d===0)s[0]=e.In();else if(d>0&&h<0)s.push(l),s.push(l.In());else if(h>0)break}s.push(t);const i=[];for(let l=0;l<s.length;l+=2){if(this.Hn(s[l],s[l+1]))return[];const d=s[l].An(this.uid,Ng,_e.empty()),h=s[l+1].An(this.uid,Ng,_e.empty());i.push(IDBKeyRange.bound(d,h))}return i}Hn(e,t){return yo(e,t)>0}getMinOffsetFromCollectionGroup(e,t){return this.getFieldIndexes(e,t).next(bC)}getMinOffset(e,t){return J.mapArray(this.vn(t),(r=>this.Fn(e,r).next((s=>s||Ie(44426))))).next(bC)}}function xC(n){return Xn(n,nm)}function Su(n){return Xn(n,Rf)}function af(n){return Xn(n,P_)}function ju(n){return Xn(n,If)}function bC(n){Fe(n.length!==0,28825);let e=n[0].indexState.offset,t=e.largestBatchId;for(let r=1;r<n.length;r++){const s=n[r].indexState.offset;I_(s,e)<0&&(e=s),t<s.largestBatchId&&(t=s.largestBatchId)}return new fs(e.readTime,e.documentKey,t)}/**
1935 * @license
1936 * Copyright 2018 Google LLC
1937 *
1938 * Licensed under the Apache License, Version 2.0 (the "License");
1939 * you may not use this file except in compliance with the License.
1940 * You may obtain a copy of the License at
1941 *
1942 *   http://www.apache.org/licenses/LICENSE-2.0
1943 *
1944 * Unless required by applicable law or agreed to in writing, software
1945 * distributed under the License is distributed on an "AS IS" BASIS,
1946 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1947 * See the License for the specific language governing permissions and
1948 * limitations under the License.
1949 */const vC={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},D4=41943040;class xr{static withCacheSize(e){return new xr(e,xr.DEFAULT_COLLECTION_PERCENTILE,xr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=r}}/**
1950 * @license
1951 * Copyright 2020 Google LLC
1952 *
1953 * Licensed under the Apache License, Version 2.0 (the "License");
1954 * you may not use this file except in compliance with the License.
1955 * You may obtain a copy of the License at
1956 *
1957 *   http://www.apache.org/licenses/LICENSE-2.0
1958 *
1959 * Unless required by applicable law or agreed to in writing, software
1960 * distributed under the License is distributed on an "AS IS" BASIS,
1961 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1962 * See the License for the specific language governing permissions and
1963 * limitations under the License.
1964 */function k4(n,e,t){const r=n.store(Ws),s=n.store(ld),i=[],l=IDBKeyRange.only(t.batchId);let d=0;const h=r.ee({range:l},((g,p,b)=>(d++,b.delete())));i.push(h.next((()=>{Fe(d===1,47070,{batchId:t.batchId})})));const m=[];for(const g of t.mutations){const p=yR(e,g.key.path,t.batchId);i.push(s.delete(p)),m.push(g.key)}return J.waitFor(i).next((()=>m))}function $0(n){if(!n)return 0;let e;if(n.document)e=n.document;else if(n.unknownDocument)e=n.unknownDocument;else{if(!n.noDocument)throw Ie(14731);e=n.noDocument}return JSON.stringify(e).length}/**
1965 * @license
1966 * Copyright 2017 Google LLC
1967 *
1968 * Licensed under the Apache License, Version 2.0 (the "License");
1969 * you may not use this file except in compliance with the License.
1970 * You may obtain a copy of the License at
1971 *
1972 *   http://www.apache.org/licenses/LICENSE-2.0
1973 *
1974 * Unless required by applicable law or agreed to in writing, software
1975 * distributed under the License is distributed on an "AS IS" BASIS,
1976 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1977 * See the License for the specific language governing permissions and
1978 * limitations under the License.
1979 */xr.DEFAULT_COLLECTION_PERCENTILE=10,xr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,xr.DEFAULT=new xr(D4,xr.DEFAULT_COLLECTION_PERCENTILE,xr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),xr.DISABLED=new xr(-1,0,0);class $y{constructor(e,t,r,s){this.userId=e,this.serializer=t,this.indexManager=r,this.referenceDelegate=s,this.Zn={}}static wt(e,t,r,s){Fe(e.uid!=="",64387);const i=e.isAuthenticated()?e.uid:"";return new $y(i,t,r,s)}checkEmpty(e){let t=!0;const r=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return xo(e).ee({index:tc,range:r},((s,i,l)=>{t=!1,l.done()})).next((()=>t))}addMutationBatch(e,t,r,s){const i=Ou(e),l=xo(e);return l.add({}).next((d=>{Fe(typeof d=="number",49019);const h=new Y_(d,t,r,s),m=(function(w,_,N){const E=N.baseMutations.map((P=>cm(w.yt,P))),j=N.mutations.map((P=>cm(w.yt,P)));return{userId:_,batchId:N.batchId,localWriteTimeMs:N.localWriteTime.toMillis(),baseMutations:E,mutations:j}})(this.serializer,this.userId,h),g=[];let p=new Lt(((b,w)=>Qe(b.canonicalString(),w.canonicalString())));for(const b of s){const w=yR(this.userId,b.key.path,d);p=p.add(b.key.path.popLast()),g.push(l.put(m)),g.push(i.put(w,uH))}return p.forEach((b=>{g.push(this.indexManager.addToCollectionParentIndex(e,b))})),e.addOnCommittedListener((()=>{this.Zn[d]=h.keys()})),J.waitFor(g).next((()=>h))}))}lookupMutationBatch(e,t){return xo(e).get(t).next((r=>r?(Fe(r.userId===this.userId,48,"Unexpected user for mutation batch",{userId:r.userId,batchId:t}),Ql(this.serializer,r)):null))}Xn(e,t){return this.Zn[t]?J.resolve(this.Zn[t]):this.lookupMutationBatch(e,t).next((r=>{if(r){const s=r.keys();return this.Zn[t]=s,s}return null}))}getNextMutationBatchAfterBatchId(e,t){const r=t+1,s=IDBKeyRange.lowerBound([this.userId,r]);let i=null;return xo(e).ee({index:tc,range:s},((l,d,h)=>{d.userId===this.userId&&(Fe(d.batchId>=r,47524,{Yn:r}),i=Ql(this.serializer,d)),h.done()})).next((()=>i))}getHighestUnacknowledgedBatchId(e){const t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let r=Fo;return xo(e).ee({index:tc,range:t,reverse:!0},((s,i,l)=>{r=i.batchId,l.done()})).next((()=>r))}getAllMutationBatches(e){const t=IDBKeyRange.bound([this.userId,Fo],[this.userId,Number.POSITIVE_INFINITY]);return xo(e).J(tc,t).next((r=>r.map((s=>Ql(this.serializer,s)))))}getAllMutationBatchesAffectingDocumentKey(e,t){const r=Xg(this.userId,t.path),s=IDBKeyRange.lowerBound(r),i=[];return Ou(e).ee({range:s},((l,d,h)=>{const[m,g,p]=l,b=Pa(g);if(m===this.userId&&t.path.isEqual(b))return xo(e).get(p).next((w=>{if(!w)throw Ie(61480,{er:l,batchId:p});Fe(w.userId===this.userId,10503,"Unexpected user for mutation batch",{userId:w.userId,batchId:p}),i.push(Ql(this.serializer,w))}));h.done()})).next((()=>i))}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new Lt(Qe);const s=[];return t.forEach((i=>{const l=Xg(this.userId,i.path),d=IDBKeyRange.lowerBound(l),h=Ou(e).ee({range:d},((m,g,p)=>{const[b,w,_]=m,N=Pa(w);b===this.userId&&i.path.isEqual(N)?r=r.add(_):p.done()}));s.push(h)})),J.waitFor(s).next((()=>this.tr(e,r)))}getAllMutationBatchesAffectingQuery(e,t){const r=t.path,s=r.length+1,i=Xg(this.userId,r),l=IDBKeyRange.lowerBound(i);let d=new Lt(Qe);return Ou(e).ee({range:l},((h,m,g)=>{const[p,b,w]=h,_=Pa(b);p===this.userId&&r.isPrefixOf(_)?_.length===s&&(d=d.add(w)):g.done()})).next((()=>this.tr(e,d)))}tr(e,t){const r=[],s=[];return t.forEach((i=>{s.push(xo(e).get(i).next((l=>{if(l===null)throw Ie(35274,{batchId:i});Fe(l.userId===this.userId,9748,"Unexpected user for mutation batch",{userId:l.userId,batchId:i}),r.push(Ql(this.serializer,l))})))})),J.waitFor(s).next((()=>r))}removeMutationBatch(e,t){return k4(e.le,this.userId,t).next((r=>(e.addOnCommittedListener((()=>{this.nr(t.batchId)})),J.forEach(r,(s=>this.referenceDelegate.markPotentiallyOrphaned(e,s))))))}nr(e){delete this.Zn[e]}performConsistencyCheck(e){return this.checkEmpty(e).next((t=>{if(!t)return J.resolve();const r=IDBKeyRange.lowerBound((function(l){return[l]})(this.userId)),s=[];return Ou(e).ee({range:r},((i,l,d)=>{if(i[0]===this.userId){const h=Pa(i[1]);s.push(h)}else d.done()})).next((()=>{Fe(s.length===0,56720,{rr:s.map((i=>i.canonicalString()))})}))}))}containsKey(e,t){return I4(e,this.userId,t)}ir(e){return R4(e).get(this.userId).next((t=>t||{userId:this.userId,lastAcknowledgedBatchId:Fo,lastStreamToken:""}))}}function I4(n,e,t){const r=Xg(e,t.path),s=r[1],i=IDBKeyRange.lowerBound(r);let l=!1;return Ou(n).ee({range:i,Y:!0},((d,h,m)=>{const[g,p,b]=d;g===e&&p===s&&(l=!0),m.done()})).next((()=>l))}function xo(n){return Xn(n,Ws)}function Ou(n){return Xn(n,ld)}function R4(n){return Xn(n,em)}/**
1980 * @license
1981 * Copyright 2017 Google LLC
1982 *
1983 * Licensed under the Apache License, Version 2.0 (the "License");
1984 * you may not use this file except in compliance with the License.
1985 * You may obtain a copy of the License at
1986 *
1987 *   http://www.apache.org/licenses/LICENSE-2.0
1988 *
1989 * Unless required by applicable law or agreed to in writing, software
1990 * distributed under the License is distributed on an "AS IS" BASIS,
1991 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1992 * See the License for the specific language governing permissions and
1993 * limitations under the License.
1994 */class _c{constructor(e){this.sr=e}next(){return this.sr+=2,this.sr}static _r(){return new _c(0)}static ar(){return new _c(-1)}}/**
1995 * @license
1996 * Copyright 2017 Google LLC
1997 *
1998 * Licensed under the Apache License, Version 2.0 (the "License");
1999 * you may not use this file except in compliance with the License.
2000 * You may obtain a copy of the License at
2001 *
2002 *   http://www.apache.org/licenses/LICENSE-2.0
2003 *
2004 * Unless required by applicable law or agreed to in writing, software
2005 * distributed under the License is distributed on an "AS IS" BASIS,
2006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2007 * See the License for the specific language governing permissions and
2008 * limitations under the License.
2009 */class OY{constructor(e,t){this.referenceDelegate=e,this.serializer=t}allocateTargetId(e){return this.ur(e).next((t=>{const r=new _c(t.highestTargetId);return t.highestTargetId=r.next(),this.cr(e,t).next((()=>t.highestTargetId))}))}getLastRemoteSnapshotVersion(e){return this.ur(e).next((t=>Ye.fromTimestamp(new Dt(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))))}getHighestSequenceNumber(e){return this.ur(e).next((t=>t.highestListenSequenceNumber))}setTargetsMetadata(e,t,r){return this.ur(e).next((s=>(s.highestListenSequenceNumber=t,r&&(s.lastRemoteSnapshotVersion=r.toTimestamp()),t>s.highestListenSequenceNumber&&(s.highestListenSequenceNumber=t),this.cr(e,s))))}addTargetData(e,t){return this.lr(e,t).next((()=>this.ur(e).next((r=>(r.targetCount+=1,this.hr(t,r),this.cr(e,r))))))}updateTargetData(e,t){return this.lr(e,t)}removeTargetData(e,t){return this.removeMatchingKeysForTargetId(e,t.targetId).next((()=>Au(e).delete(t.targetId))).next((()=>this.ur(e))).next((r=>(Fe(r.targetCount>0,8065),r.targetCount-=1,this.cr(e,r))))}removeTargets(e,t,r){let s=0;const i=[];return Au(e).ee(((l,d)=>{const h=wf(d);h.sequenceNumber<=t&&r.get(h.targetId)===null&&(s++,i.push(this.removeTargetData(e,h)))})).next((()=>J.waitFor(i))).next((()=>s))}forEachTarget(e,t){return Au(e).ee(((r,s)=>{const i=wf(s);t(i)}))}ur(e){return wC(e).get(U0).next((t=>(Fe(t!==null,2888),t)))}cr(e,t){return wC(e).put(U0,t)}lr(e,t){return Au(e).put(j4(this.serializer,t))}hr(e,t){let r=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,r=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,r=!0),r}getTargetCount(e){return this.ur(e).next((t=>t.targetCount))}getTargetData(e,t){const r=yc(t),s=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]);let i=null;return Au(e).ee({range:s,index:bR},((l,d,h)=>{const m=wf(d);jm(t,m.target)&&(i=m,h.done())})).next((()=>i))}addMatchingKeys(e,t,r){const s=[],i=So(e);return t.forEach((l=>{const d=br(l.path);s.push(i.put({targetId:r,path:d})),s.push(this.referenceDelegate.addReference(e,r,l))})),J.waitFor(s)}removeMatchingKeys(e,t,r){const s=So(e);return J.forEach(t,(i=>{const l=br(i.path);return J.waitFor([s.delete([r,l]),this.referenceDelegate.removeReference(e,r,i)])}))}removeMatchingKeysForTargetId(e,t){const r=So(e),s=IDBKeyRange.bound([t],[t+1],!1,!0);return r.delete(s)}getMatchingKeysForTargetId(e,t){const r=IDBKeyRange.bound([t],[t+1],!1,!0),s=So(e);let i=nt();return s.ee({range:r,Y:!0},((l,d,h)=>{const m=Pa(l[1]),g=new _e(m);i=i.add(g)})).next((()=>i))}containsKey(e,t){const r=br(t.path),s=IDBKeyRange.bound([r],[oR(r)],!1,!0);let i=0;return So(e).ee({index:M_,Y:!0,range:s},(([l,d],h,m)=>{l!==0&&(i++,m.done())})).next((()=>i>0))}At(e,t){return Au(e).get(t).next((r=>r?wf(r):null))}}function Au(n){return Xn(n,cd)}function wC(n){return Xn(n,cc)}function So(n){return Xn(n,ud)}/**
2010 * @license
2011 * Copyright 2020 Google LLC
2012 *
2013 * Licensed under the Apache License, Version 2.0 (the "License");
2014 * you may not use this file except in compliance with the License.
2015 * You may obtain a copy of the License at
2016 *
2017 *   http://www.apache.org/licenses/LICENSE-2.0
2018 *
2019 * Unless required by applicable law or agreed to in writing, software
2020 * distributed under the License is distributed on an "AS IS" BASIS,
2021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2022 * See the License for the specific language governing permissions and
2023 * limitations under the License.
2024 */const _C="LruGarbageCollector",M4=1048576;function TC([n,e],[t,r]){const s=Qe(n,t);return s===0?Qe(e,r):s}class LY{constructor(e){this.Pr=e,this.buffer=new Lt(TC),this.Tr=0}Er(){return++this.Tr}Ir(e){const t=[e,this.Er()];if(this.buffer.size<this.Pr)this.buffer=this.buffer.add(t);else{const r=this.buffer.last();TC(t,r)<0&&(this.buffer=this.buffer.delete(r).add(t))}}get maxValue(){return this.buffer.last()[0]}}class P4{constructor(e,t,r){this.garbageCollector=e,this.asyncQueue=t,this.localStore=r,this.Rr=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Ar(6e4)}stop(){this.Rr&&(this.Rr.cancel(),this.Rr=null)}get started(){return this.Rr!==null}Ar(e){xe(_C,`Garbage collection scheduled in ${e}ms`),this.Rr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,(async()=>{this.Rr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(t){sl(t)?xe(_C,"Ignoring IndexedDB error during garbage collection: ",t):await rl(t)}await this.Ar(3e5)}))}}class VY{constructor(e,t){this.Vr=e,this.params=t}calculateTargetCount(e,t){return this.Vr.dr(e).next((r=>Math.floor(t/100*r)))}nthSequenceNumber(e,t){if(t===0)return J.resolve(Yr.ce);const r=new LY(t);return this.Vr.forEachTarget(e,(s=>r.Ir(s.sequenceNumber))).next((()=>this.Vr.mr(e,(s=>r.Ir(s))))).next((()=>r.maxValue))}removeTargets(e,t,r){return this.Vr.removeTargets(e,t,r)}removeOrphanedDocuments(e,t){return this.Vr.removeOrphanedDocuments(e,t)}collect(e,t){return this.params.cacheSizeCollectionThreshold===-1?(xe("LruGarbageCollector","Garbage collection skipped; disabled"),J.resolve(vC)):this.getCacheSize(e).next((r=>r<this.params.cacheSizeCollectionThreshold?(xe("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),vC):this.gr(e,t)))}getCacheSize(e){return this.Vr.getCacheSize(e)}gr(e,t){let r,s,i,l,d,h,m;const g=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((p=>(p>this.params.maximumSequenceNumbersToCollect?(xe("LruGarbageCollector",`C
2024apping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${p}`),s=this.params.maximumSequenceNumbersToCollect):s=p,l=Date.now(),this.nthSequenceNumber(e,s)))).next((p=>(r=p,d=Date.now(),this.removeTargets(e,r,t)))).next((p=>(i=p,h=Date.now(),this.removeOrphanedDocuments(e,r)))).next((p=>(m=Date.now(),Ru()<=xt.DEBUG&&xe("LruGarbageCollector",`LRU Garbage Collection
2025	Counted targets in ${l-g}ms
2026	Determined least recently used ${s} in `+(d-l)+`ms
2027	Removed ${i} targets in `+(h-d)+`ms
2028	Removed ${p} documents in `+(m-h)+`ms
2029Total Duration: ${m-g}ms`),J.resolve({didRun:!0,sequenceNumbersCollected:s,targetsRemoved:i,documentsRemoved:p}))))}}function O4(n,e){return new VY(n,e)}/**
2030 * @license
2031 * Copyright 2020 Google LLC
2032 *
2033 * Licensed under the Apache License, Version 2.0 (the "License");
2034 * you may not use this file except in compliance with the License.
2035 * You may obtain a copy of the License at
2036 *
2037 *   http://www.apache.org/licenses/LICENSE-2.0
2038 *
2039 * Unless required by applicable law or agreed to in writing, software
2040 * distributed under the License is distributed on an "AS IS" BASIS,
2041 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2042 * See the License for the specific language governing permissions and
2043 * limitations under the License.
2044 */class FY{constructor(e,t){this.db=e,this.garbageCollector=O4(this,t)}dr(e){const t=this.pr(e);return this.db.getTargetCache().getTargetCount(e).next((r=>t.next((s=>r+s))))}pr(e){let t=0;return this.mr(e,(r=>{t++})).next((()=>t))}forEachTarget(e,t){return this.db.getTargetCache().forEachTarget(e,t)}mr(e,t){return this.yr(e,((r,s)=>t(s)))}addReference(e,t,r){return Eg(e,r)}removeReference(e,t,r){return Eg(e,r)}removeTargets(e,t,r){return this.db.getTargetCache().removeTargets(e,t,r)}markPotentiallyOrphaned(e,t){return Eg(e,t)}wr(e,t){return(function(s,i){let l=!1;return R4(s).te((d=>I4(s,d,i).next((h=>(h&&(l=!0),J.resolve(!h)))))).next((()=>l))})(e,t)}removeOrphanedDocuments(e,t){const r=this.db.getRemoteDocumentCache().newChangeBuffer(),s=[];let i=0;return this.yr(e,((l,d)=>{if(d<=t){const h=this.wr(e,l).next((m=>{if(!m)return i++,r.getEntry(e,l).next((()=>(r.removeEntry(l,Ye.min()),So(e).delete((function(p){return[0,br(p.path)]})(l)))))}));s.push(h)}})).next((()=>J.waitFor(s))).next((()=>r.apply(e))).next((()=>i))}removeTarget(e,t){const r=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,r)}updateLimboDocument(e,t){return Eg(e,t)}yr(e,t){const r=So(e);let s,i=Yr.ce;return r.ee({index:M_},(([l,d],{path:h,sequenceNumber:m})=>{l===0?(i!==Yr.ce&&t(new _e(Pa(s)),i),i=m,s=h):i=Yr.ce})).next((()=>{i!==Yr.ce&&t(new _e(Pa(s)),i)}))}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}}function Eg(n,e){return So(n).put((function(r,s){return{targetId:0,path:br(r.path),sequenceNumber:s}})(e,n.currentSequenceNumber))}/**
2045 * @license
2046 * Copyright 2017 Google LLC
2047 *
2048 * Licensed under the Apache License, Version 2.0 (the "License");
2049 * you may not use this file except in compliance with the License.
2050 * You may obtain a copy of the License at
2051 *
2052 *   http://www.apache.org/licenses/LICENSE-2.0
2053 *
2054 * Unless required by applicable law or agreed to in writing, software
2055 * distributed under the License is distributed on an "AS IS" BASIS,
2056 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2057 * See the License for the specific language governing permissions and
2058 * limitations under the License.
2059 */class L4{constructor(){this.changes=new Mi((e=>e.toString()),((e,t)=>e.isEqual(t))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,nn.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const r=this.changes.get(t);return r!==void 0?J.resolve(r):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/**
2060 * @license
2061 * Copyright 2017 Google LLC
2062 *
2063 * Licensed under the Apache License, Version 2.0 (the "License");
2064 * you may not use this file except in compliance with the License.
2065 * You may obtain a copy of the License at
2066 *
2067 *   http://www.apache.org/licenses/LICENSE-2.0
2068 *
2069 * Unless required by applicable law or agreed to in writing, software
2070 * distributed under the License is distributed on an "AS IS" BASIS,
2071 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2072 * See the License for the specific language governing permissions and
2073 * limitations under the License.
2074 */class BY{constructor(e){this.serializer=e}setIndexManager(e){this.indexManager=e}addEntry(e,t,r){return Bl(e).put(r)}removeEntry(e,t,r){return Bl(e).delete((function(i,l){const d=i.path.toArray();return[d.slice(0,d.length-2),d[d.length-2],Y0(l),d[d.length-1]]})(t,r))}updateMetadata(e,t){return this.getMetadata(e).next((r=>(r.byteSize+=t,this.Sr(e,r))))}getEntry(e,t){let r=nn.newInvalidDocument(t);return Bl(e).ee({index:Jg,range:IDBKeyRange.only(of(t))},((s,i)=>{r=this.br(t,i)})).next((()=>r))}Dr(e,t){let r={size:0,document:nn.newInvalidDocument(t)};return Bl(e).ee({index:Jg,range:IDBKeyRange.only(of(t))},((s,i)=>{r={document:this.br(t,i),size:$0(i)}})).next((()=>r))}getEntries(e,t){let r=$r();return this.Cr(e,t,((s,i)=>{const l=this.br(s,i);r=r.insert(s,l)})).next((()=>r))}vr(e,t){let r=$r(),s=new Xt(_e.comparator);return this.Cr(e,t,((i,l)=>{const d=this.br(i,l);r=r.insert(i,d),s=s.insert(i,$0(l))})).next((()=>({documents:r,Fr:s})))}Cr(e,t,r){if(t.isEmpty())return J.resolve();let s=new Lt(SC);t.forEach((h=>s=s.add(h)));const i=IDBKeyRange.bound(of(s.first()),of(s.last())),l=s.getIterator();let d=l.getNext();return Bl(e).ee({index:Jg,range:i},((h,m,g)=>{const p=_e.fromSegments([...m.prefixPath,m.collectionGroup,m.documentId]);for(;d&&SC(d,p)<0;)r(d,null),d=l.getNext();d&&d.isEqual(p)&&(r(d,m),d=l.hasNext()?l.getNext():null),d?g.j(of(d)):g.done()})).next((()=>{for(;d;)r(d,null),d=l.hasNext()?l.getNext():null}))}getDocumentsMatchingQuery(e,t,r,s,i){const l=t.path,d=[l.popLast().toArray(),l.lastSegment(),Y0(r.readTime),r.documentKey.path.isEmpty()?"":r.documentKey.path.lastSegment()],h=[l.popLast().toArray(),l.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return Bl(e).J(IDBKeyRange.bound(d,h,!0)).next((m=>{i==null||i.incrementDocumentReadCount(m.length);let g=$r();for(const p of m){const b=this.br(_e.fromSegments(p.prefixPath.concat(p.collectionGroup,p.documentId)),p);b.isFoundDocument()&&(Cm(t,b)||s.has(b.key))&&(g=g.insert(b.key,b))}return g}))}getAllFromCollectionGroup(e,t,r,s){let i=$r();const l=EC(t,r),d=EC(t,fs.max());return Bl(e).ee({index:xR,range:IDBKeyRange.bound(l,d,!0)},((h,m,g)=>{const p=this.br(_e.fromSegments(m.prefixPath.concat(m.collectionGroup,m.documentId)),m);i=i.insert(p.key,p),i.size===s&&g.done()})).next((()=>i))}newChangeBuffer(e){return new UY(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next((t=>t.byteSize))}getMetadata(e){return NC(e).get(n1).next((t=>(Fe(!!t,20021),t)))}Sr(e,t){return NC(e).put(n1,t)}br(e,t){if(t){const r=SY(this.serializer,t);if(!(r.isNoDocument()&&r.version.isEqual(Ye.min())))return r}return nn.newInvalidDocument(e)}}function V4(n){return new BY(n)}class UY extends L4{constructor(e,t){super(),this.Mr=e,this.trackRemovals=t,this.Or=new Mi((r=>r.toString()),((r,s)=>r.isEqual(s)))}applyChanges(e){const t=[];let r=0,s=new Lt(((i,l)=>Qe(i.canonicalString(),l.canonicalString())));
vendor: 4,120 bytes, lines 2074-2119
2074return this.changes.forEach(((i,l)=>{const d=this.Or.get(i);if(t.push(this.Mr.removeEntry(e,i,d.readTime)),l.isValidDocument()){const h=oC(this.Mr.serializer,l);s=s.add(i.path.popLast());const m=$0(h);r+=m-d.size,t.push(this.Mr.addEntry(e,i,h))}else if(r-=d.size,this.trackRemovals){const h=oC(this.Mr.serializer,l.convertToNoDocument(Ye.min()));t.push(this.Mr.addEntry(e,i,h))}})),s.forEach((i=>{t.push(this.Mr.indexManager.addToCollectionParentIndex(e,i))})),t.push(this.Mr.updateMetadata(e,r)),J.waitFor(t)}getFromCache(e,t){return this.Mr.Dr(e,t).next((r=>(this.Or.set(t,{size:r.size,readTime:r.document.readTime}),r.document)))}getAllFromCache(e,t){return this.Mr.vr(e,t).next((({documents:r,Fr:s})=>(s.forEach(((i,l)=>{this.Or.set(i,{size:l,readTime:r.get(i).readTime})})),r)))}}function NC(n){return Xn(n,tm)}function Bl(n){return Xn(n,B0)}function of(n){const e=n.path.toArray();return[e.slice(0,e.length-2),e[e.length-2],e[e.length-1]]}function EC(n,e){const t=e.documentKey.path.toArray();return[n,Y0(e.readTime),t.slice(0,t.length-2),t.length>0?t[t.length-1]:""]}function SC(n,e){const t=n.path.toArray(),r=e.path.toArray();let s=0;for(let i=0;i<t.length-2&&i<r.length-2;++i)if(s=Qe(t[i],r[i]),s)return s;return s=Qe(t.length,r.length),s||(s=Qe(t[t.length-2],r[r.length-2]),s||Qe(t[t.length-1],r[r.length-1]))}/**
2075 * @license
2076 * Copyright 2017 Google LLC
2077 *
2078 * Licensed under the Apache License, Version 2.0 (the "License");
2079 * you may not use this file except in compliance with the License.
2080 * You may obtain a copy of the License at
2081 *
2082 *   http://www.apache.org/licenses/LICENSE-2.0
2083 *
2084 * Unless required by applicable law or agreed to in writing, software
2085 * distributed under the License is distributed on an "AS IS" BASIS,
2086 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2087 * See the License for the specific language governing permissions and
2088 * limitations under the License.
2089 *//**
2090 * @license
2091 * Copyright 2022 Google LLC
2092 *
2093 * Licensed under the Apache License, Version 2.0 (the "License");
2094 * you may not use this file except in compliance with the License.
2095 * You may obtain a copy of the License at
2096 *
2097 *   http://www.apache.org/licenses/LICENSE-2.0
2098 *
2099 * Unless required by applicable law or agreed to in writing, software
2100 * distributed under the License is distributed on an "AS IS" BASIS,
2101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2102 * See the License for the specific language governing permissions and
2103 * limitations under the License.
2104 */class zY{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}/**
2105 * @license
2106 * Copyright 2017 Google LLC
2107 *
2108 * Licensed under the Apache License, Version 2.0 (the "License");
2109 * you may not use this file except in compliance with the License.
2110 * You may obtain a copy of the License at
2111 *
2112 *   http://www.apache.org/licenses/LICENSE-2.0
2113 *
2114 * Unless required by applicable law or agreed to in writing, software
2115 * distributed under the License is distributed on an "AS IS" BASIS,
2116 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2117 * See the License for the specific language governing permissions and
2118 * limitations under the License.
2119 */class F4{constructor(e,t,r,s){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=r,this.indexManager=s}getDocument(e,t){let r=null;return this.documentOverlayCache.getOverlay(e,t).next((s=>(r=s,this.remoteDocumentCache.getEntry(e,t)))).next((s=>(r!==null&&Of(r.mutation,s,Gr.empty(),Dt.now()),s)))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next((r=>this.getLocalViewOfDocuments(e,r,nt()).next((()=>r))))}getLocalViewOfDocuments(e,t,r=nt()){const s=Oa();return this.populateOverlays(e,s,t).next((()=>this.computeViews(e,t,s,r).next((i=>{let l=bf();return i.forEach(((d,h)=>{l=l.insert(d,h.overlayedDocument)})),l}))))}getOverlayedDocuments(e,t){const r=Oa();return this.populateOverlays(e,r,t).next((()=>this.computeViews(e,t,r,nt())))}populateOverlays(e,t,r){const s=[];return r.forEach((i=>{t.has(i)||s.push(i)})),this.documentOverlayCache.getOverlays(e,s).next((i=>
2119{i.forEach(((l,d)=>{t.set(l,d)}))}))}computeViews(e,t,r,s){let i=$r();const l=Pf(),d=(function(){return Pf()})();return t.forEach(((h,m)=>{const g=r.get(m.key);s.has(m.key)&&(g===void 0||g.mutation instanceof Pi)?i=i.insert(m.key,m):g!==void 0?(l.set(m.key,g.mutation.getFieldMask()),Of(g.mutation,m,g.mutation.getFieldMask(),Dt.now())):l.set(m.key,Gr.empty())})),this.recalculateAndSaveOverlays(e,i).next((h=>(h.forEach(((m,g)=>l.set(m,g))),t.forEach(((m,g)=>d.set(m,new zY(g,l.get(m)??null)))),d)))}recalculateAndSaveOverlays(e,t){const r=Pf();let s=new Xt(((l,d)=>l-d)),i=nt();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((l=>{for(const d of l)d.keys().forEach((h=>{const m=t.get(h);if(m===null)return;let g=r.get(h)||Gr.empty();g=d.applyToLocalView(m,g),r.set(h,g);const p=(s.get(d.batchId)||nt()).add(h);s=s.insert(d.batchId,p)}))})).next((()=>{const l=[],d=s.getReverseIterator();for(;d.hasNext();){const h=d.getNext(),m=h.key,g=h.value,p=ZR();g.forEach((b=>{if(!i.has(b)){const w=i4(t.get(b),r.get(b));w!==null&&p.set(b,w),i=i.add(b)}})),l.push(this.documentOverlayCache.saveOverlays(e,m,p))}return J.waitFor(l)})).next((()=>r))}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next((r=>this.recalculateAndSaveOverlays(e,r)))}getDocumentsMatchingQuery(e,t,r,s){return KH(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):U_(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,r,s):this.getDocumentsMatchingCollectionQuery(e,t,r,s)}getNextDocuments(e,t,r,s){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,r,s).next((i=>{const l=s-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,r.largestBatchId,s-i.size):J.resolve(Oa());let d=ad,h=i;return l.next((m=>J.forEach(m,((g,p)=>(d<p.largestBatchId&&(d=p.largestBatchId),i.get(g)?J.resolve():this.remoteDocumentCache.getEntry(e,g).next((b=>{h=h.insert(g,b)}))))).next((()=>this.populateOverlays(e,m,i))).next((()=>this.computeViews(e,h,m,nt()))).next((g=>({batchId:d,changes:JR(g)})))))}))}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new _e(t)).next((r=>{let s=bf();return r.isFoundDocument()&&(s=s.insert(r.key,r)),s}))}getDocumentsMatchingCollectionGroupQuery(e,t,r,s){const i=t.collectionGroup;let l=bf();return this.indexManager.getCollectionParents(e,i).next((d=>J.forEach(d,(h=>{const m=(function(p,b){return new Ri(b,null,p.explicitOrderBy.slice(),p.filters.slice(),p.limit,p.limitType,p.startAt,p.endAt)})(t,h.child(i));return this.getDocumentsMatchingCollectionQuery(e,m,r,s).next((g=>{g.forEach(((p,b)=>{l=l.insert(p,b)}))}))})).next((()=>l))))}getDocumentsMatchingCollectionQuery(e,t,r,s){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,r.largestBatchId).next((l=>(i=l,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,i,s)))).next((l=>{i.forEach(((h,m)=>{const g=m.getKey();l.get(g)===null&&(l=l.insert(g,nn.newInvalidDocument(g)))}));let d=bf();return l.forEach(((h,m)=>{const g=i.get(h);g!==void 0&&Of(g.mutation,m,Gr.empty(),Dt.now()),Cm(t,m)&&(d=d.insert(h,m))})),d}))}}/**
2120 * @license
2121 * Copyright 2020 Google LLC
2122 *
2123 * Licensed under the Apache License, Version 2.0 (the "License");
2124 * you may not use this file except in compliance with the License.
2125 * You may obtain a copy of the License at
2126 *
2127 *   http://www.apache.org/licenses/LICENSE-2.0
2128 *
2129 * Unless required by applicable law or agreed to in writing, software
2130 * distributed under the License is distributed on an "AS IS" BASIS,
2131 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2132 * See the License for the specific language governing permissions and
2133 * limitations under the License.
2134 */class qY{constructor(e){this.serializer=e,this.Nr=new Map,this.Br=new Map}getBundleMetadata(e,t){return J.resolve(this.Nr.get(t))}saveBundleMetadata(e,t){return this.Nr.set(t.id,(function(s){return{id:s.id,version:s.version,createTime:Dn(s.createTime)}})(t)),J.resolve()}getNamedQuery(e,t){return J.resolve(this.Br.get(t))}saveNamedQuery(e,t){return this.Br.set(t.name,(function(s){return{name:s.name,query:Yy(s.bundledQuery),readTime:Dn(s.readTime)}})(t)),J.resolve()}}/**
2135 * @license
2136 * Copyright 2022 Google LLC
2137 *
2138 * Licensed under the Apache License, Version 2.0 (the "License");
2139 * you may not use this file except in compliance with the License.
2140 * You may obtain a copy of the License at
2141 *
2142 *   http://www.apache.org/licenses/LICENSE-2.0
2143 *
2144 * Unless required by applicable law or agreed to in writing, software
2145 * distributed under the License is distributed on an "AS IS" BASIS,
2146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2147 * See the License for the specific language governing permissions and
2148 * limitations under the License.
2149 */class HY{constructor(){this.overlays=new Xt(_e.comparator),this.Lr=new Map}getOverlay(e,t){return J.resolve(this.overlays.get(t))}getOverlays(e,t){const r=Oa();return J.forEach(t,(s=>this.getOverlay(e,s).next((i=>{i!==null&&r.set(s,i)})))).next((()=>r))}saveOverlays(e,t,r){return r.forEach(((s,i)=>{this.St(e,t,i)})),J.resolve()}removeOverlaysForBatchId(e,t,r){const s=this.Lr.get(r);return s!==void 0&&(s.forEach((i=>this.overlays=this.overlays.remove(i))),this.Lr.delete(r)),J.resolve()}getOverlaysForCollection(e,t,r){const s=Oa(),i=t.length+1,l=new _e(t.child("")),d=this.overlays.getIteratorFrom(l);for(;d.hasNext();){const h=d.getNext().value,m=h.getKey();if(!t.isPrefixOf(m.path))break;m.path.length===i&&h.largestBatchId>r&&s.set(h.getKey(),h)}return J.resolve(s)}getOverlaysForCollectionGroup(e,t,r,s){let i=new Xt(((m,g)=>m-g));const l=this.overlays.getIterator();for(;l.hasNext();){const m=l.getNext().value;if(m.getKey().getCollectionGroup()===t&&m.largestBatchId>r){let g=i.get(m.largestBatchId);g===null&&(g=Oa(),i=i.insert(m.largestBatchId,g)),g.set(m.getKey(),m)}}const d=Oa(),h=i.getIterator();for(;h.hasNext()&&(h.getNext().value.forEach(((m,g)=>d.set(m,g))),!(d.size()>=s)););return J.resolve(d)}St(e,t,r){const s=this.overlays.get(r.key);if(s!==null){const l=this.Lr.get(s.largestBatchId).delete(r.key);this.Lr.set(s.largestBatchId,l)}this.overlays=this.overlays.insert(r.key,new $_(t,r));let i=this.Lr.get(t);i===void 0&&(i=nt(),this.Lr.set(t,i)),this.Lr.set(t,i.add(r.key))}}/**
2150 * @license
2151 * Copyright 2024 Google LLC
2152 *
2153 * Licensed under the Apache License, Version 2.0 (the "License");
2154 * you may not use this file except in compliance with the License.
2155 * You may obtain a copy of the License at
2156 *
2157 *   http://www.apache.org/licenses/LICENSE-2.0
2158 *
2159 * Unless required by applicable law or agreed to in writing, software
2160 * distributed under the License is distributed on an "AS IS" BASIS,
2161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2162 * See the License for the specific language governing permissions and
2163 * limitations under the License.
2164 */class YY{constructor(){this.sessionToken=pn.EMPTY_BYTE_STRING}getSessionToken(e){return J.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,J.resolve()}}/**
2165 * @license
2166 * Copyright 2017 Google LLC
2167 *
2168 * Licensed under the Apache License, Version 2.0 (the "License");
2169 * you may not use this file except in compliance with the License.
2170 * You may obtain a copy of the License at
2171 *
2172 *   http://www.apache.org/licenses/LICENSE-2.0
2173 *
2174 * Unless required by applicable law or agreed to in writing, software
2175 * distributed under the License is distributed on an "AS IS" BASIS,
2176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2177 * See the License for the specific language governing permissions and
2178 * limitations under the License.
2179 */class J_{constructor(){this.kr=new Lt(tr.qr),this.Kr=new Lt(tr.Ur)}isEmpty(){return this.kr.isEmpty()}addReference(e,t){const r=new tr(e,t);this.kr=this.kr.add(r),this.Kr=this.Kr.add(r)}$r(e,t){e.forEach((r=>this.addReference(r,t)))}removeReference(e,t){this.Wr(new tr(e,t))}Qr(e,t){e.forEach((r=>this.removeReference(r,t)))}Gr(e){const t=new _e(new ct([])),r=new tr(t,e),s=new tr(t,e+1),i=[];return this.Kr.forEachInRange([r,s],(l=>{this.Wr(l),i.push(l.key)})),i}zr(){this.kr.forEach((e=>this.Wr(e)))}Wr(e){this.kr=this.kr.delete(e),this.Kr=this.Kr.delete(e)}jr(e){const t=new _e(new ct([])),r=new tr(t,e),s=new tr(t,e+1);let i=nt();return this.Kr.forEachInRange([r,s],(l=>{i=i.add(l.key)})),i}containsKey(e){const t=new tr(e,0),r=this.kr.firstAfterOrEqual(t);return r!==null&&e.isEqual(r.key)}}class tr{constructor(e,t){this.key=e,this.Jr=t}static qr(e,t){return _e.comparator(e.key,t.key)||Qe(e.Jr,t.Jr)}static Ur(e,t){return Qe(e.Jr,t.Jr)||_e.comparator(e.key,t.key)}}/**
2180 * @license
2181 * Copyright 2017 Google LLC
2182 *
2183 * Licensed under the Apache License, Version 2.0 (the "License");
2184 * you may not use this file except in compliance with the License.
2185 * You may obtain a copy of the License at
2186 *
2187 *   http://www.apache.org/licenses/LICENSE-2.0
2188 *
2189 * Unless required by applicable law or agreed to in writing, software
2190 * distributed under the License is distributed on an "AS IS" BASIS,
2191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2192 * See the License for the specific language governing permissions and
2193 * limitations under the License.
2194 */class GY{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.Yn=1,this.Hr=new Lt(tr.qr)}checkEmpty(e){return J.resolve(this.mutationQueue.length===0)}addMutationBatch(e,t,r,s){const i=this.Yn;this.Yn++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const l=new Y_(i,t,r,s);this.mutationQueue.push(l);for(const d of s)this.Hr=this.Hr.add(new tr(d.key,i)),this.indexManager.addToCollectionParentIndex(e,d.key.path.popLast());return J.resolve(l)}lookupMutationBatch(e,t){return J.resolve(this.Zr(t))}getNextMutationBatchAfterBatchId(e,t){const r=t+1,s=this.Xr(r),i=s<0?0:s;return J.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return J.resolve(this.mutationQueue.length===0?Fo:this.Yn-1)}getAllMutationBatches(e){return J.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const r=new tr(t,0),s=new tr(t,Number.POSITIVE_INFINITY),i=[];return this.Hr.forEachInRange([r,s],(l=>{const d=this.Zr(l.Jr);i.push(d)})),J.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new Lt(Qe);return t.forEach((s=>{const i=new tr(s,0),l=new tr(s,Number.POSITIVE_INFINITY);this.Hr.forEachInRange([i,l],(d=>{r=r.add(d.Jr)}))})),J.resolve(this.Yr(r))}getAllMutationBatchesAffectingQuery(e,t){const r=t.path,s=r.length+1;let i=r;_e.isDocumentKey(i)||(i=i.child(""));const l=new tr(new _e(i),0);let d=new Lt(Qe);return this.Hr.forEachWhile((h=>{const m=h.key.path;return!!r.isPrefixOf(m)&&(m.length===s&&(d=d.add(h.Jr)),!0)}),l),J.resolve(this.Yr(d))}Yr(e){const t=[];return e.forEach((r=>{const s=this.Zr(r);s!==null&&t.push(s)})),t}removeMutationBatch(e,t){Fe(this.ei(t.batchId,"removed")===0,55003),this.mutationQueue.shift();let r=this.Hr;return J.forEach(t.mutations,(s=>{const i=new tr(s.key,t.batchId);return r=r.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,s.key)})).next((()=>{this.Hr=r}))}nr(e){}containsKey(e,t){const r=new tr(t,0),s=this.Hr.firstAfterOrEqual(r);return J.resolve(t.isEqual(s&&s.key))}performConsistencyCheck(e){return this.mutationQueue.length,J.resolve()}ei(e,t){return this.Xr(e)}Xr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Zr(e){const t=this.Xr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}/**
2195 * @license
2196 * Copyright 2017 Google LLC
2197 *
2198 * Licensed under the Apache License, Version 2.0 (the "License");
2199 * you may not use this file except in compliance with the License.
2200 * You may obtain a copy of the License at
2201 *
2202 *   http://www.apache.org/licenses/LICENSE-2.0
2203 *
2204 * Unless required by applicable law or agreed to in writing, software
2205 * distributed under the License is distributed on an "AS IS" BASIS,
2206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2207 * See the License for the specific language governing permissions and
2208 * limitations under the License.
2209 */class $Y{constructor(e){this.ti=e,this.docs=(function(){return new Xt(_e.comparator)})(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const r=t.key,s=this.docs.get(r),i=s?s.size:0,l=this.ti(t);return this.docs=this.docs.insert(r,{document:t.mutableCopy(),size:l}),this.size+=l-i,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const r=this.docs.get(t);return J.resolve(r?r.document.mutableCopy():nn.newInvalidDocument(t))}getEntries(e,t){let r=$r();return t.forEach((s=>{const i=this.docs.get(s);r=r.insert(s,i?i.document.mutableCopy():nn.newInvalidDocument(s))})),J.resolve(r)}getDocumentsMatchingQuery(e,t,r,s){let i=$r();const l=t.path,d=new _e(l.child("__id-9223372036854775808__")),h=this.docs.getIteratorFrom(d);for(;h.hasNext();){const{key:m,value:{document:g}}=h.getNext();if(!l.isPrefixOf(m.path))break;m.path.length>l.length+1||I_(hR(g),r)<=0||(s.has(g.key)||Cm(t,g))&&(i=i.insert(g.key,g.mutableCopy()))}return J.resolve(i)}getAllFromCollectionGroup(e,t,r,s){Ie(9500)}ni(e,t){return J.forEach(this.docs,(r=>
vendor: 5,117 bytes, lines 2209-2239
2209t(r)))}newChangeBuffer(e){return new KY(this)}getSize(e){return J.resolve(this.size)}}class KY extends L4{constructor(e){super(),this.Mr=e}applyChanges(e){const t=[];return this.changes.forEach(((r,s)=>{s.isValidDocument()?t.push(this.Mr.addEntry(e,s)):this.Mr.removeEntry(r)})),J.waitFor(t)}getFromCache(e,t){return this.Mr.getEntry(e,t)}getAllFromCache(e,t){return this.Mr.getEntries(e,t)}}/**
2210 * @license
2211 * Copyright 2017 Google LLC
2212 *
2213 * Licensed under the Apache License, Version 2.0 (the "License");
2214 * you may not use this file except in compliance with the License.
2215 * You may obtain a copy of the License at
2216 *
2217 *   http://www.apache.org/licenses/LICENSE-2.0
2218 *
2219 * Unless required by applicable law or agreed to in writing, software
2220 * distributed under the License is distributed on an "AS IS" BASIS,
2221 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2222 * See the License for the specific language governing permissions and
2223 * limitations under the License.
2224 */class WY{constructor(e){this.persistence=e,this.ri=new Mi((t=>yc(t)),jm),this.lastRemoteSnapshotVersion=Ye.min(),this.highestTargetId=0,this.ii=0,this.si=new J_,this.targetCount=0,this.oi=_c._r()}forEachTarget(e,t){return this.ri.forEach(((r,s)=>t(s))),J.resolve()}getLastRemoteSnapshotVersion(e){return J.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return J.resolve(this.ii)}allocateTargetId(e){return this.highestTargetId=this.oi.next(),J.resolve(this.highestTargetId)}setTargetsMetadata(e,t,r){return r&&(this.lastRemoteSnapshotVersion=r),t>this.ii&&(this.ii=t),J.resolve()}lr(e){this.ri.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.oi=new _c(t),this.highestTargetId=t),e.sequenceNumber>this.ii&&(this.ii=e.sequenceNumber)}addTargetData(e,t){return this.lr(t),this.targetCount+=1,J.resolve()}updateTargetData(e,t){return this.lr(t),J.resolve()}removeTargetData(e,t){return this.ri.delete(t.target),this.si.Gr(t.targetId),this.targetCount-=1,J.resolve()}removeTargets(e,t,r){let s=0;const i=[];return this.ri.forEach(((l,d)=>{d.sequenceNumber<=t&&r.get(d.targetId)===null&&(this.ri.delete(l),i.push(this.removeMatchingKeysForTargetId(e,d.targetId)),s++)})),J.waitFor(i).next((()=>s))}getTargetCount(e){return J.resolve(this.targetCount)}getTargetData(e,t){const r=this.ri.get(t)||null;return J.resolve(r)}addMatchingKeys(e,t,r){return this.si.$r(t,r),J.resolve()}removeMatchingKeys(e,t,r){this.si.Qr(t,r);const s=this.persistence.referenceDelegate,i=[];return s&&t.forEach((l=>{i.push(s.markPotentiallyOrphaned(e,l))})),J.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.si.Gr(t),J.resolve()}getMatchingKeysForTargetId(e,t){const r=this.si.jr(t);return J.resolve(r)}containsKey(e,t){return J.resolve(this.si.containsKey(t))}}/**
2225 * @license
2226 * Copyright 2017 Google LLC
2227 *
2228 * Licensed under the Apache License, Version 2.0 (the "License");
2229 * you may not use this file except in compliance with the License.
2230 * You may obtain a copy of the License at
2231 *
2232 *   http://www.apache.org/licenses/LICENSE-2.0
2233 *
2234 * Unless required by applicable law or agreed to in writing, software
2235 * distributed under the License is distributed on an "AS IS" BASIS,
2236 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2237 * See the License for the specific language governing permissions and
2238 * limitations under the License.
2239 */class Z_{constructor(e,t){this._i={},this.overlays={},this.ai=new Yr(0),this.ui=!1,this.ui=!0,this.ci=new YY,this.referenceDelegate=e(this),this.li=new WY(this),this.indexManager=new MY,this.remoteDocumentCache=(function(s){return new $Y(s)})((r=>this.referenceDelegate.hi(r))),this.serializer=new S4(t),this.Pi=new qY(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ui=!1,Promise.resolve()}get started(){return this.ui}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new HY,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let r=this._i[e.toKey()];return r||(r=new GY(t,this.referenceDelegate),this._i[e.toKey()]=r),r}getGlobalsCache(){return this.ci}getTargetCache(){return this.li}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Pi}runTransaction(e,t,r){xe("MemoryPersistence","Starting transaction:",e);const s=new QY(this.ai.next());return this.referenceDelegate.Ti(),r(s).next((i=>this.referenceDelegate.Ei(s).next((()=>i)))).toPromise().then((i=>(s.raiseOnCommittedEvent(),i)))}Ii(e,t){return J.or(Object.values(this._i).map((r=>()=>r.containsKey(e,t))))}}class QY extends mR{constructor(e){super(),this.currentSequenceNumber=e}}class Ky{constructor(e){this.persistence=e,this.Ri=new J_,this.Ai=null}static Vi(e){return new Ky(e)}get di(){if(this.Ai)return this.Ai;throw Ie(60996)}addReference(e,t,r){return this.Ri.addReference(r,t),this.di.delete(r.toString()),J.resolve()}removeReference(e,t,r){return this.Ri.removeReference(r,t),this.di.add(r.toString()),J.resolve()}markPotentiallyOrphaned(e,t){return this.di.add(t.toString()),J.resolve()}
2239removeTarget(e,t){this.Ri.Gr(t.targetId).forEach((s=>this.di.add(s.toString())));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((s=>{s.forEach((i=>this.di.add(i.toString())))})).next((()=>r.removeTargetData(e,t)))}Ti(){this.Ai=new Set}Ei(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return J.forEach(this.di,(r=>{const s=_e.fromPath(r);return this.mi(e,s).next((i=>{i||t.removeEntry(s,Ye.min())}))})).next((()=>(this.Ai=null,t.apply(e))))}updateLimboDocument(e,t){return this.mi(e,t).next((r=>{r?this.di.delete(t.toString()):this.di.add(t.toString())}))}hi(e){return 0}mi(e,t){return J.or([()=>J.resolve(this.Ri.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ii(e,t)])}}class K0{constructor(e,t){this.persistence=e,this.fi=new Mi((r=>br(r.path)),((r,s)=>r.isEqual(s))),this.garbageCollector=O4(this,t)}static Vi(e,t){return new K0(e,t)}Ti(){}Ei(e){return J.resolve()}forEachTarget(e,t){return this.persistence.getTargetCache().forEachTarget(e,t)}dr(e){const t=this.pr(e);return this.persistence.getTargetCache().getTargetCount(e).next((r=>t.next((s=>r+s))))}pr(e){let t=0;return this.mr(e,(r=>{t++})).next((()=>t))}mr(e,t){return J.forEach(this.fi,((r,s)=>this.wr(e,r,s).next((i=>i?J.resolve():t(s)))))}removeTargets(e,t,r){return this.persistence.getTargetCache().removeTargets(e,t,r)}removeOrphanedDocuments(e,t){let r=0;const s=this.persistence.getRemoteDocumentCache(),i=s.newChangeBuffer();return s.ni(e,(l=>this.wr(e,l,t).next((d=>{d||(r++,i.removeEntry(l,Ye.min()))})))).next((()=>i.apply(e))).next((()=>r))}markPotentiallyOrphaned(e,t){return this.fi.set(t,e.currentSequenceNumber),J.resolve()}removeTarget(e,t){const r=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,t,r){return this.fi.set(r,e.currentSequenceNumber),J.resolve()}removeReference(e,t,r){return this.fi.set(r,e.currentSequenceNumber),J.resolve()}updateLimboDocument(e,t){return this.fi.set(t,e.currentSequenceNumber),J.resolve()}hi(e){let t=e.key.toString().length;return e.isFoundDocument()&&(t+=e0(e.data.value)),t}wr(e,t,r){return J.or([()=>this.persistence.Ii(e,t),()=>this.persistence.getTargetCache().containsKey(e,t),()=>{const s=this.fi.get(t);return J.resolve(s!==void 0&&s>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/**
2240 * @license
2241 * Copyright 2020 Google LLC
2242 *
2243 * Licensed under the Apache License, Version 2.0 (the "License");
2244 * you may not use this file except in compliance with the License.
2245 * You may obtain a copy of the License at
2246 *
2247 *   http://www.apache.org/licenses/LICENSE-2.0
2248 *
2249 * Unless required by applicable law or agreed to in writing, software
2250 * distributed under the License is distributed on an "AS IS" BASIS,
2251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2252 * See the License for the specific language governing permissions and
2253 * limitations under the License.
2254 */class XY{constructor(e){this.serializer=e}k(e,t,r,s){const i=new My("createOrUpgrade",t);r<1&&s>=1&&((function(h){h.createObjectStore(Sm)})(e),(function(h){h.createObjectStore(em,{keyPath:cH}),h.createObjectStore(Ws,{keyPath:LA,autoIncrement:!0}).createIndex(tc,VA,{unique:!0}),h.createObjectStore(ld)})(e),jC(e),(function(h){h.createObjectStore(Gl)})(e));let l=J.resolve();return r<3&&s>=3&&(r!==0&&((function(h){h.deleteObjectStore(ud),h.deleteObjectStore(cd),h.deleteObjectStore(cc)})(e),jC(e)),l=l.next((()=>(function(h){const m=h.store(cc),g={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:Ye.min().toTimestamp(),targetCount:0};return m.put(U0,g)})(i)))),r<4&&s>=4&&(r!==0&&(l=l.next((()=>(function(h,m){return m.store(Ws).J().next((p=>{h.deleteObjectStore(Ws),h.createObjectStore(Ws,{keyPath:LA,autoIncrement:!0}).createIndex(tc,VA,{unique:!0});const b=m.store(Ws),w=p.map((_=>b.put(_)));return J.waitFor(w)}))})(e,i)))),l=l.next((()=>{(function(h){h.createObjectStore(dd,{keyPath:xH})})(e)}))),r<5&&s>=5&&(l=l.next((()=>this.gi(i)))),r<6&&s>=6&&(l=l.next((()=>((function(h){h.createObjectStore(tm)})(e),this.pi(i))))),r<7&&s>=7&&(l=l.next((()=>this.yi(i)))),r<8&&s>=8&&(l=l.next((()=>this.wi(e,i)))),r<9&&s>=9&&(l=l.next((()=>{(function(h){h.objectStoreNames.contains("remoteDocumentChanges")&&h.deleteObjectStore("remoteDocumentChanges")}
vendor: 15,302 bytes, lines 2254-2299
2254)(e)}))),r<10&&s>=10&&(l=l.next((()=>this.Si(i)))),r<11&&s>=11&&(l=l.next((()=>{(function(h){h.createObjectStore(Py,{keyPath:bH})})(e),(function(h){h.createObjectStore(Oy,{keyPath:vH})})(e)}))),r<12&&s>=12&&(l=l.next((()=>{(function(h){const m=h.createObjectStore(Ly,{keyPath:jH});m.createIndex(s1,AH,{unique:!1}),m.createIndex(_R,CH,{unique:!1})})(e)}))),r<13&&s>=13&&(l=l.next((()=>(function(h){const m=h.createObjectStore(B0,{keyPath:dH});m.createIndex(Jg,hH),m.createIndex(xR,fH)})(e))).next((()=>this.bi(e,i))).next((()=>e.deleteObjectStore(Gl)))),r<14&&s>=14&&(l=l.next((()=>this.Di(e,i)))),r<15&&s>=15&&(l=l.next((()=>(function(h){h.createObjectStore(P_,{keyPath:wH,autoIncrement:!0}).createIndex(r1,_H,{unique:!1}),h.createObjectStore(If,{keyPath:TH}).createIndex(vR,NH,{unique:!1}),h.createObjectStore(Rf,{keyPath:EH}).createIndex(wR,SH,{unique:!1})})(e)))),r<16&&s>=16&&(l=l.next((()=>{t.objectStore(If).clear()})).next((()=>{t.objectStore(Rf).clear()}))),r<17&&s>=17&&(l=l.next((()=>{(function(h){h.createObjectStore(O_,{keyPath:DH})})(e)}))),r<18&&s>=18&&HI()&&(l=l.next((()=>{t.objectStore(If).clear()})).next((()=>{t.objectStore(Rf).clear()}))),l}pi(e){let t=0;return e.store(Gl).ee(((r,s)=>{t+=$0(s)})).next((()=>{const r={byteSize:t};return e.store(tm).put(n1,r)}))}gi(e){const t=e.store(em),r=e.store(Ws);return t.J().next((s=>J.forEach(s,(i=>{const l=IDBKeyRange.bound([i.userId,Fo],[i.userId,i.lastAcknowledgedBatchId]);return r.J(tc,l).next((d=>J.forEach(d,(h=>{Fe(h.userId===i.userId,18650,"Cannot process batch from unexpected user",{batchId:h.batchId});const m=Ql(this.serializer,h);return k4(e,i.userId,m).next((()=>{}))}))))}))))}yi(e){const t=e.store(ud),r=e.store(Gl);return e.store(cc).get(U0).next((s=>{const i=[];return r.ee(((l,d)=>{const h=new ct(l),m=(function(p){return[0,br(p)]})(h);i.push(t.get(m).next((g=>g?J.resolve():(p=>t.put({targetId:0,path:br(p),sequenceNumber:s.highestListenSequenceNumber}))(h))))})).next((()=>J.waitFor(i)))}))}wi(e,t){e.createObjectStore(nm,{keyPath:yH});const r=t.store(nm),s=new X_,i=l=>{if(s.add(l)){const d=l.lastSegment(),h=l.popLast();return r.put({collectionId:d,parent:br(h)})}};return t.store(Gl).ee({Y:!0},((l,d)=>{const h=new ct(l);return i(h.popLast())})).next((()=>t.store(ld).ee({Y:!0},(([l,d,h],m)=>{const g=Pa(d);return i(g.popLast())}))))}Si(e){const t=e.store(cd);return t.ee(((r,s)=>{const i=wf(s),l=j4(this.serializer,i);return t.put(l)}))}bi(e,t){const r=t.store(Gl),s=[];return r.ee(((i,l)=>{const d=t.store(B0),h=(function(p){return p.document?new _e(ct.fromString(p.document.name).popFirst(5)):p.noDocument?_e.fromSegments(p.noDocument.path):p.unknownDocument?_e.fromSegments(p.unknownDocument.path):Ie(36783)})(l).path.toArray(),m={prefixPath:h.slice(0,h.length-2),collectionGroup:h[h.length-2],documentId:h[h.length-1],readTime:l.readTime||[0,0],unknownDocument:l.unknownDocument,noDocument:l.noDocument,document:l.document,hasCommittedMutations:!!l.hasCommittedMutations};s.push(d.put(m))})).next((()=>J.waitFor(s)))}Di(e,t){const r=t.store(Ws),s=V4(this.serializer),i=new Z_(Ky.Vi,this.serializer.yt);return r.J().next((l=>{const d=new Map;return l.forEach((h=>{let m=d.get(h.userId)??nt();Ql(this.serializer,h).keys().forEach((g=>m=m.add(g))),d.set(h.userId,m)})),J.forEach(d,((h,m)=>{const g=new nr(m),p=Gy.wt(this.serializer,g),b=i.getIndexManager(g),w=$y.wt(g,this.serializer,b,i.referenceDelegate);return new F4(s,w,p,b).recalculateAndSaveOverlaysForDocumentKeys(new a1(t,Yr.ce),h).next()}))}))}}function jC(n){n.createObjectStore(ud,{keyPath:pH}).createIndex(M_,gH,{unique:!0}),n.createObjectStore(cd,{keyPath:"targetId"}).createIndex(bR,mH,{unique:!0}),n.createObjectStore(cc)}const bo="IndexedDbPersistence",Gv=18e5,$v=5e3,Kv="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",B4="main";class e2{constructor(e,t,r,s,i,l,d,h,m,g,p=18){if(this.allowTabSynchronization=e,this.persistenceKey=t,this.clientId=r,this.Ci=i,this.window=l,this.document=d,this.Fi=m,this.Mi=g,this.xi=p,this.ai=null,this.ui=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Oi=null,this.inForeground=!1,this.Ni=null,this.Bi=null,this.Li=Number.NEGATIVE_INFINITY,this.ki=b=>Promise.resolve(),!e2.v())throw new pe(ne.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new FY(this,s),this.qi=t+B4,this.serializer=new S4(h),this.Ki=new Ba(this.qi,this.xi,new XY(this.serializer)),this.ci=new AY,this.li=new OY(this.referenceDelegate,this.serializer),this.remoteDocumentCache=V4(this.serializer),this.Pi=new jY,this.window&&this.window.localStorage?this.Ui=this.window.localStorage:(this.Ui=null,g===!1&&jn(bo,"LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.$i().then((()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new pe(ne.FAILED_PRECONDITION,Kv);return this.Wi(),this.Qi(),this.Gi(),this.runTransaction("getHighestListenSequenceNumber","readonly",(e=>this.li.getHighestSequenceNumber(e)))})).then((e=>{this.ai=new Yr(e,this.Fi)})).then((()=>{this.ui=!0})).catch((e=>(this.Ki&&this.Ki.close(),Promise.reject(e))))}zi(e){return this.ki=async t=>{if(this.started)return e(t)},e(this.isPrimary)}setDatabaseDeletedListener(e){this.Ki.K((async t=>{t.newVersion===null&&await e()}))}setNetworkEnabled(e){this.networkEnabled!==e&&(this.networkEnabled=e,this.Ci.enqueueAndForget((async()=>{this.started&&await this.$i()})))}$i(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(e=>Sg(e).put({clientId:this.clientId,updateTimeMs:Date.now(),networkEnabled:this.networkEnabled,inForeground:this.inForeground}).next((()=>{if(this.isPrimary)return this.ji(e).next((t=>{t||(this.isPrimary=!1,this.Ci.enqueueRetryable((()=>this.ki(!1))))}))})).next((()=>this.Ji(e))).next((t=>this.isPrimary&&!t?this.Hi(e).next((()=>!1)):!!t&&this.Zi(e).next((()=>!0)))))).catch((e=>{if(sl(e))return xe(bo,"Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return xe(bo,"Releasing owner lease after error during lease refresh",e),!1})).then((e=>{this.isPrimary!==e&&this.Ci.enqueueRetryable((()=>this.ki(e))),this.isPrimary=e}))}ji(e){return lf(e).get(Tu).next((t=>J.resolve(this.Xi(t))))}Yi(e){return Sg(e).delete(this.clientId)}async es(){if(this.isPrimary&&!this.ts(this.Li,Gv)){this.Li=Date.now();const e=await this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(t=>{const r=Xn(t,dd);return r.J().next((s=>{const i=this.ns(s,Gv),l=s.filter((d=>i.indexOf(d)===-1));return J.forEach(l,(d=>r.delete(d.clientId))).next((()=>l))}))})).catch((()=>[]));if(this.Ui)for(const t of e)this.Ui.removeItem(this.rs(t.clientId))}}Gi(){this.Bi=this.Ci.enqueueAfterDelay("client_metadata_refresh",4e3,(()=>this.$i().then((()=>this.es())).then((()=>this.Gi()))))}Xi(e){return!!e&&e.ownerId===this.clientId}Ji(e){return this.Mi?J.resolve(!0):lf(e).get(Tu).next((t=>{if(t!==null&&this.ts(t.leaseTimestampMs,$v)&&!this.ss(t.ownerId)){if(this.Xi(t)&&this.networkEnabled)return!0;if(!this.Xi(t)){if(!t.allowTabSynchronization)throw new pe(ne.FAILED_PRECONDITION,Kv);return!1}}return!(!this.networkEnabled||!this.inForeground)||Sg(e).J().next((r=>this.ns(r,$v).find((s=>{if(this.clientId!==s.clientId){const i=!this.networkEnabled&&s.networkEnabled,l=!this.inForeground&&s.inForeground,d=this.networkEnabled===s.networkEnabled;if(i||l&&d)return!0}return!1}))===void 0))})).next((t=>(this.isPrimary!==t&&xe(bo,`Client ${t?"is":"is not"} eligible for a primary lease.`),t)))}async shutdown(){this.ui=!1,this._s(),this.Bi&&(this.Bi.cancel(),this.Bi=null),this.us(),this.cs(),await this.Ki.runTransaction("shutdown","readwrite",[Sm,dd],(e=>{const t=new a1(e,Yr.ce);return this.Hi(t).next((()=>this.Yi(t)))})),this.Ki.close(),this.ls()}ns(e,t){return e.filter((r=>this.ts(r.updateTimeMs,t)&&!this.ss(r.clientId)))}hs(){return this.runTransaction("getActiveClients","readonly",(e=>Sg(e).J().next((t=>this.ns(t,Gv).map((r=>r.clientId))))))}get started(){return this.ui}getGlobalsCache(){return this.ci}getMutationQueue(e,t){return $y.wt(e,this.serializer,t,this.referenceDelegate)}getTargetCache(){return this.li}getRemoteDocumentCache(){return this.remoteDocumentCache}getIndexManager(e){return new PY(e,this.serializer.yt.databaseId)}getDocumentOverlayCache(e){return Gy.wt(this.serializer,e)}getBundleCache(){return this.Pi}runTransaction(e,t,r){xe(bo,"Starting transaction:",e);const s=t==="readonly"?"readonly":"readwrite",i=(function(h){return h===18?RH:h===17?SR:h===16?IH:h===15?L_:h===14?ER:h===13?NR:h===12?kH:h===11?TR:void Ie(60245)})(this.xi);let l;return this.Ki.runTransaction(e,s,i,(d=>(l=new a1(d,this.ai?this.ai.next():Yr.ce),t==="readwrite-primary"?this.ji(l).next((h=>!!h||this.Ji(l))).next((h=>{if(!h)throw jn(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.Ci.enqueueRetryable((()=>this.ki(!1))),new pe(ne.FAILED_PRECONDITION,fR);return r(l)})).next((h=>this.Zi(l).next((()=>h)))):this.Ps(l).next((()=>r(l)))))).then((d=>(l.raiseOnCommittedEvent(),d)))}Ps(e){return lf(e).get(Tu).next((t=>{if(t!==null&&this.ts(t.leaseTimestampMs,$v)&&!this.ss(t.ownerId)&&!this.Xi(t)&&!(this.Mi||this.allowTabSynchronization&&t.allowTabSynchronization))throw new pe(ne.FAILED_PRECONDITION,Kv)}))}Zi(e){const t={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return lf(e).put(Tu,t)}static v(){return Ba.v()}Hi(e){const t=lf(e);return t.get(Tu).next((r=>this.Xi(r)?(xe(bo,"Releasing primary lease."),t.delete(Tu)):J.resolve()))}ts(e,t){const r=Date.now();return!(e<r-t)&&(!(e>r)||(jn(`Detected an update time that is in the future: ${e} > ${r}`),!1))}Wi(){this.document!==null&&typeof this.document.addEventListener=="function"&&(this.Ni=()=>{this.Ci.enqueueAndForget((()=>(this.inForeground=this.document.visibilityState==="visible",this.$i())))},this.document.addEventListener("visibilitychange",this.Ni),this.inForeground=this.document.visibilityState==="visible")}us(){this.Ni&&(this.document.removeEventListener("visibilitychange",this.Ni),this.Ni=null)}Qi(){var e;typeof((e=this.window)==null?void 0:e.addEventListener)=="function"&&(this.Oi=()=>{this._s();const t=/(?:Version|Mobile)\/1[456]/;qI()&&(navigator.appVersion.match(t)||navigator.userAgent.match(t))&&this.Ci.enterRestrictedMode(!0),this.Ci.enqueueAndForget((()=>this.shutdown()))},this.window.addEventListener("pagehide",this.Oi))}cs(){this.Oi&&(this.window.removeEventListener("pagehide",this.Oi),this.Oi=null)}ss(e){var t;try{const r=((t=this.Ui)==null?void 0:t.getItem(this.rs(e)))!==null;return xe(bo,`Client '${e}' ${r?"is":"is not"} zombied in LocalStorage`),r}catch(r){return jn(bo,"Failed to get zombied client id.",r),!1}}_s(){if(this.Ui)try{this.Ui.setItem(this.rs(this.clientId),String(Date.now()))}catch(e){jn("Failed to set zombie client id.",e)}}ls(){if(this.Ui)try{this.Ui.removeItem(this.rs(this.clientId))}catch{}}rs(e){return`firestore_zombie_${this.persistenceKey}_${e}`}}function lf(n){return Xn(n,Sm)}function Sg(n){return Xn(n,dd)}function t2(n,e){let t=n.projectId;return n.isDefaultDatabase||(t+="."+n.database),"firestore/"+e+"/"+t+"/"}/**
2255 * @license
2256 * Copyright 2017 Google LLC
2257 *
2258 * Licensed under the Apache License, Version 2.0 (the "License");
2259 * you may not use this file except in compliance with the License.
2260 * You may obtain a copy of the License at
2261 *
2262 *   http://www.apache.org/licenses/LICENSE-2.0
2263 *
2264 * Unless required by applicable law or agreed to in writing, software
2265 * distributed under the License is distributed on an "AS IS" BASIS,
2266 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2267 * See the License for the specific language governing permissions and
2268 * limitations under the License.
2269 */class n2{constructor(e,t,r,s){this.targetId=e,this.fromCache=t,this.Ts=r,this.Es=s}static Is(e,t){let r=nt(),s=nt();for(const i of t.docChanges)switch(i.type){case 0:r=r.add(i.doc.key);break;case 1:s=s.add(i.doc.key)}return new n2(e,t.fromCache,r,s)}}/**
2270 * @license
2271 * Copyright 2023 Google LLC
2272 *
2273 * Licensed under the Apache License, Version 2.0 (the "License");
2274 * you may not use this file except in compliance with the License.
2275 * You may obtain a copy of the License at
2276 *
2277 *   http://www.apache.org/licenses/LICENSE-2.0
2278 *
2279 * Unless required by applicable law or agreed to in writing, software
2280 * distributed under the License is distributed on an "AS IS" BASIS,
2281 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2282 * See the License for the specific language governing permissions and
2283 * limitations under the License.
2284 */class JY{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/**
2285 * @license
2286 * Copyright 2019 Google LLC
2287 *
2288 * Licensed under the Apache License, Version 2.0 (the "License");
2289 * you may not use this file except in compliance with the License.
2290 * You may obtain a copy of the License at
2291 *
2292 *   http://www.apache.org/licenses/LICENSE-2.0
2293 *
2294 * Unless required by applicable law or agreed to in writing, software
2295 * distributed under the License is distributed on an "AS IS" BASIS,
2296 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2297 * See the License for the specific language governing permissions and
2298 * limitations under the License.
2299 */class U4{constructor(){this.Rs=!1,this.As=!1,this.Vs=100,this.ds=(function(){return qI()?8:pR(Wn())>0?6:4})()}initialize(e,t){this.fs=e,this.indexManager=t,this.Rs=!0}getDocumentsMatchingQuery(e,t,r,s){const i={result:null};return this.gs(e,t).next((l=>{i.result=l})).next((()=>{if(!i.result)return this.ps(e,t,s,r).next((l=>{i.result=l}))})).next((()=>{if(i.result)return;const l=new JY;return this.ys(e,t,l).next((d=>{if(i.result=d,this.As)return this.ws(e,t,l,d.size)}))})).next((()=>i.result))}ws(e,t,r,s){return r.documentReadCount<this.Vs?(Ru()<=xt.DEBUG&&xe("QueryEngine","SDK will not create cache indexes for query:",Mu(t),"since it only creates cache indexes for collection contains","more than or equal to",this.Vs,"documents"),J.resolve()):(Ru()<=xt.DEBUG&&xe("QueryEngine","Query:",Mu(t),"scans",r.documentReadCount,"local documents and returns",s,"documents as results."),r.documentReadCount>this.ds*s?(Ru()<=xt.DEBUG&&xe("QueryEngine","The SDK decides to create cache indexes for query:",Mu(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,vr(t))):J.resolve())}gs(e,t){if(XA(t))return J.resolve(null);let r=vr(t);return this.indexManager.getIndexType(e,r).next((s=>s===0?null:(t.limit!==null&&s===1&&(t=H0(t,null,"F"),r=vr(t)),this.indexManager.getDocumentsMatchingTarget(e,r).next((i=>{const l=nt(...i);return this.fs.getDocuments(e,l).next((d=>this.indexManager.getMinOffset(e,r).next((h=>{const m=this.Ss(t,d);return this.bs(t,m,l,h.readTime)?this.gs(e,H0(t,null,"F")):this.Ds(e,m,t,h)}))))}
2299)))))}ps(e,t,r,s){return XA(t)||s.isEqual(Ye.min())?J.resolve(null):this.fs.getDocuments(e,r).next((i=>{const l=this.Ss(t,i);return this.bs(t,l,r,s)?J.resolve(null):(Ru()<=xt.DEBUG&&xe("QueryEngine","Re-using previous result from %s to execute query: %s",s.toString(),Mu(t)),this.Ds(e,l,t,dR(s,ad)).next((d=>d)))}))}Ss(e,t){let r=new Lt(QR(e));return t.forEach(((s,i)=>{Cm(e,i)&&(r=r.add(i))})),r}bs(e,t,r,s){if(e.limit===null)return!1;if(r.size!==t.size)return!0;const i=e.limitType==="F"?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(s)>0)}ys(e,t,r){return Ru()<=xt.DEBUG&&xe("QueryEngine","Using full collection scan to execute query:",Mu(t)),this.fs.getDocumentsMatchingQuery(e,t,fs.min(),r)}Ds(e,t,r,s){return this.fs.getDocumentsMatchingQuery(e,r,s).next((i=>(t.forEach((l=>{i=i.insert(l.key,l)})),i)))}}/**
2300 * @license
2301 * Copyright 2020 Google LLC
2302 *
2303 * Licensed under the Apache License, Version 2.0 (the "License");
2304 * you may not use this file except in compliance with the License.
2305 * You may obtain a copy of the License at
2306 *
2307 *   http://www.apache.org/licenses/LICENSE-2.0
2308 *
2309 * Unless required by applicable law or agreed to in writing, software
2310 * distributed under the License is distributed on an "AS IS" BASIS,
2311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2312 * See the License for the specific language governing permissions and
2313 * limitations under the License.
2314 */const r2="LocalStore",ZY=3e8;class eG{constructor(e,t,r,s){this.persistence=e,this.Cs=t,this.serializer=s,this.vs=new Xt(Qe),this.Fs=new Mi((i=>yc(i)),jm),this.Ms=new Map,this.xs=e.getRemoteDocumentCache(),this.li=e.getTargetCache(),this.Pi=e.getBundleCache(),this.Os(r)}Os(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new F4(this.xs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.xs.setIndexManager(this.indexManager),this.Cs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(t=>e.collect(t,this.vs)))}}function z4(n,e,t,r){return new eG(n,e,t,r)}async function q4(n,e){const t=Ee(n);return await t.persistence.runTransaction("Handle user change","readonly",(r=>{let s;return t.mutationQueue.getAllMutationBatches(r).next((i=>(s=i,t.Os(e),t.mutationQueue.getAllMutationBatches(r)))).next((i=>{const l=[],d=[];let h=nt();for(const m of s){l.push(m.batchId);for(const g of m.mutations)h=h.add(g.key)}for(const m of i){d.push(m.batchId);for(const g of m.mutations)h=h.add(g.key)}return t.localDocuments.getDocuments(r,h).next((m=>({Ns:m,removedBatchIds:l,addedBatchIds:d})))}))}))}function tG(n,e){const t=Ee(n);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",(r=>{const s=e.batch.keys(),i=t.xs.newChangeBuffer({trackRemovals:!0});return(function(d,h,m,g){const p=m.batch,b=p.keys();let w=J.resolve();return b.forEach((_=>{w=w.next((()=>g.getEntry(h,_))).next((N=>{const E=m.docVersions.get(_);Fe(E!==null,48541),N.version.compareTo(E)<0&&(p.applyToRemoteDocument(N,m),N.isValidDocument()&&(N.setReadTime(m.commitVersion),g.addEntry(N)))}))})),w.next((()=>d.mutationQueue.removeMutationBatch(h,p)))})(t,r,e,i).next((()=>i.apply(r))).next((()=>t.mutationQueue.performConsistencyCheck(r))).next((()=>t.documentOverlayCache.removeOverlaysForBatchId(r,s,e.batch.batchId))).next((()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,(function(d){let h=nt();for(let m=0;m<d.mutationResults.length;++m)d.mutationResults[m].transformResults.length>0&&(h=h.add(d.batch.mutations[m].key));return h})(e)))).next((()=>t.localDocuments.getDocuments(r,s)))}))}function H4(n){const e=Ee(n);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(t=>e.li.getLastRemoteSnapshotVersion(t)))}function nG(n,e){const t=Ee(n),r=e.snapshotVersion;let s=t.vs;return t.persistence.runTransaction("Apply remote event","readwrite-primary",(i=>{const l=t.xs.newChangeBuffer({trackRemovals:!0});s=t.vs;const d=[];
2314e.targetChanges.forEach(((g,p)=>{const b=s.get(p);if(!b)return;d.push(t.li.removeMatchingKeys(i,g.removedDocuments,p).next((()=>t.li.addMatchingKeys(i,g.addedDocuments,p))));let w=b.withSequenceNumber(i.currentSequenceNumber);e.targetMismatches.get(p)!==null?w=w.withResumeToken(pn.EMPTY_BYTE_STRING,Ye.min()).withLastLimboFreeSnapshotVersion(Ye.min()):g.resumeToken.approximateByteSize()>0&&(w=w.withResumeToken(g.resumeToken,r)),s=s.insert(p,w),(function(N,E,j){return N.resumeToken.approximateByteSize()===0||E.snapshotVersion.toMicroseconds()-N.snapshotVersion.toMicroseconds()>=ZY?!0:j.addedDocuments.size+j.modifiedDocuments.size+j.removedDocuments.size>0})(b,w,g)&&d.push(t.li.updateTargetData(i,w))}));let h=$r(),m=nt();if(e.documentUpdates.forEach((g=>{e.resolvedLimboDocuments.has(g)&&d.push(t.persistence.referenceDelegate.updateLimboDocument(i,g))})),d.push(Y4(i,l,e.documentUpdates).next((g=>{h=g.Bs,m=g.Ls}))),!r.isEqual(Ye.min())){const g=t.li.getLastRemoteSnapshotVersion(i).next((p=>t.li.setTargetsMetadata(i,i.currentSequenceNumber,r)));d.push(g)}return J.waitFor(d).next((()=>l.apply(i))).next((()=>t.localDocuments.getLocalViewOfDocuments(i,h,m))).next((()=>h))})).then((i=>(t.vs=s,i)))}function Y4(n,e,t){let r=nt(),s=nt();return t.forEach((i=>r=r.add(i))),e.getEntries(n,r).next((i=>{let l=$r();return t.forEach(((d,h)=>{const m=i.get(d);h.isFoundDocument()!==m.isFoundDocument()&&(s=s.add(d)),h.isNoDocument()&&h.version.isEqual(Ye.min())?(e.removeEntry(d,h.readTime),l=l.insert(d,h)):!m.isValidDocument()||h.version.compareTo(m.version)>0||h.version.compareTo(m.version)===0&&m.hasPendingWrites?(e.addEntry(h),l=l.insert(d,h)):xe(r2,"Ignoring outdated watch update for ",d,". Current version:",m.version," Watch version:",h.version)})),{Bs:l,Ls:s}}))}function rG(n,e){const t=Ee(n);return t.persistence.runTransaction("Get next mutation batch","readonly",(r=>(e===void 0&&(e=Fo),t.mutationQueue.getNextMutationBatchAfterBatchId(r,e))))}function xd(n,e){const t=Ee(n);return t.persistence.runTransaction("Allocate target","readwrite",(r=>{let s;return t.li.getTargetData(r,e).next((i=>i?(s=i,J.resolve(s)):t.li.allocateTargetId(r).next((l=>(s=new gi(e,l,"TargetPurposeListen",r.currentSequenceNumber),t.li.addTargetData(r,s).next((()=>s)))))))})).then((r=>{const s=t.vs.get(r.targetId);return(s===null||r.snapshotVersion.compareTo(s.snapshotVersion)>0)&&(t.vs=t.vs.insert(r.targetId,r),t.Fs.set(e,r.targetId)),r}))}async function bd(n,e,t){const r=Ee(n),s=r.vs.get(e),i=t?"readwrite":"readwrite-primary";try{t||await r.persistence.runTransaction("Release target",i,(l=>r.persistence.referenceDelegate.removeTarget(l,s)))}catch(l){if(!sl(l))throw l;xe(r2,`Failed to update sequence numbers for target ${e}: ${l}`)}r.vs=r.vs.remove(e),r.Fs.delete(s.target)}function W0(n,e,t){const r=Ee(n);let s=Ye.min(),i=nt();return r.persistence.runTransaction("Execute query","readwrite",(l=>(function(h,m,g){const p=Ee(h),b=p.Fs.get(g);return b!==void 0?J.resolve(p.vs.get(b)):p.li.getTargetData(m,g)})(r,l,vr(e)).next((d=>{if(d)return s=d.lastLimboFreeSnapshotVersion,r.li.getMatchingKeysForTargetId(l,d.targetId).next((h=>{i=h}))})).next((()=>r.Cs.getDocumentsMatchingQuery(l,e,t?s:Ye.min(),t?i:nt()))).next((d=>(K4(r,WR(e),d),{documents:d,ks:i})))))}function G4(n,e){const t=Ee(n),r=Ee(t.li),s=t.vs.get(e);return s?Promise.resolve(s.target):t.persistence.runTransaction("Get target data","readonly",(i=>r.At(i,e).next((l=>l?l.target:null))))}function $4(n,e){const t=Ee(n),r=t.Ms.get(e)||Ye.min();return t.persistence.runTransaction("Get new document changes","readonly",(s=>t.xs.getAllFromCollectionGroup(s,e,dR(r,ad),Number.MAX_SAFE_INTEGER))).then((s=>(K4(t,e,s),s)))}function K4(n,e,t){let r=n.Ms.get(e)||Ye.min();t.forEach(((s,i)=>{i.readTime.compareTo(r)>0&&(r=i.readTime)})),n.Ms.set(e,r)}async function sG(n,e,t,r){const s=Ee(n);let i=nt(),l=$r();for(const m of t){const g=e.qs(m.metadata.name);m.document&&(i=i.add(g));const p=e.Ks(m);p.setReadTime(e.Us(m.metadata.readTime)),l=l.insert(g,p)}const d=s.xs.newChangeBuffer({trackRemovals:!0}),h=await xd(s,(function(g){return vr(Bd(ct.fromString(`__bundle__/docs/${g}`)))})(r));return s.persistence.runTransaction("Apply bundle documents","readwrite",(m=>Y4(m,d,l).next((g=>(d.apply(m),g))).next((g=>s.li.removeMatchingKeysForTargetId(m,h.targetId).next((()=>s.li.addMatchingKeys(m,i,h.targetId))).next((()=>s.localDocuments.getLocalViewOfDocuments(m,g.Bs,g.Ls))).next((()=>g.Bs))))))}async function aG(n,e,t=nt()){const r=await xd(n,vr(Yy(e.bundledQuery))),s=Ee(n);return s.persistence.runTransaction("Save named query","readwrite",(i=>{const l=Dn(e.readTime);if(r.snapshotVersion.compareTo(l)>=0)return s.Pi.saveNamedQuery(i,e);const d=r.withResumeToken(pn.EMPTY_BYTE_STRING,l);return s.vs=s.vs.insert(d.targetId,d),s.li.updateTargetData(i,d).next((()=>s.li.removeMatchingKeysForTargetId(i,r.targetId))).next((()=>s.li.addMatchingKeys(i,t,r.targetId))).next((()=>s.Pi.saveNamedQuery(i,e)))}))}/**
2315 * @license
2316 * Copyright 2019 Google LLC
2317 *
2318 * Licensed under the Apache License, Version 2.0 (the "License");
2319 * you may not use this file except in compliance with the License.
2320 * You may obtain a copy of the License at
2321 *
2322 *   http://www.apache.org/licenses/LICENSE-2.0
2323 *
2324 * Unless required by applicable law or agreed to in writing, software
2325 * distributed under the License is distributed on an "AS IS" BASIS,
2326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2327 * See the License for the specific language governing permissions and
2328 * limitations under the License.
2329 */const W4="firestore_clients";function AC(n,e){return`${W4}_${n}_${e}`}const Q4="firestore_mutations";function CC(n,e,t){let r=`${Q4}_${n}_${t}`;return e.isAuthenticated()&&(r+=`_${e.uid}`),r}const X4="firestore_targets";function Wv(n,e){return`${X4}_${n}_${e}`}/**
2330 * @license
2331 * Copyright 2018 Google LLC
2332 *
2333 * Licensed under the Apache License, Version 2.0 (the "License");
2334 * you may not use this file except in compliance with the License.
2335 * You may obtain a copy of the License at
2336 *
2337 *   http://www.apache.org/licenses/LICENSE-2.0
2338 *
2339 * Unless required by applicable law or agreed to in writing, software
2340 * distributed under the License is distributed on an "AS IS" BASIS,
2341 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2342 * See the License for the specific language governing permissions and
2343 * limitations under the License.
2344 */const ka="SharedClientState";class Q0{constructor(e,t,r,s){this.user=e,this.batchId=t,this.state=r,this.error=s}static $s(e,t,r){const s=JSON.parse(r);let i,l=typeof s=="object"&&["pending","acknowledged","rejected"].indexOf(s.state)!==-1&&(s.error===void 0||typeof s.error=="object");return l&&s.error&&(l=typeof s.error.message=="string"&&typeof s.error.code=="string",l&&(i=new pe(s.error.code,s.error.message))),l?new Q0(e,t,s.state,i):(jn(ka,`Failed to parse mutation state for ID '${t}': ${r}`),null)}Ws(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class Vf{constructor(e,t,r){this.targetId=e,this.state=t,this.error=r}static $s(e,t){const r=JSON.parse(t);let s,i=typeof r=="object"&&["not-current","current","rejected"].indexOf(r.state)!==-1&&(r.error===void 0||typeof r.error=="object");return i&&r.error&&(i=typeof r.error.message=="string"&&typeof r.error.code=="string",i&&(s=new pe(r.error.code,r.error.message))),i?new Vf(e,r.state,s):(jn(ka,`Failed to parse target state for ID '${e}': ${t}`),null)}Ws(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class X0{constructor(e,t){this.clientId=e,this.activeTargetIds=t}static $s(e,t){const r=JSON.parse(t);let s=typeof r=="object"&&r.activeTargetIds instanceof Array,i=z_();for(let l=0;s&&l<r.activeTargetIds.length;++l)s=gR(r.activeTargetIds[l]),i=i.add(r.activeTargetIds[l]);return s?new X0(e,i):(jn(ka,`Failed to parse client data for instance '${e}': ${t}`),null)}}class s2{constructor(e,t){this.clientId=e,this.onlineState=t}static $s(e){const t=JSON.parse(e);return typeof t=="object"&&["Unknown","Online","Offline"].indexOf(t.onlineState)!==-1&&typeof t.clientId=="string"?new s2(t.clientId,t.onlineState):(jn(ka,`Failed to parse online state: ${e}`),null)}}class b1{constructor(){this.activeTargetIds=z_()}Qs(e){this.activeTargetIds=this.activeTargetIds.add(e)}Gs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ws(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Qv{constructor(e,t,r,s,i){this.window=e,this.Ci=t,this.persistenceKey=r,this.zs=s,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.js=this.Js.bind(this),this.Hs=new Xt(Qe),this.started=!1,this.Zs=[];const l=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Xs=AC(this.persistenceKey,this.zs),this.Ys=(function(h){return`firestore_sequence_number_${h}`})(this.persistenceKey),this.Hs=this.Hs.insert(this.zs,new b1),this.eo=new RegExp(`^${W4}_${l}_([^_]*)$`),this.no=new RegExp(`^${Q4}_${l}_(\\d+)(?:_(.*))?$`),this.ro=new RegExp(`^${X4}_${l}_(\\d+)$`),this.io=(function(h){return`firestore_online_state_${h}`})(this.persistenceKey),this.so=(function(h){return`firestore_bundle_loaded_v2_${h}`})(this.persistenceKey),this.window.addEventListener("storage",this.js)}static v(e){return!(!e||!e.localStorage)}async start(){const e=await this.syncEngine.hs();for(const r of e){if(r===this.zs)continue;const s=this.getItem(AC(this.persistenceKey,r));if(s){const i=X0.$s(r,s);i&&(this.Hs=this.Hs.insert(i.clientId,i))}}this.oo();const t=this.storage.getItem(this.io);if(t){const r=this._o(t);r&&this.ao(r)}for(const r of this.Zs)this.Js(r);this.Zs=[],this.window.addEventListener("pagehide",(()=>this.shutdown())),this.started=!0}writeSequenceNumber(e){this.setItem(this.Ys,JSON.stringify(e))}getAllActiveQueryTargets(){return this.uo(this.Hs)}isActiveQueryTarget(e){let t=!1;return this.Hs.forEach(((r,s)=>{s.activeTargetIds.has(e)&&(t=!0)})),t}addPendingMutation(e){this.co(e,"pending")}updateMutationState(e,t,r){this.co(e,t,r),this.lo(e)}addLocalQueryTarget(e,t=!0){let r="not-current";if(this.isActiveQueryTarget(e)){const s=this.storage.getItem(Wv(this.persistenceKey,e));
vendor: 4,169 bytes, lines 2344-2348
2344if(s){const i=Vf.$s(e,s);i&&(r=i.state)}}return t&&this.ho.Qs(e),this.oo(),r}removeLocalQueryTarget(e){this.ho.Gs(e),this.oo()}isLocalQueryTarget(e){return this.ho.activeTargetIds.has(e)}clearQueryState(e){this.removeItem(Wv(this.persistenceKey,e))}updateQueryState(e,t,r){this.Po(e,t,r)}handleUserChange(e,t,r){t.forEach((s=>{this.lo(s)})),this.currentUser=e,r.forEach((s=>{this.addPendingMutation(s)}))}setOnlineState(e){this.To(e)}notifyBundleLoaded(e){this.Eo(e)}shutdown(){this.started&&(this.window.removeEventListener("storage",this.js),this.removeItem(this.Xs),this.started=!1)}getItem(e){const t=this.storage.getItem(e);return xe(ka,"READ",e,t),t}setItem(e,t){xe(ka,"SET",e,t),this.storage.setItem(e,t)}removeItem(e){xe(ka,"REMOVE",e),this.storage.removeItem(e)}Js(e){const t=e;if(t.storageArea===this.storage){if(xe(ka,"EVENT",t.key,t.newValue),t.key===this.Xs)return void jn("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Ci.enqueueRetryable((async()=>{if(this.started){if(t.key!==null){if(this.eo.test(t.key)){if(t.newValue==null){const r=this.Io(t.key);return this.Ro(r,null)}{const r=this.Ao(t.key,t.newValue);if(r)return this.Ro(r.clientId,r)}}else if(this.no.test(t.key)){if(t.newValue!==null){const r=this.Vo(t.key,t.newValue);if(r)return this.mo(r)}}else if(this.ro.test(t.key)){if(t.newValue!==null){const r=this.fo(t.key,t.newValue);if(r)return this.po(r)}}else if(t.key===this.io){if(t.newValue!==null){const r=this._o(t.newValue);if(r)return this.ao(r)}}else if(t.key===this.Ys){const r=(function(i){let l=Yr.ce;if(i!=null)try{const d=JSON.parse(i);Fe(typeof d=="number",30636,{yo:i}),l=d}catch(d){jn(ka,"Failed to read sequence number from WebStorage",d)}return l})(t.newValue);r!==Yr.ce&&this.sequenceNumberHandler(r)}else if(t.key===this.so){const r=this.wo(t.newValue);await Promise.all(r.map((s=>this.syncEngine.So(s))))}}}else this.Zs.push(t)}))}}get ho(){return this.Hs.get(this.zs)}oo(){this.setItem(this.Xs,this.ho.Ws())}co(e,t,r){const s=new Q0(this.currentUser,e,t,r),i=CC(this.persistenceKey,this.currentUser,e);this.setItem(i,s.Ws())}lo(e){const t=CC(this.persistenceKey,this.currentUser,e);this.removeItem(t)}To(e){const t={clientId:this.zs,onlineState:e};this.storage.setItem(this.io,JSON.stringify(t))}Po(e,t,r){const s=Wv(this.persistenceKey,e),i=new Vf(e,t,r);this.setItem(s,i.Ws())}Eo(e){const t=JSON.stringify(Array.from(e));this.setItem(this.so,t)}Io(e){const t=this.eo.exec(e);return t?t[1]:null}Ao(e,t){const r=this.Io(e);return X0.$s(r,t)}Vo(e,t){const r=this.no.exec(e),s=Number(r[1]),i=r[2]!==void 0?r[2]:null;return Q0.$s(new nr(i),s,t)}fo(e,t){const r=this.ro.exec(e),s=Number(r[1]);return Vf.$s(s,t)}_o(e){return s2.$s(e)}wo(e){return JSON.parse(e)}async mo(e){if(e.user.uid===this.currentUser.uid)return this.syncEngine.bo(e.batchId,e.state,e.error);xe(ka,`Ignoring mutation for non-active user ${e.user.uid}`)}po(e){return this.syncEngine.Do(e.targetId,e.state,e.error)}Ro(e,t){const r=t?this.Hs.insert(e,t):this.Hs.remove(e),s=this.uo(this.Hs),i=this.uo(r),l=[],d=[];return i.forEach((h=>{s.has(h)||l.push(h)})),s.forEach((h=>{i.has(h)||d.push(h)})),this.syncEngine.Co(l,d).then((()=>{this.Hs=r}))}ao(e){this.Hs.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}uo(e){let t=z_();return e.forEach(((r,s)=>{t=t.unionWith(s.activeTargetIds)})),t}}class J4{constructor(){this.vo=new b1,this.Fo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,r){}addLocalQueryTarget(e,t=!0){return t&&this.vo.Qs(e),this.Fo[e]||"not-current"}updateQueryState(e,t,r){this.Fo[e]=t}removeLocalQueryTarget(e){this.vo.Gs(e)}isLocalQueryTarget(e){return this.vo.activeTargetIds.has(e)}clearQueryState(e){delete this.Fo[e]}getAllActiveQueryTargets(){return this.vo.activeTargetIds}isActiveQueryTarget(e){return this.vo.activeTargetIds.has(e)}start(){return this.vo=new b1,Promise.resolve()}handleUserChange(e,t,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/**
2345 * @license
2346 * Copyright 2019 Google LLC
2347 *
2348 * Licensed under the Apache License, Version 2.0 (the "License");
2349 * you may not use this file except in compliance with the License.
2350 * You may obtain a copy of the License at
2351 *
2352 *   http://www.apache.org/licenses/LICENSE-2.0
2353 *
2354 * Unless required by applicable law or agreed to in writing, software
2355 * distributed under the License is distributed on an "AS IS" BASIS,
2356 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2357 * See the License for the specific language governing permissions and
2358 * limitations under the License.
2359 */class iG{Mo(e){}shutdown(){}}/**
2360 * @license
2361 * Copyright 2019 Google LLC
2362 *
2363 * Licensed under the Apache License, Version 2.0 (the "License");
2364 * you may not use this file except in compliance with the License.
2365 * You may obtain a copy of the License at
2366 *
2367 *   http://www.apache.org/licenses/LICENSE-2.0
2368 *
2369 * Unless required by applicable law or agreed to in writing, software
2370 * distributed under the License is distributed on an "AS IS" BASIS,
2371 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2372 * See the License for the specific language governing permissions and
2373 * limitations under the License.
2374 */const DC="ConnectivityMonitor";class kC{constructor(){this.xo=()=>this.Oo(),this.No=()=>this.Bo(),this.Lo=[],this.ko()}Mo(e){this.Lo.push(e)}shutdown(){window.removeEventListener("online",this.xo),window.removeEventListener("offline",this.No)}ko(){window.addEventListener("online",this.xo),window.addEventListener("offline",this.No)}Oo(){xe(DC,"Network connectivity changed: AVAILABLE");for(const e of this.Lo)e(0)}Bo(){xe(DC,"Network connectivity changed: UNAVAILABLE");for(const e of this.Lo)e(1)}static v(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
2375 * @license
2376 * Copyright 2023 Google LLC
2377 *
2378 * Licensed under the Apache License, Version 2.0 (the "License");
2379 * you may not use this file except in compliance with the License.
2380 * You may obtain a copy of the License at
2381 *
2382 *   http://www.apache.org/licenses/LICENSE-2.0
2383 *
2384 * Unless required by applicable law or agreed to in writing, software
2385 * distributed under the License is distributed on an "AS IS" BASIS,
2386 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2387 * See the License for the specific language governing permissions and
2388 * limitations under the License.
2389 */let jg=null;function v1(){return jg===null?jg=(function(){return 268435456+Math.round(2147483648*Math.random())})():jg++,"0x"+jg.toString(16)}/**
2390 * @license
2391 * Copyright 2020 Google LLC
2392 *
2393 * Licensed under the Apache License, Version 2.0 (the "License");
2394 * you may not use this file except in compliance with the License.
2395 * You may obtain a copy of the License at
2396 *
2397 *   http://www.apache.org/licenses/LICENSE-2.0
2398 *
2399 * Unless required by applicable law or agreed to in writing, software
2400 * distributed under the License is distributed on an "AS IS" BASIS,
2401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2402 * See the License for the specific language governing permissions and
2403 * limitations under the License.
2404 */const Xv="RestConnection",oG={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery",ExecutePipeline:"executePipeline"};class lG{get qo(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.Ko=t+"://"+e.host,this.Uo=`projects/${r}/databases/${s}`,this.$o=this.databaseId.database===sm?`project_id=${r}`:`project_id=${r}&database_id=${s}`}Wo(e,t,r,s,i){const l=v1(),d=this.Qo(e,t.toUriEncodedString());xe(Xv,`Sending RPC '${e}' ${l}:`,d,r);const h={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.$o};this.Go(h,s,i);const{host:m}=new URL(d),g=Ld(m);return this.zo(e,d,h,r,g).then((p=>(xe(Xv,`Received RPC '${e}' ${l}: `,p),p)),(p=>{throw Zr(Xv,`RPC '${e}' ${l} failed with error: `,p,"url: ",d,"request:",r),p}))}jo(e,t,r,s,i,l){return this.Wo(e,t,r,s,i)}Go(e,t,r){e["X-Goog-Api-Client"]=(function(){return"gl-js/ fire/"+Fd})(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEac
vendor: 4,216 bytes, lines 2404-2434
2404h(((s,i)=>e[i]=s)),r&&r.headers.forEach(((s,i)=>e[i]=s))}Qo(e,t){const r=oG[e];let s=`${this.Ko}/v1/${t}:${r}`;return this.databaseInfo.apiKey&&(s=`${s}?key=${encodeURIComponent(this.databaseInfo.apiKey)}`),s}terminate(){}}/**
2405 * @license
2406 * Copyright 2017 Google LLC
2407 *
2408 * Licensed under the Apache License, Version 2.0 (the "License");
2409 * you may not use this file except in compliance with the License.
2410 * You may obtain a copy of the License at
2411 *
2412 *   http://www.apache.org/licenses/LICENSE-2.0
2413 *
2414 * Unless required by applicable law or agreed to in writing, software
2415 * distributed under the License is distributed on an "AS IS" BASIS,
2416 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2417 * See the License for the specific language governing permissions and
2418 * limitations under the License.
2419 */class cG{constructor(e){this.Jo=e.Jo,this.Ho=e.Ho}Zo(e){this.Xo=e}Yo(e){this.e_=e}t_(e){this.n_=e}onMessage(e){this.r_=e}close(){this.Ho()}send(e){this.Jo(e)}i_(){this.Xo()}s_(){this.e_()}o_(e){this.n_(e)}__(e){this.r_(e)}}/**
2420 * @license
2421 * Copyright 2017 Google LLC
2422 *
2423 * Licensed under the Apache License, Version 2.0 (the "License");
2424 * you may not use this file except in compliance with the License.
2425 * You may obtain a copy of the License at
2426 *
2427 *   http://www.apache.org/licenses/LICENSE-2.0
2428 *
2429 * Unless required by applicable law or agreed to in writing, software
2430 * distributed under the License is distributed on an "AS IS" BASIS,
2431 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2432 * See the License for the specific language governing permissions and
2433 * limitations under the License.
2434 */const pr="WebChannelConnection",cf=(n,e,t)=>{n.listen(e,(r=>{try{t(r)}catch(s){setTimeout((()=>{throw s}),0)}}))};class Hu extends lG{constructor(e){super(e),this.a_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}static u_(){if(!Hu.c_){const e=nR();cf(e,tR.STAT_EVENT,(t=>{t.stat===Xw.PROXY?xe(pr,"STAT_EVENT: detected buffering proxy"):t.stat===Xw.NOPROXY&&xe(pr,"STAT_EVENT: detected no buffering proxy")})),Hu.c_=!0}}zo(e,t,r,s,i){const l=v1();return new Promise(((d,h)=>{const m=new ZI;m.setWithCredentials(!0),m.listenOnce(eR.COMPLETE,(()=>{try{switch(m.getLastErrorCode()){case Qg.NO_ERROR:const p=m.getResponseJson();xe(pr,`XHR for RPC '${e}' ${l} received:`,JSON.stringify(p)),d(p);break;case Qg.TIMEOUT:xe(pr,`RPC '${e}' ${l} timed out`),h(new pe(ne.DEADLINE_EXCEEDED,"Request time out"));break;case Qg.HTTP_ERROR:const b=m.getStatus();if(xe(pr,`RPC '${e}' ${l} failed with status:`,b,"response text:",m.getResponseText()),b>0){let w=m.getResponseJson();Array.isArray(w)&&(w=w[0]);const _=w==null?void 0:w.error;if(_&&_.status&&_.message){const N=(function(j){const P=j.toLowerCase().replace(/_/g,"-");return Object.values(ne).indexOf(P)>=0?P:ne.UNKNOWN})(_.status);h(new pe(N,_.message))}else h(new pe(ne.UNKNOWN,"Server responded with status "+m.getStatus()))}else h(new pe(ne.UNAVAILABLE,"Connection failed."));break;default:Ie(9055,{l_:e,streamId:l,h_:m.getLastErrorCode(),P_:m.getLastError()})}}finally{xe(pr,`RPC '${e}' ${l} completed.`)}}));const g=JSON.stringify(s);xe(pr,`RPC '${e}' ${l} sending request:`,s),m.send(t,"POST",g,r,15)}))}T_(e,t,r){const s=v1(),i=[this.Ko,"/","google.firestore.v1.Firestore","/",e,"/channel"],l=this.createWebChannelTransport(),d={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},h=this.longPollingOptions.timeoutSeconds;h!==void 0&&(d.longPollingTimeout=Math.round(1e3*h)),this.useFetchStreams&&(d.useFetchStreams=!0),this.Go(d.initMessageHeaders,t,r),d.encodeInitMessageHeaders=!0;const m=i.join("");xe(pr,`Creating RPC '${e}' stream ${s}: ${m}`,d);const g=l.createWebChannel(m,d);this.E_(g);let p=!1,b=!1;const w=new cG({Jo:_=>{b?xe(pr,`Not sending because RPC '${e}' stream ${s}
2434 is closed:`,_):(p||(xe(pr,`Opening RPC '${e}' stream ${s} transport.`),g.open(),p=!0),xe(pr,`RPC '${e}' stream ${s} sending:`,_),g.send(_))},Ho:()=>g.close()});return cf(g,xf.EventType.OPEN,(()=>{b||(xe(pr,`RPC '${e}' stream ${s} transport opened.`),w.i_())})),cf(g,xf.EventType.CLOSE,(()=>{b||(b=!0,xe(pr,`RPC '${e}' stream ${s} transport closed`),w.o_(),this.I_(g))})),cf(g,xf.EventType.ERROR,(_=>{b||(b=!0,Zr(pr,`RPC '${e}' stream ${s} transport errored. Name:`,_.name,"Message:",_.message),w.o_(new pe(ne.UNAVAILABLE,"The operation could not be completed")))})),cf(g,xf.EventType.MESSAGE,(_=>{var N;if(!b){const E=_.data[0];Fe(!!E,16349);const j=E,P=(j==null?void 0:j.error)||((N=j[0])==null?void 0:N.error);if(P){xe(pr,`RPC '${e}' stream ${s} received error:`,P);const A=P.status;let M=(function(L){const k=Fn[L];if(k!==void 0)return u4(k)})(A),O=P.message;A==="NOT_FOUND"&&O.includes("database")&&O.includes("does not exist")&&O.includes(this.databaseId.database)&&Zr(`Database '${this.databaseId.database}' not found. Please check your project configuration.`),M===void 0&&(M=ne.INTERNAL,O="Unknown error status: "+A+" with message "+P.message),b=!0,w.o_(new pe(M,O)),g.close()}else xe(pr,`RPC '${e}' stream ${s} received:`,E),w.__(E)}})),Hu.u_(),setTimeout((()=>{w.s_()}),0),w}terminate(){this.a_.forEach((e=>e.close())),this.a_=[]}E_(e){this.a_.push(e)}I_(e){this.a_=this.a_.filter((t=>t===e))}Go(e,t,r){super.Go(e,t,r),this.databaseInfo.apiKey&&(e["x-goog-api-key"]=this.databaseInfo.apiKey)}createWebChannelTransport(){return rR()}}/**
2435 * @license
2436 * Copyright 2020 Google LLC
2437 *
2438 * Licensed under the Apache License, Version 2.0 (the "License");
2439 * you may not use this file except in compliance with the License.
2440 * You may obtain a copy of the License at
2441 *
2442 *   http://www.apache.org/licenses/LICENSE-2.0
2443 *
2444 * Unless required by applicable law or agreed to in writing, software
2445 * distributed under the License is distributed on an "AS IS" BASIS,
2446 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2447 * See the License for the specific language governing permissions and
2448 * limitations under the License.
2449 */function uG(n){return new Hu(n)}/**
2450 * @license
2451 * Copyright 2020 Google LLC
2452 *
2453 * Licensed under the Apache License, Version 2.0 (the "License");
2454 * you may not use this file except in compliance with the License.
2455 * You may obtain a copy of the License at
2456 *
2457 *   http://www.apache.org/licenses/LICENSE-2.0
2458 *
2459 * Unless required by applicable law or agreed to in writing, software
2460 * distributed under the License is distributed on an "AS IS" BASIS,
2461 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2462 * See the License for the specific language governing permissions and
2463 * limitations under the License.
2464 */function Z4(){return typeof window<"u"?window:null}function a0(){return typeof document<"u"?document:null}/**
2465 * @license
2466 * Copyright 2020 Google LLC
2467 *
2468 * Licensed under the Apache License, Version 2.0 (the "License");
2469 * you may not use this file except in compliance with the License.
2470 * You may obtain a copy of the License at
2471 *
2472 *   http://www.apache.org/licenses/LICENSE-2.0
2473 *
2474 * Unless required by applicable law or agreed to in writing, software
2475 * distributed under the License is distributed on an "AS IS" BASIS,
2476 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2477 * See the License for the specific language governing permissions and
2478 * limitations under the License.
2479 */function Dc(n){return new gY(n,!0)}/**
2480 * @license
2481 * Copyright 2017 Google LLC
2482 *
2483 * Licensed under the Apache License, Version 2.0 (the "License");
2484 * you may not use this file except in compliance with the License.
2485 * You may obtain a copy of the License at
2486 *
2487 *   http://www.apache.org/licenses/LICENSE-2.0
2488 *
2489 * Unless required by applicable law or agreed to in writing, software
2490 * distributed under the License is distributed on an "AS IS" BASIS,
2491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2492 * See the License for the specific language governing permissions and
2493 * limitations under the License.
2494 */Hu.c_=!1;class a2{constructor(e,t,r=1e3,s=1.5,i=6e4){this.Ci=e,this.timerId=t,this.R_=r,this.A_=s,this.V_=i,this.d_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.d_=0}g_(){this.d_=this.V_}p_(e){this.cancel();const t=Math.floor(this.d_+this.y_()),r=Math.max(0,Date.now()-this.f_),s=Math.max(0,t-r);s>0&&xe("ExponentialBackoff",`Backing off for ${s} ms (base delay: ${this.d_}
2494 ms, delay with jitter: ${t} ms, last attempt: ${r} ms ago)`),this.m_=this.Ci.enqueueAfterDelay(this.timerId,s,(()=>(this.f_=Date.now(),e()))),this.d_*=this.A_,this.d_<this.R_&&(this.d_=this.R_),this.d_>this.V_&&(this.d_=this.V_)}w_(){this.m_!==null&&(this.m_.skipDelay(),this.m_=null)}cancel(){this.m_!==null&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.d_}}/**
2495 * @license
2496 * Copyright 2017 Google LLC
2497 *
2498 * Licensed under the Apache License, Version 2.0 (the "License");
2499 * you may not use this file except in compliance with the License.
2500 * You may obtain a copy of the License at
2501 *
2502 *   http://www.apache.org/licenses/LICENSE-2.0
2503 *
2504 * Unless required by applicable law or agreed to in writing, software
2505 * distributed under the License is distributed on an "AS IS" BASIS,
2506 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2507 * See the License for the specific language governing permissions and
2508 * limitations under the License.
2509 */const IC="PersistentStream";class eM{constructor(e,t,r,s,i,l,d,h){this.Ci=e,this.S_=r,this.b_=s,this.connection=i,this.authCredentialsProvider=l,this.appCheckCredentialsProvider=d,this.listener=h,this.state=0,this.D_=0,this.C_=null,this.v_=null,this.stream=null,this.F_=0,this.M_=new a2(e,t)}x_(){return this.state===1||this.state===5||this.O_()}O_(){return this.state===2||this.state===3}start(){this.F_=0,this.state!==4?this.auth():this.N_()}async stop(){this.x_()&&await this.close(0)}B_(){this.state=0,this.M_.reset()}L_(){this.O_()&&this.C_===null&&(this.C_=this.Ci.enqueueAfterDelay(this.S_,6e4,(()=>this.k_())))}q_(e){this.K_(),this.stream.send(e)}async k_(){if(this.O_())return this.close(0)}K_(){this.C_&&(this.C_.cancel(),this.C_=null)}U_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(e,t){this.K_(),this.U_(),this.M_.cancel(),this.D_++,e!==4?this.M_.reset():t&&t.code===ne.RESOURCE_EXHAUSTED?(jn(t.toString()),jn("Using maximum backoff delay to prevent overloading the backend."),this.M_.g_()):t&&t.code===ne.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.W_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.t_(t)}W_(){}auth(){this.state=1;const e=this.Q_(this.D_),t=this.D_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([r,s])=>{this.D_===t&&this.G_(r,s)}),(r=>{e((()=>{const s=new pe(ne.UNKNOWN,"Fetching auth token failed: "+r.message);return this.z_(s)}))}))}G_(e,t){const r=this.Q_(this.D_);this.stream=this.j_(e,t),this.stream.Zo((()=>{r((()=>this.listener.Zo()))})),this.stream.Yo((()=>{r((()=>(this.state=2,this.v_=this.Ci.enqueueAfterDelay(this.b_,1e4,(()=>(this.O_()&&(this.state=3),Promise.resolve()))),this.listener.Yo())))})),this.stream.t_((s=>{r((()=>this.z_(s)))})),this.stream.onMessage((s=>{r((()=>++this.F_==1?this.J_(s):this.onNext(s)))}))}N_(){this.state=5,this.M_.p_((async()=>{this.state=0,this.start()}))}z_(e){return xe(IC,`close with error: ${e}`),this.stream=null,this.close(4,e)}Q_(e){return t=>{this.Ci.enqueueAndForget((()=>this.D_===e?t():(xe(IC,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class dG extends eM{constructor(e,t,r,s,i,l){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,r,s,l),this.serializer=i}j_(e,t){return this.connection.T_("Listen",e,t)}J_(e){return this.onNext(e)}onNext(e){this.M_.reset();const t=bY(this.serializer,e),r=(function(i){if(!("targetChange"in i))return Ye.min();const l=i.targetChange;return l.targetIds&&l.targetIds.length?Ye.min():l.readTime?Dn(l.readTime):Ye.min()})(e);return this.listener.H_(t,r)}Z_(e){const t={};t.database=m1(this.serializer),t.addTarget=(function(i,l){let d;const h=l.target;if(d=z0(h)?{documents:b4(i,h)}:{query:Hy(i,h).ft},d.targetId=l.targetId,l.resumeToken.approximateByteSize()>0){d.resumeToken=m4(i,l.resumeToken);const m=h1(i,l.expectedCount);m!==null&&(d.expectedCount=m)}else if(l.snapshotVersion.compareTo(Ye.min())>0){d.readTime=yd(i,l.snapshotVersion.toTimestamp());const m=h1(i,l.expectedCount);m!==null&&(d.expectedCount=m)}return d})(this.serializer,e);const r=wY(this.serializer,e);r&&(t.labels=r),this.q_(t)}X_(e){const t={};t.database=m1(this.serializer),t.removeTarget=e,this.q_(t)}}class hG extends eM{constructor(e,t,r,s,i,l){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,r,s,l),this.serializer
2509=i}get Y_(){return this.F_>0}start(){this.lastStreamToken=void 0,super.start()}W_(){this.Y_&&this.ea([])}j_(e,t){return this.connection.T_("Write",e,t)}J_(e){return Fe(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,Fe(!e.writeResults||e.writeResults.length===0,55816),this.listener.ta()}onNext(e){Fe(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.M_.reset();const t=vY(e.writeResults,e.commitTime),r=Dn(e.commitTime);return this.listener.na(r,t)}ra(){const e={};e.database=m1(this.serializer),this.q_(e)}ea(e){const t={streamToken:this.lastStreamToken,writes:e.map((r=>cm(this.serializer,r)))};this.q_(t)}}/**
2510 * @license
2511 * Copyright 2017 Google LLC
2512 *
2513 * Licensed under the Apache License, Version 2.0 (the "License");
2514 * you may not use this file except in compliance with the License.
2515 * You may obtain a copy of the License at
2516 *
2517 *   http://www.apache.org/licenses/LICENSE-2.0
2518 *
2519 * Unless required by applicable law or agreed to in writing, software
2520 * distributed under the License is distributed on an "AS IS" BASIS,
2521 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2522 * See the License for the specific language governing permissions and
2523 * limitations under the License.
2524 */class fG{}class mG extends fG{constructor(e,t,r,s){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=r,this.serializer=s,this.ia=!1}sa(){if(this.ia)throw new pe(ne.FAILED_PRECONDITION,"The client has already been terminated.")}Wo(e,t,r,s){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([i,l])=>this.connection.Wo(e,f1(t,r),s,i,l))).catch((i=>{throw i.name==="FirebaseError"?(i.code===ne.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),i):new pe(ne.UNKNOWN,i.toString())}))}jo(e,t,r,s,i){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([l,d])=>this.connection.jo(e,f1(t,r),s,l,d,i))).catch((l=>{throw l.name==="FirebaseError"?(l.code===ne.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),l):new pe(ne.UNKNOWN,l.toString())}))}terminate(){this.ia=!0,this.connection.terminate()}}function pG(n,e,t,r){return new mG(n,e,t,r)}class gG{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.oa=0,this._a=null,this.aa=!0}ua(){this.oa===0&&(this.ca("Unknown"),this._a=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this._a=null,this.la("Backend didn't respond within 10 seconds."),this.ca("Offline"),Promise.resolve()))))}ha(e){this.state==="Online"?this.ca("Unknown"):(this.oa++,this.oa>=1&&(this.Pa(),this.la(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ca("Offline")))}set(e){this.Pa(),this.oa=0,e==="Online"&&(this.aa=!1),this.ca(e)}ca(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}la(e){const t=`Could not reach Cloud Firestore backend. ${e}
2525This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.aa?(jn(t),this.aa=!1):xe("OnlineStateTracker",t)}Pa(){this._a!==null&&(this._a.cancel(),this._a=null)}}/**
2526 * @license
2527 * Copyright 2017 Google LLC
2528 *
2529 * Licensed under the Apache License, Version 2.0 (the "License");
2530 * you may not use this file except in compliance with the License.
2531 * You may obtain a copy of the License at
2532 *
2533 *   http://www.apache.org/licenses/LICENSE-2.0
2534 *
2535 * Unless required by applicable law or agreed to in writing, software
2536 * distributed under the License is distributed on an "AS IS" BASIS,
2537 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2538 * See the License for the specific language governing permissions and
2539 * limitations under the License.
2540 */const Tc="RemoteStore";class yG{constructor(e,t,r,s,i){this.localStore=e,this.datastore=t,this.asyncQueue=r,this.remoteSyncer={},this.Ta=[],this.Ea=new Map,this.Ia=new Set,this.Ra=[],this.Aa=i,this.Aa.Mo((l=>{r.enqueueAndForget((async()=>
2540{il(this)&&(xe(Tc,"Restarting streams for network reachability change."),await(async function(h){const m=Ee(h);m.Ia.add(4),await qd(m),m.Va.set("Unknown"),m.Ia.delete(4),await Rm(m)})(this))}))})),this.Va=new gG(r,s)}}async function Rm(n){if(il(n))for(const e of n.Ra)await e(!0)}async function qd(n){for(const e of n.Ra)await e(!1)}function Wy(n,e){const t=Ee(n);t.Ea.has(e.targetId)||(t.Ea.set(e.targetId,e),l2(t)?o2(t):Yd(t).O_()&&i2(t,e))}function vd(n,e){const t=Ee(n),r=Yd(t);t.Ea.delete(e),r.O_()&&tM(t,e),t.Ea.size===0&&(r.O_()?r.L_():il(t)&&t.Va.set("Unknown"))}function i2(n,e){if(n.da.$e(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Ye.min())>0){const t=n.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(t)}Yd(n).Z_(e)}function tM(n,e){n.da.$e(e),Yd(n).X_(e)}function o2(n){n.da=new hY({getRemoteKeysForTarget:e=>n.remoteSyncer.getRemoteKeysForTarget(e),At:e=>n.Ea.get(e)||null,ht:()=>n.datastore.serializer.databaseId}),Yd(n).start(),n.Va.ua()}function l2(n){return il(n)&&!Yd(n).x_()&&n.Ea.size>0}function il(n){return Ee(n).Ia.size===0}function nM(n){n.da=void 0}async function xG(n){n.Va.set("Online")}async function bG(n){n.Ea.forEach(((e,t)=>{i2(n,e)}))}async function vG(n,e){nM(n),l2(n)?(n.Va.ha(e),o2(n)):n.Va.set("Unknown")}async function wG(n,e,t){if(n.Va.set("Online"),e instanceof f4&&e.state===2&&e.cause)try{await(async function(s,i){const l=i.cause;for(const d of i.targetIds)s.Ea.has(d)&&(await s.remoteSyncer.rejectListen(d,l),s.Ea.delete(d),s.da.removeTarget(d))})(n,e)}catch(r){xe(Tc,"Failed to remove targets %s: %s ",e.targetIds.join(","),r),await J0(n,r)}else if(e instanceof r0?n.da.Xe(e):e instanceof h4?n.da.st(e):n.da.tt(e),!t.isEqual(Ye.min()))try{const r=await H4(n.localStore);t.compareTo(r)>=0&&await(function(i,l){const d=i.da.Tt(l);
vendor: 4,232 bytes, lines 2540-2555
2540return d.targetChanges.forEach(((h,m)=>{if(h.resumeToken.approximateByteSize()>0){const g=i.Ea.get(m);g&&i.Ea.set(m,g.withResumeToken(h.resumeToken,l))}})),d.targetMismatches.forEach(((h,m)=>{const g=i.Ea.get(h);if(!g)return;i.Ea.set(h,g.withResumeToken(pn.EMPTY_BYTE_STRING,g.snapshotVersion)),tM(i,h);const p=new gi(g.target,h,m,g.sequenceNumber);i2(i,p)})),i.remoteSyncer.applyRemoteEvent(d)})(n,t)}catch(r){xe(Tc,"Failed to raise snapshot:",r),await J0(n,r)}}async function J0(n,e,t){if(!sl(e))throw e;n.Ia.add(1),await qd(n),n.Va.set("Offline"),t||(t=()=>H4(n.localStore)),n.asyncQueue.enqueueRetryable((async()=>{xe(Tc,"Retrying IndexedDB access"),await t(),n.Ia.delete(1),await Rm(n)}))}function rM(n,e){return e().catch((t=>J0(n,t,e)))}async function Hd(n){const e=Ee(n),t=Xo(e);let r=e.Ta.length>0?e.Ta[e.Ta.length-1].batchId:Fo;for(;_G(e);)try{const s=await rG(e.localStore,r);if(s===null){e.Ta.length===0&&t.L_();break}r=s.batchId,TG(e,s)}catch(s){await J0(e,s)}sM(e)&&aM(e)}function _G(n){return il(n)&&n.Ta.length<10}function TG(n,e){n.Ta.push(e);const t=Xo(n);t.O_()&&t.Y_&&t.ea(e.mutations)}function sM(n){return il(n)&&!Xo(n).x_()&&n.Ta.length>0}function aM(n){Xo(n).start()}async function NG(n){Xo(n).ra()}async function EG(n){const e=Xo(n);for(const t of n.Ta)e.ea(t.mutations)}async function SG(n,e,t){const r=n.Ta.shift(),s=G_.from(r,e,t);await rM(n,(()=>n.remoteSyncer.applySuccessfulWrite(s))),await Hd(n)}async function jG(n,e){e&&Xo(n).Y_&&await(async function(r,s){if((function(l){return c4(l)&&l!==ne.ABORTED})(s.code)){const i=r.Ta.shift();Xo(r).B_(),await rM(r,(()=>r.remoteSyncer.rejectFailedWrite(i.batchId,s))),await Hd(r)}})(n,e),sM(n)&&aM(n)}async function RC(n,e){const t=Ee(n);t.asyncQueue.verifyOperationInProgress(),xe(Tc,"RemoteStore received new credentials");const r=il(t);t.Ia.add(3),await qd(t),r&&t.Va.set("Unknown"),await t.remoteSyncer.handleCredentialChange(e),t.Ia.delete(3),await Rm(t)}async function w1(n,e){const t=Ee(n);e?(t.Ia.delete(2),await Rm(t)):e||(t.Ia.add(2),await qd(t),t.Va.set("Unknown"))}function Yd(n){return n.ma||(n.ma=(function(t,r,s){const i=Ee(t);return i.sa(),new dG(r,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,s)})(n.datastore,n.asyncQueue,{Zo:xG.bind(null,n),Yo:bG.bind(null,n),t_:vG.bind(null,n),H_:wG.bind(null,n)}),n.Ra.push((async e=>{e?(n.ma.B_(),l2(n)?o2(n):n.Va.set("Unknown")):(await n.ma.stop(),nM(n))}))),n.ma}function Xo(n){return n.fa||(n.fa=(function(t,r,s){const i=Ee(t);return i.sa(),new hG(r,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,s)})(n.datastore,n.asyncQueue,{Zo:()=>Promise.resolve(),Yo:NG.bind(null,n),t_:jG.bind(null,n),ta:EG.bind(null,n),na:SG.bind(null,n)}),n.Ra.push((async e=>{e?(n.fa.B_(),await Hd(n)):(await n.fa.stop(),n.Ta.length>0&&(xe(Tc,`Stopping write stream with ${n.Ta.length} pending writes`),n.Ta=[]))}))),n.fa}/**
2541 * @license
2542 * Copyright 2017 Google LLC
2543 *
2544 * Licensed under the Apache License, Version 2.0 (the "License");
2545 * you may not use this file except in compliance with the License.
2546 * You may obtain a copy of the License at
2547 *
2548 *   http://www.apache.org/licenses/LICENSE-2.0
2549 *
2550 * Unless required by applicable law or agreed to in writing, software
2551 * distributed under the License is distributed on an "AS IS" BASIS,
2552 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2553 * See the License for the specific language governing permissions and
2554 * limitations under the License.
2555 */class c2{constructor(e,t,r,s,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=r,this.op=s,this.removalCallback=i,this.deferred=new sr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((l=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(e,t,r,s,i){const l=Date.now()+r,d=new c2(e,t,l,s,i);return d.start(r),d}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new pe(ne.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then((e=>
2555this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Gd(n,e){if(jn("AsyncQueue",`${e}: ${n}`),sl(n))return new pe(ne.UNAVAILABLE,`${e}: ${n}`);throw n}/**
2556 * @license
2557 * Copyright 2017 Google LLC
2558 *
2559 * Licensed under the Apache License, Version 2.0 (the "License");
2560 * you may not use this file except in compliance with the License.
2561 * You may obtain a copy of the License at
2562 *
2563 *   http://www.apache.org/licenses/LICENSE-2.0
2564 *
2565 * Unless required by applicable law or agreed to in writing, software
2566 * distributed under the License is distributed on an "AS IS" BASIS,
2567 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2568 * See the License for the specific language governing permissions and
2569 * limitations under the License.
2570 */class uc{static emptySet(e){return new uc(e.comparator)}constructor(e){this.comparator=e?(t,r)=>e(t,r)||_e.comparator(t.key,r.key):(t,r)=>_e.comparator(t.key,r.key),this.keyedMap=bf(),this.sortedSet=new Xt(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((t,r)=>(e(t),!1)))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof uc)||this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;t.hasNext();){const s=t.getNext().key,i=r.getNext().key;if(!s.isEqual(i))return!1}return!0}toString(){const e=[];return this.forEach((t=>{e.push(t.toString())})),e.length===0?"DocumentSet ()":`DocumentSet (
2571  `+e.join(`  
2572`)+`
2573)`}copy(e,t){const r=new uc;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=t,r}}/**
2574 * @license
2575 * Copyright 2017 Google LLC
2576 *
2577 * Licensed under the Apache License, Version 2.0 (the "License");
2578 * you may not use this file except in compliance with the License.
2579 * You may obtain a copy of the License at
2580 *
2581 *   http://www.apache.org/licenses/LICENSE-2.0
2582 *
2583 * Unless required by applicable law or agreed to in writing, software
2584 * distributed under the License is distributed on an "AS IS" BASIS,
2585 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2586 * See the License for the specific language governing permissions and
2587 * limitations under the License.
2588 */class MC{constructor(){this.ga=new Xt(_e.comparator)}track(e){const t=e.doc.key,r=this.ga.get(t);r?e.type!==0&&r.type===3?this.ga=this.ga.insert(t,e):e.type===3&&r.type!==1?this.ga=this.ga.insert(t,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.ga=this.ga.insert(t,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.ga=this.ga.insert(t,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.ga=this.ga.remove(t):e.type===1&&r.type===2?this.ga=this.ga.insert(t,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.ga=this.ga.insert(t,{type:2,doc:e.doc}):Ie(63341,{Vt:e,pa:r}):this.ga=this.ga.insert(t,e)}ya(){const e=[];return this.ga.inorderTraversal(((t,r)=>{e.push(r)})),e}}class Nc{constructor(e,t,r,s,i,l,d,h,m){this.query=e,this.docs=t,this.oldDocs=r,this.docChanges=s,this.mutatedKeys=i,this.fromCache=l,this.syncStateChanged=d,this.excludesMetadataChanges=h,this.hasCachedResults=m}static fromInitialDocuments(e,t,r,s,i){const l=[];return t.forEach((d=>{l.push({type:0,doc:d})})),new Nc(e,t,uc.emptySet(t),l,r,s,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Am(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,r=e.docChanges;if(t.length!==r.length)return!1;for(let s=0;s<t.length;s++)if(t[s].type!==r[s].type||!t[s].doc.isEqual(r[s].doc))return!1;return!0}}/**
2589 * @license
2590 * Copyright 2017 Google LLC
2591 *
2592 * Licensed under the Apache License, Version 2.0 (the "License");
2593 * you may not use this file except in compliance with the License.
2594 * You may obtain a copy of the License at
2595 *
2596 *   http://www.apache.org/licenses/LICENSE-2.0
2597 *
2598 * Unless required by applicable law or agreed to in writing, software
2599 * distributed under the License is distributed on an "AS IS" BASIS,
2600 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2601 * See the License for the specific language governing permissions and
2602 * limitations under the License.
2603 */class AG{constructor(){this.wa=void 0,this.Sa=[]}ba(){return this.Sa.some((e=>e.Da()))}}class CG{constructor(){this.queries=PC(),this.onlineState="Unknown",this.Ca=new Set}terminate(){(function(t,r){const s=Ee(t),i=s.queries;s.queries=PC(),i.forEach(((l,d)=>{for(const h of d.Sa)h.onError(r)}))})(this,new pe(ne.ABORTED,"Firestore shutting down"))}}function PC(){return new Mi((n=>KR(n)),Am)}async function u2(n,e){const t=Ee(n);let r=3;const s=e.query;let i=t.queries.get(s);i?!i.ba()&&e.Da()&&(r=2):(i=new AG,r=e.Da()?0:1);try{switch(r){case 0:i.wa=await t.onListen(s,!0);break;case 1:i.wa=await t.onListen(s,!1);break;case 2:await t.onFirstRemoteStoreListen(s)}}catch(l){const d=Gd(l,`Initialization of query '${Mu(e.query)}' failed`);return void e.onError(d)}t.queries.set(s,i),i.Sa.push(e),e.va(t.onlineState),i.wa&&e.Fa(i.wa)&&h2(t)}async function d2(n,e){const t=Ee(n),r=e.query;let s=3;const i=t.queries.get(r);if(i){const l=i.Sa.indexOf(e);l>=0&&(i.Sa.splice(l,1),i.Sa.length===0?s=e.Da()?0:1:!i.ba()&&e.Da()&&(s=2))}switch(s){case 0:return t.queries.delete(r),t.onUnlisten(r,!0);case 1:return t.queries.delete(r),t.onUnlisten(r,!1);case 2:return t.onLastRemoteStoreUnlisten(r);default:return}}function DG(n,e){const t=Ee(n);let r=!1;for(const s of e){const i=s.query,l=t.queries.get(i);if(l){for(const d of l.Sa)d.Fa(s)&&(r=!0);l.wa=s}}r&&h2(t)}function kG(n,e,t){const r=Ee(n),s=r.queries.get(e);if(s)for(const i of s.Sa)i.onError(t);r.queries.delete(e)}function h2(n){n.Ca.forEach((e=>{e.next()}))}var _1,OC;(OC=_1||(_1={})).Ma="default",OC.Cache="cache";class f2{constructor(e,t,r){this.query=e,this.xa=t,this.Oa=!1,this.Na=null,this.onlineState="Unknown",this.options=r||{}}Fa(e){if(!this.options.includeMetadataChanges){const r=[];for(const s of e.docChanges)s.type!==3&&r.push(s);e=new Nc(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Oa?this.Ba(e)&&(this.xa.next(e),t=!0):this.La(e,this.onlineState)&&(this.ka(e),t=!0),this.Na=e,t}onError(e){this.xa.error(e)}va(e){this.onlineState=e;let t=!1;return this.Na&&!this.Oa&&this.La(this.Na,e)&&(this.ka(this.Na),t=!0),t}La(e,t){if(!e.fromCache||!this.Da())return!0;const r=t!=="Offline";return(!this.options.qa||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||t==="Offline")}Ba(e){if(e.docChanges.length>0)return!0;const t=this.Na&&this.Na.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&this.options.includeMetadataChanges===!0}ka(e){e=Nc.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Oa=!0,this.xa.next(e)}Da(){return this.options.source!==_1.Cache}}/**
2604 * @license
2605 * Copyright 2020 Google LLC
2606 *
2607 * Licensed under the Apache License, Version 2.0 (the "License");
2608 * you may not use this file except in compliance with the License.
2609 * You may obtain a copy of the License at
2610 *
2611 *   http://www.apache.org/licenses/LICENSE-2.0
2612 *
2613 * Unless required by applicable law or agreed to in writing, software
2614 * distributed under the License is distributed on an "AS IS" BASIS,
2615 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2616 * See the License for the specific language governing permissions and
2617 * limitations under the License.
2618 */class iM{constructor(e,t){this.Ka=e,this.byteLength=t}Ua(){return"metadata"in this.Ka}}/**
2619 * @license
2620 * Copyright 2020 Google LLC
2621 *
2622 * Licensed under the Apache License, Version 2.0 (the "License");
2623 * you may not use this file except in compliance with the License.
2624 * You may obtain a copy of the License at
2625 *
2626 *   http://www.apache.org/licenses/LICENSE-2.0
2627 *
2628 * Unless required by applicable law or agreed to in writing, softw
2628are
2629 * distributed under the License is distributed on an "AS IS" BASIS,
2630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2631 * See the License for the specific language governing permissions and
2632 * limitations under the License.
2633 */class LC{constructor(e){this.serializer=e}qs(e){return Ua(this.serializer,e)}Ks(e){return e.metadata.exists?qy(this.serializer,e.document,!1):nn.newNoDocument(this.qs(e.metadata.name),this.Us(e.metadata.readTime))}Us(e){return Dn(e)}}class m2{constructor(e,t){this.$a=e,this.serializer=t,this.Wa=[],this.Qa=[],this.collectionGroups=new Set,this.progress=oM(e)}get queries(){return this.Wa}get documents(){return this.Qa}Ga(e){this.progress.bytesLoaded+=e.byteLength;let t=this.progress.documentsLoaded;if(e.Ka.namedQuery)this.Wa.push(e.Ka.namedQuery);else if(e.Ka.documentMetadata){this.Qa.push({metadata:e.Ka.documentMetadata}),e.Ka.documentMetadata.exists||++t;const r=ct.fromString(e.Ka.documentMetadata.name);this.collectionGroups.add(r.get(r.length-2))}else e.Ka.document&&(this.Qa[this.Qa.length-1].document=e.Ka.document,++t);return t!==this.progress.documentsLoaded?(this.progress.documentsLoaded=t,{...this.progress}):null}za(e){const t=new Map,r=new LC(this.serializer);for(const s of e)if(s.metadata.queries){const i=r.qs(s.metadata.name);for(const l of s.metadata.queries){const d=(t.get(l)||nt()).add(i);t.set(l,d)}}return t}async ja(e){const t=await sG(e,new LC(this.serializer),this.Qa,this.$a.id),r=this.za(this.documents);for(const s of this.Wa)await aG(e,s,r.get(s.name));return this.progress.taskState="Success",{progress:this.progress,Ja:this.collectionGroups,Ha:t}}}function oM(n){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:n.totalDocuments,totalBytes:n.totalBytes}}/**
2634 * @license
2635 * Copyright 2017 Google LLC
2636 *
2637 * Licensed under the Apache License, Version 2.0 (the "License");
2638 * you may not use this file except in compliance with the License.
2639 * You may obtain a copy of the License at
2640 *
2641 *   http://www.apache.org/licenses/LICENSE-2.0
2642 *
2643 * Unless required by applicable law or agreed to in writing, software
2644 * distributed under the License is distributed on an "AS IS" BASIS,
2645 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2646 * See the License for the specific language governing permissions and
2647 * limitations under the License.
2648 */class lM{constructor(e){this.key=e}}class cM{constructor(e){this.key=e}}class uM{constructor(e,t){this.query=e,this.Za=t,this.Xa=null,this.hasCachedResults=!1,this.current=!1,this.Ya=nt(),this.mutatedKeys=nt(),this.eu=QR(e),this.tu=new uc(this.eu)}get nu(){return this.Za}ru(e,t){const r=t?t.iu:new MC,s=t?t.tu:this.tu;let i=t?t.mutatedKeys:this.mutatedKeys,l=s,d=!1;const h=this.query.limitType==="F"&&s.size===this.query.limit?s.last():null,m=this.query.limitType==="L"&&s.size===this.query.limit?s.first():null;if(e.inorderTraversal(((g,p)=>{const b=s.get(g),w=Cm(this.query,p)?p:null,_=!!b&&this.mutatedKeys.has(b.key),N=!!w&&(w.hasLocalMutations||this.mutatedKeys.has(w.key)&&w.hasCommittedMutations);let E=!1;b&&w?b.data.isEqual(w.data)?_!==N&&(r.track({type:3,doc:w}),E=!0):this.su(b,w)||(r.track({type:2,doc:w}),E=!0,(h&&this.eu(w,h)>0||m&&this.eu(w,m)<0)&&(d=!0)):!b&&w?(r.track({type:0,doc:w}),E=!0):b&&!w&&(r.track({type:1,doc:b}),E=!0,(h||m)&&(d=!0)),E&&(w?(l=l.add(w),i=N?i.add(g):i.delete(g)):(l=l.delete(g),i=i.delete(g)))})),this.query.limit!==null)for(;l.size>this.query.limit;){const g=this.query.limitType==="F"?l.last():l.first();l=l.delete(g.key),i=i.delete(g.key),r.track({type:1,doc:g})}return{tu:l,iu:r,bs:d,mutatedKeys:i}}su(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,r,s){const i=this.tu;this.tu=e.tu,this.mutatedKeys=e.mutatedKeys;const l=e.iu.ya();l.sort(((g,p)=>(function(w,_){const N=E=>{switch(E){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Ie(20277,{Vt:E})}};return N(w)-N(_)})(g.type,p.type)||this.eu(g.doc,p.doc))),this.ou(r),s=s??!1;const d=t&&!s?this._u():[],h=this.Ya.size===0&&this.current&&!s?1:0,m=h!==this.Xa;return this.Xa=h,l.length!==0||m?{snapshot:new Nc(this.query,e.tu,i,l,e.mutatedKeys,h===0,m,!1,!!r&&r.resumeToken.approximateByteSize()>
vendor: 2,828 bytes, line 2648
26480),au:d}:{au:d}}va(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({tu:this.tu,iu:new MC,mutatedKeys:this.mutatedKeys,bs:!1},!1)):{au:[]}}uu(e){return!this.Za.has(e)&&!!this.tu.has(e)&&!this.tu.get(e).hasLocalMutations}ou(e){e&&(e.addedDocuments.forEach((t=>this.Za=this.Za.add(t))),e.modifiedDocuments.forEach((t=>{})),e.removedDocuments.forEach((t=>this.Za=this.Za.delete(t))),this.current=e.current)}_u(){if(!this.current)return[];const e=this.Ya;this.Ya=nt(),this.tu.forEach((r=>{this.uu(r.key)&&(this.Ya=this.Ya.add(r.key))}));const t=[];return e.forEach((r=>{this.Ya.has(r)||t.push(new cM(r))})),this.Ya.forEach((r=>{e.has(r)||t.push(new lM(r))})),t}cu(e){this.Za=e.ks,this.Ya=nt();const t=this.ru(e.documents);return this.applyChanges(t,!0)}lu(){return Nc.fromInitialDocuments(this.query,this.tu,this.mutatedKeys,this.Xa===0,this.hasCachedResults)}}const ol="SyncEngine";class IG{constructor(e,t,r){this.query=e,this.targetId=t,this.view=r}}class RG{constructor(e){this.key=e,this.hu=!1}}class MG{constructor(e,t,r,s,i,l){this.localStore=e,this.remoteStore=t,this.eventManager=r,this.sharedClientState=s,this.currentUser=i,this.maxConcurrentLimboResolutions=l,this.Pu={},this.Tu=new Mi((d=>KR(d)),Am),this.Eu=new Map,this.Iu=new Set,this.Ru=new Xt(_e.comparator),this.Au=new Map,this.Vu=new J_,this.du={},this.mu=new Map,this.fu=_c.ar(),this.onlineState="Unknown",this.gu=void 0}get isPrimaryClient(){return this.gu===!0}}async function PG(n,e,t=!0){const r=Qy(n);let s;const i=r.Tu.get(e);return i?(r.sharedClientState.addLocalQueryTarget(i.targetId),s=i.view.lu()):s=await dM(r,e,t,!0),s}async function OG(n,e){const t=Qy(n);await dM(t,e,!0,!1)}async function dM(n,e,t,r){const s=await xd(n.localStore,vr(e)),i=s.targetId,l=n.sharedClientState.addLocalQueryTarget(i,t);let d;return r&&(d=await p2(n,e,i,l==="current",s.resumeToken)),n.isPrimaryClient&&t&&Wy(n.remoteStore,s),d}async function p2(n,e,t,r,s){n.pu=(p,b,w)=>(async function(N,E,j,P){let A=E.view.ru(j);A.bs&&(A=await W0(N.localStore,E.query,!1).then((({documents:L})=>E.view.ru(L,A))));const M=P&&P.targetChanges.get(E.targetId),O=P&&P.targetMismatches.get(E.targetId)!=null,q=E.view.applyChanges(A,N.isPrimaryClient,M,O);return T1(N,E.targetId,q.au),q.snapshot})(n,p,b,w);const i=await W0(n.localStore,e,!0),l=new uM(e,i.ks),d=l.ru(i.documents),h=Im.createSynthesizedTargetChangeForCurrentChange(t,r&&n.onlineState!=="Offline",s),m=l.applyChanges(d,n.isPrimaryClient,h);T1(n,t,m.au);const g=new IG(e,t,l);return n.Tu.set(e,g),n.Eu.has(t)?n.Eu.get(t).push(e):n.Eu.set(t,[e]),m.snapshot}async function LG(n,e,t){const r=Ee(n),s=r.Tu.get(e),i=r.Eu.get(s.targetId);if(i.length>1)return r.Eu.set(s.targetId,i.filter((l=>!Am(l,e)))),void r.Tu.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(s.targetId),r.sharedCl
2648ientState.isActiveQueryTarget(s.targetId)||await bd(r.localStore,s.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(s.targetId),t&&vd(r.remoteStore,s.targetId),wd(r,s.targetId)})).catch(rl)):(wd(r,s.targetId),await bd(r.localStore,s.targetId,!0))}async function VG(n,e){const t=Ee(n),r=t.Tu.get(e),s=t.Eu.get(r.targetId);t.isPrimaryClient&&s.length===1&&(t.sharedClientState.removeLocalQueryTarget(r.targetId),vd(t.remoteStore,r.targetId))}async function FG(n,e,t){const r=b2(n);try{const s=await(function(l,d){const h=Ee(l),m=Dt.now(),g=d.reduce(((w,_)=>w.add(_.key)),nt());let p,b;return h.persistence.runTransaction("Locally write mutations","readwrite",(w=>{let _=$r(),N=nt();return h.xs.getEntries(w,g).next((E=>{_=E,_.forEach(((j,P)=>{P.isValidDocument()||(N=N.add(j))}))})).next((()=>h.localDocuments.getOverlayedDocuments(w,_))).next((E=>{p=E;const j=[];for(const P of d){const A=lY(P,p.get(P.key).overlayedDocument);A!=null&&j.push(new Pi(P.key,A,LR(A.value.mapValue),un.exists(!0)))}return h.mutationQueue.addMutationBatch(w,m,j,d)})).next((E=>{b=E;const j=E.applyToLocalDocumentSet(p,N);return h.documentOverlayCache.saveOverlays(w,E.batchId,j)}))})).then((()=>({batchId:b.batchId,changes:JR(p)})))})(r.localStore,e);r.sharedClientState.addPendingMutation(s.batchId),(function(l,d,h){let m=l.du[l.currentUser.toKey()];m||(m=new Xt(Qe)),m=m.insert(d,h),l.du[l.currentUser.toKey()]=m})(r,s.batchId,t),await Oi(r,s.changes),await Hd(r.remoteStore)}catch(s){const i=Gd(s,"Failed to persist write");t.reject(i)}}async function hM(n,e){const t=Ee(n);try{const r=await nG(t.localStore,e);
2648e.targetChanges.forEach(((s,i)=>{const l=t.Au.get(i);l&&(Fe(s.addedDocuments.size+s.modifiedDocuments.size+s.removedDocuments.size<=1,22616),s.addedDocuments.size>0?l.hu=!0:s.modifiedDocuments.size>0?Fe(l.hu,14607):s.removedDocuments.size>0&&(Fe(l.hu,42227),l.hu=!1))})),await Oi(t,r,e)}catch(r){await rl(r)}}function VC(n,e,t){const r=Ee(n);if(r.isPrimaryClient&&t===0||!r.isPrimaryClient&&t===1){const s=[];r.Tu.forEach(((i,l)=>{const d=l.view.va(e);d.snapshot&&s.push(d.snapshot)})),(function(l,d){const h=Ee(l);h.onlineState=d;let m=!1;h.queries.forEach(((g,p)=>{for(const b of p.Sa)b.va(d)&&(m=!0)})),m&&h2(h)})(r.eventManager,e),s.length&&r.Pu.H_(s),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function BG(n,e,t){const r=Ee(n);r.sharedClientState.updateQueryState(e,"rejected",t);const s=r.Au.get(e),i=s&&s.key;if(i){let l=new Xt(_e.comparator);l=l.insert(i,nn.newNoDocument(i,Ye.min()));const d=nt().add(i),h=new km(Ye.min(),new Map,new Xt(Qe),l,d);await hM(r,h),r.Ru=r.Ru.remove(i),r.Au.delete(e),x2(r)}else await bd(r.localStore,e,!1).then((()=>wd(r,e,t))).catch(rl)}async function UG(n,e){const t=Ee(n),r=e.batch.batchId;try{const s=await tG(t.localStore,e);y2(t,r,null),g2(t,r),t.sharedClientState.updateMutationState(r,"acknowledged"),await Oi(t,s)}catch(s){await rl(s)}}async function zG(n,e,t){const r=Ee(n);try{const s=await(function(l,d){const h=Ee(l);return h.persistence.runTransaction("Reject batch","readwrite-primary",(m=>{let g;return h.mutationQueue.lookupMutationBatch(m,d).next((p=>(Fe(p!==null,37113),g=p.keys(),h.mutationQueue.removeMutationBatch(m,p)))).next((()=>h.mutationQueue.performConsistencyCheck(m))).next((()=>h.documentOverlayCache.removeOverlaysForBatchId(m,g,d))).next((()=>h.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(m,g))).next((()=>h.localDocuments.getDocuments(m,g)))}))})(r.localStore,e);y2(r,e,t),g2(r,e),r.sharedClientState.updateMutationState(e,"rejected",t),await Oi(r,s)}catch(s){await rl(s)}}async function qG(n,e){const t=Ee(n);il(t.remoteStore)||xe(ol,"The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{const r=await(function(l){const d=Ee(l);return d.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(h=>d.mutationQueue.getHighestUnacknowledgedBatchId(h)))})(t.localStore);if(r===Fo)return void e.resolve();const s=t.mu.get(r)||[];s.push(e),t.mu.set(r,s)}catch(r){const s=Gd(r,"Initialization of waitForPendingWrites() operation failed");e.reject(s)}}function g2(n,e){(n.mu.get(e)||[]).forEach((t=>{t.resolve()})),n.mu.delete(e)}function y2(n,e,t){const r=Ee(n);let s=r.du[r.currentUser.toKey()];if(s){const i=s.get(e);i&&(t?i.reject(t):i.resolve(),s=s.remove(e)),r.du[r.currentUser.toKey()]=s}}function wd(n,e,t=null){n.sharedClientState.removeLocalQueryTarget(e);for(const r of n.Eu.get(e))n.Tu.delete(r),t&&n.Pu.yu(r,t);n.Eu.delete(e),n.isPrimaryClient&&n.Vu.Gr(e).forEach((r=>{n.Vu.containsKey(r)||fM(n,r)}))}function fM(n,e){n.Iu.delete(e.path.canonicalString());const t=n.Ru.get(e);t!==null&&(vd(n.remoteStore,t),n.Ru=n.Ru.remove(e),n.Au.delete(t),x2(n))}function T1(n,e,t){for(const r of t)r instanceof lM?(n.Vu.addReference(r.key,e),HG(n,r)):r instanceof cM?(xe(ol,"Document no longer in limbo: "+r.key),n.Vu.removeReference(r.key,e),n.Vu.containsKey(r.key)||fM(n,r.key)):Ie(19791,{wu:r})}function HG(n,e){const t=e.key,r=t.path.canonicalString();n.Ru.get(t)||n.Iu.has(r)||(xe(ol,"New document in limbo: "+t),n.Iu.add(r),x2(n))}function x2(n){for(;n.Iu.size>0&&n.Ru.size<n.maxConcurrentLimboResolutions;){const e=n.Iu.values().next().value;n.Iu.delete(e);const t=new _e(ct.fromString(e)),r=n.fu.next();n.Au.set(r,new RG(t)),n.Ru=n.Ru.insert(t,r),Wy(n.remoteStore,new gi(vr(Bd(t.path)),r,"TargetPurposeLimboResolution",Yr.ce))}}async function Oi(n,e,t){const r=Ee(n),s=[],i=[],l=[];r.Tu.isEmpty()||(r.Tu.forEach(((d,h)=>{l.push(r.pu(h,e,t).then((m=>{var g;if((m||t)&&r.isPrimaryClient){const p=m?!m.fromCache:(g=t==null?void 0:t.targetChanges.get(h.targetId))==null?void 0:g.current;
2648r.sharedClientState.updateQueryState(h.targetId,p?"current":"not-current")}if(m){s.push(m);const p=n2.Is(h.targetId,m);i.push(p)}})))})),await Promise.all(l),r.Pu.H_(s),await(async function(h,m){const g=Ee(h);try{await g.persistence.runTransaction("notifyLocalViewChanges","readwrite",(p=>J.forEach(m,(b=>J.forEach(b.Ts,(w=>g.persistence.referenceDelegate.addReference(p,b.targetId,w))).next((()=>J.forEach(b.Es,(w=>g.persistence.referenceDelegate.removeReference(p,b.targetId,w)))))))))}catch(p){if(!sl(p))throw p;xe(r2,"Failed to update sequence numbers: "+p)}for(const p of m){const b=p.targetId;if(!p.fromCache){const w=g.vs.get(b),_=w.snapshotVersion,N=w.withLastLimboFreeSnapshotVersion(_);g.vs=g.vs.insert(b,N)}}})(r.localStore,i))}async function YG(n,e){const t=Ee(n);if(!t.currentUser.isEqual(e)){xe(ol,"User change. New user:",e.toKey());const r=await q4(t.localStore,e);t.currentUser=e,(function(i,l){i.mu.forEach((d=>{d.forEach((h=>{h.reject(new pe(ne.CANCELLED,l))}))})),i.mu.clear()})(t,"'waitForPendingWrites' promise is rejected due to a user change."),t.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Oi(t,r.Ns)}}function GG(n,e){const t=Ee(n),r=t.Au.get(e);if(r&&r.hu)return nt().add(r.key);{let s=nt();const i=t.Eu.get(e);if(!i)return s;for(const l of i){const d=t.Tu.get(l);s=s.unionWith(d.view.nu)}return s}}async function $G(n,e){const t=Ee(n),r=await W0(t.localStore,e.query,!0),s=e.view.cu(r);return t.isPrimaryClient&&T1(t,e.targetId,s.au),s}async function KG(n,e){const t=Ee(n);return $4(t.localStore,e).then((r=>Oi(t,r)))}async function WG(n,e,t,r){const s=Ee(n),i=await(function(d,h){const m=Ee(d),g=Ee(m.mutationQueue);return m.persistence.runTransaction("Lookup mutation documents","readonly",(p=>g.Xn(p,h).next((b=>b?m.localDocuments.getDocuments(p,b):J.resolve(null)))))})(s.localStore,e);i!==null?(t==="pending"?await Hd(s.remoteStore):t==="acknowledged"||t==="rejected"?(y2(s,e,r||null),g2(s,e),(function(d,h){Ee(Ee(d).mutationQueue).nr(h)})(s.localStore,e)):Ie(6720,"Unknown batchState",{Su:t}),await Oi(s,i)):xe(ol,"Cannot apply mutation batch with id: "+e)}async function QG(n,e){const t=Ee(n);if(Qy(t),b2(t),e===!0&&t.gu!==!0){const r=t.sharedClientState.getAllActiveQueryTargets(),s=await FC(t,r.toArray());t.gu=!0,await w1(t.remoteStore,!0);for(const i of s)Wy(t.remoteStore,i)}else if(e===!1&&t.gu!==!1){const r=[];let s=Promise.resolve();t.Eu.forEach(((i,l)=>{t.sharedClientState.isLocalQueryTarget(l)?r.push(l):s=s.then((()=>(wd(t,l),bd(t.localStore,l,!0)))),vd(t.remoteStore,l)})),await s,await FC(t,r),(function(l){const d=Ee(l);d.Au.forEach(((h,m)=>{vd(d.remoteStore,m)})),d.Vu.zr(),d.Au=new Map,d.Ru=new Xt(_e.comparator)})(t),t.gu=!1,await w1(t.remoteStore,!1)}}async function FC(n,e,t){const r=Ee(n),s=[],i=[];for(const l of e){let d;const h=r.Eu.get(l);if(h&&h.length!==0){d=await xd(r.localStore,vr(h[0]));for(const m of h){const g=r.Tu.get(m),p=await $G(r,g);p.snapshot&&i.push(p.snapshot)}}else{const m=await G4(r.localStore,l);d=await xd(r.localStore,m),await p2(r,mM(m),l,!1,d.resumeToken)}s.push(d)}return r.Pu.H_(i),s}function mM(n){return YR(n.path,n.collectionGroup,n.orderBy,n.filters,n.limit,"F",n.startAt,n.endAt)}function XG(n){return(function(t){return Ee(Ee(t).persistence).hs()})(Ee(n).localStore)}async function JG(n,e,t,r){const s=Ee(n);if(s.gu)return void xe(ol,"Ignoring unexpected query state notification.");const i=s.Eu.get(e);if(i&&i.length>0)switch(t){case"current":case"not-current":{const l=await $4(s.localStore,WR(i[0])),d=km.createSynthesizedRemoteEventForCurrentChange(e,t==="current",pn.EMPTY_BYTE_STRING);await Oi(s,l,d);break}case"rejected":await bd(s.localStore,e,!0),wd(s,e,r);break;default:Ie(64155,t)}}async function ZG(n,e,t){const r=Qy(n);if(r.gu){for(const s of e){if(r.Eu.has(s)&&r.sharedClientState.isActiveQueryTarget(s)){xe(ol,"Adding an already active target "+s);continue}const i=await G4(r.localStore,s),l=await xd(r.localStore,i);await p2(r,mM(i),l.targetId,!1,l.resumeToken),Wy(r.remoteStore,l)}for(const s of t)r.Eu.has(s)&&await bd(r.localStore,s,!1).then((()=>{vd(r.remoteStore,s),wd(r,s)}
vendor: 4,101 bytes, line 2648
2648)).catch(rl)}}function Qy(n){const e=Ee(n);return e.remoteStore.remoteSyncer.applyRemoteEvent=hM.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=GG.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=BG.bind(null,e),e.Pu.H_=DG.bind(null,e.eventManager),e.Pu.yu=kG.bind(null,e.eventManager),e}function b2(n){const e=Ee(n);return e.remoteStore.remoteSyncer.applySuccessfulWrite=UG.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=zG.bind(null,e),e}function e$(n,e,t){const r=Ee(n);(async function(i,l,d){try{const h=await l.getMetadata();if(await(function(w,_){const N=Ee(w),E=Dn(_.createTime);return N.persistence.runTransaction("hasNewerBundle","readonly",(j=>N.Pi.getBundleMetadata(j,_.id))).then((j=>!!j&&j.createTime.compareTo(E)>=0))})(i.localStore,h))return await l.close(),d._completeWith((function(w){return{taskState:"Success",documentsLoaded:w.totalDocuments,bytesLoaded:w.totalBytes,totalDocuments:w.totalDocuments,totalBytes:w.totalBytes}})(h)),Promise.resolve(new Set);d._updateProgress(oM(h));const m=new m2(h,l.serializer);let g=await l.bu();for(;g;){const b=await m.Ga(g);b&&d._updateProgress(b),g=await l.bu()}const p=await m.ja(i.localStore);return await Oi(i,p.Ha,void 0),await(function(w,_){const N=Ee(w);return N.persistence.runTransaction("Save bundle","readwrite",(E=>N.Pi.saveBundleMetadata(E,_)))})(i.localStore,h),d._completeWith(p.progress),Promise.resolve(p.Ja)}catch(h){return Zr(ol,`Loading bundle failed with ${h}`),d._failWith(h),Promise.resolve(new Set)}})(r,e,t).then((s=>{r.sharedClientState.notifyBundleLoaded(s)}))}class _d{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Dc(e.databaseInfo.databaseId),this.sharedClientState=this.Du(e),this.persistence=this.Cu(e),await this.persistence.start(),this.localStore=this.vu(e),this.gcScheduler=this.Fu(e,this.localStore),this.indexBackfillerScheduler=this.Mu(e,this.localStore)}Fu(e,t){return null}Mu(e,t){return null}vu(e){return z4(this.persistence,new U4,e.initialUser,this.serializer)}Cu(e){return new Z_(Ky.Vi,this.serializer)}Du(e){return new J4}async terminate(){var e,t;(e=this.gcScheduler)==null||e.stop(),(t=this.indexBackfillerScheduler)==null||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}_d.provider={build:()=>new _d};class v2 extends _d{constructor(e){super(),this.cacheSizeBytes=e}Fu(e,t){Fe(this.persistence.referenceDelegate instanceof K0,46915);const r=this.persistence.referenceDelegate.garbageCollector;return new P4(r,e.asyncQueue,t)}Cu(e){const t=this.cacheSizeBytes!==void 0?xr.withCacheSize(this.cacheSizeBytes):xr.DEFAULT;return new Z_((r=>K0.Vi(r,t)),this.serializer)}}class w2 extends _d{constructor(e,t,r){super(),this.xu=e,this.cacheSizeBytes=t,this.forceOwnership=r,this.kind="persistent",this.synchronizeTabs=!1}async initialize(e){await super.initialize(e),await this.xu.initialize(this,e),await b2(this.xu.syncEngine),await Hd(this.xu.remoteStore),await this.persistence.zi((()=>(this.gcScheduler&&!this.gcScheduler.started&&this.gcScheduler.start(),this.indexBackfillerScheduler&&!this.indexBackfillerScheduler.started&&this.indexBackfillerScheduler.start(),Promise.resolve())))}vu(e){return z4(this.persistence,new U4,e.initialUser,this.serializer)}Fu(e,t){const r=this.persistence.referenceDelegate.garbageCollector;return new P4(r,e.asyncQueue,t)}Mu(e,t){const r=new oH(t,this.persistence);return new iH(e.asyncQueue,r)}Cu(e){const t=t2(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),r=this.cacheSizeBytes!==void 0?xr.withCacheSize(this.cacheSizeBytes):xr.DEFAULT;return new e2(this.synchronizeTabs,t,e.clientId,r,e.asyncQueue,Z4(),a0(),this.serializer,this.sharedClientState,!!this.forceOwnership)}Du(e){return new J4}}class pM extends w2{constructor(e,t){super(e,t,!1),this.xu=e,this.cacheSizeBytes=t,this.synchronizeTabs=!0}async initialize(e){await super.initialize(e);const t=this.xu.syncEngine;this.sharedClientState instanceof Qv&&(this.sharedClientState.syncEngine={bo:WG.bind(null,t),Do:JG.bind(null,t),Co:ZG.bind(null,t),hs:XG.bind(null,t),So:KG.bind(null,t)}
2648,await this.sharedClientState.start()),await this.persistence.zi((async r=>{await QG(this.xu.syncEngine,r),this.gcScheduler&&(r&&!this.gcScheduler.started?this.gcScheduler.start():r||this.gcScheduler.stop()),this.indexBackfillerScheduler&&(r&&!this.indexBackfillerScheduler.started?this.indexBackfillerScheduler.start():r||this.indexBackfillerScheduler.stop())}))}Du(e){const t=Z4();if(!Qv.v(t))throw new pe(ne.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");const r=t2(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new Qv(t,e.asyncQueue,r,e.clientId,e.initialUser)}}class Jo{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>VC(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=YG.bind(null,this.syncEngine),await w1(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return(function(){return new CG})()}createDatastore(e){const t=Dc(e.databaseInfo.databaseId),r=uG(e.databaseInfo);return pG(e.authCredentials,e.appCheckCredentials,r,t)}createRemoteStore(e){return(function(r,s,i,l,d){return new yG(r,s,i,l,d)})(this.localStore,this.datastore,e.asyncQueue,(t=>VC(this.syncEngine,t,0)),(function(){return kC.v()?new kC:new iG})())}createSyncEngine(e,t){return(function(s,i,l,d,h,m,g){const p=new MG(s,i,l,d,h,m);return g&&(p.gu=!0),p})(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await(async function(s){const i=Ee(s);xe(Tc,"RemoteStore shutting down."),i.Ia.add(5),await qd(i),i.Aa.shutdown(),i.Va.set("Unknown")})(this.remoteStore),(e=this.datastore)==null||e.terminate(),(t=this.eventManager)==null||t.terminate()}}Jo.provider={build:()=>new Jo};function BC(n,e=10240){let t=0;return{async read(){if(t<n.byteLength){const r={value:n.slice(t,t+e),done:!1};return t+=e,r}return{done:!0}},async cancel(){},releaseLock(){},closed:Promise.resolve()}}/**
2649 * @license
2650 * Copyright 2020 Google LLC
2651 *
2652 * Licensed under the Apache License, Version 2.0 (the "License");
2653 * you may not use this file except in compliance with the License.
2654 * You may obtain a copy of the License at
2655 *
2656 *   http://www.apache.org/licenses/LICENSE-2.0
2657 *
2658 * Unless required by applicable law or agreed to in writing, software
2659 * distributed under the License is distributed on an "AS IS" BASIS,
2660 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2661 * See the License for the specific language governing permissions and
2662 * limitations under the License.
2663 *//**
2664 * @license
2665 * Copyright 2017 Google LLC
2666 *
2667 * Licensed under the Apache License, Version 2.0 (the "License");
2668 * you may not use this file except in compliance with the License.
2669 * You may obtain a copy of the License at
2670 *
2671 *   http://www.apache.org/licenses/LICENSE-2.0
2672 *
2673 * Unless required by applicable law or agreed to in writing, software
2674 * distributed under the License is distributed on an "AS IS" BASIS,
2675 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2676 * See the License for the specific language governing permissions and
2677 * limitations under the License.
2678 */class Xy{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ou(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ou(this.observer.error,e):jn("Uncaught Error in snapshot listener:",e.toString()))}Nu(){this.muted=!0}Ou(e,t){setTimeout((()=>{this.muted||e(t)}),0)}}/**
2679 * @license
2680 * Copyright 2020 Google LLC
2681 *
2682 * Licensed under the Apache License, Version 2.0 (the "License");
2683 * you may not use this file except in compliance with the License.
2684 * You may obtain a copy of the License at
2685 *
2686 *   http://www.apache.org/licenses/LICENSE-2.0
2687 *
2688 * Unless required by applicable law or agreed to in writing, softw
2688are
2689 * distributed under the License is distributed on an "AS IS" BASIS,
2690 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2691 * See the License for the specific language governing permissions and
2692 * limitations under the License.
2693 */class t${constructor(e,t){this.Bu=e,this.serializer=t,this.metadata=new sr,this.buffer=new Uint8Array,this.Lu=(function(){return new TextDecoder("utf-8")})(),this.ku().then((r=>{r&&r.Ua()?this.metadata.resolve(r.Ka.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is
2694             ${JSON.stringify(r==null?void 0:r.Ka)}`))}),(r=>this.metadata.reject(r)))}close(){return this.Bu.cancel()}async getMetadata(){return this.metadata.promise}async bu(){return await this.getMetadata(),this.ku()}async ku(){const e=await this.qu();if(e===null)return null;const t=this.Lu.decode(e),r=Number(t);isNaN(r)&&this.Ku(`length string (${t}) is not valid number`);const s=await this.Uu(r);return new iM(JSON.parse(s),e.length+r)}$u(){return this.buffer.findIndex((e=>e===123))}async qu(){for(;this.$u()<0&&!await this.Wu(););if(this.buffer.length===0)return null;const e=this.$u();e<0&&this.Ku("Reached the end of bundle when a length string is expected.");const t=this.buffer.slice(0,e);return this.buffer=this.buffer.slice(e),t}async Uu(e){for(;this.buffer.length<e;)await this.Wu()&&this.Ku("Reached the end of bundle when more is expected.");const t=this.Lu.decode(this.buffer.slice(0,e));return this.buffer=this.buffer.slice(e),t}Ku(e){throw this.Bu.cancel(),new Error(`Invalid bundle format: ${e}`)}async Wu(){const e=await this.Bu.read();if(!e.done){const t=new Uint8Array(this.buffer.length+e.value.length);t.set(this.buffer),t.set(e.value,this.buffer.length),this.buffer=t}return e.done}}/**
2695 * @license
2696 * Copyright 2025 Google LLC
2697 *
2698 * Licensed under the Apache License, Version 2.0 (the "License");
2699 * you may not use this file except in compliance with the License.
2700 * You may obtain a copy of the License at
2701 *
2702 *   http://www.apache.org/licenses/LICENSE-2.0
2703 *
2704 * Unless required by applicable law or agreed to in writing, software
2705 * distributed under the License is distributed on an "AS IS" BASIS,
2706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2707 * See the License for the specific language governing permissions and
2708 * limitations under the License.
2709 */class n${constructor(e,t){this.bundleData=e,this.serializer=t,this.cursor=0,this.elements=[];let r=this.bu();if(!r||!r.Ua())throw new Error(`The first element of the bundle is not a metadata object, it is
2710         ${JSON.stringify(r==null?void 0:r.Ka)}`);this.metadata=r;do r=this.bu(),r!==null&&this.elements.push(r);while(r!==null)}getMetadata(){return this.metadata}Qu(){return this.elements}bu(){if(this.cursor===this.bundleData.length)return null;const e=this.qu(),t=this.Uu(e);return new iM(JSON.parse(t),e)}Uu(e){if(this.cursor+e>this.bundleData.length)throw new pe(ne.INTERNAL,"Reached the end of bundle when more is expected.");return this.bundleData.slice(this.cursor,this.cursor+=e)}qu(){const e=this.cursor;let t=this.cursor;for(;t<this.bundleData.length;){if(this.bundleData[t]==="{"){if(t===e)throw new Error("First character is a bracket and not a number");return this.cursor=t,Number(this.bundleData.slice(e,t))}t++}throw new Error("Reached the end of bundle when more is expected.")}}/**
2711 * @license
2712 * Copyright 2017 Google LLC
2713 *
2714 * Licensed under the Apache License, Version 2.0 (the "License");
2715 * you may not use this file except in compliance with the License.
2716 * You may obtain a copy of the License at
2717 *
2718 *   http://www.apache.org/licenses/LICENSE-2.0
2719 *
2720 * Unless required by applicable law or agreed to in writing, software
2721 * distributed under the License is distributed on an "AS IS" BASIS,
2722 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2723 * See the License for the specific language governing permissions and
2724 * limitations under the License.
2725 */let r$=class{constructor(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastTransactionError=null,this.writtenDocs=new Set}async lookup(e){if(this.ensureCommitNotCalled(),this.mutations.length>
vendor: 4,127 bytes, lines 2725-2750
27250)throw this.lastTransactionError=new pe(ne.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes."),this.lastTransactionError;const t=await(async function(s,i){const l=Ee(s),d={documents:i.map((p=>lm(l.serializer,p)))},h=await l.jo("BatchGetDocuments",l.serializer.databaseId,ct.emptyPath(),d,i.length),m=new Map;h.forEach((p=>{const b=xY(l.serializer,p);m.set(b.key.toString(),b)}));const g=[];return i.forEach((p=>{const b=m.get(p.toString());Fe(!!b,55234,{key:p}),g.push(b)})),g})(this.datastore,e);return t.forEach((r=>this.recordVersion(r))),t}set(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(r){this.lastTransactionError=r}this.writtenDocs.add(e.toString())}delete(e){this.write(new zd(e,this.precondition(e))),this.writtenDocs.add(e.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastTransactionError)throw this.lastTransactionError;const e=this.readVersions;this.mutations.forEach((t=>{e.delete(t.key.toString())})),e.forEach(((t,r)=>{const s=_e.fromPath(r);this.mutations.push(new H_(s,this.precondition(s)))})),await(async function(r,s){const i=Ee(r),l={writes:s.map((d=>cm(i.serializer,d)))};await i.Wo("Commit",i.serializer.databaseId,ct.emptyPath(),l)})(this.datastore,this.mutations),this.committed=!0}recordVersion(e){let t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw Ie(50498,{Gu:e.constructor.name});t=Ye.min()}const r=this.readVersions.get(e.key.toString());if(r){if(!t.isEqual(r))throw new pe(ne.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)}precondition(e){const t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?t.isEqual(Ye.min())?un.exists(!1):un.updateTime(t):un.none()}preconditionForUpdate(e){const t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(Ye.min()))throw new pe(ne.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return un.updateTime(t)}return un.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}};/**
2726 * @license
2727 * Copyright 2019 Google LLC
2728 *
2729 * Licensed under the Apache License, Version 2.0 (the "License");
2730 * you may not use this file except in compliance with the License.
2731 * You may obtain a copy of the License at
2732 *
2733 *   http://www.apache.org/licenses/LICENSE-2.0
2734 *
2735 * Unless required by applicable law or agreed to in writing, software
2736 * distributed under the License is distributed on an "AS IS" BASIS,
2737 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2738 * See the License for the specific language governing permissions and
2739 * limitations under the License.
2740 */class s${constructor(e,t,r,s,i){this.asyncQueue=e,this.datastore=t,this.options=r,this.updateFunction=s,this.deferred=i,this.zu=r.maxAttempts,this.M_=new a2(this.asyncQueue,"transaction_retry")}ju(){this.zu-=1,this.Ju()}Ju(){this.M_.p_((async()=>{const e=new r$(this.datastore),t=this.Hu(e);t&&t.then((r=>{this.asyncQueue.enqueueAndForget((()=>e.commit().then((()=>{this.deferred.resolve(r)})).catch((s=>{this.Zu(s)}))))})).catch((r=>{this.Zu(r)}))}))}Hu(e){try{const t=this.updateFunction(e);return!Em(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.deferred.reject(t),null}}Zu(e){this.zu>0&&this.Xu(e)?(this.zu-=1,this.asyncQueue.enqueueAndForget((()=>(this.Ju(),Promise.resolve())))):this.deferred.reject(e)}Xu(e){if((e==null?void 0:e.name)==="FirebaseError"){const t=e.code;return t==="aborted"||t==="failed-precondition"||t==="already-exists"||!c4(t)}return!1}}/**
2741 * @license
2742 * Copyright 2017 Google LLC
2743 *
2744 * Licensed under the Apache License, Version 2.0 (the "License");
2745 * you may not use this file except in compliance with the License.
2746 * You may obtain a copy of the License at
2747 *
2748 *   http://www.apache.org/licenses/LICENSE-2.0
2749 *
2750 * Unless required by applicable law or agreed to in writing, softw
2750are
2751 * distributed under the License is distributed on an "AS IS" BASIS,
2752 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2753 * See the License for the specific language governing permissions and
2754 * limitations under the License.
2755 */const Zo="FirestoreClient";class a${constructor(e,t,r,s,i){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=r,this._databaseInfo=s,this.user=nr.UNAUTHENTICATED,this.clientId=Iy.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=i,this.authCredentials.start(r,(async l=>{xe(Zo,"Received user=",l.uid),await this.authCredentialListener(l),this.user=l})),this.appCheckCredentials.start(r,(l=>(xe(Zo,"Received new app check token=",l),this.appCheckCredentialListener(l,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this._databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new sr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){const r=Gd(t,"Failed to shutdown persistence");e.reject(r)}})),e.promise}}async function Jv(n,e){n.asyncQueue.verifyOperationInProgress(),xe(Zo,"Initializing OfflineComponentProvider");const t=n.configuration;await e.initialize(t);let r=t.initialUser;n.setCredentialChangeListener((async s=>{r.isEqual(s)||(await q4(e.localStore,s),r=s)})),e.persistence.setDatabaseDeletedListener((()=>n.terminate())),n._offlineComponents=e}async function UC(n,e){n.asyncQueue.verifyOperationInProgress();const t=await _2(n);xe(Zo,"Initializing OnlineComponentProvider"),await e.initialize(t,n.configuration),n.setCredentialChangeListener((r=>RC(e.remoteStore,r))),n.setAppCheckTokenChangeListener(((r,s)=>RC(e.remoteStore,s))),n._onlineComponents=e}async function _2(n){if(!n._offlineComponents)if(n._uninitializedComponentsProvider){xe(Zo,"Using user provided OfflineComponentProvider");try{await Jv(n,n._uninitializedComponentsProvider._offline)}catch(e){const t=e;if(!(function(s){return s.name==="FirebaseError"?s.code===ne.FAILED_PRECONDITION||s.code===ne.UNIMPLEMENTED:!(typeof DOMException<"u"&&s instanceof DOMException)||s.code===22||s.code===20||s.code===11})(t))throw t;Zr("Error using user provided cache. Falling back to memory cache: "+t),await Jv(n,new _d)}}else xe(Zo,"Using default OfflineComponentProvider"),await Jv(n,new v2(void 0));return n._offlineComponents}async function Jy(n){return n._onlineComponents||(n._uninitializedComponentsProvider?(xe(Zo,"Using user provided OnlineComponentProvider"),await UC(n,n._uninitializedComponentsProvider._online)):(xe(Zo,"Using default OnlineComponentProvider"),await UC(n,new Jo))),n._onlineComponents}function gM(n){return _2(n).then((e=>e.persistence))}function $d(n){return _2(n).then((e=>e.localStore))}function yM(n){return Jy(n).then((e=>e.remoteStore))}function T2(n){return Jy(n).then((e=>e.syncEngine))}function xM(n){return Jy(n).then((e=>e.datastore))}async function Td(n){const e=await Jy(n),t=e.eventManager;return t.onListen=PG.bind(null,e.syncEngine),t.onUnlisten=LG.bind(null,e.syncEngine),t.onFirstRemoteStoreListen=OG.bind(null,e.syncEngine),t.onLastRemoteStoreUnlisten=VG.bind(null,e.syncEngine),t}function i$(n){return n.asyncQueue.enqueue((async()=>{const e=await gM(n),t=await yM(n);return e.setNetworkEnabled(!0),(function(s){const i=Ee(s);return i.Ia.delete(0),Rm(i)})(t)}))}function o$(n){return n.asyncQueue.enqueue((async()=>{const e=await gM(n),t=await yM(n);return e.setNetworkEnabled(!1),(async function(s){const i=Ee(s);i.Ia.add(0),await qd(i),i.Va.set("Offline")})(t)}))}function l$(n,e,t,r){const s=new Xy(r),i=new f2(e,s,t);return n.asyncQueue.enqueueAndForget((async()=>u2(await Td(n),i))),()=>{s.Nu(),n.asyncQueue.enqueueAndForget((async()=>d2(await Td(n),i)))}}function c$(n,e){const t=new sr;return n.asyncQueue.enqueueAndForget((async()=>(async function(s,i,l){try{const d=await(function(m,g){const p=Ee(m);return p.persistence.runTransaction("read document","readonly",(b=>p.localDocuments.getDocument(b,g)))})(s,i);d.isFoundDocument()?l.resolve(d):d.isNoDocument()?l.resolve(null):l.reject(new pe(ne.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(d){const h=Gd(d,`Failed to get document '${i} from cache`);l.reject(h)}})(await $d(n),e,t))),t.promise}function bM(n,e,t={}){const r=new sr;return n.asyncQueue.enqueueAndForget((async()=>(function(i,l,d,h,m){const g=new Xy({next:b=>{g.Nu(),l.enqueueAndForget((()=>d2(i,p)));const w=b.docs.has(d);!w&&b.fromCache?m.reject(new pe(ne.UNAVAILABLE,"Failed to get document because the client is offline.")):w&&b.fromCache&&h&&h.source==="server"?m.reject(new pe(ne.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):m.resolve(b)},error:b=>m.reject(b)}),p=new f2(Bd(d.path),g,{includeMetadataChanges:!0,qa:!0});return u2(i,p)})(await Td(n),n.asyncQueue,e,t,r))),r.promise}function u$(n,e){const t=new sr;return n.asyncQueue.enqueueAndForget((async()=>(async function(s,i,l){try{const d=await W0(s,i,!0),h=new uM(i,d.ks),m=h.ru(d.documents),g=h.applyChanges(m,!1);l.resolve(g.snapshot)}catch(d){const h=Gd(d,`Failed to execute query '${i} against cache`);l.reject(h)}})(await $d(n),e,t))),t.promise}function vM(n,e,t={}){const r=new sr;return n.asyncQueue.enqueueAndForget((async()=>(function(i,l,d,h,m){const g=new Xy({next:b=>{g.Nu(),l.enqueueAndForget((()=>d2(i,p))),b.fromCache&&h.source==="server"?m.reject(new pe(ne.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):m.resolve(b)},error:b=>m.reject(b)}),p=new f2(d,g,{includeMetadataChanges:!0,qa:!0});return u2(i,p)})(await Td(n),n.asyncQueue,e,t,r))),r.promise}function d$(n,e,t){const r=new sr;return n.asyncQueue.enqueueAndForget((async()=>{try{const s=await xM(n);r.resolve((async function(l,d,h){var N;const m=Ee(l),{request:g,gt:p,parent:b}=v4(m.serializer,GR(d),h);m.connection.qo||delete g.parent;
2755const w=(await m.jo("RunAggregationQuery",m.serializer.databaseId,b,g,1)).filter((E=>!!E.result));Fe(w.length===1,64727);const _=(N=w[0].result)==null?void 0:N.aggregateFields;return Object.keys(_).reduce(((E,j)=>(E[p[j]]=_[j],E)),{})})(s,e,t))}catch(s){r.reject(s)}})),r.promise}function h$(n,e){const t=new sr;return n.asyncQueue.enqueueAndForget((async()=>FG(await T2(n),e,t))),t.promise}function f$(n,e){const t=new Xy(e);return n.asyncQueue.enqueueAndForget((async()=>(function(s,i){Ee(s).Ca.add(i),i.next()})(await Td(n),t))),()=>{t.Nu(),n.asyncQueue.enqueueAndForget((async()=>(function(s,i){Ee(s).Ca.delete(i)})(await Td(n),t)))}}function m$(n,e,t){const r=new sr;return n.asyncQueue.enqueueAndForget((async()=>{const s=await xM(n);new s$(n.asyncQueue,s,t,e,r).ju()})),r.promise}function p$(n,e,t,r){const s=(function(l,d){let h;return h=typeof l=="string"?d4().encode(l):l,(function(g,p){return new t$(g,p)})((function(g,p){if(g instanceof Uint8Array)return BC(g,p);if(g instanceof ArrayBuffer)return BC(new Uint8Array(g),p);if(g instanceof ReadableStream)return g.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")})(h),d)})(t,Dc(e));n.asyncQueue.enqueueAndForget((async()=>{e$(await T2(n),s,r)}))}function g$(n,e){return n.asyncQueue.enqueue((async()=>(function(r,s){const i=Ee(r);return i.persistence.runTransaction("Get named query","readonly",(l=>i.Pi.getNamedQuery(l,s)))})(await $d(n),e)))}function wM(n,e){return(function(r,s){return new n$(r,s)})(n,e)}function y$(n,e){return n.asyncQueue.enqueue((async()=>(async function(r,s){const i=Ee(r),l=i.indexManager,d=[];return i.persistence.runTransaction("Configure indexes","readwrite",(h=>l.getFieldIndexes(h).next((m=>(function(p,b,w,_,N){p=[...p],b=[...b],p.sort(w),b.sort(w);const E=p.length,j=b.length;let P=0,A=0;for(;P<j&&A<E;){const M=w(p[A],b[P]);M<0?N(p[A++]):M>0?_(b[P++]):(P++,A++)}for(;P<j;)_(b[P++]);for(;A<E;)N(p[A++])})(m,s,nH,(g=>{d.push(l.addFieldIndex(h,g))}),(g=>{d.push(l.deleteFieldIndex(h,g))})))).next((()=>J.waitFor(d)))))})(await $d(n),e)))}function x$(n,e){return n.asyncQueue.enqueue((async()=>(function(r,s){Ee(r).Cs.As=s})(await $d(n),e)))}function b$(n){return n.asyncQueue.enqueue((async()=>(function(t){const r=Ee(t),s=r.indexManager;return r.persistence.runTransaction("Delete All Indexes","readwrite",(i=>s.deleteAllFieldIndexes(i)))})(await $d(n))))}/**
2756 * @license
2757 * Copyright 2023 Google LLC
2758 *
2759 * Licensed under the Apache License, Version 2.0 (the "License");
2760 * you may not use this file except in compliance with the License.
2761 * You may obtain a copy of the License at
2762 *
2763 *   http://www.apache.org/licenses/LICENSE-2.0
2764 *
2765 * Unless required by applicable law or agreed to in writing, software
2766 * distributed under the License is distributed on an "AS IS" BASIS,
2767 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2768 * See the License for the specific language governing permissions and
2769 * limitations under the License.
2770 */function _M(n){const e={};return n.timeoutSeconds!==void 0&&(e.timeoutSeconds=n.timeoutSeconds),e}/**
2771 * @license
2772 * Copyright 2020 Google LLC
2773 *
2774 * Licensed under the Apache License, Version 2.0 (the "License");
2775 * you may not use this file except in compliance with the License.
2776 * You may obtain a copy of the License at
2777 *
2778 *   http://www.apache.org/licenses/LICENSE-2.0
2779 *
2780 * Unless required by applicable law or agreed to in writing, software
2781 * distributed under the License is distributed on an "AS IS" BASIS,
2782 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2783 * See the License for the specific language governing permissions and
2784 * limitations under the License.
2785 */const v$="ComponentProvider",zC=new Map;function w$(n,e,t,r,s){return new OH(n,e,t,s.host,s.ssl,s.experimentalForceLongPolling,s.experimentalAutoDetectLongPolling,_M(s.experimentalLongPollingOptions),s.useFetchStreams,s.isUsingEmulator,r)}/**
2786 * @license
2787 * Copyright 2020 Google LLC
2788 *
2789 * Licensed under the Apache License, Version 2.0 (the "License");
2790 * you may not use this file except in compliance with the License.
2791 * You may obtain a copy of the License at
2792 *
2793 *   http://www.apache.org/licenses/LICENSE-2.0
2794 *
2795 * Unless required by applicable law or agreed to in writing, softw
2795are
2796 * distributed under the License is distributed on an "AS IS" BASIS,
2797 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2798 * See the License for the specific language governing permissions and
2799 * limitations under the License.
2800 */const TM="firestore.googleapis.com",qC=!0;class HC{constructor(e){if(e.host===void 0){if(e.ssl!==void 0)throw new pe(ne.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=TM,this.ssl=qC}else this.host=e.host,this.ssl=e.ssl??qC;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=D4;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<M4)throw new pe(ne.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}lR("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=_M(e.experimentalLongPollingOptions??{}),(function(r){if(r.timeoutSeconds!==void 0){if(isNaN(r.timeoutSeconds))throw new pe(ne.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (must not be NaN)`);if(r.timeoutSeconds<5)throw new pe(ne.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (minimum allowed value is 5)`);if(r.timeoutSeconds>30)throw new pe(ne.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (maximum allowed value is 30)`)}})(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(function(r,s){return r.timeoutSeconds===s.timeoutSeconds})(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Mm{constructor(e,t,r,s){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=r,this._app=s,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new HC({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new pe(ne.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new pe(ne.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new HC(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=(function(r){if(!r)return new iR;switch(r.type){case"firstParty":return new Wq(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new pe(ne.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}})(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return(function(t){const r=zC.get(t);r&&(xe(v$,"Removing Datastore"),zC.delete(t),r.terminate())})(this),Promise.resolve()}}function NM(n,e,t,r={}){var m;n=ut(n,Mm);const s=Ld(e),i=n._getSettings(),l={...i,emulatorOptions:n._getEmulatorOptions()},d=`${e}:${t}`;s&&j_(`https://${d}`),i.host!==TM&&i.host!==d&&Zr("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const h={...i,host:d,ssl:s,emulatorOptions:r};if(!aa(h,l)&&(n._setSettings(h),r.mockUserToken)){let g,p;if(typeof r.mockUserToken=="string")g=r.mockUserToken,p=nr.MOCK_USER;else{g=vz(r.mockUserToken,(m=n._app)==null?void 0:m.options.projectId);const b=r.mockUserToken.sub||r.mockUserToken.user_id;if(!b)throw new pe(ne.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");p=new nr(b)}n._authCredentials=new Gq(new aR(g,p))}}/**
2801 * @license
2802 * Copyright 2020 Google LLC
2803 *
2804 * Licensed under the Apache License, Version 2.0 (the "License");
2805 * you may not use this file except in compliance with the License.
2806 * You may obtain a copy of the License at
2807 *
2808 *   http://www.apache.org/licenses/LICENSE-2.0
2809 *
2810 * Unless required by applicable law or agreed to in writing, software
2811 * distributed under the License is distributed on an "AS IS" BASIS,
2812 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2813 * See the License for the specific language governing permissions and
2814 * limitations under the License.
2815 */class Qn{constructor(e,t,r){this.converter=t,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new Qn(this.firestore,e,this._query)}}class Ot{constructor(e,t,r){this.converter=t,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new ea(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Ot(this.firestore,e,this._key)}toJSON(){return{type:Ot._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,t,r){if(Cc(t,Ot._jsonSchema))return new Ot(e,r||null,new _e(ct.fromString(t.referencePath)))}}Ot._jsonSchemaVersion="firestore/documentReference/1.0",Ot._jsonSchema={type:zn("string",Ot._jsonSchemaVersion),referencePath:zn("string")};class ea extends Qn{constructor(e,t,r){super(e,t,Bd(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Ot(this.firestore,null,new _e(e))}withConverter(e){return new ea(this.firestore,e,this._path)}}function dc(n,e,...t){if(n=an(n),k_("collection","path",e),n instanceof Mm){const r=ct.fromString(e,...t);return IA(r),new ea(n,null,r)}{if(!(n instanceof Ot||n instanceof ea))throw new pe(ne.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=n._path.child(ct.fromString(e,...t));return IA(r),new ea(n.firestore,null,r)}}function _$(n,e){if(n=ut(n,Mm),k_("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new pe(ne.INVALID_ARGUMENT,`Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new Qn(n,null,(function(r){return new Ri(ct.emptyPath(),r)})(e))}function qt(n,e,...t){if(n=an(n),arguments.length===1&&(e=Iy.newId()),k_("doc","path",e),n instanceof Mm){const r=ct.fromString(e,...t);return kA(r),new Ot(n,null,new _e(r))}{if(!(n instanceof Ot||n instanceof ea))throw new pe(ne.INVALID_ARGUMENT,"Expected first argument to doc() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=n._path.child(ct.fromString(e,...t));return kA(r),new Ot(n.firestore,n instanceof ea?n.converter:null,new _e(r))}}function T$(n,e){return n=an(n),e=an(e),(n instanceof Ot||n instanceof ea)&&(e instanceof Ot||e instanceof ea)&&n.firestore===e.firestore&&n.path===e.path&&n.converter===e.converter}function N2(n,e){return n=an(n),e=an(e),n instanceof Qn&&e instanceof Qn&&n.firestore===e.firestore&&Am(n._query,e._query)&&n.converter===e.converter}/**
2816 * @license
2817 * Copyright 2020 Google LLC
2818 *
2819 * Licensed under the Apache License, Version 2.0 (the "License");
2820 * you may not use this file except in compliance with the License.
2821 * You may obtain a copy of the License at
2822 *
2823 *   http://www.apache.org/licenses/LICENSE-2.0
2824 *
2825 * Unless required by applicable law or agreed to in writing, software
2826 * distributed under the License is distributed on an "AS IS" BASIS,
2827 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2828 * See the License for the specific language governing permissions and
2829 * limitations under the License.
2830 */const YC="AsyncQueue";class GC{constructor(e=Promise.resolve()){this.Yu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new a2(this,"async_queue_retry"),this._c=()=>{const r=a0();r&&xe(YC,"Visibility state changed to "+r.visibilityState),this.M_.w_()},this.ac=e;const t=a0();t&&typeof t.addEventListener=="function"&&t.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const t=a0();t&&typeof t.removeEventListener=="function"&&t.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise((()=>{}));const t=new sr;return this.cc((()=>this.ec&&this.sc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise))).then((()=>t.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.Yu.push(e),this.lc())))}async lc(){if(this.Yu.length!==0){try{await this.Yu[0](),this.Yu.shift(),this.M_.reset()}catch(e){if(!sl(e))throw e;xe(YC,"Operation failed with retryable error: "+e)}this.Yu.length>0&&this.M_.p_((()=>this.lc()))}}cc(e){const t=this.ac.then((()=>(this.rc=!0,e().catch((r=>{throw this.nc=r,this.rc=!1,jn("INTERNAL UNHANDLED ERROR: ",$C(r)),r})).then((r=>(this.rc=!1,r))))));return this.ac=t,t}enqueueAfterDelay(e,t,r){this.uc(),this.oc.indexOf(e)>-1&&(t=0);const s=c2.createAndSchedule(this,e,t,r,(i=>this.hc(i)));return this.tc.push(s),s}uc(){this.nc&&Ie(47125,{Pc:$C(this.nc)})}verifyOperationInProgress(){}async Tc(){let e;do e=this.ac,await e;while(e!==this.ac)}Ec(e){for(const t of this.tc)if(t.timerId===e)return!0;return!1}Ic(e){return this.Tc().then((()=>{this.tc.sort(((t,r)=>t.targetTimeMs-r.targetTimeMs));for(const t of this.tc)if(t.skipDelay(),e!=="all"&&t.timerId===e)break;return this.Tc()}))}Rc(e){this.oc.push(e)}hc(e){const t=this.tc.indexOf(e);this.tc.splice(t,1)}}function $C(n){let e=n.message||"";return n.stack&&(e=n.stack.includes(n.message)?n.stack:n.message+`
2831`+n.stack),e}/**
2832 * @license
2833 * Copyright 2020 Google LLC
2834 *
2835 * Licensed under the Apache License, Version 2.0 (the "License");
2836 * you may not use this file except in compliance with the License.
2837 * You may obtain a copy of the License at
2838 *
2839 *   http://www.apache.org/licenses/LICENSE-2.0
2840 *
2841 * Unless required by applicable law or agreed to in writing, software
2842 * distributed under the License is distributed on an "AS IS" BASIS,
2843 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2844 * See the License for the specific language governing permissions and
2845 * limitations under the License.
2846 */class EM{constructor(){this._progressObserver={},this._taskCompletionResolver=new sr,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(e,t,r){this._progressObserver={next:e,error:t,complete:r}}catch(e){return this._taskCompletionResolver.promise.catch(e)}then(e,t){return this._taskCompletionResolver.promise.then(e,t)}_completeWith(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}_failWith(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}_updateProgress(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}}/**
2847 * @license
2848 * Copyright 2020 Google LLC
2849 *
2850 * Licensed under the Apache License, Version 2.0 (the "License");
2851 * you may not use this file except in compliance with the License.
2852 * You may obtain a copy of the License at
2853 *
2854 *   http://www.apache.org/licenses/LICENSE-2.0
2855 *
2856 * Unless required by applicable law or agreed to in writing, software
2857 * distributed under the License is distributed on an "AS IS" BASIS,
2858 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2859 * See the License for the specific language governing permissions and
2860 * limitations under the License.
2861 */const N$=-1;class Ht extends Mm{constructor(e,t,r,s){super(e,t,r,s),this.type="firestore",this._queue=new GC,this._persistenceKey=(s==null?void 0:s.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new GC(e),this._firestoreClient=void 0,await e}}}function E$(n,e,t){t||(t=sm);const r=Nm(n,"firestore");if(r.isInitialized(t)){const s=r.getImmediate({identifier:t}),i=r.getOptions(t);if(aa(i,e))return s;throw new pe(ne.FAILED_PRECONDITION,"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.")}if(e.cacheSizeBytes!==void 0&&e.localCache!==void 0)throw new pe(ne.INVALID_ARGUMENT,"cache and cacheSizeBytes cannot be specified at the same time as cacheSizeBytes willbe deprecated. Instead, specify the cache size in the cache object");if(e.cacheSizeBytes!==void 0&&e.cacheSizeBytes!==-1&&e.cacheSizeBytes<M4)throw new pe(ne.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");return e.host&&Ld(e.host)&&j_(e.host),r.initialize({options:e,instanceIdentifier:t})}function SM(n,e){const t=typeof n=="object"?n:WI(),r=typeof n=="string"?n:e||sm,s=Nm(t,"firestore").getImmediate({identifier:r});if(!s._initialized){const i=xz("firestore");i&&NM(s,...i)}return s}function hn(n){if(n._terminated)throw new pe(ne.FAILED_PRECONDITION,"The client has already been terminated.");return n._firestoreClient||jM(n),n._firestoreClient}function jM(n){var r,s,i,l;const e=n._freezeSettings(),t=w$(n._databaseId,((r=n._app)==null?void 0:r.options.appId)||"",n._persistenceKey,(s=n._app)==null?void 0:s.options.apiKey,e);n._componentsProvider||(i=e.localCache)!=null&&i._offlineComponentProvider&&((l=e.localCache)!=null&&l._onlineComponentProvider)&&(n._componentsProvider={_offline:e.localCache._offlineComponentProvider,_online:e.localCache._onlineComponentProvider}),n._firestoreClient=new a$(n._authCredentials,n._appCheckCredentials,n._queue,t,n._componentsProvider&&(function(h){const m=h==null?void 0:h._online.build();return{_offline:h==null?void 0:h._offline.build(m),_online:m}})(n._componentsProvider))}function S$(n,e){Zr("enableIndexedDbPersistence() will be deprecated 
2861in the future, you can use `FirestoreSettings.cache` instead.");const t=n._freezeSettings();return AM(n,Jo.provider,{build:r=>new w2(r,t.cacheSizeBytes,e==null?void 0:e.forceOwnership)}),Promise.resolve()}async function j$(n){Zr("enableMultiTabIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");const e=n._freezeSettings();AM(n,Jo.provider,{build:t=>new pM(t,e.cacheSizeBytes)})}function AM(n,e,t){if((n=ut(n,Ht))._firestoreClient||n._terminated)throw new pe(ne.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.");if(n._componentsProvider||n._getSettings().localCache)throw new pe(ne.FAILED_PRECONDITION,"SDK cache is already specified.");n._componentsProvider={_online:e,_offline:t},jM(n)}function A$(n){if(n._initialized&&!n._terminated)throw new pe(ne.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");const e=new sr;return n._queue.enqueueAndForgetEvenWhileRestricted((async()=>{try{await(async function(r){if(!Ba.v())return Promise.resolve();const s=r+B4;await Ba.delete(s)})(t2(n._databaseId,n._persistenceKey)),e.resolve()}catch(t){e.reject(t)}})),e.promise}function C$(n){return(function(t){const r=new sr;return t.asyncQueue.enqueueAndForget((async()=>qG(await T2(t),r))),r.promise})(hn(n=ut(n,Ht)))}function D$(n){return i$(hn(n=ut(n,Ht)))}function k$(n){return o$(hn(n=ut(n,Ht)))}function I$(n){return Dq(n.app,"firestore",n._databaseId.database),n._delete()}function N1(n,e){const t=hn(n=ut(n,Ht)),r=new EM;return p$(t,n._databaseId,e,r),r}function CM(n,e){return g$(hn(n=ut(n,Ht)),e).then((t=>t?new Qn(n,null,t.query):null))}/**
2862 * @license
2863 * Copyright 2020 Google LLC
2864 *
2865 * Licensed under the Apache License, Version 2.0 (the "License");
2866 * you may not use this file except in compliance with the License.
2867 * You may obtain a copy of the License at
2868 *
2869 *   http://www.apache.org/licenses/LICENSE-2.0
2870 *
2871 * Unless required by applicable law or agreed to in writing, software
2872 * distributed under the License is distributed on an "AS IS" BASIS,
2873 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2874 * See the License for the specific language governing permissions and
2875 * limitations under the License.
2876 */class qr{constructor(e){this._byteString=e}static fromBase64String(e){try{return new qr(pn.fromBase64String(e))}catch(t){throw new pe(ne.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(e){return new qr(pn.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:qr._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(Cc(e,qr._jsonSchema))return qr.fromBase64String(e.bytes)}}qr._jsonSchemaVersion="firestore/bytes/1.0",qr._jsonSchema={type:zn("string",qr._jsonSchemaVersion),bytes:zn("string")};/**
2877 * @license
2878 * Copyright 2020 Google LLC
2879 *
2880 * Licensed under the Apache License, Version 2.0 (the "License");
2881 * you may not use this file except in compliance with the License.
2882 * You may obtain a copy of the License at
2883 *
2884 *   http://www.apache.org/licenses/LICENSE-2.0
2885 *
2886 * Unless required by applicable law or agreed to in writing, software
2887 * distributed under the License is distributed on an "AS IS" BASIS,
2888 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2889 * See the License for the specific language governing permissions and
2890 * limitations under the License.
2891 */class kc{constructor(...e){for(let t=0;t<e.length;++t)if(e[t].length===0)throw new pe(ne.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new rn(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}function R$(){return new kc(e1)}/**
2892 * @license
2893 * Copyright 2020 Google LLC
2894 *
2895 * Licensed under the Apache License, Version 2.0 (the "License");
2896 * you may not use this file except in compliance with the License.
2897 * You may obtain a copy of the License at
2898 *
2899 *   http://www.apache.org/licenses/LICENSE-2.0
2900 *
2901 * Unless required by applicable law or agreed to in writing, software
2902 * distributed under the License is distributed on an "AS IS" BASIS,
2903 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2904 * See the License for the specific language governing permissions and
2905 * limitations under the License.
2906 */class ll{constructor(e){this._methodName=e}}/**
2907 * @license
2908 * Copyright 2017 Google LLC
2909 *
2910 * Licensed under the Apache License, Version 2.0 (the "License");
2911 * you may not use this file except in compliance with the License.
2912 * You may obtain a copy of the License at
2913 *
2914 *   http://www.apache.org/licenses/LICENSE-2.0
2915 *
2916 * Unless required by applicable law or agreed to in writing, software
2917 * distributed under the License is distributed on an "AS IS" BASIS,
2918 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2919 * See the License for the specific language governing permissions and
2920 * limitations under the License.
2921 */class ta{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new pe(ne.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new pe(ne.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return Qe(this._lat,e._lat)||Qe(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:ta._jsonSchemaVersion}}static fromJSON(e){if(Cc(e,ta._jsonSchema))return new ta(e.latitude,e.longitude)}}ta._jsonSchemaVersion="firestore/geoPoint/1.0",ta._jsonSchema={type:zn("string",ta._jsonSchemaVersion),latitude:zn("number"),longitude:zn("number")};/**
2922 * @license
2923 * Copyright 2024 Google LLC
2924 *
2925 * Licensed under the Apache License, Version 2.0 (the "License");
2926 * you may not use this file except in compliance with the License.
2927 * You may obtain a copy of the License at
2928 *
2929 *   http://www.apache.org/licenses/LICENSE-2.0
2930 *
2931 * Unless required by applicable law or agreed to in writing, software
2932 * distributed under the License is distributed on an "AS IS" BASIS,
2933 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2934 * See the License for the specific language governing permissions and
2935 * limitations under the License.
2936 */class hs{constructor(e){this._values=(e||[]).map((t=>t))}toArray(){return this._values.map((e=>e))}isEqual(e){return(function(r,s){if(r.length!==s.length)return!1;for(let i=0;i<r.length;++i)if(r[i]!==s[i])return!1;return!0})(this._values,e._values)}toJSON(){return{type:hs._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(Cc(e,hs._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every((t=>typeof t=="number")))return new hs(e.vectorValues);throw new pe(ne.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}hs._jsonSchemaVersion="firestore/vectorValue/1.0",hs._jsonSchema={type:zn("string",hs._jsonSchemaVersion),vectorValues:zn("object")};/**
2937 * @license
2938 * Copyright 2017 Google LLC
2939 *
2940 * Licensed under the Apache License, Version 2.0 (the "License");
2941 * you may not use this file except in compliance with the License.
2942 * You may obtain a copy of the License at
2943 *
2944 *   http://www.apache.org/licenses/LICENSE-2.0
2945 *
2946 * Unless required by applicable law or agreed to in writing, software
2947 * distributed under the License is distributed on an "AS IS" BASIS,
2948 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2949 * See the License for the specific language governing permissions and
2950 * limitations under the License.
2951 */const M$=/^__.*__$/;class P${constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return this.fieldMask!==null?new Pi(e,this.data,this.fieldMask,t,this.fieldTransforms):new Ud(e,this.data,t,this.fieldTransforms)}}class DM{constructor(e,t,r){this.data=e,this.fieldMask=t,this.fieldTransforms=r}toMutation(e,t){return new Pi(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function kM(n){switch(n){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Ie(40011,{dataSource:n})}}class Zy{constructor(e,t,r,s,i,l){this.settings=e,this.databaseId=t,this.serializer
vendor: 4,386 bytes, line 2951
2951=r,this.ignoreUndefinedProperties=s,i===void 0&&this.Ac(),this.fieldTransforms=i||[],this.fieldMask=l||[]}get path(){return this.settings.path}get dataSource(){return this.settings.dataSource}i(e){return new Zy({...this.settings,...e},this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}dc(e){var s;const t=(s=this.path)==null?void 0:s.child(e),r=this.i({path:t,arrayElement:!1});return r.mc(e),r}fc(e){var s;const t=(s=this.path)==null?void 0:s.child(e),r=this.i({path:t,arrayElement:!1});return r.Ac(),r}gc(e){return this.i({path:void 0,arrayElement:!0})}yc(e){return Z0(e,this.settings.methodName,this.settings.hasConverter||!1,this.path,this.settings.targetDoc)}contains(e){return this.fieldMask.find((t=>e.isPrefixOf(t)))!==void 0||this.fieldTransforms.find((t=>e.isPrefixOf(t.field)))!==void 0}Ac(){if(this.path)for(let e=0;e<this.path.length;e++)this.mc(this.path.get(e))}mc(e){if(e.length===0)throw this.yc("Document fields must not be empty");if(kM(this.dataSource)&&M$.test(e))throw this.yc('Document fields cannot begin and end with "__"')}}class O${constructor(e,t,r){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer=r||Dc(e)}I(e,t,r,s=!1){return new Zy({dataSource:e,methodName:t,targetDoc:r,path:rn.emptyPath(),arrayElement:!1,hasConverter:s},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Ic(n){const e=n._freezeSettings(),t=Dc(n._databaseId);return new O$(n._databaseId,!!e.ignoreUndefinedProperties,t)}function ex(n,e,t,r,s,i={}){const l=n.I(i.merge||i.mergeFields?2:0,e,t,s);k2("Data must be an object, but it was:",l,r);const d=MM(r,l);let h,m;if(i.merge)h=new Gr(l.fieldMask),m=l.fieldTransforms;else if(i.mergeFields){const g=[];for(const p of i.mergeFields){const b=Ai(e,p,t);if(!l.contains(b))throw new pe(ne.INVALID_ARGUMENT,`Field '${b}' is specified in your field mask but missing from your input data.`);OM(g,b)||g.push(b)}h=new Gr(g),m=l.fieldTransforms.filter((p=>h.covers(p.field)))}else h=null,m=l.fieldTransforms;return new P$(new rr(d),h,m)}class Pm extends ll{_toFieldTransform(e){if(e.dataSource!==2)throw e.dataSource===1?e.yc(`${this._methodName}() can only appear at the top level of your update data`):e.yc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Pm}}function IM(n,e,t){return new Zy({dataSource:3,targetDoc:e.settings.targetDoc,methodName:n._methodName,arrayElement:t},e.databaseId,e.serializer,e.ignoreUndefinedProperties)}class E2 extends ll{_toFieldTransform(e){return new Dm(e.path,new pd)}isEqual(e){return e instanceof E2}}class S2 extends ll{constructor(e,t){super(e),this.Sc=t}_toFieldTransform(e){const t=IM(this,e,!0),r=this.Sc.map((i=>Rc(i,t))),s=new xc(r);return new Dm(e.path,s)}isEqual(e){return e instanceof S2&&aa(this.Sc,e.Sc)}}class j2 extends ll{constructor(e,t){super(e),this.Sc=t}_toFieldTransform(e){const t=IM(this,e,!0),r=this.Sc.map((i=>Rc(i,t))),s=new bc(r);return new Dm(e.path,s)}isEqual(e){return e instanceof j2&&aa(this.Sc,e.Sc)}}class A2 extends ll{constructor(e,t){super(e),this.bc=t}_toFieldTransform(e){const t=new gd(e.serializer,t4(e.serializer,this.bc));return new Dm(e.path,t)}isEqual(e){return e instanceof A2&&this.bc===e.bc}}function C2(n,e,t,r){const s=n.I(1,e,t);k2("Data must be an object, but it was:",s,r);const i=[],l=rr.empty();al(r,((h,m)=>{const g=I2(e,h,t);m=an(m);const p=s.fc(g);if(m instanceof Pm)i.push(g);else{const b=Rc(m,p);b!=null&&(i.push(g),l.set(g,b))}}));const d=new Gr(i);return new DM(l,d,s.fieldTransforms)}function D2(n,e,t,r,s,i){const l=n.I(1,e,t),d=[Ai(e,r,t)],h=[s];if(i.length%2!=0)throw new pe(ne.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let b=0;b<i.length;b+=2)d.push(Ai(e,i[b])),h.push(i[b+1]);const m=[],g=rr.empty();for(let b=d.length-1;b>=0;--b)if(!OM(m,d[b])){const w=d[b];let _=h[b];_=an(_);const N=l.fc(w);if(_ instanceof Pm)m.push(w);else{const E=Rc(_,N);E!=null&&(m.push(w),g.set(w,E))}}const p=new Gr(m);return new DM(g,p,l.fieldTransforms)}function RM(n,e,t,r=!1){return Rc(t,n.I(r?4:3,e))}function Rc(n,e){if(PM(n=an(n)))return k2("Unsupported field value:",e,n),MM(n,e);if(n instanceof ll)return(function(r,s){if(!kM(s.dataSource))throw s.yc(`${r._methodName}
2951() can only be used with update() and set()`);if(!s.path)throw s.yc(`${r._methodName}() is not currently supported inside arrays`);const i=r._toFieldTransform(s);i&&s.fieldTransforms.push(i)})(n,e),null;if(n===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),n instanceof Array){if(e.settings.arrayElement&&e.dataSource!==4)throw e.yc("Nested arrays are not supported");return(function(r,s){const i=[];let l=0;for(const d of r){let h=Rc(d,s.gc(l));h==null&&(h={nullValue:"NULL_VALUE"}),i.push(h),l++}return{arrayValue:{values:i}}})(n,e)}return(function(r,s){if((r=an(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return t4(s.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const i=Dt.fromDate(r);return{timestampValue:yd(s.serializer,i)}}if(r instanceof Dt){const i=new Dt(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:yd(s.serializer,i)}}if(r instanceof ta)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof qr)return{bytesValue:m4(s.serializer,r._byteString)};if(r instanceof Ot){const i=s.databaseId,l=r.firestore._databaseId;if(!l.isEqual(i))throw s.yc(`Document reference is for database ${l.projectId}/${l.database} but should be for database ${i.projectId}/${i.database}`);return{referenceValue:W_(r.firestore._databaseId||s.databaseId,r._key.path)}}if(r instanceof hs)return(function(l,d){const h=l instanceof hs?l.toArray():l;return{mapValue:{fields:{[V_]:{stringValue:F_},[hd]:{arrayValue:{values:h.map((g=>{if(typeof g!="number")throw d.yc("VectorValues must only contain numeric values.");return q_(d.serializer,g)}))}}}}}})(r,s);if(E4(r))return r._toProto(s.serializer);throw s.yc(`Unsupported field value: ${Ry(r)}`)})(n,e)}function MM(n,e){const t={};return AR(n)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):al(n,((r,s)=>{const i=Rc(s,e.dc(r));i!=null&&(t[r]=i)})),{mapValue:{fields:t}}}function PM(n){return!(typeof n!="object"||n===null||n instanceof Array||n instanceof Date||n instanceof Dt||n instanceof ta||n instanceof qr||n instanceof Ot||n instanceof ll||n instanceof hs||E4(n))}function k2(n,e,t){if(!PM(t)||!cR(t)){const r=Ry(t);throw r==="an object"?e.yc(n+" a custom object"):e.yc(n+" "+r)}}function Ai(n,e,t){if((e=an(e))instanceof kc)return e._internalPath;if(typeof e=="string")return I2(n,e);throw Z0("Field path arguments must be of type string or ",n,!1,void 0,t)}const L$=new RegExp("[~\\*/\\[\\]]");function I2(n,e,t){if(e.search(L$)>=0)throw Z0(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,n,!1,void 0,t);try{return new kc(...e.split("."))._internalPath}catch{throw Z0(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,n,!1,void 0,t)}}function Z0(n,e,t,r,s){const i=r&&!r.isEmpty(),l=s!==void 0;let d=`Function ${e}() called with invalid data`;t&&(d+=" (via `toFirestore()`)"),d+=". ";let h="";return(i||l)&&(h+=" (found",i&&(h+=` in field ${r}`),l&&(h+=` in document ${s}`),h+=")"),new pe(ne.INVALID_ARGUMENT,d+n+h)}function OM(n,e){return n.some((t=>t.isEqual(e)))}/**
2952 * @license
2953 * Copyright 2020 Google LLC
2954 *
2955 * Licensed under the Apache License, Version 2.0 (the "License");
2956 * you may not use this file except in compliance with the License.
2957 * You may obtain a copy of the License at
2958 *
2959 *   http://www.apache.org/licenses/LICENSE-2.0
2960 *
2961 * Unless required by applicable law or agreed to in writing, software
2962 * distributed under the License is distributed on an "AS IS" BASIS,
2963 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2964 * See the License for the specific language governing permissions and
2965 * limitations under the License.
2966 */class R2{convertValue(e,t="none"){switch(Ko(e)){case 0:return null;case 1:return e.booleanValue;case 2:return cn(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(ji(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw Ie(62114,{value:e})}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){const r={};return al(e,((s,i)=>{r[s]=this.convertValue(i,t)})),r}convertVectorValue(e){var r,s,i;const t=(i=(s=(r=e.fields)==null?void 0:r[hd].arrayValue)==null?void 0:s.values)==null?void 0:i.map((l=>cn(l.doubleValue)));return new hs(t)}convertGeoPoint(e){return new ta(cn(e.latitude),cn(e.longitude))}convertArray(e,t){return(e.values||[]).map((r=>this.convertValue(r,t)))}convertServerTimestamp(e,t){switch(t){case"previous":const r=Fy(e);return r==null?null:this.convertValue(r,t);case"estimate":return this.convertTimestamp(rm(e));default:return null}}convertTimestamp(e){const t=Si(e);return new Dt(t.seconds,t.nanos)}convertDocumentKey(e,t){const r=ct.fromString(e);Fe(N4(r),9688,{name:e});const s=new $o(r.get(1),r.get(3)),i=new _e(r.popFirst(5));return s.isEqual(t)||jn(`Document ${i} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}/**
2967 * @license
2968 * Copyright 2024 Google LLC
2969 *
2970 * Licensed under the Apache License, Version 2.0 (the "License");
2971 * you may not use this file except in compliance with the License.
2972 * You may obtain a copy of the License at
2973 *
2974 *   http://www.apache.org/licenses/LICENSE-2.0
2975 *
2976 * Unless required by applicable law or agreed to in writing, software
2977 * distributed under the License is distributed on an "AS IS" BASIS,
2978 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2979 * See the License for the specific language governing permissions and
2980 * limitations under the License.
2981 */class cl extends R2{constructor(e){super(),this.firestore=e}convertBytes(e){return new qr(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new Ot(this.firestore,null,t)}}/**
2982 * @license
2983 * Copyright 2020 Google LLC
2984 *
2985 * Licensed under the Apache License, Version 2.0 (the "License");
2986 * you may not use this file except in compliance with the License.
2987 * You may obtain a copy of the License at
2988 *
2989 *   http://www.apache.org/licenses/LICENSE-2.0
2990 *
2991 * Unless required by applicable law or agreed to in writing, software
2992 * distributed under the License is distributed on an "AS IS" BASIS,
2993 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2994 * See the License for the specific language governing permissions and
2995 * limitations under the License.
2996 */function V$(){return new Pm("deleteField")}function F$(){return new E2("serverTimestamp")}function B$(...n){return new S2("arrayUnion",n)}function U$(...n){return new j2("arrayRemove",n)}function z$(n){return new A2("increment",n)}function q$(n){return new hs(n)}/**
2997 * @license
2998 * Copyright 2017 Google LLC
2999 *
3000 * Licensed under the Apache License, Version 2.0 (the "License");
3001 * you may not use this file except in compliance with the License.
3002 * You may obtain a copy of the License at
3003 *
3004 *   http://www.apache.org/licenses/LICENSE-2.0
3005 *
3006 * Unless required by applicable law or agreed to in writing, software
3007 * distributed under the License is distributed on an "AS IS" BASIS,
3008 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3009 * See the License for the specific language governing permissions and
3010 * limitations under the License.
3011 */function H$(n){var r;const e=hn(ut(n.firestore,Ht)),t=(r=e._onlineComponents)==null?void 0:r.datastore.serializer;return t===void 0?null:Hy(t,vr(n._query)).ft}function Y$(n,e){var i;const t=jR(e,((l,d)=>new l4(d,l.aggregateType,l._internalFieldPath))),r=hn(ut(n.firestore,Ht)),s=(i=r._onlineComponents)==null?void 0:i.datastore.serializer;return s===void 0?null:v4(s,GR(n._query),t,!0).request}const KC="@firebase/firestore",WC="4.14.0";/**
3012 * @license
3013 * Copyright 2017 Google LLC
3014 *
3015 * Licensed under the Apache License, Version 2.0 (the "License");
3016 * you may not use this file except in compliance with the License.
3017 * You may obtain a copy of the License at
3018 *
3019 *   http://www.apache.org/licenses/LICENSE-2.0
3020 *
3021 * Unless required by applicable law or agreed to in writing, software
3022 * distributed under the License is distributed on an "AS IS" BASIS,
3023 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3024 * See the License for the specific language governing permissions and
3025 * limitations under the License.
3026 */function Yu(n){return(function(t,r){if(typeof t!="object"||t===null)return!1;const s=t;for(const i of r)if(i in s&&typeof s[i]=="function")return!0;return!1})(n,["next","error","complete"])}/**
3027 * @license
3028 * Copyright 2022 Google LLC
3029 *
3030 * Licensed under the Apache License, Version 2.0 (the "License");
3031 * you may not use this file except in compliance with the License.
3032 * You may obtain a copy of the License at
3033 *
3034 *   http://www.apache.org/licenses/LICENSE-2.0
3035 *
3036 * Unless required by applicable law or agreed to in writing, software
3037 * distributed under the License is distributed on an "AS IS" BASIS,
3038 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3039 * See the License for the specific language governing permissions and
3040 * limitations under the License.
3041 */class Nd{constructor(e="count",t){this._internalFieldPath=t,this.type="AggregateField",this.aggregateType=e}}class LM{constructor(e,t,r){this._userDataWriter=t,this._data=r,this.type="AggregateQuerySnapsh
3041ot",this.query=e}data(){return this._userDataWriter.convertObjectMap(this._data)}_fieldsProto(){return new rr({mapValue:{fields:this._data}}).clone().value.mapValue.fields}}/**
3042 * @license
3043 * Copyright 2020 Google LLC
3044 *
3045 * Licensed under the Apache License, Version 2.0 (the "License");
3046 * you may not use this file except in compliance with the License.
3047 * You may obtain a copy of the License at
3048 *
3049 *   http://www.apache.org/licenses/LICENSE-2.0
3050 *
3051 * Unless required by applicable law or agreed to in writing, software
3052 * distributed under the License is distributed on an "AS IS" BASIS,
3053 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3054 * See the License for the specific language governing permissions and
3055 * limitations under the License.
3056 */class um{constructor(e,t,r,s,i){this._firestore=e,this._userDataWriter=t,this._key=r,this._document=s,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new Ot(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new G$(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){var e;return((e=this._document)==null?void 0:e.data.clone().value.mapValue.fields)??void 0}get(e){if(this._document){const t=this._document.data.field(Ai("DocumentSnapshot.get",e));if(t!==null)return this._userDataWriter.convertValue(t)}}}class G$ extends um{data(){return super.data()}}/**
3057 * @license
3058 * Copyright 2020 Google LLC
3059 *
3060 * Licensed under the Apache License, Version 2.0 (the "License");
3061 * you may not use this file except in compliance with the License.
3062 * You may obtain a copy of the License at
3063 *
3064 *   http://www.apache.org/licenses/LICENSE-2.0
3065 *
3066 * Unless required by applicable law or agreed to in writing, software
3067 * distributed under the License is distributed on an "AS IS" BASIS,
3068 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3069 * See the License for the specific language governing permissions and
3070 * limitations under the License.
3071 */function VM(n){if(n.limitType==="L"&&n.explicitOrderBy.length===0)throw new pe(ne.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class M2{}class Kd extends M2{}function FM(n,e,...t){let r=[];e instanceof M2&&r.push(e),r=r.concat(t),(function(i){const l=i.filter((h=>h instanceof Mc)).length,d=i.filter((h=>h instanceof Wd)).length;if(l>1||l>0&&d>0)throw new pe(ne.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")})(r);for(const s of r)n=s._apply(n);return n}class Wd extends Kd{constructor(e,t,r){super(),this._field=e,this._op=t,this._value=r,this.type="where"}static _create(e,t,r){return new Wd(e,t,r)}_apply(e){const t=this._parse(e);return zM(e._query,t),new Qn(e.firestore,e.converter,d1(e._query,t))}_parse(e){const t=Ic(e.firestore);return(function(i,l,d,h,m,g,p){let b;if(m.isKeyField()){if(g==="array-contains"||g==="array-contains-any")throw new pe(ne.INVALID_ARGUMENT,`Invalid Query. You can't perform '${g}' queries on documentId().`);if(g==="in"||g==="not-in"){XC(p,g);const _=[];for(const N of p)_.push(QC(h,i,N));b={arrayValue:{values:_}}}else b=QC(h,i,p)}else g!=="in"&&g!=="not-in"&&g!=="array-contains-any"||XC(p,g),b=RM(d,l,p,g==="in"||g==="not-in");return bt.create(m,g,b)})(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value)}}function $$(n,e,t){const r=e,s=Ai("where",n);return Wd._create(s,r,t)}class Mc extends M2{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new Mc(e,t)}_parse(e){const t=this._queryConstraints.map((r=>r._parse(e))).filter((r=>r.getFilters().length>0));return t.length===1?t[0]:Pt.create(t,this._getOperator())}_apply(e){const t=this._parse(e);return t.getFilters().length===0?e:((function(s,i){let l=s;const d=i.getFlattenedFilters();for(const h of d)zM(l,h),l=d1(l,h)})(e._query,t),new Qn(e.firestore,e.converter,d1(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}
3071function K$(...n){return n.forEach((e=>qM("or",e))),Mc._create("or",n)}function W$(...n){return n.forEach((e=>qM("and",e))),Mc._create("and",n)}class tx extends Kd{constructor(e,t){super(),this._field=e,this._direction=t,this.type="orderBy"}static _create(e,t){return new tx(e,t)}_apply(e){const t=(function(s,i,l){if(s.startAt!==null)throw new pe(ne.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(s.endAt!==null)throw new pe(ne.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new om(i,l)})(e._query,this._field,this._direction);return new Qn(e.firestore,e.converter,WH(e._query,t))}}function Q$(n,e="asc"){const t=e,r=Ai("orderBy",n);return tx._create(r,t)}class Om extends Kd{constructor(e,t,r){super(),this.type=e,this._limit=t,this._limitType=r}static _create(e,t,r){return new Om(e,t,r)}_apply(e){return new Qn(e.firestore,e.converter,H0(e._query,this._limit,this._limitType))}}function BM(n){return uR("limit",n),Om._create("limit",n,"F")}function X$(n){return uR("limitToLast",n),Om._create("limitToLast",n,"L")}class Lm extends Kd{constructor(e,t,r){super(),this.type=e,this._docOrFields=t,this._inclusive=r}static _create(e,t,r){return new Lm(e,t,r)}_apply(e){const t=UM(e,this.type,this._docOrFields,this._inclusive);return new Qn(e.firestore,e.converter,QH(e._query,t))}}function J$(...n){return Lm._create("startAt",n,!0)}function Z$(...n){return Lm._create("startAfter",n,!1)}class Vm extends Kd{constructor(e,t,r){super(),this.type=e,this._docOrFields=t,this._inclusive=r}static _create(e,t,r){return new Vm(e,t,r)}_apply(e){const t=UM(e,this.type,this._docOrFields,this._inclusive);return new Qn(e.firestore,e.converter,XH(e._query,t))}}function eK(...n){return Vm._create("endBefore",n,!1)}function tK(...n){return Vm._create("endAt",n,!0)}function UM(n,e,t,r){if(t[0]=an(t[0]),t[0]instanceof um)return(function(i,l,d,h,m){if(!h)throw new pe(ne.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${d}().`);const g=[];for(const p of qu(i))if(p.field.isKeyField())g.push(gc(l,h.key));else{const b=h.data.field(p.field);if(Vy(b))throw new pe(ne.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+p.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(b===null){const w=p.field.canonicalString();throw new pe(ne.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${w}' (used as the orderBy) does not exist.`)}g.push(b)}return new Qo(g,m)})(n._query,n.firestore._databaseId,e,t[0]._document,r);{const s=Ic(n.firestore);return(function(l,d,h,m,g,p){const b=l.explicitOrderBy;if(g.length>b.length)throw new pe(ne.INVALID_ARGUMENT,`Too many arguments provided to ${m}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const w=[];for(let _=0;_<g.length;_++){const N=g[_];if(b[_].field.isKeyField()){if(typeof N!="string")throw new pe(ne.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${m}(), but got a ${typeof N}`);if(!U_(l)&&N.indexOf("/")!==-1)throw new pe(ne.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${m}() must be a plain document ID, but '${N}' contains a slash.`);const E=l.path.child(ct.fromString(N));if(!_e.isDocumentKey(E))throw new pe(ne.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${m}() must result in a valid document path, but '${E}' is not because it contains an odd number of segments.`);const j=new _e(E);w.push(gc(d,j))}else{const E=RM(h,m,N);w.push(E)}}return new Qo(w,p)})(n._query,n.firestore._databaseId,s,e,t,r)}}function QC(n,e,t){if(typeof(t=an(t))=="string"){if(t==="")throw new pe(ne.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!U_(e)&&t.indexOf("/")!==-1)throw new pe(ne.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${t}' contains a '/' character.`);const r=e.path.child(ct.fromString(t));if(!_e.isDocumentKey(r))throw new pe(ne.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return gc(n,new _e(r))}if(t instanceof Ot)return gc(n,t._key);throw new pe(ne.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Ry(t)}.`)}function XC(n,e){if(!Array.isArray(n)||n.length===0)throw new pe(ne.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function zM(n,e){const t=(function(s,i){for(const l of s)for(const d of l.getFlattenedFilters())if(i.indexOf(d.op)>=0)return d.op;return null})(n.filters,(function(s){switch(s){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}})(e.op));if(t!==null)throw t===e.op?new pe(ne.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new pe(ne.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${t.toString()}' filters.`)}function qM(n,e){if(!(e instanceof Wd||e instanceof Mc))throw new pe(ne.INVALID_ARGUMENT,`Function ${n}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`)}function nx(n,e,t){let r;return r=n?t&&(t.merge||t.mergeFields)?n.toFirestore(e,t):n.toFirestore(e):e,r}class P2 extends R2{constructor(e){super(),this.firestore=e}convertBytes(e){return new qr(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);
3071return new Ot(this.firestore,null,t)}}/**
3072 * @license
3073 * Copyright 2022 Google LLC
3074 *
3075 * Licensed under the Apache License, Version 2.0 (the "License");
3076 * you may not use this file except in compliance with the License.
3077 * You may obtain a copy of the License at
3078 *
3079 *   http://www.apache.org/licenses/LICENSE-2.0
3080 *
3081 * Unless required by applicable law or agreed to in writing, software
3082 * distributed under the License is distributed on an "AS IS" BASIS,
3083 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3084 * See the License for the specific language governing permissions and
3085 * limitations under the License.
3086 */function nK(n){return new Nd("sum",Ai("sum",n))}function rK(n){return new Nd("avg",Ai("average",n))}function HM(){return new Nd("count")}function sK(n,e){var t,r;return n instanceof Nd&&e instanceof Nd&&n.aggregateType===e.aggregateType&&((t=n._internalFieldPath)==null?void 0:t.canonicalString())===((r=e._internalFieldPath)==null?void 0:r.canonicalString())}function aK(n,e){return N2(n.query,e.query)&&aa(n.data(),e.data())}/**
3087 * @license
3088 * Copyright 2022 Google LLC
3089 *
3090 * Licensed under the Apache License, Version 2.0 (the "License");
3091 * you may not use this file except in compliance with the License.
3092 * You may obtain a copy of the License at
3093 *
3094 *   http://www.apache.org/licenses/LICENSE-2.0
3095 *
3096 * Unless required by applicable law or agreed to in writing, software
3097 * distributed under the License is distributed on an "AS IS" BASIS,
3098 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3099 * See the License for the specific language governing permissions and
3100 * limitations under the License.
3101 */function iK(n){return YM(n,{count:HM()})}function YM(n,e){const t=ut(n.firestore,Ht),r=hn(t),s=jR(e,((i,l)=>new l4(l,i.aggregateType,i._internalFieldPath)));return d$(r,n._query,s).then((i=>(function(d,h,m){const g=new cl(d);return new LM(h,g,m)})(t,n,i)))}class oK{constructor(e){this.kind="memory",this._onlineComponentProvider=Jo.provider,this._offlineComponentProvider=e!=null&&e.garbageCollector?e.garbageCollector._offlineComponentProvider:{build:()=>new v2(void 0)}}toJSON(){return{kind:this.kind}}}class lK{constructor(e){let t;this.kind="persistent",e!=null&&e.tabManager?(e.tabManager._initialize(e),t=e.tabManager):(t=GM(void 0),t._initialize(e)),this._onlineComponentProvider=t._onlineComponentProvider,this._offlineComponentProvider=t._offlineComponentProvider}toJSON(){return{kind:this.kind}}}class cK{constructor(){this.kind="memoryEager",this._offlineComponentProvider=_d.provider}toJSON(){return{kind:this.kind}}}class uK{constructor(e){this.kind="memoryLru",this._offlineComponentProvider={build:()=>new v2(e)}}toJSON(){return{kind:this.kind}}}function dK(){return new cK}function hK(n){return new uK(n==null?void 0:n.cacheSizeBytes)}function fK(n){return new oK(n)}function mK(n){return new lK(n)}class pK{constructor(e){this.forceOwnership=e,this.kind="persistentSingleTab"}toJSON(){return{kind:this.kind}}_initialize(e){this._onlineComponentProvider=Jo.provider,this._offlineComponentProvider={build:t=>new w2(t,e==null?void 0:e.cacheSizeBytes,this.forceOwnership)}}}class gK{constructor(){this.kind="PersistentMultipleTab"}toJSON(){return{kind:this.kind}}_initialize(e){this._onlineComponentProvider=Jo.provider,this._offlineComponentProvider={build:t=>new pM(t,e==null?void 0:e.cacheSizeBytes)}}}function GM(n){return new pK(n==null?void 0:n.forceOwnership)}function yK(){return new gK}/**
3102 * @license
3103 * Copyright 2025 Google LLC
3104 *
3105 * Licensed under the Apache License, Version 2.0 (the "License");
3106 * you may not use this file except in compliance with the License.
3107 * You may obtain a copy of the License at
3108 *
3109 *   http://www.apache.org/licenses/LICENSE-2.0
3110 *
3111 * Unless required by applicable law or agreed to in writing, software
3112 * distributed under the License is distributed on an "AS IS" BASIS,
3113 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3114 * See the License for the specific language governing permissions and
3115 * limitations under the License.
3116 *//**
3117 * @license
3118 * Copyright 2020 Google LLC
3119 *
3120 * Licensed under the Apache License, Version 2.0 (the "License");
3121 * you may not use this file except in compliance with the License.
3122 * You may obtain a copy of the License at
3123 *
3124 *   http://www.apache.org/licenses/LICENSE-2.0
3125 *
3126 * Unless required by applicable law or agreed to in writing, software
3127 * distributed under the License is distributed on an "AS IS" BASIS,
3128 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3129 * See the License for the specific language governing permissions and
3130 * limitations under the License.
3131 */const $M="NOT SUPPORTED";class yi{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Qr extends um{constructor(e,t,r,s,i,l){super(e,t,r,s,l),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Ff(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const r=this._document.data.field(Ai("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new pe(ne.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,t={};return t.type=Qr._jsonSchemaVersion,t.bundle="",t.bundleSource="DocumentSnapshot",t.bundleName=this._key.toString(),!e||!e.isValidDocument()||!e.isFoundDocument()?t:(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),t.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),t)}}function xK(n,e,t){if(Cc(e,Qr._jsonSchema)){if(e.bundle===$M)throw new pe(ne.INVALID_ARGUMENT,"The provided JSON object was created in a client environment, which is not supported.");const r=Dc(n._databaseId),s=wM(e.bundle,r),i=s.Qu(),l=new m2(s.getMetadata(),r);for(const g of i)l.Ga(g);const d=l.documents;if(d.length!==1)throw new pe(ne.INVALID_ARGUMENT,`Expected bundle data to contain 1 document, but it contains ${d.length} documents.`);const h=qy(r,d[0].document),m=new _e(ct.fromString(e.bundleName));return new Qr(n,new P2(n),m,h,new yi(!1,!1),t||null)}}Qr._jsonSchemaVersion="firestore/documentSnapshot/1.0",Qr._jsonSchema={type:zn("string",Qr._jsonSchemaVersion),bundleSource:zn("string","DocumentSnapshot"),bundleName:zn("string"),bundle:zn("string")};class Ff extends Qr{data(e={}){return super.data(e)}}class Xr{constructor(e,t,r,s){this._firestore=e,this._userDataWriter=t,this._snapshot=s,this.metadata=new yi(s.hasPendingWrites,s.fromCache),this.query=r}get docs(){const e=[];return this.forEach((t=>e.push(t))),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,t){this._snapshot.docs.forEach((r=>{e.call(t,new Ff(this._firestore,this._userDataWriter,r.key,r,new yi(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new pe(ne.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=(function(s,i){if(s._snapshot.oldDocs.isEmpty()){let l=0;return s._snapshot.docChanges.map((d=>{const h=new Ff(s._firestore,s._userDataWriter,d.doc.key,d.doc,new yi(s._snapshot.mutatedKeys.has(d.doc.key),s._snapshot.fromCache),s.query.converter);return d.doc,{type:"added",doc:h,oldIndex:-1,newIndex:l++}}))}{let l=s._snapshot.oldDocs;return s._snapshot.docChanges.filter((d=>i||d.type!==3)).map((d=>{const h=new Ff(s._firestore,s._userDataWriter,d.doc.key,d.doc,new yi(s._snapshot.mutatedKeys.has(d.doc.key),s._snapshot.fromCache),s.query.converter);let m=-1,g=-1;return d.type!==0&&(m=l.indexOf(d.doc.key),l=l.delete(d.doc.key)),d.type!==1&&(l=l.add(d.doc),g=l.indexOf(d.doc.key)),{type:vK(d.type),doc:h,oldIndex:m,newIndex:g}}))}})(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new pe(ne.FAILED_PRECONDITION,"QuerySnapsh
3131ot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=Xr._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=Iy.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const t=[],r=[],s=[];return this.docs.forEach((i=>{i._document!==null&&(t.push(i._document),r.push(this._userDataWriter.convertObjectMap(i._document.data.value.mapValue.fields,"previous")),s.push(i.ref.path))})),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function bK(n,e,t){if(Cc(e,Xr._jsonSchema)){if(e.bundle===$M)throw new pe(ne.INVALID_ARGUMENT,"The provided JSON object was created in a client environment, which is not supported.");const r=Dc(n._databaseId),s=wM(e.bundle,r),i=s.Qu(),l=new m2(s.getMetadata(),r);for(const b of i)l.Ga(b);if(l.queries.length!==1)throw new pe(ne.INVALID_ARGUMENT,`Snapshot data expected 1 query but found ${l.queries.length} queries.`);const d=Yy(l.queries[0].bundledQuery),h=l.documents;let m=new uc;h.map((b=>{const w=qy(r,b.document);m=m.add(w)}));const g=Nc.fromInitialDocuments(d,m,nt(),!1,!1),p=new Qn(n,t||null,d);return new Xr(n,new P2(n),p,g)}}function vK(n){switch(n){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Ie(61501,{type:n})}}function wK(n,e){return n instanceof Qr&&e instanceof Qr?n._firestore===e._firestore&&n._key.isEqual(e._key)&&(n._document===null?e._document===null:n._document.isEqual(e._document))&&n._converter===e._converter:n instanceof Xr&&e instanceof Xr&&n._firestore===e._firestore&&N2(n.query,e.query)&&n.metadata.isEqual(e.metadata)&&n._snapshot.isEqual(e._snapshot)}/**
3132 * @license
3133 * Copyright 2022 Google LLC
3134 *
3135 * Licensed under the Apache License, Version 2.0 (the "License");
3136 * you may not use this file except in compliance with the License.
3137 * You may obtain a copy of the License at
3138 *
3139 *   http://www.apache.org/licenses/LICENSE-2.0
3140 *
3141 * Unless required by applicable law or agreed to in writing, software
3142 * distributed under the License is distributed on an "AS IS" BASIS,
3143 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3144 * See the License for the specific language governing permissions and
3145 * limitations under the License.
3146 */Xr._jsonSchemaVersion="firestore/querySnapshot/1.0",Xr._jsonSchema={type:zn("string",Xr._jsonSchemaVersion),bundleSource:zn("string","QuerySnapshot"),bundleName:zn("string"),bundle:zn("string")};const _K={maxAttempts:5};/**
3147 * @license
3148 * Copyright 2020 Google LLC
3149 *
3150 * Licensed under the Apache License, Version 2.0 (the "License");
3151 * you may not use this file except in compliance with the License.
3152 * You may obtain a copy of the License at
3153 *
3154 *   http://www.apache.org/licenses/LICENSE-2.0
3155 *
3156 * Unless required by applicable law or agreed to in writing, software
3157 * distributed under the License is distributed on an "AS IS" BASIS,
3158 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3159 * See the License for the specific language governing permissions and
3160 * limitations under the License.
3161 */class KM{constructor(e,t){this._firestore=e,this._commitHandler=t,this._mutations=[],this._committed=!1,this._dataReader=Ic(e)}set(e,t,r){this._verifyNotCommitted();const s=Ro(e,this._firestore),i=nx(s.converter,t,r),l=ex(this._dataReader,"WriteBatch.set",s._key,i,s.converter!==null,r);return this._mutations.push(l.toMutation(s._key,un.none())),this}update(e,t,r,...s){this._verifyNotCommitted();const i=Ro(e,this._firestore);let l;return l=typeof(t=an(t))=="string"||t instanceof kc?D2(this._dataReader,"WriteBatch.update",i._key,t,r,s):C2(this._dataReader,"WriteBatch.update",i._key,t),this._mutations.push(l.toMutation(i._key,un.exists(!0))),this}delete(e){this._verifyNotCommitted();const t=Ro(e,this._firestore);return this._mutations=this._mutations.concat(new zd(t._key,un.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new pe(ne.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function Ro(n,e){if((n=an(n)).firestore!==e)throw new pe(ne.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return n}/**
3162 * @license
3163 * Copyright 2020 Google LLC
3164 *
3165 * Licensed under the Apache License, Version 2.0 (the "License");
3166 * you may not use this file except in compliance with the License.
3167 * You may obtain a copy of the License at
3168 *
3169 *   http://www.apache.org/licenses/LICENSE-2.0
3170 *
3171 * Unless required by applicable law or agreed to in writing, software
3172 * distributed under the License is distributed on an "AS IS" BASIS,
3173 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3174 * See the License for the specific language governing permissions and
3175 * limitations under the License.
3176 */class TK{constructor(e,t){this._firestore=e,this._transaction=t,this._dataReader=Ic(e)}get(e){const t=Ro(e,this._firestore),r=new P2(this._firestore);return this._transaction.lookup([t._key]).then((s=>{if(!s||s.length!==1)return Ie(24041);const i=s[0];if(i.isFoundDocument())return new um(this._firestore,r,i.key,i,t.converter);if(i.isNoDocument())return new um(this._firestore,r,t._key,null,t.converter);throw Ie(18433,{doc:i})}))}set(e,t,r){const s=Ro(e,this._firestore),i=nx(s.converter,t,r),l=ex(this._dataReader,"Transaction.set",s._key,i,s.converter!==null,r);return this._transaction.set(s._key,l),this}update(e,t,r,...s){const i=Ro(e,this._firestore);let l;return l=typeof(t=an(t))=="string"||t instanceof kc?D2(this._dataReader,"Transaction.update",i._key,t,r,s):C2(this._dataReader,"Transaction.update",i._key,t),this._transaction.update(i._key,l),this}delete(e){const t=Ro(e,this._firestore);return this._transaction.delete(t._key),this}}/**
3177 * @license
3178 * Copyright 2020 Google LLC
3179 *
3180 * Licensed under the Apache License, Version 2.0 (the "License");
3181 * you may not use this file except in compliance with the License.
3182 * You may obtain a copy of the License at
3183 *
3184 *   http://www.apache.org/licenses/LICENSE-2.0
3185 *
3186 * Unless required by applicable law or agreed to in writing, software
3187 * distributed under the License is distributed on an "AS IS" BASIS,
3188 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3189 * See the License for the specific language governing permissions and
3190 * limitations under the License.
3191 */class WM extends TK{constructor(e,t){super(e,t),this._firestore=e}get(e){const t=Ro(e,this._firestore),r=new cl(this._firestore);return super.get(e).then((s=>new Qr(this._firestore,r,t._key,s._document,new yi(!1,!1),t.converter)))}}function NK(n,e,t){n=ut(n,Ht);const r={..._K,...t};(function(l){if(l.maxAttempts<1)throw new pe(ne.INVALID_ARGUMENT,"Max attempts must be at least 1")})(r);const s=hn(n);return m$(s,(i=>e(new WM(n,i))),r)}/**
3192 * @license
3193 * Copyright 2020 Google LLC
3194 *
3195 * Licensed under the Apache License, Version 2.0 (the "License");
3196 * you may not use this file except in compliance with the License.
3197 * You may obtain a copy of the License at
3198 *
3199 *   http://www.apache.org/licenses/LICENSE-2.0
3200 *
3201 * Unless required by applicable law or agreed to in writing, software
3202 * distributed under the License is distributed on an "AS IS" BASIS,
3203 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3204 * See the License for the specific language governing permissions and
3205 * limitations under the License.
3206 */function mn(n){n=ut(n,Ot);const e=ut(n.firestore,Ht),t=hn(e);return bM(t,n._key).then((r=>L2(e,n,r)))}function EK(n){n=ut(n,Ot);const e=ut(n.firestore,Ht),t=hn(e),r=new cl(e);return c$(t,n._key).then((s=>new Qr(e,r,n._key,s,new yi(s!==null&&s.hasLocalMutations,!0),n.converter)))}function SK(n){n=ut(n,Ot);const e=ut(n.firestore,Ht),t=hn(e);return bM(t,n._key,{source:"server"}).then((r=>L2(e,n,r)))}function ey(n){n=ut(n,Qn);const e=ut(n.firestore,Ht),t=hn(e),r=new cl(e);return VM(n._query),vM(t,n._query).then((s=>new Xr(e,r,n,s)))}function jK(n){n=ut(n,Qn);const e=ut(n.firestore,Ht),t=hn(e),r=new cl(e);return u$(t,n._query).then((s=>new Xr(e,r,n,s)))}function AK(n){n=ut(n,Qn);const e=ut(n.firestore,Ht),t=hn(e),r=new cl(e);return vM(t,n._query,{source:"server"}).then((s=>new Xr(e,r,n,s)))}function O2(n,e,t){n=ut(n,Ot);const r=ut(n.firestore,Ht),s=nx(n.converter,e,t),i=Ic(r);return Qd(r,[ex(i,"setDoc",n._key,s,n.converter!==null,t).toMutation(n._key,un.none())])}function QM(n,e,t,...r){n=ut(n,Ot);const s=ut(n.firestore,Ht),i=Ic(s);let l;return l=typeof(e=an(e))=="string"||e instanceof kc?D2(i,"updateDoc",n._key,e,t,r):C2(i,"updateDoc",n._key,e),Qd(s,[l.toMutation(n._key,un.exists(!0))])}function XM(n){return Qd(ut(n.firestore,Ht),[new zd(n._key,un.none())])}function i0(n,e){const t=ut(n.firestore,Ht),r=qt(n),s=nx(n.converter,e),i=Ic(n.firestore);return Qd(t,[ex(i,"addDoc",r._key,s,n.converter!==null,{}).toMutation(r._key,un.exists(!1))]).then((()=>r))}function ty(n,...e){var m,g,p;n=an(n);let t={includeMetadataChanges:!1,source:"default"},r=0;typeof e[r]!="object"||Yu(e[r])||(t=e[r++]);const s={includeMetadataChanges:t.includeMetadataChanges,source:t.source};if(Yu(e[r])){const b=e[r];e[r]=(m=b.next)==null?void 0:m.bind(b),e[r+1]=(g=b.error)==null?void 0:g.bind(b),e[r+2]=(p=b.complete)==null?void 0:p.bind(b)}let i,l,d;if(n instanceof Ot)l=ut(n.firestore,Ht),d=Bd(n._key.path),i={next:b=>{e[r]&&e[r](L2(l,n,b))},error:e[r+1],complete:e[r+2]};else{const b=ut(n,Qn);l=ut(b.firestore,Ht),d=b._query;const w=new cl(l);i={next:_=>{e[r]&&e[r](new Xr(l,w,b,_))},error:e[r+1],complete:e[r+2]},VM(n._query)}const h=hn(l);return l$(h,d,s,i)}function CK(n,e,...t){const r=an(n),s=(function(h){const m={bundle:"",bundleName:"",bundleSource:""},g=["bundle","bundleName","bundleSource"];for(const p of g){if(!(p in h)){m.error=`snapshotJson missing required field: ${p}`;break}const b=h[p];if(typeof b!="string"){m.error=`snapshotJson field '${p}' must be a string.`;break}if(b.length===0){m.error=`snapshotJson field '${p}' cannot be an empty string.`;break}p==="bundle"?m.bundle=b:p==="bundleName"?m.bundleName=b:p==="bundleSource"&&(m.bundleSource=b)}return m})(e);if(s.error)throw new pe(ne.INVALID_ARGUMENT,s.error);let i,l=0;if(typeof t[l]!="object"||Yu(t[l])||(i=t[l++]),s.bundleSource==="QuerySnapsh
3206ot"){let d=null;if(typeof t[l]=="object"&&Yu(t[l])){const h=t[l++];d={next:h.next,error:h.error,complete:h.complete}}else d={next:t[l++],error:t[l++],complete:t[l++]};return(function(m,g,p,b,w){let _,N=!1;return N1(m,g.bundle).then((()=>CM(m,g.bundleName))).then((j=>{j&&!N&&(w&&j.withConverter(w),_=ty(j,p||{},b))})).catch((j=>(b.error&&b.error(j),()=>{}))),()=>{N||(N=!0,_&&_())}})(r,s,i,d,t[l])}if(s.bundleSource==="DocumentSnapshot"){let d=null;if(typeof t[l]=="object"&&Yu(t[l])){const h=t[l++];d={next:h.next,error:h.error,complete:h.complete}}else d={next:t[l++],error:t[l++],complete:t[l++]};return(function(m,g,p,b,w){let _,N=!1;return N1(m,g.bundle).then((()=>{if(!N){const j=new Ot(m,w||null,_e.fromPath(g.bundleName));_=ty(j,p||{},b)}})).catch((j=>(b.error&&b.error(j),()=>{}))),()=>{N||(N=!0,_&&_())}})(r,s,i,d,t[l])}throw new pe(ne.INVALID_ARGUMENT,`unsupported bundle source: ${s.bundleSource}`)}function DK(n,e){n=ut(n,Ht);const t=hn(n),r=Yu(e)?e:{next:e};return f$(t,r)}function Qd(n,e){const t=hn(n);return h$(t,e)}function L2(n,e,t){const r=t.docs.get(e._key),s=new cl(n);return new Qr(n,s,e._key,r,new yi(t.hasPendingWrites,t.fromCache),e.converter)}function V2(n){return n=ut(n,Ht),hn(n),new KM(n,(e=>Qd(n,e)))}/**
3207 * @license
3208 * Copyright 2021 Google LLC
3209 *
3210 * Licensed under the Apache License, Version 2.0 (the "License");
3211 * you may not use this file except in compliance with the License.
3212 * You may obtain a copy of the License at
3213 *
3214 *   http://www.apache.org/licenses/LICENSE-2.0
3215 *
3216 * Unless required by applicable law or agreed to in writing, software
3217 * distributed under the License is distributed on an "AS IS" BASIS,
3218 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3219 * See the License for the specific language governing permissions and
3220 * limitations under the License.
3221 */function kK(n,e){n=ut(n,Ht);const t=hn(n);if(!t._uninitializedComponentsProvider||t._uninitializedComponentsProvider._offline.kind==="memory")return Zr("Cannot enable indexes when persistence is disabled"),Promise.resolve();const r=(function(i){const l=typeof i=="string"?(function(m){try{return JSON.parse(m)}catch(g){throw new pe(ne.INVALID_ARGUMENT,"Failed to parse JSON: "+(g==null?void 0:g.message))}})(i):i,d=[];if(Array.isArray(l.indexes))for(const h of l.indexes){const m=JC(h,"collectionGroup"),g=[];if(Array.isArray(h.fields))for(const p of h.fields){const b=JC(p,"fieldPath"),w=I2("setIndexConfiguration",b);p.arrayConfig==="CONTAINS"?g.push(new lc(w,2)):p.order==="ASCENDING"?g.push(new lc(w,0)):p.order==="DESCENDING"&&g.push(new lc(w,1))}d.push(new id(id.UNKNOWN_ID,m,g,od.empty()))}return d})(e);return y$(t,r)}function JC(n,e){if(typeof n[e]!="string")throw new pe(ne.INVALID_ARGUMENT,"Missing string value for: "+e);return n[e]}/**
3222 * @license
3223 * Copyright 2023 Google LLC
3224 *
3225 * Licensed under the Apache License, Version 2.0 (the "License");
3226 * you may not use this file except in compliance with the License.
3227 * You may obtain a copy of the License at
3228 *
3229 *   http://www.apache.org/licenses/LICENSE-2.0
3230 *
3231 * Unless required by applicable law or agreed to in writing, software
3232 * distributed under the License is distributed on an "AS IS" BASIS,
3233 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3234 * See the License for the specific language governing permissions and
3235 * limitations under the License.
3236 */class JM{constructor(e){this._firestore=e,this.type="PersistentCacheIndexManager"}}function IK(n){var s;n=ut(n,Ht);const e=ZC.get(n);if(e)return e;if(((s=hn(n)._uninitializedComponentsProvider)==null?void 0:s._offline.kind)!=="persistent")return null;const r=new JM(n);return ZC.set(n,r),r}function RK(n){ZM(n,!0)}function MK(n){ZM(n,!1)}function PK(n){const e=hn(n._firestore);b$(e).then((t=>xe("deleting all persistent cache indexes succeeded"))).catch((t=>Zr("deleting all persistent cache indexes failed",t)))}function ZM(n,e){const t=hn(n._firestore);x$(t,e).then((r=>xe(`setting persistent cache index auto creation isEnabled=${e} succeeded`))).catch((r=>Zr(`setting persistent cache index auto creation isEnabled=${e} failed`,r)))}const ZC=new WeakMap;/**
3237 * @license
3238 * Copyright 2023 Google LLC
3239 *
3240 * Licensed under the Apache License, Version 2.0 (the "License");
3241 * you may not use this file except in compliance with the License.
3242 * You may obtain a copy of the License at
3243 *
3244 *   http://www.apache.org/licenses/LICENSE-2.0
3245 *
3246 * Unless required by applicable law or agreed to in writing, software
3247 * distributed under the License is distributed on an "AS IS" BASIS,
3248 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3249 * See the License for the specific language governing permissions and
3250 * limitations under the License.
3251 */class OK{constructor(){throw new Error("instances of this class should not be created")}static onExistenceFilterMismatch(e){return F2.instance.onExistenceFilterMismatch(e)}}class F2{constructor(){this.t=new Map}static get instance(){return Ag||(Ag=new F2,uY(Ag)),Ag}o(e){this.t.forEach((t=>t(e)))}onExistenceFilterMismatch(e){const t=Symbol(),r=this.t;return r.set(t,e),()=>r.delete(t)}}let Ag=null;(function(e,t=!0){qq(Vd),rd(new pc("firestore",((r,{instanceIdentifier:s,options:i})=>{const l=r.getProvider("app").getImmediate(),d=new Ht(new $q(r.getProvider("auth-internal")),new Qq(l,r.getProvider("app-check-internal")),LH(l,s),l);return i={useFetchStreams:t,...i},d._setSettings(i),d}),"PUBLIC").setMultipleInstances(!0)),Lo(KC,WC,e),Lo(KC,WC,"esm2020")})();const uf=Object.freeze(Object.defineProperty({__proto__:null,AbstractUserDataWriter:R2,AggregateField:Nd,AggregateQuerySnapshot:LM,Bytes:qr,CACHE_SIZE_UNLIMITED:N$,CollectionReference:ea,DocumentReference:Ot,DocumentSnapshot:Qr,FieldPath:kc,FieldValue:ll,Firestore:Ht,FirestoreError:pe,GeoPoint:ta,LoadBundleTask:EM,PersistentCacheIndexManager:JM,Query:Qn,QueryCompositeFilterConstraint:Mc,QueryConstraint:Kd,QueryDocumentSnapshot:Ff,QueryEndAtConstraint:Vm,QueryFieldFilterConstraint:Wd,QueryLimitConstraint:Om,QueryOrderByConstraint:tx,QuerySnapshot:Xr,QueryStartAtConstraint:Lm,SnapshotMetadata:yi,Timestamp:Dt,Transaction:WM,VectorValue:hs,WriteBatch:KM,_AutoId:Iy,_ByteString:pn,_DatabaseId:$o,_DocumentKey:_e,_EmptyAppCheckTokenProvider:Xq,_EmptyAuthCredentialsProvider:iR,_FieldPath:rn,_TestingHooks:OK,_cast:ut,_debugAssert:Yq,_internalAggregationQueryToProtoRunAggregationQueryRequest:Y$,_internalQueryToProtoQueryTarget:H$,_isBase64Available:MH,_logWarn:Zr,_validateIsNotUsedTogether:lR,addDoc:i0,aggregateFieldEqual:sK,aggregateQuerySnapshotEqual:aK,and:W$,arrayRemove:U$,arrayUnion:B$,average:rK,clearIndexedDbPersistence:A$,collection:dc,collectionGroup:_$,connectFirestoreEmulator:NM,count:HM,deleteAllPersistentCacheIndexes:PK,deleteDoc:XM,deleteField:V$,disableNetwork:k$,disablePersistentCacheIndexAutoCreation:MK,doc:qt,documentId:R$,documentSnapshotFromJSON:xK,enableIndexedDbPersistence:S$,enableMultiTabIndexedDbPersistence:j$,enableNetwork:D$,enablePersistentCacheIndexAutoCreation:RK,endAt:tK,endBefore:eK,ensureFirestoreConfigured:hn,executeWrite:Qd,getAggregateFromServer:YM,getCountFromServer:iK,getDoc:mn,getDocFromCache:EK,getDocFromServer:SK,getDocs:ey,getDocsFromCache:jK,getDocsFromServer:AK,getFirestore:SM,getPersistentCacheIndexManager:IK,increment:z$,initializeFirestore:E$,limit:BM,limitToLast:X$,loadBundle:N1,memoryEagerGarbageCollector:dK,memoryLocalCache:fK,memoryLruGarbageCollector:hK,namedQuery:CM,onSnapshot:ty,onSnapshotResume:CK,onSnapshotsInSync:DK,or:K$,orderBy:Q$,persistentLocalCache:mK,persistentMultipleTabManager:yK,persistentSingleTabManager:GM,query:FM,queryEqual:N2,querySnapshotFromJSON:bK,refEqual:T$,runTransaction:NK,serverTimestamp:F$,setDoc:O2,setIndexConfiguration:kK,setLogLevel:Hq,snapshotEqual:wK,startAfter:Z$,startAt:J$,sum:nK,terminate:I$,updateDoc:QM,vector:q$,waitForPendingWrites:C$,where:$$,writeBatch:V2},Symbol.toStringTag,{value:"Module"}));var LK="firebase",VK="12.12.0";/**
3252 * @license
3253 * Copyright 2020 Google LLC
3254 *
3255 * Licensed under the Apache License, Version 2.0 (the "License");
3256 * you may not use this file except in compliance with the License.
3257 * You may obtain a copy of the License at
3258 *
3259 *   http://www.apache.org/licenses/LICENSE-2.0
3260 *
3261 * Unless required by applicable law or agreed to in writing, software
3262 * distributed under the License is distributed on an "AS IS" BASIS,
3263 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3264 * See the License for the specific language governing permissions and
3265 * limitations under the License.
3266 */Lo(LK,VK,"app");function e3(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}
3266const FK=e3,t3=new _m("auth","Firebase",e3());/**
3267 * @license
3268 * Copyright 2020 Google LLC
3269 *
3270 * Licensed under the Apache License, Version 2.0 (the "License");
3271 * you may not use this file except in compliance with the License.
3272 * You may obtain a copy of the License at
3273 *
3274 *   http://www.apache.org/licenses/LICENSE-2.0
3275 *
3276 * Unless required by applicable law or agreed to in writing, software
3277 * distributed under the License is distributed on an "AS IS" BASIS,
3278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3279 * See the License for the specific language governing permissions and
3280 * limitations under the License.
3281 */const ny=new A_("@firebase/auth");function BK(n,...e){ny.logLevel<=xt.WARN&&ny.warn(`Auth (${Vd}): ${n}`,...e)}function o0(n,...e){ny.logLevel<=xt.ERROR&&ny.error(`Auth (${Vd}): ${n}`,...e)}/**
3282 * @license
3283 * Copyright 2020 Google LLC
3284 *
3285 * Licensed under the Apache License, Version 2.0 (the "License");
3286 * you may not use this file except in compliance with the License.
3287 * You may obtain a copy of the License at
3288 *
3289 *   http://www.apache.org/licenses/LICENSE-2.0
3290 *
3291 * Unless required by applicable law or agreed to in writing, software
3292 * distributed under the License is distributed on an "AS IS" BASIS,
3293 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3294 * See the License for the specific language governing permissions and
3295 * limitations under the License.
3296 */function Ci(n,...e){throw B2(n,...e)}function za(n,...e){return B2(n,...e)}function n3(n,e,t){const r={...FK(),[e]:t};return new _m("auth","Firebase",r).create(e,{appName:n.name})}function Bo(n){return n3(n,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function B2(n,...e){if(typeof n!="string"){const t=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=n.name),n._errorFactory.create(t,...r)}return t3.create(n,...e)}function Ze(n,e,...t){if(!n)throw B2(e,...t)}function xi(n){const e="INTERNAL ASSERTION FAILED: "+n;throw o0(e),new Error(e)}function Di(n,e){n||xi(e)}/**
3297 * @license
3298 * Copyright 2020 Google LLC
3299 *
3300 * Licensed under the Apache License, Version 2.0 (the "License");
3301 * you may not use this file except in compliance with the License.
3302 * You may obtain a copy of the License at
3303 *
3304 *   http://www.apache.org/licenses/LICENSE-2.0
3305 *
3306 * Unless required by applicable law or agreed to in writing, software
3307 * distributed under the License is distributed on an "AS IS" BASIS,
3308 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3309 * See the License for the specific language governing permissions and
3310 * limitations under the License.
3311 */function E1(){var n;return typeof self<"u"&&((n=self.location)==null?void 0:n.href)||""}function UK(){return eD()==="http:"||eD()==="https:"}function eD(){var n;return typeof self<"u"&&((n=self.location)==null?void 0:n.protocol)||null}/**
3312 * @license
3313 * Copyright 2020 Google LLC
3314 *
3315 * Licensed under the Apache License, Version 2.0 (the "License");
3316 * you may not use this file except in compliance with the License.
3317 * You may obtain a copy of the License at
3318 *
3319 *   http://www.apache.org/licenses/LICENSE-2.0
3320 *
3321 * Unless required by applicable law or agreed to in writing, software
3322 * distributed under the License is distributed on an "AS IS" BASIS,
3323 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3324 * See the License for the specific language governing permissions and
3325 * limitations under the License.
3326 */function zK(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(UK()||Tz()||"connection"in navigator)?navigator.onLine:!0}function qK(){if(typeof navigator>"u")return null;const n=navigator;return n.languages&&n.languages[0]||n.language||null}/**
3327 * @license
3328 * Copyright 2020 Google LLC
3329 *
3330 * Licensed under the Apache License, Version 2.0 (the "License");
3331 * you may not use this file except in compliance with the License.
3332 * You may obtain a copy of the License at
3333 *
3334 *   http://www.apache.org/licenses/LICENSE-2.0
3335 *
3336 * Unless required by applicable law or agreed to in writing, softw
3336are
3337 * distributed under the License is distributed on an "AS IS" BASIS,
3338 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3339 * See the License for the specific language governing permissions and
3340 * limitations under the License.
3341 */class Fm{constructor(e,t){this.shortDelay=e,this.longDelay=t,Di(t>e,"Short delay should be less than long delay!"),this.isMobile=wz()||Nz()}get(){return zK()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
3342 * @license
3343 * Copyright 2020 Google LLC
3344 *
3345 * Licensed under the Apache License, Version 2.0 (the "License");
3346 * you may not use this file except in compliance with the License.
3347 * You may obtain a copy of the License at
3348 *
3349 *   http://www.apache.org/licenses/LICENSE-2.0
3350 *
3351 * Unless required by applicable law or agreed to in writing, software
3352 * distributed under the License is distributed on an "AS IS" BASIS,
3353 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3354 * See the License for the specific language governing permissions and
3355 * limitations under the License.
3356 */function U2(n,e){Di(n.emulator,"Emulator should always be set here");const{url:t}=n.emulator;return e?`${t}${e.startsWith("/")?e.slice(1):e}`:t}/**
3357 * @license
3358 * Copyright 2020 Google LLC
3359 *
3360 * Licensed under the Apache License, Version 2.0 (the "License");
3361 * you may not use this file except in compliance with the License.
3362 * You may obtain a copy of the License at
3363 *
3364 *   http://www.apache.org/licenses/LICENSE-2.0
3365 *
3366 * Unless required by applicable law or agreed to in writing, software
3367 * distributed under the License is distributed on an "AS IS" BASIS,
3368 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3369 * See the License for the specific language governing permissions and
3370 * limitations under the License.
3371 */class r3{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;xi("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;xi("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;xi("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
3372 * @license
3373 * Copyright 2020 Google LLC
3374 *
3375 * Licensed under the Apache License, Version 2.0 (the "License");
3376 * you may not use this file except in compliance with the License.
3377 * You may obtain a copy of the License at
3378 *
3379 *   http://www.apache.org/licenses/LICENSE-2.0
3380 *
3381 * Unless required by applicable law or agreed to in writing, software
3382 * distributed under the License is distributed on an "AS IS" BASIS,
3383 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3384 * See the License for the specific language governing permissions and
3385 * limitations under the License.
3386 */const HK={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
3386aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
3387 * @license
3388 * Copyright 2020 Google LLC
3389 *
3390 * Licensed under the Apache License, Version 2.0 (the "License");
3391 * you may not use this file except in compliance with the License.
3392 * You may obtain a copy of the License at
3393 *
3394 *   http://www.apache.org/licenses/LICENSE-2.0
3395 *
3396 * Unless required by applicable law or agreed to in writing, software
3397 * distributed under the License is distributed on an "AS IS" BASIS,
3398 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3399 * See the License for the specific language governing permissions and
3400 * limitations under the License.
3401 */const YK=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],GK=new Fm(3e4,6e4);function rx(n,e){return n.tenantId&&!e.tenantId?{...e,tenantId:n.tenantId}:e}async function Xd(n,e,t,r,s={}){return s3(n,s,async()=>{let i={},l={};r&&(e==="GET"?l=r:i={body:JSON.stringify(r)});const d=Tm({key:n.config.apiKey,...l}).slice(1),h=await n._getAdditionalHeaders();h["Content-Type"]="application/json",n.languageCode&&(h["X-Firebase-Locale"]=n.languageCode);const m={method:e,headers:h,...i};return _z()||(m.referrerPolicy="no-referrer"),n.emulatorConfig&&Ld(n.emulatorConfig.host)&&(m.credentials="include"),r3.fetch()(await i3(n,n.config.apiHost,t,d),m)})}async function s3(n,e,t){n._canInitEmulator=!1;const r={...HK,...e};try{const s=new $K(n),i=await Promise.race([t(),s.promise]);s.clearNetworkTimeout();const l=await i.json();if("needConfirmation"in l)throw Cg(n,"account-exists-with-different-credential",l);if(i.ok&&!("errorMessage"in l))return l;{const d=i.ok?l.errorMessage:l.error.message,[h,m]=d.split(" : ");if(h==="FEDERATED_USER_ID_ALREADY_LINKED")throw Cg(n,"credential-already-in-use",l);if(h==="EMAIL_EXISTS")throw Cg(n,"email-already-in-use",l);if(h==="USER_DISABLED")throw Cg(n,"user-disabled",l);const g=r[h]||h.toLowerCase().replace(/[_\s]+/g,"-");if(m)throw n3(n,g,m);Ci(n,g)}}catch(s){if(s instanceof Ii)throw s;Ci(n,"network-request-failed",{message:String(s)})}}async function a3(n,e,t,r,s={}){const i=await Xd(n,e,t,r,s);return"mfaPendingCredential"in i&&Ci(n,"multi-factor-auth-required",{_serverResponse:i}),i}async function i3(n,e,t,r){const s=`${e}${t}?${r}`,i=n,l=i.config.emulator?U2(n.config,s):`${n.config.apiScheme}://${s}`;return YK.includes(t)&&(await i._persistenceManagerAvailable,i._getPersistenceType()==="COOKIE")?i._getPersistence()._getFinalTarget(l).toString():l}class $K{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((t,r)=>{this.timer=setTimeout(()=>r(za(this.auth,"network-request-failed")),GK.get())})}}function Cg(n,e,t){const r={appName:n.name};t.email&&(r.email=t.email),t.phoneNumber&&(r.phoneNumber=t.phoneNumber);const s=za(n,e,r);return s.customData._tokenResponse=t,s}/**
3402 * @license
3403 * Copyright 2020 Google LLC
3404 *
3405 * Licensed under the Apache License, Version 2.0 (the "License");
3406 * you may not use this file except in compliance with the License.
3407 * You may obtain a copy of the License at
3408 *
3409 *   http://www.apache.org/licenses/LICENSE-2.0
3410 *
3411 * Unless required by applicable law or agreed to in writing, software
3412 * distributed under the License is distributed on an "AS IS" BASIS,
3413 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3414 * See the License for the specific language governing permissions and
3415 * limitations under the License.
3416 */async function KK(n,e){return Xd(n,"POST","/v1/accounts:delete",e)}async function ry(n,e){return Xd(n,"POST","/v1/accounts:lookup",e)}/**
3417 * @license
3418 * Copyright 2020 Google LLC
3419 *
3420 * Licensed under the Apache License, Version 2.0 (the "License");
3421 * you may not use this file except in compliance with the License.
3422 * You may obtain a copy of the License at
3423 *
3424 *   http://www.apache.org/licenses/LICENSE-2.0
3425 *
3426 * Unless required by applicable law or agreed to in writing, softw
3426are
3427 * distributed under the License is distributed on an "AS IS" BASIS,
3428 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3429 * See the License for the specific language governing permissions and
3430 * limitations under the License.
3431 */function Bf(n){if(n)try{const e=new Date(Number(n));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function WK(n,e=!1){const t=an(n),r=await t.getIdToken(e),s=z2(r);Ze(s&&s.exp&&s.auth_time&&s.iat,t.auth,"internal-error");const i=typeof s.firebase=="object"?s.firebase:void 0,l=i==null?void 0:i.sign_in_provider;return{claims:s,token:r,authTime:Bf(Zv(s.auth_time)),issuedAtTime:Bf(Zv(s.iat)),expirationTime:Bf(Zv(s.exp)),signInProvider:l||null,signInSecondFactor:(i==null?void 0:i.sign_in_second_factor)||null}}function Zv(n){return Number(n)*1e3}function z2(n){const[e,t,r]=n.split(".");if(e===void 0||t===void 0||r===void 0)return o0("JWT malformed, contained fewer than 3 sections"),null;try{const s=LI(t);return s?JSON.parse(s):(o0("Failed to decode base64 JWT payload"),null)}catch(s){return o0("Caught error parsing JWT payload as JSON",s==null?void 0:s.toString()),null}}function tD(n){const e=z2(n);return Ze(e,"internal-error"),Ze(typeof e.exp<"u","internal-error"),Ze(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/**
3432 * @license
3433 * Copyright 2020 Google LLC
3434 *
3435 * Licensed under the Apache License, Version 2.0 (the "License");
3436 * you may not use this file except in compliance with the License.
3437 * You may obtain a copy of the License at
3438 *
3439 *   http://www.apache.org/licenses/LICENSE-2.0
3440 *
3441 * Unless required by applicable law or agreed to in writing, software
3442 * distributed under the License is distributed on an "AS IS" BASIS,
3443 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3444 * See the License for the specific language governing permissions and
3445 * limitations under the License.
3446 */async function dm(n,e,t=!1){if(t)return e;try{return await e}catch(r){throw r instanceof Ii&&QK(r)&&n.auth.currentUser===n&&await n.auth.signOut(),r}}function QK({code:n}){return n==="auth/user-disabled"||n==="auth/user-token-expired"}/**
3447 * @license
3448 * Copyright 2020 Google LLC
3449 *
3450 * Licensed under the Apache License, Version 2.0 (the "License");
3451 * you may not use this file except in compliance with the License.
3452 * You may obtain a copy of the License at
3453 *
3454 *   http://www.apache.org/licenses/LICENSE-2.0
3455 *
3456 * Unless required by applicable law or agreed to in writing, software
3457 * distributed under the License is distributed on an "AS IS" BASIS,
3458 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3459 * See the License for the specific language governing permissions and
3460 * limitations under the License.
3461 */class XK{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){if(e){const t=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),t}else{this.errorBackoff=3e4;const r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
3462 * @license
3463 * Copyright 2020 Google LLC
3464 *
3465 * Licensed under the Apache License, Version 2.0 (the "License");
3466 * you may not use this file except in compliance with the License.
3467 * You may obtain a copy of the License at
3468 *
3469 *   http://www.apache.org/licenses/LICENSE-2.0
3470 *
3471 * Unless required by applicable law or agreed to in writing, software
3472 * distributed under the License is distributed on an "AS IS" BASIS,
3473 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3474 * See the License for the specific language governing permissions and
3475 * limitations under the License.
3476 */class S1{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Bf(this.lastLoginAt),this.creationTime=Bf(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
3477 * @license
3478 * Copyright 2019 Google LLC
3479 *
3480 * Licensed under the Apache License, Version 2.0 (the "License");
3481 * you may not use this file except in compliance with the License.
3482 * You may obtain a copy of the License at
3483 *
3484 *   http://www.apache.org/licenses/LICENSE-2.0
3485 *
3486 * Unless required by applicable law or agreed to in writing, software
3487 * distributed under the License is distributed on an "AS IS" BASIS,
3488 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3489 * See the License for the specific language governing permissions and
3490 * limitations under the License.
3491 */async function sy(n){var p;const e=n.auth,t=await n.getIdToken(),r=await dm(n,ry(e,{idToken:t}));Ze(r==null?void 0:r.users.length,e,"internal-error");const s=r.users[0];n._notifyReloadListener(s);const i=(p=s.providerUserInfo)!=null&&p.length?o3(s.providerUserInfo):[],l=ZK(n.providerData,i),d=n.isAnonymous,h=!(n.email&&s.passwordHash)&&!(l!=null&&l.length),m=d?h:!1,g={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new S1(s.createdAt,s.lastLoginAt),isAnonymous:m};Object.assign(n,g)}async function JK(n){const e=an(n);await sy(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function ZK(n,e){return[...n.filter(r=>!e.some(s=>s.providerId===r.providerId)),...e]}function o3(n){return n.map(({providerId:e,...t})=>({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}/**
3492 * @license
3493 * Copyright 2020 Google LLC
3494 *
3495 * Licensed under the Apache License, Version 2.0 (the "License");
3496 * you may not use this file except in compliance with the License.
3497 * You may obtain a copy of the License at
3498 *
3499 *   http://www.apache.org/licenses/LICENSE-2.0
3500 *
3501 * Unless required by applicable law or agreed to in writing, software
3502 * distributed under the License is distributed on an "AS IS" BASIS,
3503 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3504 * See the License for the specific language governing permissions and
3505 * limitations under the License.
3506 */async function eW(n,e){const t=await s3(n,{},async()=>{const r=Tm({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:s,apiKey:i}=n.config,l=await i3(n,s,"/v1/token",`key=${i}`),d=await n._getAdditionalHeaders();d["Content-Type"]="application/x-www-form-urlencoded";const h={method:"POST",headers:d,body:r};return n.emulatorConfig&&Ld(n.emulatorConfig.host)&&(h.credentials="include"),r3.fetch()(l,h)});return{accessToken:t.access_token,expiresIn:t.expires_in,refreshToken:t.refresh_token}}async function tW(n,e){return Xd(n,"POST","/v2/accounts:revokeToken",rx(n,e))}/**
3507 * @license
3508 * Copyright 2020 Google LLC
3509 *
3510 * Licensed under the Apache License, Version 2.0 (the "License");
3511 * you may not use this file except in compliance with the License.
3512 * You may obtain a copy of the License at
3513 *
3514 *   http://www.apache.org/licenses/LICENSE-2.0
3515 *
3516 * Unless required by applicable law or agreed to in writing, software
3517 * distributed under the License is distributed on an "AS IS" BASIS,
3518 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3519 * See the License for the specific language governing permissions and
3520 * limitations under the License.
3521 */class Gu{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ze(e.idToken,"internal-error"),Ze(typeof e.idToken<"u","internal-error"),Ze(typeof e.refreshToken<"u","internal-error");const t="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):tD(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){Ze(e.length!==0,"internal-error");const t=tD(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return!t&&this.accessToken&&!this.isExpired?this.accessToken:(Ze(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:r,refreshToken:s,expiresIn:i}=await eW(e,t);this.updateTokensAndExpiration(r,s,Number(i))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,t){const{refreshToken:r,accessToken:s,expirationTime:i}=t,l=new Gu;return r&&(Ze(typeof r=="string","internal-error",{appName:e}),l.refreshToken=r),s&&(Ze(typeof s=="string","internal-error",{appName:e}),l.accessToken=s),i&&(Ze(typeof i=="number","internal-error",{appName:e}),l.expirationTime=i),l}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Gu,this.toJSON())}_performRefresh(){return xi("not implemented")}}/**
3522 * @license
3523 * Copyright 2020 Google LLC
3524 *
3525 * Licensed under the Apache License, Version 2.0 (the "License");
3526 * you may not use this file except in compliance with the License.
3527 * You may obtain a copy of the License at
3528 *
3529 *   http://www.apache.org/licenses/LICENSE-2.0
3530 *
3531 * Unless required by applicable law or agreed to in writing, software
3532 * distributed under the License is distributed on an "AS IS" BASIS,
3533 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3534 * See the License for the specific language governing permissions and
3535 * limitations under the License.
3536 */function vo(n,e){Ze(typeof n=="string"||typeof n>"u","internal-error",{appName:e})}class Xs{constructor({uid:e,auth:t,stsTokenManager:r,...s}){this.providerId="firebase",this.proactiveRefresh=new XK(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new S1(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const t=await dm(this,this.stsTokenManager.getToken(this.auth,e));return Ze(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return WK(this,e)}reload(){return JK(this)}_assign(e){this!==e&&(Ze(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(t=>({...t})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Xs({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){Ze(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await sy(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Qs(this.auth.app))return Promise.reject(Bo(this.auth));const e=await this.getIdToken();return await dm(this,KK(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){const r=t.displayName??void 0,s=t.email??void 0,i=t.phoneNumber??void 0,l=t.photoURL??void 0,d=t.tenantId??void 0,h=t._redirectEventId??void 0,m=t.createdAt??void 0,g=t.lastLoginAt??void 0,{uid:p,emailVerified:b,isAnonymous:w,providerData:_,stsTokenManager:N}=t;Ze(p&&N,e,"internal-error");const E=Gu.fromJSON(this.name,N);Ze(typeof p=="string",e,"internal-error"),vo(r,e.name),vo(s,e.name),Ze(typeof b=="boolean",e,"internal-error"),Ze(typeof w=="boolean",e,"internal-error"),vo(i,e.name),vo(l,e.name),vo(d,e.name),vo(h,e.name),vo(m,e.name),vo(g,e.name);const j=new Xs({uid:p,auth:e,email:s,emailVerified:b,displayName:r,isAnonymous:w,photoURL:l,phoneNumber:i,tenantId:d,stsTokenManager:E,createdAt:m,lastLoginAt:g});return _&&Array.isArray(_)&&(j.providerData=_.map(P=>({...P}))),h&&(j._redirectEventId=h),j}static async _fromIdTokenResponse(e,t,r=!1){const s=new Gu;s.updateFromServerResponse(t);const i=new Xs({uid:t.localId,auth:e,stsTokenManager:s,isAnonymous:r});return await sy(i),i}static async _fromGetAccountInfoResponse(e,t,r){const s=t.users[0];Ze(s.localId!==void 0,"internal-error");const i=s.providerUserInfo!==void 0?o3(s.providerUserInfo):[],l=!(s.email&&s.passwordHash)&&!(i!=null&&i.length),d=new Gu;d.updateFromIdToken(r);const h=new Xs({uid:s.localId,auth:e,stsTokenManager:d,isAnonymous:l}),m={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:i,metadata:new S1(s.createdAt,s.lastLoginAt),isAnonymous:!(s.email&&s.passwordHash)&&!(i!=null&&i.length)};return Object.assign(h,m),h}}/**
3537 * @license
3538 * Copyright 2020 Google LLC
3539 *
3540 * Licensed under the Apache License, Version 2.0 (the "License");
3541 * you may not use this file except in compliance with the License.
3542 * You may obtain a copy of the License at
3543 *
3544 *   http://www.apache.org/licenses/LICENSE-2.0
3545 *
3546 * Unless required by applicable law or agreed to in writing, software
3547 * distributed under the License is distributed on an "AS IS" BASIS,
3548 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3549 * See the License for the specific language governing permissions and
3550 * limitations under the License.
3551 */const nD=new Map;function bi(n){Di(n instanceof Function,"Expected a class definition");let e=nD.get(n);return e?(Di(e instanceof n,"Instance stored in cache mismatched with class"),e):(e=new n,nD.set(n,e),e)}/**
3552 * @license
3553 * Copyright 2019 Google LLC
3554 *
3555 * Licensed under the Apache License, Version 2.0 (the "License");
3556 * you may not use this file except in compliance with the License.
3557 * You may obtain a copy of the License at
3558 *
3559 *   http://www.apache.org/licenses/LICENSE-2.0
3560 *
3561 * Unless required by applicable law or agreed to in writing, software
3562 * distributed under the License is distributed on an "AS IS" BASIS,
3563 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3564 * See the License for the specific language governing permissions and
3565 * limitations under the License.
3566 */class l3{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return t===void 0?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}l3.type="NONE";const rD=l3;/**
3567 * @license
3568 * Copyright 2019 Google LLC
3569 *
3570 * Licensed under the Apache License, Version 2.0 (the "License");
3571 * you may not use this file except in compliance with the License.
3572 * You may obtain a copy of the License at
3573 *
3574 *   http://www.apache.org/licenses/LICENSE-2.0
3575 *
3576 * Unless required by applicable law or agreed to in writing, software
3577 * distributed under the License is distributed on an "AS IS" BASIS,
3578 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3579 * See the License for the specific language governing permissions and
3580 * limitations under the License.
3581 */function l0(n,e,t){return`firebase:${n}:${e}:${t}`}class $u{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:s,name:i}=this.auth;this.fullUserKey=l0(this.userKey,s.apiKey,i),this.fullPersistenceKey=l0("persistence",s.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);if(!e)return null;if(typeof e=="string"){const t=await ry(this.auth,{idToken:e}).catch(()=>{});return t?Xs._fromGetAccountInfoResponse(this.auth,t,e):null}return Xs._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,r="authUser"){if(!t.length)return new $u(bi(rD),e,r);const s=(await Promise.all(t.map(async m=>{if(await m._isAvailable())return m}))).filter(m=>m);let i=s[0]||bi(rD);const l=l0(r,e.config.apiKey,e.name);let d=null;for(const m of t)try{const g=await m._get(l);if(g){let p;if(typeof g=="string"){const b=await ry(e,{idToken:g}).catch(()=>{});if(!b)break;p=await Xs._fromGetAccountInfoResponse(e,b,g)}else p=Xs._fromJSON(e,g);m!==i&&(d=p),i=m;break}}catch{}const h=s.filter(m=>m._shouldAllowMigration);return!i._shouldAllowMigration||!h.length?new $u(i,e,r):(i=h[0],d&&await i._set(l,d.toJSON()),await Promise.all(t.map(async m=>{if(m!==i)try{await m._remove(l)}catch{}})),new $u(i,e,r))}}/**
3582 * @license
3583 * Copyright 2020 Google LLC
3584 *
3585 * Licensed under the Apache License, Version 2.0 (the "License");
3586 * you may not use this file except in compliance with the License.
3587 * You may obtain a copy of the License at
3588 *
3589 *   http://www.apache.org/licenses/LICENSE-2.0
3590 *
3591 * Unless required by applicable law or agreed to in writing, software
3592 * distributed under the License is distributed on an "AS IS" BASIS,
3593 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3594 * See the License for the specific language governing permissions and
3595 * limitations under the License.
3596 */function sD(n){const e=n.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(h3(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(c3(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(m3(e))return"Blackberry";if(p3(e))return"Webos";if(u3(e))return"Safari";if((e.includes("chrome/")||d3(e))&&!e.includes("edge/"))return"Chrome";if(f3(e))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=n.match(t);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function c3(n=Wn()){return/firefox\//i.test(n)}function u3(n=Wn()){const e=n.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function d3(n=Wn()){return/crios\//i.test(n)}function h3(n=Wn()){return/iemobile/i.test(n)}function f3(n=Wn()){return/android/i.test(n)}function m3(n=Wn()){return/blackberry/i.test(n)}function p3(n=Wn()){return/webos/i.test(n)}function q2(n=Wn()){return/iphone|ipad|ipod/i.test(n)||/macintosh/i.test(n)&&/mobile/i.test(n)}function nW(n=Wn()){var e;return q2(n)&&!!((e=window.navigator)!=null&&e.standalone)}function rW(){return Ez()&&document.documentMode===10}function g3(n=Wn()){return q2(n)||f3(n)||p3(n)||m3(n)||/windows phone/i.test(n)||h3(n)}/**
3597 * @license
3598 * Copyright 2020 Google LLC
3599 *
3600 * Licensed under the Apache License, Version 2.0 (the "License");
3601 * you may not use this file except in compliance with the License.
3602 * You may obtain a copy of the License at
3603 *
3604 *   http://www.apache.org/licenses/LICENSE-2.0
3605 *
3606 * Unless required by applicable law or agreed to in writing, software
3607 * distributed under the License is distributed on an "AS IS" BASIS,
3608 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3609 * See the License for the specific language governing permissions and
3610 * limitations under the License.
3611 */function y3(n,e=[]){let t;switch(n){case"Browser":t=sD(Wn());break;case"Worker":t=`${sD(Wn())}-${n}`;break;default:t=n}const r=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${Vd}/${r}`}/**
3612 * @license
3613 * Copyright 2022 Google LLC
3614 *
3615 * Licensed under the Apache License, Version 2.0 (the "License");
3616 * you may not use this file except in compliance with the License.
3617 * You may obtain a copy of the License at
3618 *
3619 *   http://www.apache.org/licenses/LICENSE-2.0
3620 *
3621 * Unless required by applicable law or agreed to in writing, software
3622 * distributed under the License is distributed on an "AS IS" BASIS,
3623 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3624 * See the License for the specific language governing permissions and
3625 * limitations under the License.
3626 */class sW{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const r=i=>new Promise((l,d)=>{try{const h=e(i);l(h)}catch(h){d(h)}});r.onAbort=t,this.queue.push(r);const s=this.queue.length-1;return()=>{this.queue[s]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(r){t.reverse();for(const s of t)try{s()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/**
3627 * @license
3628 * Copyright 2023 Google LLC
3629 *
3630 * Licensed under the Apache License, Version 2.0 (the "License");
3631 * you may not use this file except in compliance with the License.
3632 * You may obtain a copy of the License at
3633 *
3634 *   http://www.apache.org/licenses/LICENSE-2.0
3635 *
3636 * Unless required by applicable law or agreed to in writing, softw
3636are
3637 * distributed under the License is distributed on an "AS IS" BASIS,
3638 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3639 * See the License for the specific language governing permissions and
3640 * limitations under the License.
3641 */async function aW(n,e={}){return Xd(n,"GET","/v2/passwordPolicy",rx(n,e))}/**
3642 * @license
3643 * Copyright 2023 Google LLC
3644 *
3645 * Licensed under the Apache License, Version 2.0 (the "License");
3646 * you may not use this file except in compliance with the License.
3647 * You may obtain a copy of the License at
3648 *
3649 *   http://www.apache.org/licenses/LICENSE-2.0
3650 *
3651 * Unless required by applicable law or agreed to in writing, software
3652 * distributed under the License is distributed on an "AS IS" BASIS,
3653 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3654 * See the License for the specific language governing permissions and
3655 * limitations under the License.
3656 */const iW=6;class oW{constructor(e){var r;const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??iW,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),t.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),t.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),t.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),t.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((r=e.allowedNonAlphanumericCharacters)==null?void 0:r.join(""))??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){const t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){const r=this.customStrengthOptions.minPasswordLength,s=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),s&&(t.meetsMaxPasswordLength=e.length<=s)}validatePasswordCharacterOptions(e,t){this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);let r;for(let s=0;s<e.length;s++)r=e.charAt(s),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,s,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=s)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}/**
3657 * @license
3658 * Copyright 2020 Google LLC
3659 *
3660 * Licensed under the Apache License, Version 2.0 (the "License");
3661 * you may not use this file except in compliance with the License.
3662 * You may obtain a copy of the License at
3663 *
3664 *   http://www.apache.org/licenses/LICENSE-2.0
3665 *
3666 * Unless required by applicable law or agreed to in writing, software
3667 * distributed under the License is distributed on an "AS IS" BASIS,
3668 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3669 * See the License for the specific language governing permissions and
3670 * limitations under the License.
3671 */class lW{constructor(e,t,r,s){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=s,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new aD(this),this.idTokenSubscription=new aD(this),this.beforeStateQueue=new sW(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=t3,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=s.sdkClientVersion,this._persistenceManagerAvailable=new Promise(i=>this._resolvePersistenceManagerAvailable=i)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=bi(t)),this._initializationPromise=this.queue(async()=>{var r,s,i;if(!this._deleted&&(this.persistenceManager=await $u.create(this,e),(r=this._resolvePersistenceManagerAvailable)==null||r.call(this),!this._deleted)){if
3671((s=this._popupRedirectResolver)!=null&&s._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(t),this.lastNotifiedUid=((i=this.currentUser)==null?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{const t=await ry(this,{idToken:e}),r=await Xs._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(r)}catch(t){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",t),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var i;if(Qs(this.app)){const l=this.app.settings.authIdToken;return l?new Promise(d=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(l).then(d,d))}):this.directlySetCurrentUser(null)}const t=await this.assertedPersistence.getCurrentUser();let r=t,s=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const l=(i=this.redirectUser)==null?void 0:i._redirectEventId,d=r==null?void 0:r._redirectEventId,h=await this.tryRedirectSignIn(e);(!l||l===d)&&(h!=null&&h.user)&&(r=h.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(r)}catch(l){r=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(l))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return Ze(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await sy(e)}catch(t){if((t==null?void 0:t.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=qK()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(Qs(this.app))return Promise.reject(Bo(this));const t=e?an(e):null;return t&&Ze(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Ze(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return Qs(this.app)?Promise.reject(Bo(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return Qs(this.app)?Promise.reject(Bo(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(bi(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await aW(this),t=new oW(e);this.tenantId===null?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new _m("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise((e,t)=>
3671{if(this.currentUser)e();else{const r=this.onAuthStateChanged(()=>{r(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){const t=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:t};this.tenantId!=null&&(r.tenantId=this.tenantId),await tW(this,r)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)==null?void 0:e.toJSON()}}async _setRedirectUser(e,t){const r=await this.getOrInitRedirectPersistenceManager(t);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&bi(e)||this._popupRedirectResolver;Ze(t,this,"argument-error"),this.redirectPersistenceManager=await $u.create(this,[bi(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,r;return this._isInitialized&&await this.queue(async()=>{}),((t=this._currentUser)==null?void 0:t._redirectEventId)===e?this._currentUser:((r=this.redirectUser)==null?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const e=((t=this.currentUser)==null?void 0:t.uid)??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,s){if(this._deleted)return()=>{};const i=typeof t=="function"?t:t.next.bind(t);let l=!1;const d=this._isInitialized?Promise.resolve():this._initializationPromise;if(Ze(d,this,"internal-error"),d.then(()=>{l||i(this.currentUser)}),typeof t=="function"){const h=e.addObserver(t,r,s);return()=>{l=!0,h()}}else{const h=e.addObserver(t);return()=>{l=!0,h()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Ze(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=y3(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var s;const e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);const t=await((s=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:s.getHeartbeatsHeader());t&&(e["X-Firebase-Client"]=t);const r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){var t;if(Qs(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=await((t=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:t.getToken());return e!=null&&e.error&&BK(`Error while retrieving App Check token: ${e.error}`),e==null?void 0:e.token}}function sx(n){return an(n)}class aD{constructor(e){this.auth=e,this.observer=null,this.addObserver=kz(t=>this.observer=t)}get next(){return Ze(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
3672 * @license
3673 * Copyright 2020 Google LLC
3674 *
3675 * Licensed under the Apache License, Version 2.0 (the "License");
3676 * you may not use this file except in compliance with the License.
3677 * You may obtain a copy of the License at
3678 *
3679 *   http://www.apache.org/licenses/LICENSE-2.0
3680 *
3681 * Unless required by applicable law or agreed to in writing, software
3682 * distributed under the License is distributed on an "AS IS" BASIS,
3683 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3684 * See the License for the specific language governing permissions and
3685 * limitations under the License.
3686 */let H2={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function cW(n){H2=n}function uW(n){return H2.loadJS(n)}function dW(){return H2.gapiScript}function hW(n){return`__${n}${Math.floor(Math.random()*1e6)}`}/**
3687 * @license
3688 * Copyright 2020 Google LLC
3689 *
3690 * Licensed under the Apache License, Version 2.0 (the "License");
3691 * you may not use this file except in compliance with the License.
3692 * You may obtain a copy of the License at
3693 *
3694 *   http://www.apache.org/licenses/LICENSE-2.0
3695 *
3696 * Unless required by applicable law or agreed to in writing, software
3697 * distributed under the License is distributed on an "AS IS" BASIS,
3698 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3699 * See the License for the specific language governing permissions and
3700 * limitations under the License.
3701 */function fW(n,e){const t=Nm(n,"auth");if(t.isInitialized()){const s=t.getImmediate(),i=t.getOptions();if(aa(i,e??{}))return s;Ci(s,"already-initialized")}return t.initialize({options:e})}function mW(n,e){const t=(e==null?void 0:e.persistence)||[],r=(Array.isArray(t)?t:[t]).map(bi);e!=null&&e.errorMap&&n._updateErrorMap(e.errorMap),n._initializeWithPersistence(r,e==null?void 0:e.popupRedirectResolver)}function pW(n,e,t){const r=sx(n);
3701Ze(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");const s=!1,i=x3(e),{host:l,port:d}=gW(e),h=d===null?"":`:${d}`,m={url:`${i}//${l}${h}/`},g=Object.freeze({host:l,port:d,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:s})});if(!r._canInitEmulator){Ze(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),Ze(aa(m,r.config.emulator)&&aa(g,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=m,r.emulatorConfig=g,r.settings.appVerificationDisabledForTesting=!0,Ld(l)?j_(`${i}//${l}${h}`):yW()}function x3(n){const e=n.indexOf(":");return e<0?"":n.substr(0,e+1)}function gW(n){const e=x3(n),t=/(\/\/)?([^?#/]+)/.exec(n.substr(e.length));if(!t)return{host:"",port:null};const r=t[2].split("@").pop()||"",s=/^(\[[^\]]+\])(:|$)/.exec(r);if(s){const i=s[1];return{host:i,port:iD(r.substr(i.length+1))}}else{const[i,l]=r.split(":");return{host:i,port:iD(l)}}}function iD(n){if(!n)return null;const e=Number(n);return isNaN(e)?null:e}function yW(){function n(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",n):n())}/**
3702 * @license
3703 * Copyright 2020 Google LLC
3704 *
3705 * Licensed under the Apache License, Version 2.0 (the "License");
3706 * you may not use this file except in compliance with the License.
3707 * You may obtain a copy of the License at
3708 *
3709 *   http://www.apache.org/licenses/LICENSE-2.0
3710 *
3711 * Unless required by applicable law or agreed to in writing, software
3712 * distributed under the License is distributed on an "AS IS" BASIS,
3713 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3714 * See the License for the specific language governing permissions and
3715 * limitations under the License.
3716 */class b3{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return xi("not implemented")}_getIdTokenResponse(e){return xi("not implemented")}_linkToIdToken(e,t){return xi("not implemented")}_getReauthenticationResolver(e){return xi("not implemented")}}/**
3717 * @license
3718 * Copyright 2020 Google LLC
3719 *
3720 * Licensed under the Apache License, Version 2.0 (the "License");
3721 * you may not use this file except in compliance with the License.
3722 * You may obtain a copy of the License at
3723 *
3724 *   http://www.apache.org/licenses/LICENSE-2.0
3725 *
3726 * Unless required by applicable law or agreed to in writing, software
3727 * distributed under the License is distributed on an "AS IS" BASIS,
3728 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3729 * See the License for the specific language governing permissions and
3730 * limitations under the License.
3731 */async function Ku(n,e){return a3(n,"POST","/v1/accounts:signInWithIdp",rx(n,e))}/**
3732 * @license
3733 * Copyright 2020 Google LLC
3734 *
3735 * Licensed under the Apache License, Version 2.0 (the "License");
3736 * you may not use this file except in compliance with the License.
3737 * You may obtain a copy of the License at
3738 *
3739 *   http://www.apache.org/licenses/LICENSE-2.0
3740 *
3741 * Unless required by applicable law or agreed to in writing, software
3742 * distributed under the License is distributed on an "AS IS" BASIS,
3743 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3744 * See the License for the specific language governing permissions and
3745 * limitations under the License.
3746 */const xW="http://localhost";class Ec extends b3{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Ec(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&
3746(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):Ci("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:s,...i}=t;if(!r||!s)return null;const l=new Ec(r,s);return l.idToken=i.idToken||void 0,l.accessToken=i.accessToken||void 0,l.secret=i.secret,l.nonce=i.nonce,l.pendingToken=i.pendingToken||null,l}_getIdTokenResponse(e){const t=this.buildRequest();return Ku(e,t)}_linkToIdToken(e,t){const r=this.buildRequest();return r.idToken=t,Ku(e,r)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Ku(e,t)}buildRequest(){const e={requestUri:xW,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=Tm(t)}return e}}/**
3747 * @license
3748 * Copyright 2020 Google LLC
3749 *
3750 * Licensed under the Apache License, Version 2.0 (the "License");
3751 * you may not use this file except in compliance with the License.
3752 * You may obtain a copy of the License at
3753 *
3754 *   http://www.apache.org/licenses/LICENSE-2.0
3755 *
3756 * Unless required by applicable law or agreed to in writing, software
3757 * distributed under the License is distributed on an "AS IS" BASIS,
3758 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3759 * See the License for the specific language governing permissions and
3760 * limitations under the License.
3761 */class v3{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
3762 * @license
3763 * Copyright 2019 Google LLC
3764 *
3765 * Licensed under the Apache License, Version 2.0 (the "License");
3766 * you may not use this file except in compliance with the License.
3767 * You may obtain a copy of the License at
3768 *
3769 *   http://www.apache.org/licenses/LICENSE-2.0
3770 *
3771 * Unless required by applicable law or agreed to in writing, software
3772 * distributed under the License is distributed on an "AS IS" BASIS,
3773 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3774 * See the License for the specific language governing permissions and
3775 * limitations under the License.
3776 */class Bm extends v3{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/**
3777 * @license
3778 * Copyright 2020 Google LLC
3779 *
3780 * Licensed under the Apache License, Version 2.0 (the "License");
3781 * you may not use this file except in compliance with the License.
3782 * You may obtain a copy of the License at
3783 *
3784 *   http://www.apache.org/licenses/LICENSE-2.0
3785 *
3786 * Unless required by applicable law or agreed to in writing, software
3787 * distributed under the License is distributed on an "AS IS" BASIS,
3788 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3789 * See the License for the specific language governing permissions and
3790 * limitations under the License.
3791 */class jo extends Bm{constructor(){super("facebook.com")}static credential(e){return Ec._fromParams({providerId:jo.PROVIDER_ID,signInMethod:jo.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return jo.credentialFromTaggedObject(e)}static credentialFromError(e){return jo.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return jo.credential(e.oauthAccessToken)}catch{return null}}}jo.FACEBOOK_SIGN_IN_METHOD="facebook.com";jo.PROVIDER_ID="facebook.com";/**
3792 * @license
3793 * Copyright 2020 Google LLC
3794 *
3795 * Licensed under the Apache License, Version 2.0 (the "License");
3796 * you may not use this file except in compliance with the License.
3797 * You may obtain a copy of the License at
3798 *
3799 *   http://www.apache.org/licenses/LICENSE-2.0
3800 *
3801 * Unless required by applicable law or agreed to in writing, software
3802 * distributed under the License is distributed on an "AS IS" BASIS,
3803 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3804 * See the License for the specific language governing permissions and
3805 * limitations under the License.
3806 */class Ao extends Bm{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Ec._fromParams({providerId:Ao.PROVIDER_ID,signInMethod:Ao.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Ao.credentialFromTaggedObject(e)}static credentialFromError(e){return Ao.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return Ao.credential(t,r)}catch{return null}}}Ao.GOOGLE_SIGN_IN_METHOD="google.com";Ao.PROVIDER_ID="google.com";/**
3807 * @license
3808 * Copyright 2020 Google LLC
3809 *
3810 * Licensed under the Apache License, Version 2.0 (the "License");
3811 * you may not use this file except in compliance with the License.
3812 * You may obtain a copy of the License at
3813 *
3814 *   http://www.apache.org/licenses/LICENSE-2.0
3815 *
3816 * Unless required by applicable law or agreed to in writing, software
3817 * distributed under the License is distributed on an "AS IS" BASIS,
3818 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3819 * See the License for the specific language governing permissions and
3820 * limitations under the License.
3821 */class Co extends Bm{constructor(){super("github.com")}static credential(e){return Ec._fromParams({providerId:Co.PROVIDER_ID,signInMethod:Co.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Co.credentialFromTaggedObject(e)}static credentialFromError(e){return Co.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Co.credential(e.oauthAccessToken)}catch{return null}}}Co.GITHUB_SIGN_IN_METHOD="github.com";Co.PROVIDER_ID="github.com";/**
3822 * @license
3823 * Copyright 2020 Google LLC
3824 *
3825 * Licensed under the Apache License, Version 2.0 (the "License");
3826 * you may not use this file except in compliance with the License.
3827 * You may obtain a copy of the License at
3828 *
3829 *   http://www.apache.org/licenses/LICENSE-2.0
3830 *
3831 * Unless required by applicable law or agreed to in writing, software
3832 * distributed under the License is distributed on an "AS IS" BASIS,
3833 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3834 * See the License for the specific language governing permissions and
3835 * limitations under the License.
3836 */class Do extends Bm{constructor(){super("twitter.com")}static credential(e,t){return Ec._fromParams({providerId:Do.PROVIDER_ID,signInMethod:Do.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Do.credentialFromTaggedObject(e)}static credentialFromError(e){return Do.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return Do.credential(t,r)}catch{return null}}}Do.TWITTER_SIGN_IN_METHOD="twitter.com";Do.PROVIDER_ID="twitter.com";/**
3837 * @license
3838 * Copyright 2020 Google LLC
3839 *
3840 * Licensed under the Apache License, Version 2.0 (the "License");
3841 * you may not use this file except in compliance with the License.
3842 * You may obtain a copy of the License at
3843 *
3844 *   http://www.apache.org/licenses/LICENSE-2.0
3845 *
3846 * Unless required by applicable law or agreed to in writing, software
3847 * distributed under the License is distributed on an "AS IS" BASIS,
3848 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3849 * See the License for the specific language governing permissions and
3850 * limitations under the License.
3851 */async function bW(n,e){return a3(n,"POST","/v1/accounts:signUp",rx(n,e))}/**
3852 * @license
3853 * Copyright 2020 Google LLC
3854 *
3855 * Licensed under the Apache License, Version 2.0 (the "License");
3856 * you may not use this file except in compliance with the License.
3857 * You may obtain a copy of the License at
3858 *
3859 *   http://www.apache.org/licenses/LICENSE-2.0
3860 *
3861 * Unless required by applicable law or agreed to in writing, software
3862 * distributed under the License is distributed on an "AS IS" BASIS,
3863 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3864 * See the License for the specific language governing permissions and
3865 * limitations under the License.
3866 */class el{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,s=!1){const i=await Xs._fromIdTokenResponse(e,r,s),l=oD(r);return new el({user:i,providerId:l,_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){await e._updateTokensIfNecessary(r,!0);const s=oD(r);return new el({user:e,providerId:s,_tokenResponse:r,operationType:t})}}function oD(n){return n.providerId?n.providerId:"phoneNumber"in n?"phone":null}/**
3867 * @license
3868 * Copyright 2020 Google LLC
3869 *
3870 * Licensed under the Apache License, Version 2.0 (the "License");
3871 * you may not use this file except in compliance with the License.
3872 * You may obtain a copy of the License at
3873 *
3874 *   http://www.apache.org/licenses/LICENSE-2.0
3875 *
3876 * Unless required by applicable law or agreed to in writing, software
3877 * distributed under the License is distributed on an "AS IS" BASIS,
3878 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3879 * See the License for the specific language governing permissions and
3880 * limitations under the License.
3881 */async function vW(n){var s;if(Qs(n.app))return Promise.reject(Bo(n));const e=sx(n);if(await e._initializationPromise,(s=e.currentUser)!=null&&s.isAnonymous)return new el({user:e.currentUser,providerId:null,operationType:"signIn"});const t=await bW(e,{returnSecureToken:!0}),r=await el._fromIdTokenResponse(e,"signIn",t,!0);return await e._updateCurrentUser(r.user),r}/**
3882 * @license
3883 * Copyright 2020 Google LLC
3884 *
3885 * Licensed under the Apache License, Version 2.0 (the "License");
3886 * you may not use this file except in compliance with the License.
3887 * You may obtain a copy of the License at
3888 *
3889 *   http://www.apache.org/licenses/LICENSE-2.0
3890 *
3891 * Unless required by applicable law or agreed to in writing, software
3892 * distributed under the License is distributed on an "AS IS" BASIS,
3893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3894 * See the License for the specific language governing permissions and
3895 * limitations under the License.
3896 */class ay extends Ii{constructor(e,t,r,s){super(t.code,t.message),this.operationType=r,this.user=s,Object.setPrototypeOf(this,ay.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,s){return new ay(e,t,r,s)}}function w3(n,e,t,r){return(e==="reauthenticate"?t._getReauthenticationResolver(n):t._getIdTokenResponse(n)).catch(i=>{throw i.code==="auth/multi-factor-auth-required"?ay._fromErrorAndOperation(n,i,e,r):i})}async function wW(n,e,t=!1){const r=await dm(n,e._linkToIdToken(n.auth,await n.getIdToken()),t);return el._forOperation(n,"link",r)}/**
3897 * @license
3898 * Copyright 2019 Google LLC
3899 *
3900 * Licensed under the Apache License, Version 2.0 (the "License");
3901 * you may not use this file except in compliance with the License.
3902 * You may obtain a copy of the License at
3903 *
3904 *   http://www.apache.org/licenses/LICENSE-2.0
3905 *
3906 * Unless required by applicable law or agreed to in writing, software
3907 * distributed under the License is distributed on an "AS IS" BASIS,
3908 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3909 * See the License for the specific language governing permissions and
3910 * limitations under the License.
3911 */async function _W(n,e,t=!1){const{auth:r}=n;if(Qs(r.app))return Promise.reject(Bo(r));const s="reauthenticate";try{const i=await dm(n,w3(r,s,e,n),t);Ze(i.idToken,r,"internal-error");const l=z2(i.idToken);Ze(l,r,"internal-error");const{sub:d}=l;return Ze(n.uid===d,r,"user-mismatch"),el._forOperation(n,s,i)}catch(i){throw(i==null?void 0:i.code)==="auth/user-not-found"&&Ci(r,"user-mismatch"),i}}/**
3912 * @license
3913 * Copyright 2020 Google LLC
3914 *
3915 * Licensed under the Apache License, Version 2.0 (the "License");
3916 * you may not use this file except in compliance with the License.
3917 * You may obtain a copy of the License at
3918 *
3919 *   http://www.apache.org/licenses/LICENSE-2.0
3920 *
3921 * Unless required by applicable law or agreed to in writing, software
3922 * distributed under the License is distributed on an "AS IS" BASIS,
3923 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3924 * See the License for the specific language governing permissions and
3925 * limitations under the License.
3926 */async function TW(n,e,t=!1){if(Qs(n.app))return Promise.reject(Bo(n));const r="signIn",s=await w3(n,r,e),i=await el._fromIdTokenResponse(n,r,s);return t||await n._updateCurrentUser(i.user),i}function NW(n,e,t,r){return an(n).onIdTokenChanged(e,t,r)}function EW(n,e,t){return an(n).beforeAuthStateChanged(e,t)}const iy="__sak";/**
3927 * @license
3928 * Copyright 2019 Google LLC
3929 *
3930 * Licensed under the Apache License, Version 2.0 (the "License");
3931 * you may not use this file except in compliance with the License.
3932 * You may obtain a copy of the License at
3933 *
3934 *   http://www.apache.org/licenses/LICENSE-2.0
3935 *
3936 * Unless required by applicable law or agreed to in writing, software
3937 * distributed under the License is distributed on an "AS IS" BASIS,
3938 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3939 * See the License for the specific language governing permissions and
3940 * limitations under the License.
3941 */class _3{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(iy,"1"),this.storage.removeItem(iy),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
3942 * @license
3943 * Copyright 2020 Google LLC
3944 *
3945 * Licensed under the Apache License, Version 2.0 (the "License");
3946 * you may not use this file except in compliance with the License.
3947 * You may obtain a copy of the License at
3948 *
3949 *   http://www.apache.org/licenses/LICENSE-2.0
3950 *
3951 * Unless required by applicable law or agreed to in writing, software
3952 * distributed under the License is distributed on an "AS IS" BASIS,
3953 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3954 * See the License for the specific language governing permissions and
3955 * limitations under the License.
3956 */const SW=1e3,jW=10;class T3 extends _3{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=g3(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const r=this.storage.getItem(t),s=this.localCache[t];r!==s&&e(t,s,r)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((l,d,h)=>{this.notifyListeners(l,h)});return}const r=e.key;t?this.detachListener():this.stopPolling();const s=()=>{const l=this.storage.getItem(r);!t&&this.localCache[r]===l||this.notifyListeners(r,l)},i=this.storage.getItem(r);rW()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,jW):s()}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const s of Array.from(r))s(t&&JSON.parse(t))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)})},SW)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Ob
3956ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}T3.type="LOCAL";const AW=T3;/**
3957 * @license
3958 * Copyright 2020 Google LLC
3959 *
3960 * Licensed under the Apache License, Version 2.0 (the "License");
3961 * you may not use this file except in compliance with the License.
3962 * You may obtain a copy of the License at
3963 *
3964 *   http://www.apache.org/licenses/LICENSE-2.0
3965 *
3966 * Unless required by applicable law or agreed to in writing, software
3967 * distributed under the License is distributed on an "AS IS" BASIS,
3968 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3969 * See the License for the specific language governing permissions and
3970 * limitations under the License.
3971 */class N3 extends _3{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}N3.type="SESSION";const E3=N3;/**
3972 * @license
3973 * Copyright 2019 Google LLC
3974 *
3975 * Licensed under the Apache License, Version 2.0 (the "License");
3976 * you may not use this file except in compliance with the License.
3977 * You may obtain a copy of the License at
3978 *
3979 *   http://www.apache.org/licenses/LICENSE-2.0
3980 *
3981 * Unless required by applicable law or agreed to in writing, software
3982 * distributed under the License is distributed on an "AS IS" BASIS,
3983 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3984 * See the License for the specific language governing permissions and
3985 * limitations under the License.
3986 */function CW(n){return Promise.all(n.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}}))}/**
3987 * @license
3988 * Copyright 2019 Google LLC
3989 *
3990 * Licensed under the Apache License, Version 2.0 (the "License");
3991 * you may not use this file except in compliance with the License.
3992 * You may obtain a copy of the License at
3993 *
3994 *   http://www.apache.org/licenses/LICENSE-2.0
3995 *
3996 * Unless required by applicable law or agreed to in writing, software
3997 * distributed under the License is distributed on an "AS IS" BASIS,
3998 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3999 * See the License for the specific language governing permissions and
4000 * limitations under the License.
4001 */class ax{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find(s=>s.isListeningto(e));if(t)return t;const r=new ax(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:r,eventType:s,data:i}=t.data,l=this.handlersMap[s];if(!(l!=null&&l.size))return;t.ports[0].postMessage({status:"ack",eventId:r,eventType:s});const d=Array.from(l).map(async m=>m(t.origin,i)),h=await CW(d);t.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:h})}_subscribe(e,t){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),(!t||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}ax.receivers=[];/**
4002 * @license
4003 * Copyright 2020 Google LLC
4004 *
4005 * Licensed under the Apache License, Version 2.0 (the "License");
4006 * you may not use this file except in compliance with the License.
4007 * You may obtain a copy of the License at
4008 *
4009 *   http://www.apache.org/licenses/LICENSE-2.0
4010 *
4011 * Unless required by applicable law or agreed to in writing, software
4012 * distributed under the License is distributed on an "AS IS" BASIS,
4013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4014 * See the License for the specific language governing permissions and
4015 * limitations under the License.
4016 */function Y2(n="",e=10){let t="";for(let r=0;r<e;r++)t+=Math.floor(Math.random()*10);return n+t}/**
4017 * @license
4018 * Copyright 2019 Google LLC
4019 *
4020 * Licensed under the Apache License, Version 2.0 (the "License");
4021 * you may not use this file except in compliance with the License.
4022 * You may obtain a copy of the License at
4023 *
4024 *   http://www.apache.org/licenses/LICENSE-2.0
4025 *
4026 * Unless required by applicable law or agreed to in writing, software
4027 * distributed under the License is distributed on an "AS IS" BASIS,
4028 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4029 * See the License for the specific language governing permissions and
4030 * limitations under the License.
4031 */class DW{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,r=50){const s=typeof MessageChannel<"u"?new MessageChannel:null;if(!s)throw new Error("connection_unavailable");let i,l;return new Promise((d,h)=>{const m=Y2("",20);s.port1.start();const g=setTimeout(()=>{h(new Error("unsupported_event"))},r);l={messageChannel:s,onMessage(p){const b=p;if(b.data.eventId===m)switch(b.data.status){case"ack":clearTimeout(g),i=setTimeout(()=>{h(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),d(b.data.response);break;default:clearTimeout(g),clearTimeout(i),h(new Error("invalid_response"));break}}},this.handlers.add(l),s.port1.addEventListener("message",l.onMessage),this.target.postMessage({eventType:e,eventId:m,data:t},[s.port2])}).finally(()=>{l&&this.removeMessageHandler(l)})}}/**
4032 * @license
4033 * Copyright 2020 Google LLC
4034 *
4035 * Licensed under the Apache License, Version 2.0 (the "License");
4036 * you may not use this file except in compliance with the License.
4037 * You may obtain a copy of the License at
4038 *
4039 *   http://www.apache.org/licenses/LICENSE-2.0
4040 *
4041 * Unless required by applicable law or agreed to in writing, software
4042 * distributed under the License is distributed on an "AS IS" BASIS,
4043 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4044 * See the License for the specific language governing permissions and
4045 * limitations under the License.
4046 */function qa(){return window}function kW(n){qa().location.href=n}/**
4047 * @license
4048 * Copyright 2020 Google LLC.
4049 *
4050 * Licensed under the Apache License, Version 2.0 (the "License");
4051 * you may not use this file except in compliance with the License.
4052 * You may obtain a copy of the License at
4053 *
4054 *   http://www.apache.org/licenses/LICENSE-2.0
4055 *
4056 * Unless required by applicable law or agreed to in writing, software
4057 * distributed under the License is distributed on an "AS IS" BASIS,
4058 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4059 * See the License for the specific language governing permissions and
4060 * limitations under the License.
4061 */function S3(){return typeof qa().WorkerGlobalScope<"u"&&typeof qa().importScripts=="function"}async function IW(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function RW(){var n;return((n=navigator==null?void 0:navigator.serviceWorker)==null?void 0:n.controller)||null}function MW(){return S3()?self:null}/**
4062 * @license
4063 * Copyright 2019 Google LLC
4064 *
4065 * Licensed under the Apache License, Version 2.0 (the "License");
4066 * you may not use this file except in compliance with the License.
4067 * You may obtain a copy of the License at
4068 *
4069 *   http://www.apache.org/licenses/LICENSE-2.0
4070 *
4071 * Unless required by applicable law or agreed to in writing, software
4072 * distributed under the License is distributed on an "AS IS" BASIS,
4073 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4074 * See the License for the specific language governing permissions and
4075 * limitations under the License.
4076 */const j3="firebaseLocalStorageDb",PW=1,oy="firebaseLocalStorage",A3="fbase_key";class Um{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function ix(n,e){return n.transaction([oy],e?"readwrite":"readonly").objectStore(oy)}function OW(){const n=indexedDB.deleteDatabase(j3);return new Um(n).toPromise()}function j1(){const n=indexedDB.open(j3,PW);return new Promise((e,t)=>
4076{n.addEventListener("error",()=>{t(n.error)}),n.addEventListener("upgradeneeded",()=>{const r=n.result;try{r.createObjectStore(oy,{keyPath:A3})}catch(s){t(s)}}),n.addEventListener("success",async()=>{const r=n.result;r.objectStoreNames.contains(oy)?e(r):(r.close(),await OW(),e(await j1()))})})}async function lD(n,e,t){const r=ix(n,!0).put({[A3]:e,value:t});return new Um(r).toPromise()}async function LW(n,e){const t=ix(n,!1).get(e),r=await new Um(t).toPromise();return r===void 0?null:r.value}function cD(n,e){const t=ix(n,!0).delete(e);return new Um(t).toPromise()}const VW=800,FW=3;class C3{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await j1(),this.db)}async _withRetries(e){let t=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(t++>FW)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return S3()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=ax._getInstance(MW()),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var t,r;if(this.activeServiceWorker=await IW(),!this.activeServiceWorker)return;this.sender=new DW(this.activeServiceWorker);const e=await this.sender._send("ping",{},800);e&&(t=e[0])!=null&&t.fulfilled&&(r=e[0])!=null&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||RW()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await j1();return await lD(e,iy,"1"),await cD(e,iy),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(r=>lD(r,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){const t=await this._withRetries(r=>LW(r,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>cD(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(s=>{const i=ix(s,!1).getAll();return new Um(i).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const t=[],r=new Set;if(e.length!==0)for(const{fbase_key:s,value:i}of e)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(i)&&(this.notifyListeners(s,i),t.push(s));for(const s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),t.push(s));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const s of Array.from(r))s(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),VW)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Ob
vendor: 4,318 bytes, lines 4076-4125
4076ject.keys(this.listeners).length===0&&this.stopPolling()}}C3.type="LOCAL";const BW=C3;new Fm(3e4,6e4);/**
4077 * @license
4078 * Copyright 2021 Google LLC
4079 *
4080 * Licensed under the Apache License, Version 2.0 (the "License");
4081 * you may not use this file except in compliance with the License.
4082 * You may obtain a copy of the License at
4083 *
4084 *   http://www.apache.org/licenses/LICENSE-2.0
4085 *
4086 * Unless required by applicable law or agreed to in writing, software
4087 * distributed under the License is distributed on an "AS IS" BASIS,
4088 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4089 * See the License for the specific language governing permissions and
4090 * limitations under the License.
4091 */function UW(n,e){return e?bi(e):(Ze(n._popupRedirectResolver,n,"argument-error"),n._popupRedirectResolver)}/**
4092 * @license
4093 * Copyright 2019 Google LLC
4094 *
4095 * Licensed under the Apache License, Version 2.0 (the "License");
4096 * you may not use this file except in compliance with the License.
4097 * You may obtain a copy of the License at
4098 *
4099 *   http://www.apache.org/licenses/LICENSE-2.0
4100 *
4101 * Unless required by applicable law or agreed to in writing, software
4102 * distributed under the License is distributed on an "AS IS" BASIS,
4103 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4104 * See the License for the specific language governing permissions and
4105 * limitations under the License.
4106 */class G2 extends b3{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Ku(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Ku(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Ku(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function zW(n){return TW(n.auth,new G2(n),n.bypassAuthState)}function qW(n){const{auth:e,user:t}=n;return Ze(t,e,"internal-error"),_W(t,new G2(n),n.bypassAuthState)}async function HW(n){const{auth:e,user:t}=n;return Ze(t,e,"internal-error"),wW(t,new G2(n),n.bypassAuthState)}/**
4107 * @license
4108 * Copyright 2020 Google LLC
4109 *
4110 * Licensed under the Apache License, Version 2.0 (the "License");
4111 * you may not use this file except in compliance with the License.
4112 * You may obtain a copy of the License at
4113 *
4114 *   http://www.apache.org/licenses/LICENSE-2.0
4115 *
4116 * Unless required by applicable law or agreed to in writing, software
4117 * distributed under the License is distributed on an "AS IS" BASIS,
4118 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4119 * See the License for the specific language governing permissions and
4120 * limitations under the License.
4121 */class D3{constructor(e,t,r,s,i=!1){this.auth=e,this.resolver=r,this.user=s,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:t,sessionId:r,postBody:s,tenantId:i,error:l,type:d}=e;if(l){this.reject(l);return}const h={auth:this.auth,requestUri:t,sessionId:r,tenantId:i||void 0,postBody:s||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(d)(h))}catch(m){this.reject(m)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return zW;case"linkViaPopup":case"linkViaRedirect":return HW;case"reauthViaPopup":case"reauthViaRedirect":return qW;default:Ci(this.auth,"internal-error")}}resolve(e){Di(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Di(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
4122 * @license
4123 * Copyright 2020 Google LLC
4124 *
4125 * Licensed under the Apache License, Version 2.0 (the "License");
4126 * you may not use this file except in compliance with the License.
4127 * You may obtain a copy of the License at
4128 *
4129 *   http://www.apache.org/licenses/LICENSE-2.0
4130 *
4131 * Unless required by applicable law or agreed to in writing, software
4132 * distributed under the License is distributed on an "AS IS" BASIS,
4133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4134 * See the License for the specific language governing permissions and
4135 * limitations under the License.
4136 */const YW=new Fm(2e3,1e4);class Uu extends D3{constructor(e,t,r,s,i){super(e,t,s,i),this.provider=r,this.authWindow=null,this.pollId=null,Uu.currentPopupAction&&Uu.currentPopupAction.cancel(),Uu.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ze(e,this.auth,"internal-error"),e}async onExecution(){Di(this.filter.length===1,"Popup operations only handle one event");const e=Y2();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(t=>{this.reject(t)}),this.resolver._isIframeWebStorageSupported(this.auth,t=>{t||this.reject(za(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)==null?void 0:e.associatedEvent)||null}cancel(){this.reject(za(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Uu.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,r;if((r=(t=this.authWindow)==null?void 0:t.window)!=null&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(za(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,YW.get())};e()}}Uu.currentPopupAction=null;/**
4137 * @license
4138 * Copyright 2020 Google LLC
4139 *
4140 * Licensed under the Apache License, Version 2.0 (the "License");
4141 * you may not use this file except in compliance with the License.
4142 * You may obtain a copy of the License at
4143 *
4144 *   http://www.apache.org/licenses/LICENSE-2.0
4145 *
4146 * Unless required by applicable law or agreed to in writing, software
4147 * distributed under the License is distributed on an "AS IS" BASIS,
4148 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4149 * See the License for the specific language governing permissions and
4150 * limitations under the License.
4151 */const GW="pendingRedirect",c0=new Map;class $W extends D3{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=c0.get(this.auth._key());if(!e){try{const r=await KW(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(t){e=()=>Promise.reject(t)}c0.set(this.auth._key(),e)}return this.bypassAuthState||c0.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function KW(n,e){const t=XW(e),r=QW(n);if(!await r._isAvailable())return!1;const s=await r._get(t)==="true";return await r._remove(t),s}function WW(n,e){c0.set(n._key(),e)}function QW(n){return bi(n._redirectPersistence)}function XW(n){return l0(GW,n.config.apiKey,n.name)}async function JW(n,e,t=!1){if(Qs(n.app))return Promise.reject(Bo(n));const r=sx(n),s=UW(r,e),l=await new $W(r,s,t).execute();return l&&!t&&(delete l.user._redirectEventId,await r._persistUserIfCurrent(l.user),await r._setRedirectUser(null,e)),l}/**
4152 * @license
4153 * Copyright 2020 Google LLC
4154 *
4155 * Licensed under the Apache License, Version 2.0 (the "License");
4156 * you may not use this file except in compliance with the License.
4157 * You may obtain a copy of the License at
4158 *
4159 *   http://www.apache.org/licenses/LICENSE-2.0
4160 *
4161 * Unless required by applicable law or agreed to in writing, softw
4161are
4162 * distributed under the License is distributed on an "AS IS" BASIS,
4163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4164 * See the License for the specific language governing permissions and
4165 * limitations under the License.
4166 */const ZW=600*1e3;class eQ{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!tQ(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var r;if(e.error&&!k3(e)){const s=((r=e.error.code)==null?void 0:r.split("auth/")[1])||"internal-error";t.onError(za(this.auth,s))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const r=t.eventId===null||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=ZW&&this.cachedEventUids.clear(),this.cachedEventUids.has(uD(e))}saveEventToCache(e){this.cachedEventUids.add(uD(e)),this.lastProcessedEventTime=Date.now()}}function uD(n){return[n.type,n.eventId,n.sessionId,n.tenantId].filter(e=>e).join("-")}function k3({type:n,error:e}){return n==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function tQ(n){switch(n.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return k3(n);default:return!1}}/**
4167 * @license
4168 * Copyright 2020 Google LLC
4169 *
4170 * Licensed under the Apache License, Version 2.0 (the "License");
4171 * you may not use this file except in compliance with the License.
4172 * You may obtain a copy of the License at
4173 *
4174 *   http://www.apache.org/licenses/LICENSE-2.0
4175 *
4176 * Unless required by applicable law or agreed to in writing, software
4177 * distributed under the License is distributed on an "AS IS" BASIS,
4178 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4179 * See the License for the specific language governing permissions and
4180 * limitations under the License.
4181 */async function nQ(n,e={}){return Xd(n,"GET","/v1/projects",e)}/**
4182 * @license
4183 * Copyright 2020 Google LLC
4184 *
4185 * Licensed under the Apache License, Version 2.0 (the "License");
4186 * you may not use this file except in compliance with the License.
4187 * You may obtain a copy of the License at
4188 *
4189 *   http://www.apache.org/licenses/LICENSE-2.0
4190 *
4191 * Unless required by applicable law or agreed to in writing, software
4192 * distributed under the License is distributed on an "AS IS" BASIS,
4193 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4194 * See the License for the specific language governing permissions and
4195 * limitations under the License.
4196 */const rQ=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,sQ=/^https?/;async function aQ(n){if(n.config.emulator)return;const{authorizedDomains:e}=await nQ(n);for(const t of e)try{if(iQ(t))return}catch{}Ci(n,"unauthorized-domain")}function iQ(n){const e=E1(),{protocol:t,hostname:r}=new URL(e);if(n.startsWith("chrome-extension://")){const l=new URL(n);return l.hostname===""&&r===""?t==="chrome-extension:"&&n.replace("chrome-extension://","")===e.replace("chrome-extension://",""):t==="chrome-extension:"&&l.hostname===r}if(!sQ.test(t))return!1;if(rQ.test(n))return r===n;const s=n.replace(/\./g,"\\.");return new RegExp("^(.+\\."+s+"|"+s+")$","i").test(r)}/**
4197 * @license
4198 * Copyright 2020 Google LLC.
4199 *
4200 * Licensed under the Apache License, Version 2.0 (the "License");
4201 * you may not use this file except in compliance with the License.
4202 * You may obtain a copy of the License at
4203 *
4204 *   http://www.apache.org/licenses/LICENSE-2.0
4205 *
4206 * Unless required by applicable law or agreed to in writing, softw
4206are
4207 * distributed under the License is distributed on an "AS IS" BASIS,
4208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4209 * See the License for the specific language governing permissions and
4210 * limitations under the License.
4211 */const oQ=new Fm(3e4,6e4);function dD(){const n=qa().___jsl;if(n!=null&&n.H){for(const e of Object.keys(n.H))if(n.H[e].r=n.H[e].r||[],n.H[e].L=n.H[e].L||[],n.H[e].r=[...n.H[e].L],n.CP)for(let t=0;t<n.CP.length;t++)n.CP[t]=null}}function lQ(n){return new Promise((e,t)=>{var s,i,l;function r(){dD(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{dD(),t(za(n,"network-request-failed"))},timeout:oQ.get()})}if((i=(s=qa().gapi)==null?void 0:s.iframes)!=null&&i.Iframe)e(gapi.iframes.getContext());else if((l=qa().gapi)!=null&&l.load)r();else{const d=hW("iframefcb");return qa()[d]=()=>{gapi.load?r():t(za(n,"network-request-failed"))},uW(`${dW()}?onload=${d}`).catch(h=>t(h))}}).catch(e=>{throw u0=null,e})}let u0=null;function cQ(n){return u0=u0||lQ(n),u0}/**
4212 * @license
4213 * Copyright 2020 Google LLC.
4214 *
4215 * Licensed under the Apache License, Version 2.0 (the "License");
4216 * you may not use this file except in compliance with the License.
4217 * You may obtain a copy of the License at
4218 *
4219 *   http://www.apache.org/licenses/LICENSE-2.0
4220 *
4221 * Unless required by applicable law or agreed to in writing, software
4222 * distributed under the License is distributed on an "AS IS" BASIS,
4223 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4224 * See the License for the specific language governing permissions and
4225 * limitations under the License.
4226 */const uQ=new Fm(5e3,15e3),dQ="__/auth/iframe",hQ="emulator/auth/iframe",fQ={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},mQ=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function pQ(n){const e=n.config;Ze(e.authDomain,n,"auth-domain-config-required");const t=e.emulator?U2(e,hQ):`https://${n.config.authDomain}/${dQ}`,r={apiKey:e.apiKey,appName:n.name,v:Vd},s=mQ.get(n.config.apiHost);s&&(r.eid=s);const i=n._getFrameworks();return i.length&&(r.fw=i.join(",")),`${t}?${Tm(r).slice(1)}`}async function gQ(n){const e=await cQ(n),t=qa().gapi;return Ze(t,n,"internal-error"),e.open({where:document.body,url:pQ(n),messageHandlersFilter:t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:fQ,dontclear:!0},r=>new Promise(async(s,i)=>{await r.restyle({setHideOnLeave:!1});const l=za(n,"network-request-failed"),d=qa().setTimeout(()=>{i(l)},uQ.get());function h(){qa().clearTimeout(d),s(r)}r.ping(h).then(h,()=>{i(l)})}))}/**
4227 * @license
4228 * Copyright 2020 Google LLC.
4229 *
4230 * Licensed under the Apache License, Version 2.0 (the "License");
4231 * you may not use this file except in compliance with the License.
4232 * You may obtain a copy of the License at
4233 *
4234 *   http://www.apache.org/licenses/LICENSE-2.0
4235 *
4236 * Unless required by applicable law or agreed to in writing, software
4237 * distributed under the License is distributed on an "AS IS" BASIS,
4238 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4239 * See the License for the specific language governing permissions and
4240 * limitations under the License.
4241 */const yQ={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},xQ=500,bQ=600,vQ="_blank",wQ="http://localhost";class hD{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function _Q(n,e,t,r=xQ,s=bQ){const i=Math.max((window.screen.availHeight-s)/2,0).toString(),l=Math.max((window.screen.availWidth-r)/2,0).toString();let d="";const h={...yQ,width:r.toString(),height:s.toString(),top:i,left:l},m=Wn().toLowerCase();t&&(d=d3(m)?vQ:t),c3(m)&&(e=e||wQ,h.scrollbars="yes");const g=Object.entries(h).reduce((b,[w,_])=>`${b}${w}=${_},`,"");if(nW(m)&&d!=="_self")return TQ(e||"",d),new hD(null);const p=window.open(e||"",d,g);Ze(p,n,"popup-blocked");try{p.focus()}catch{}return new hD(p)}function TQ(n,e){const t=document.createElement("a");t.href=n,t.target=e;const r=document.createEvent("MouseEvent");
4241r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),t.dispatchEvent(r)}/**
4242 * @license
4243 * Copyright 2021 Google LLC
4244 *
4245 * Licensed under the Apache License, Version 2.0 (the "License");
4246 * you may not use this file except in compliance with the License.
4247 * You may obtain a copy of the License at
4248 *
4249 *   http://www.apache.org/licenses/LICENSE-2.0
4250 *
4251 * Unless required by applicable law or agreed to in writing, software
4252 * distributed under the License is distributed on an "AS IS" BASIS,
4253 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4254 * See the License for the specific language governing permissions and
4255 * limitations under the License.
4256 */const NQ="__/auth/handler",EQ="emulator/auth/handler",SQ=encodeURIComponent("fac");async function fD(n,e,t,r,s,i){Ze(n.config.authDomain,n,"auth-domain-config-required"),Ze(n.config.apiKey,n,"invalid-api-key");const l={apiKey:n.config.apiKey,appName:n.name,authType:t,redirectUrl:r,v:Vd,eventId:s};if(e instanceof v3){e.setDefaultLanguage(n.languageCode),l.providerId=e.providerId||"",Dz(e.getCustomParameters())||(l.customParameters=JSON.stringify(e.getCustomParameters()));for(const[g,p]of Object.entries({}))l[g]=p}if(e instanceof Bm){const g=e.getScopes().filter(p=>p!=="");g.length>0&&(l.scopes=g.join(","))}n.tenantId&&(l.tid=n.tenantId);const d=l;for(const g of Object.keys(d))d[g]===void 0&&delete d[g];const h=await n._getAppCheckToken(),m=h?`#${SQ}=${encodeURIComponent(h)}`:"";return`${jQ(n)}?${Tm(d).slice(1)}${m}`}function jQ({config:n}){return n.emulator?U2(n,EQ):`https://${n.authDomain}/${NQ}`}/**
4257 * @license
4258 * Copyright 2020 Google LLC
4259 *
4260 * Licensed under the Apache License, Version 2.0 (the "License");
4261 * you may not use this file except in compliance with the License.
4262 * You may obtain a copy of the License at
4263 *
4264 *   http://www.apache.org/licenses/LICENSE-2.0
4265 *
4266 * Unless required by applicable law or agreed to in writing, software
4267 * distributed under the License is distributed on an "AS IS" BASIS,
4268 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4269 * See the License for the specific language governing permissions and
4270 * limitations under the License.
4271 */const ew="webStorageSupport";class AQ{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=E3,this._completeRedirectFn=JW,this._overrideRedirectResult=WW}async _openPopup(e,t,r,s){var l;Di((l=this.eventManagers[e._key()])==null?void 0:l.manager,"_initialize() not called before _openPopup()");const i=await fD(e,t,r,E1(),s);return _Q(e,i,Y2())}async _openRedirect(e,t,r,s){await this._originValidation(e);const i=await fD(e,t,r,E1(),s);return kW(i),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:s,promise:i}=this.eventManagers[t];return s?Promise.resolve(s):(Di(i,"If manager is not set, promise should be"),i)}const r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch(()=>{delete this.eventManagers[t]}),r}async initAndGetManager(e){const t=await gQ(e),r=new eQ(e);return t.register("authEvent",s=>(Ze(s==null?void 0:s.authEvent,e,"invalid-auth-event"),{status:r.onEvent(s.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(ew,{type:ew},s=>{var l;const i=(l=s==null?void 0:s[0])==null?void 0:l[ew];i!==void 0&&t(!!i),Ci(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=aQ(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return g3()||u3()||q2()}}const CQ=AQ;var mD="@firebase/auth",pD="1.13.0";/**
4272 * @license
4273 * Copyright 2020 Google LLC
4274 *
4275 * Licensed under the Apache License, Version 2.0 (the "License");
4276 * you may not use this file except in compliance with the License.
4277 * You may obtain a copy of the License at
4278 *
4279 *   http://www.apache.org/licenses/LICENSE-2.0
4280 *
4281 * Unless required by applicable law or agreed to in writing, softw
4281are
4282 * distributed under the License is distributed on an "AS IS" BASIS,
4283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4284 * See the License for the specific language governing permissions and
4285 * limitations under the License.
4286 */class DQ{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)==null?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged(r=>{e((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Ze(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
4287 * @license
4288 * Copyright 2020 Google LLC
4289 *
4290 * Licensed under the Apache License, Version 2.0 (the "License");
4291 * you may not use this file except in compliance with the License.
4292 * You may obtain a copy of the License at
4293 *
4294 *   http://www.apache.org/licenses/LICENSE-2.0
4295 *
4296 * Unless required by applicable law or agreed to in writing, software
4297 * distributed under the License is distributed on an "AS IS" BASIS,
4298 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4299 * See the License for the specific language governing permissions and
4300 * limitations under the License.
4301 */function kQ(n){switch(n){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function IQ(n){rd(new pc("auth",(e,{options:t})=>{const r=e.getProvider("app").getImmediate(),s=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:l,authDomain:d}=r.options;Ze(l&&!l.includes(":"),"invalid-api-key",{appName:r.name});const h={apiKey:l,authDomain:d,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:y3(n)},m=new lW(r,s,i,h);return mW(m,t),m},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider("auth-internal").initialize()})),rd(new pc("auth-internal",e=>{const t=sx(e.getProvider("auth").getImmediate());return(r=>new DQ(r))(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),Lo(mD,pD,kQ(n)),Lo(mD,pD,"esm2020")}/**
4302 * @license
4303 * Copyright 2021 Google LLC
4304 *
4305 * Licensed under the Apache License, Version 2.0 (the "License");
4306 * you may not use this file except in compliance with the License.
4307 * You may obtain a copy of the License at
4308 *
4309 *   http://www.apache.org/licenses/LICENSE-2.0
4310 *
4311 * Unless required by applicable law or agreed to in writing, software
4312 * distributed under the License is distributed on an "AS IS" BASIS,
4313 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4314 * See the License for the specific language governing permissions and
4315 * limitations under the License.
4316 */const RQ=300,MQ=UI("authIdTokenMaxAge")||RQ;let gD=null;const PQ=n=>async e=>{const t=e&&await e.getIdTokenResult(),r=t&&(new Date().getTime()-Date.parse(t.issuedAtTime))/1e3;if(r&&r>MQ)return;const s=t==null?void 0:t.token;gD!==s&&(gD=s,await fetch(n,{method:s?"POST":"DELETE",headers:s?{Authorization:`Bearer ${s}`}:{}}))};function OQ(n=WI()){const e=Nm(n,"auth");if(e.isInitialized())return e.getImmediate();const t=fW(n,{popupRedirectResolver:CQ,persistence:[BW,AW,E3]}),r=UI("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const i=new URL(r,location.origin);if(location.origin===i.origin){const l=PQ(i.toString());EW(t,l,()=>l(t.currentUser)),NW(t,d=>
4316l(d))}}const s=FI("auth");return s&&pW(t,`http://${s}`),t}function LQ(){var n;return((n=document.getElementsByTagName("head"))==null?void 0:n[0])??document}cW({loadJS(n){return new Promise((e,t)=>{const r=document.createElement("script");r.setAttribute("src",n),r.onload=e,r.onerror=s=>{const i=za("internal-error");i.customData=s,t(i)},r.type="text/javascript",r.charset="UTF-8",LQ().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});IQ("Browser");const VQ="gen-lang-client-0645135435",FQ="1:487679546541:web:bc845d7f76035721a22224",BQ="AIzaSyCi75Iwi75LVLvVDdfeqhCcOihjYARML1k",UQ="gen-lang-client-0645135435.firebaseapp.com",zQ="ai-studio-c45f20fe-0279-4f48-8462-b7df143d9067",qQ="gen-lang-client-0645135435.firebasestorage.app",HQ="487679546541",YQ="",GQ="487679546541-lg7grbs6smh84jsjjdm3niv4qqhcv48v.apps.googleusercontent.com",I3={projectId:VQ,appId:FQ,apiKey:BQ,authDomain:UQ,firestoreDatabaseId:zQ,storageBucket:qQ,messagingSenderId:HQ,measurementId:YQ,oAuthClientId:GQ},R3=KI(I3),pi=OQ(R3),ot=SM(R3,I3.firestoreDatabaseId);let Dg=null;async function M3(){var n;return pi.currentUser||(Dg||(Dg=vW(pi).catch(e=>{console.warn("익명 로그인 실패(관리자 API 인증 불가):",e),Dg=null})),await Dg),(n=pi.currentUser)==null?void 0:n.getIdToken()}const P3=D.createContext({isAdmin:!1,login:()=>!1,logout:()=>{},isDirty:!1,setIsDirty:()=>{},pendingNavigation:null,setPendingNavigation:()=>{}}),$Q=({children:n})=>{const[e,t]=D.useState(()=>localStorage.getItem("admin_pwd")==="cloverhub0011"),[r,s]=D.useState(!1),[i,l]=D.useState(null),d=m=>m==="cloverhub0011"?(t(!0),localStorage.setItem("admin_pwd","cloverhub0011"),!0):!1,h=()=>{t(!1),s(!1),l(null),localStorage.removeItem("admin_pwd")};return c.jsx(P3.Provider,{value:{isAdmin:e,login:d,logout:h,isDirty:r,setIsDirty:s,pendingNavigation:i,setPendingNavigation:l},children:n})},ox=()=>D.useContext(P3),O3=D.createContext({lang:"ko",setLang:()=>{},t:n=>n}),KQ=({children:n})=>{const[e,t]=D.useState(()=>{const l=localStorage.getItem("clover_lang");return l==="en"||l==="ko"?l:"ko"}),r=l=>{const d=l==="en"?"/ko/en":"/ko/ko",h=window.location.hostname;document.cookie=`googtrans=${d}; path=/;`,h&&(document.cookie=`googtrans=${d}; path=/; domain=${h};`);const m=document.querySelector(".goog-te-combo");m?(m.value=l==="en"?"en":"ko",m.dispatchEvent(new Event("change"))):window.location.reload()},s=l=>{l!==e&&(t(l),localStorage.setItem("clover_lang",l),r(l))};D.useEffect(()=>{if(e==="en"){const l="/ko/en",d=window.location.hostname;document.cookie=`googtrans=${l}; path=/;`,d&&(document.cookie=`googtrans=${l}; path=/; domain=${d};`)}},[e]);const i=(l,d)=>e==="ko"?l:d;return c.jsx(O3.Provider,{value:{lang:e,setLang:s,t:i},children:n})},L3=()=>D.useContext(O3),Cu=({to:n,className:e,text:t,isExternal:r=!1})=>{const{isDirty:s,setPendingNavigation:i}=ox(),l=d=>{s&&!r&&(d.preventDefault(),i(n))};return r?c.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:e,children:c.jsx("span",{className:"inline-block",children:t})}):c.jsx(bn,{to:n,className:e,onClick:l,children:c.jsx("span",{className:"inline-block",children:t})})},WQ=()=>{const{isDirty:n,setPendingNavigation:e}=ox(),{lang:t,setLang:r,t:s}=L3(),[i,l]=D.useState(!1),[d,h]=D.useState(!1),[m,g]=D.useState(!1),p=ps(),[b,w]=D.useState(null),_=p.pathname==="/";D.useEffect(()=>{const A=qt(ot,"site_content","logo_config"),M=ty(A,O=>{try{if(O.exists()&&O.data().content){const q=JSON.parse(O.data().content);w(q)}}catch(q){console.error("Failed to parse logo config in Navbar:",q)}},O=>{console.error("Failed to load logo config in Navbar snapshot:",O)});return()=>M()},[]),D.useEffect(()=>{const A=()=>{l(window.scrollY>50)};return window.addEventListener("scroll",A),()=>window.removeEventListener("scroll",A)},[]),D.useEffect(()=>{h(!1)},[p]);const N=_&&!i?"bg-transparent text-white py-6":"bg-white text-gray-900 shadow-sm py-4",E=_&&!i?"text-[#39ff14]":"text-[#015133]",j=A=>{const M=p.pathname===A;return`transition-all duration-300 relative ${M?"opacity-100 font-bold":"opacity-70 hover:opacity-100"} ${M?'after:content-[""] after:absolute after:left-0 after:right-0 after:-bottom-1.5 after:h-0.5 after:bg-current':""}`},P=A=>{const M=p.pathname===A,O=A==="/ai-hub";return M?"text-base px-4 py-3 rounded-xl transition-all duration-200 flex items-center font-bold bg-gray-100 text-[#224328]":`text-base px-4 py-3 rounded-xl transition-all duration-200 flex items-center font-medium hover:bg-gray-50 active:bg-gray-100 ${O?"text-[#015133] font-bold":"text-gray-700"}`};return c.jsxs(c.Fragment,{children:[c.jsxs("header",{className:`fixed top-0 left-0 right-0 ${d?"z-[150]":"z-50"} transition-all duration-300 ${N}`,children:[c.jsxs("div",{className:"max-w-7xl mx-auto px-6 md:px-12 flex justify-between items-center",children:[c.jsxs("div",{className:"flex items-center gap-12",children:[c.jsx(bn,{to:"/",onClick:A=>{n&&(A.preventDefault(),e("/"))},className:"flex items-center gap-2 group transition-opacity hover:opacity-80",children:(()=>{const M=_&&!i&&!d?b==null?void 0:b.defaultLogoUrl:b==null?void 0:b.scrollLogoUrl,O=(b==null?void 0:b.logoWidth)||"180";return M?c.jsx(et,{src:M,alt:"CLOVER FURNITURE",style:{width:`${O}px`},className:"object-contain h-auto max-h-[44px]",referrerPolicy:"no-referrer"}):c.jsxs(c.Fragment,{children:[c.jsx(Gw,{className:`w-7 h-7 ${_&&!i?"text-white":"text-[#224328]"}`}),c.jsxs("span",{className:"text-lg md:text-xl font-bold tracking-tight mt-0.5",children:["CLOVER ",c.jsx("span",{className:"font-light",children:"FURNITURE"})]})]})})()}),c.jsxs("nav",{className:"hidden lg:flex gap-8 text-sm font-medium pt-1 items-center",children:[c.jsx(Cu,{to:"/about",className:j("/about"),text:s("소개","ABOUT")}),c.jsx(Cu,{to:"/spaces",className:j("/spaces"),text:s("제품","PRODUCTS")}),c.jsx(Cu,{to:"/design",className:j("/design"),text:s("자료실","ARCHIVE")}),c.jsx(Cu,{to:"/sustainability",className:j("/sustainability"),text:s("고객지원","SUPPORT")}),c.jsx(Cu,{to:(b==null?void 0:b.constructionUrl)||"#",className:j("_construction"),text:s("시공 사례","CASES"),isExternal:!0}),c.jsx(Cu,{to:"/ai-hub",className:`${E} transition-opacity opacity-80 hover:opacity-100 ${i?"!text-[#224328] !font-bold":""}`,text:s("크로바 AI 허브","AI HUB")})]})]}),c.jsxs("div",{className:"flex items-center gap-4 md:gap-5",children:[c.jsxs("div",{className:`notranslate flex items-center p-0.5 rounded-full border text-xs font-semibold transition-all ${_&&!i?"bg-black/30 backdrop-blur-md border-white/20 text-white":"bg-stone-100 border-stone-200 text-stone-700"}`,translate:"no",children:[c.jsx("button",{type:"button",onClick:()=>r("ko"),className:`px-2.5 py-1 rounded-full text-[11px] font-bold transition-all ${t==="ko"?_&&!i?"bg-white text-black shadow-sm":"bg-[#015133] text-white shadow-sm":"opacity-70 hover:opacity-100"}`,children:"한글"}),c.jsx("button",{type:"button",onClick:()=>r("en"),className:`px-2.5 py-1 rounded-full text-[11px] font-bold transition-all ${t==="en"?_&&!i?"bg-white text-black shadow-sm":"bg-[#015133] text-white shadow-sm":"opacity-70 hover:opacity-100"}`,children:"ENG"})]}),c.jsx("div",{className:"mt-3 hidden lg:block",children:c.jsx(bA,{variant:"header-pill"})}),c.jsx("button",{className:"lg:hidden relative p-1",onClick:()=>h(!d),"aria-label":"Toggle menu",children:d?c.jsx(ds,{size:24}):c.jsx(EU,{size:24})})]})]}),c.jsx(Cr,{children:d&&c.jsxs(c.Fragment,{children:[c.jsx(Ge.div,{initial:{opacity:0}
4316,animate:{opacity:1},exit:{opacity:0},onClick:()=>h(!1),className:"fixed inset-0 bg-black/60 backdrop-blur-md z-[100] lg:hidden"}),c.jsxs(Ge.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:25,stiffness:220},className:"fixed top-0 right-0 w-[280px] h-full bg-white text-gray-900 shadow-2xl z-[110] flex flex-col p-6 lg:hidden border-l border-gray-100 font-sans text-left",children:[c.jsxs("div",{className:"flex items-center justify-between mb-8 pb-4 border-b border-gray-100",children:[c.jsx("span",{className:"font-bold text-[#224328] text-sm tracking-wider",children:"MENU"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"notranslate flex items-center p-0.5 rounded-full border text-xs font-semibold bg-stone-100 border-stone-200 text-stone-700",translate:"no",children:[c.jsx("button",{type:"button",onClick:()=>r("ko"),className:`px-2.5 py-1 rounded-full text-[11px] font-bold transition-all ${t==="ko"?"bg-[#015133] text-white shadow-sm":"opacity-70 hover:opacity-100"}`,children:"한글"}),c.jsx("button",{type:"button",onClick:()=>r("en"),className:`px-2.5 py-1 rounded-full text-[11px] font-bold transition-all ${t==="en"?"bg-[#015133] text-white shadow-sm":"opacity-70 hover:opacity-100"}`,children:"ENG"})]}),c.jsx("button",{onClick:()=>h(!1),className:"p-2 -mr-2 text-gray-500 hover:text-gray-900 transition-colors","aria-label":"Close menu",children:c.jsx(ds,{size:20})})]})]}),c.jsxs("nav",{className:"flex flex-col gap-2",children:[c.jsx(bn,{to:"/about",onClick:A=>{h(!1),n&&(A.preventDefault(),e("/about"))},className:P("/about"),children:s("소개","ABOUT")}),c.jsx(bn,{to:"/spaces",onClick:A=>{h(!1),n&&(A.preventDefault(),e("/spaces"))},className:P("/spaces"),children:s("제품","PRODUCTS")}),c.jsx(bn,{to:"/design",onClick:A=>{h(!1),n&&(A.preventDefault(),e("/design"))},className:P("/design"),children:s("자료실","ARCHIVE")}),c.jsx(bn,{to:"/sustainability",onClick:A=>{h(!1),n&&(A.preventDefault(),e("/sustainability"))},className:P("/sustainability"),children:s("고객지원","SUPPORT")}),c.jsx("a",{href:(b==null?void 0:b.constructionUrl)||"#",target:"_blank",rel:"noopener noreferrer",onClick:()=>h(!1),className:P("_construction"),children:s("시공 사례","CASES")}),c.jsx(bn,{to:"/ai-hub",onClick:A=>{h(!1),n&&(A.preventDefault(),e("/ai-hub"))},className:P("/ai-hub"),children:s("크로바 AI 허브","AI HUB")})]}),c.jsx("div",{className:"mt-auto pt-6 border-t border-gray-100",children:c.jsxs("button",{onClick:()=>{g(!0),h(!1)},className:"w-full flex items-center gap-3 bg-gray-50 hover:bg-gray-100 p-3 rounded-xl text-gray-600 hover:text-gray-900 transition-all font-medium text-sm border border-gray-100",children:[c.jsx(Yo,{size:18,className:"text-gray-400"}),c.jsx("span",{children:"통합 검색하기"})]})})]})]})})]}),c.jsx("div",{className:"lg:hidden",children:c.jsx(bA,{variant:"floating-mobile"})}),c.jsx(lz,{isOpen:m,onClose:()=>g(!1)})]})},ar=(n,e)=>{if(Array.isArray(n))return Array.isArray(e)?e:n;if(!n||typeof n!="object")return e;if(!e||typeof e!="object")return n;const t={...n};for(const r in e)typeof e[r]=="object"&&e[r]!==null&&!Array.isArray(e[r])?t[r]=ar(n[r],e[r]):t[r]=e[r];return t},A1={companyName:"크로바가구",businessNumber:"127-86-39798",addressOffice:"본사 및 제1공장: 경기도 양주시 칠봉산로 227번길 76-39",addressFactory:"제2공장: 경기도 양주시 화합로 1325번길 403-8(덕정동)",contactPhone:"031-858-0011",contactFax:"031-858-0012",contactEmail:"[email protected]",csHours:"평일 AM 9:00 ~ PM 18:00",csLunch:"점심 PM 12:30 ~ PM 1:30",csClosed:"(토, 일요일 및 공휴일 휴무입니다)",supportTitle:"Support",supportLink1Text:"고객지원 & 상담 센터",supportLink1Url:"/support",supportLink2Text:"자료실 & 회사 뉴스",supportLink2Url:"/archive",copyright:"크로바가구",footerLinks:[{label:"관리자 모드",url:"/admin"},{label:"개인정보처리방침",url:"privacy-policy"},{label:"이용약관",url:"#"}],privacyPolicyContent:"여기에 개인정보처리방침 내용을 작성하세요.",termsOfServiceContent:"여기에 이용약관 내용을 작성하세요."},QQ=()=>{const{isDirty:n,setPendingNavigation:e}=ox(),[t,r]=D.useState(A1),[s,i]=D.useState(!1),[l,d]=D.useState(!1),h=(g,p)=>
4316{if(p.label==="개인정보처리방침"){g.preventDefault(),i(!0);return}if(p.label==="이용약관"){g.preventDefault(),d(!0);return}n&&p.url.startsWith("/")&&(g.preventDefault(),e(p.url))};D.useEffect(()=>{(async()=>{try{const p=qt(ot,"site_content","footer_config"),b=await mn(p);if(b.exists()){const w=b.data();if(w.content){const _=JSON.parse(w.content);delete _.newsletterTitle,delete _.newsletterDesc,delete _.description,delete _.contactInfo,delete _.productsLinks,delete _.companyLinks,delete _.designSustainabilityDesc,delete _.designSustainabilityTitle,r(ar(A1,_))}}}catch(p){console.error("Failed to load footer data:",p)}})()},[]);const m=g=>{if(!g)return null;const p=g.indexOf(":");if(p!==-1){const b=g.substring(0,p+1),w=g.substring(p+1).trim();return c.jsxs("div",{className:"space-y-0.5",children:[c.jsx("p",{className:"font-bold text-white",children:b}),c.jsx("p",{className:"text-gray-400",children:w})]})}return c.jsx("p",{className:"whitespace-pre-wrap",children:g})};return c.jsxs("footer",{className:"bg-[#1a1a1a] text-white pt-20 pb-10 px-6 md:px-12",children:[c.jsxs("div",{className:"max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-12 mb-16",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsx("p",{className:"text-base text-gray-500 font-medium mb-0.5",children:"주식회사"}),c.jsx("h3",{className:"text-2xl font-bold",children:t.companyName})]}),c.jsxs("div",{className:"lg:col-span-3",children:[c.jsx("h4",{className:"font-bold mb-6 uppercase tracking-wider text-sm text-gray-200",children:"ADDRESS"}),c.jsxs("div",{className:"text-xs text-gray-400 space-y-2 leading-relaxed",children:[m(t.addressOffice),m(t.addressFactory),c.jsxs("p",{className:"text-white font-bold text-[16px] pt-2 border-t border-gray-800/40 mt-3",children:["사업자등록번호: ",c.jsx("span",{className:"font-mono font-bold text-white",children:t.businessNumber})]})]})]}),c.jsxs("div",{className:"lg:col-span-2",children:[c.jsx("h4",{className:"font-bold mb-6 uppercase tracking-wider text-sm text-gray-200",children:"CONTACT US"}),c.jsxs("div",{className:"text-xs text-gray-400 space-y-1.5",children:[c.jsxs("p",{children:[c.jsx("span",{className:"text-gray-500 font-medium mr-1.5",children:"T."})," ",t.contactPhone]}),c.jsxs("p",{children:[c.jsx("span",{className:"text-gray-500 font-medium mr-1.5",children:"F."})," ",t.contactFax]}),c.jsxs("p",{children:[c.jsx("span",{className:"text-gray-500 font-medium mr-1.5",children:"E."})," ",t.contactEmail]})]})]}),c.jsxs("div",{className:"lg:col-span-3",children:[c.jsx("h4",{className:"font-bold mb-6 uppercase tracking-wider text-sm text-gray-200",children:"CS CENTER"}),c.jsxs("div",{className:"text-xs text-gray-400 space-y-1.5 leading-relaxed",children:[c.jsx("p",{children:t.csHours}),c.jsx("p",{children:t.csLunch}),c.jsx("p",{className:"text-[10px] text-[#f5f9ff] font-medium mt-1",children:t.csClosed})]})]}),c.jsxs("div",{className:"lg:col-span-2",children:[c.jsx("h4",{className:"font-bold mb-6 uppercase tracking-wider text-sm text-gray-200",children:t.supportTitle}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{children:c.jsxs(bn,{to:t.supportLink1Url,onClick:g=>h(g,{label:t.supportLink1Text,url:t.supportLink1Url}),className:"group flex items-center gap-1.5 text-xs font-bold text-white hover:text-blue-400 transition-colors",children:[c.jsx("span",{children:t.supportLink1Text}),c.jsx("span",{className:"text-[10px] text-gray-500 group-hover:text-blue-400 transition-all group-hover:translate-x-1",children:"→"})]})}),c.jsx("div",{children:c.jsxs(bn,{to:t.supportLink2Url,onClick:g=>h(g,{label:t.supportLink2Text,url:t.supportLink2Url}),className:"group flex items-center gap-1.5 text-xs font-bold text-white hover:text-blue-400 transition-colors",children:[c.jsx("span",{children:t.supportLink2Text}),c.jsx("span",{className:"text-[10px] text-gray-500 group-hover:text-blue-400 transition-all group-hover:translate-x-1",children:"→"})]})})]})]})]}),c.jsxs("div",{className:"max-w-7xl mx-auto border-t border-gray-800 pt-8 flex flex-col md:flex-row justify-between items-center gap-4 text-xs text-gray-500",children:[c.jsxs("p",{children:["© ",new Date().getFullYear()," (주)",t.copyright,". All rights reserved."]}),c.jsx("div",{className:"flex gap-6",children:t.footerLinks.map((g,p)=>g.url.startsWith("/")?c.jsx(bn,{to:g.url,onClick:b=>h(b,g),className:"hover:text-white transition-colors",children:g.label},p):c.jsx("a",{href:g.url,onClick:b=>h(b,g),className:"hover:text-white transition-colors",children:g.label},p))})]}),s&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",onClick:()=>i(!1),children:c.jsxs("div",{className:"bg-white text-gray-900 p-8 rounded-2xl max-w-2xl w-full max-h-[80vh] overflow-y-auto",onClick:g=>g.stopPropagation(),children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-xl font-bold",children:"개인정보처리방침"}),c.jsx("button",{onClick:()=>i(!1),className:"text-gray-500 hover:text-black",children:"닫기"})]}),c.jsx("div",{className:"whitespace-pre-wrap text-sm leading-relaxed",children:t.privacyPolicyContent})]})}),l&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",onClick:()=>d(!1),children:c.jsxs("div",{className:"bg-white text-gray-900 p-8 rounded-2xl max-w-2xl w-full max-h-[80vh] overflow-y-auto",onClick:g=>g.stopPropagation(),children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-xl font-bold",children:"이용약관"}),c.jsx("button",{onClick:()=>d(!1),className:"text-gray-500 hover:text-black",children:"닫기"})]}),c.jsx("div",{className:"whitespace-pre-wrap text-sm leading-relaxed",children:t.termsOfServiceContent})]})})]})},XQ=()=>
4316{const[n,e]=D.useState(!1);D.useEffect(()=>{const r=()=>{window.scrollY>300?e(!0):e(!1)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]);const t=()=>{window.scrollTo({top:0,behavior:"smooth"})};return c.jsx(Cr,{children:n&&c.jsxs(Ge.button,{id:"scroll-to-top-btn",initial:{opacity:0,y:10,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.9},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:t,"aria-label":"Scroll to top",className:"absolute bottom-6 -right-20 w-16 h-16 bg-white text-gray-950 border border-gray-200 rounded-full shadow-lg hover:shadow-xl hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-950/20 z-40 transition-shadow duration-300 flex flex-col items-center justify-center cursor-pointer pointer-events-auto",children:[c.jsx(Bw,{size:20,className:"stroke-[2.5]"}),c.jsx("span",{className:"mt-1 text-xs font-semibold",children:"Top"})]})})},Wu={heroTitle:"마감재 라이브러리",heroDesc:"크로바가구의 모든 제품에 적용 가능한 마감재 라인업입니다. 공간의 목적과 취향에 맞는 다양한 소재와 컬러를 탐색해 보세요.",categories:["All","LPM","LPM (학생용)","인조대리석/라미스","그라스톤","메쉬 (의자)","패브릭","인조가죽","소파 전용"],materialsData:[{id:"lpm1",category:"LPM",name:"망펄비취",code:"MB",color:"#deb887",fullName:"망펄비취 MB",tags:["LPM"],border:!1},{id:"lpm2",category:"LPM",name:"애플",code:"AP",color:"#fada5e",fullName:"애플 AP",tags:["LPM"],border:!1},{id:"lpm3",category:"LPM",name:"화이트오크",code:"WO",color:"#ece0d1",fullName:"화이트오크 WO",tags:["LPM"],border:!1},{id:"lpm4",category:"LPM",name:"메이플",code:"MP",color:"#e8d2a6",fullName:"메이플 MP",tags:["LPM"],border:!1},{id:"lpm5",category:"LPM",name:"에쉬오크",code:"AO",color:"#c19a6b",fullName:"에쉬오크 AO",tags:["LPM"],border:!1},{id:"lpm6",category:"LPM",name:"고무나무",code:"RW",color:"#cd853f",fullName:"고무나무 RW",tags:["LPM"],border:!1},{id:"lpm7",category:"LPM",name:"웜화이트",code:"WW",color:"#fdf5e6",fullName:"웜화이트 WW",tags:["LPM"],border:!0},{id:"lpm8",category:"LPM",name:"CL월넛",code:"CW",color:"#5c4033",fullName:"CL월넛 CW (중역용)",tags:["LPM","SUPER series"],border:!1},{id:"lpms1",category:"LPM (학생용)",name:"파스텔그린",code:"PGN",color:"#a8e4a0",fullName:"파스텔그린 PGN",tags:["LPM"],border:!1},{id:"lpms2",category:"LPM (학생용)",name:"파스텔블루",code:"PBU",color:"#add8e6",fullName:"파스텔블루 PBU",tags:["LPM"],border:!1},{id:"lpms3",category:"LPM (학생용)",name:"파스텔퍼플",code:"PPP",color:"#e6e6fa",fullName:"파스텔퍼플 PPP",tags:["LPM"],border:!1},{id:"lpms4",category:"LPM (학생용)",name:"파스텔핑크",code:"PPK",color:"#ffb6c1",fullName:"파스텔핑크 PPK",tags:["LPM"],border:!1},{id:"lpms5",category:"LPM (학생용)",name:"파스텔옐로우",code:"PYE",color:"#fff68f",fullName:"파스텔옐로우 PYE",tags:["LPM"],border:!1},{id:"lpms6",category:"LPM (학생용)",name:"아이보리",code:"IV",color:"#fffff0",fullName:"아이보리 IV",tags:["LPM"],border:!0},{id:"st1",category:"인조대리석/라미스",name:"아스펜스노우",code:"AS",color:"#f0f8ff",fullName:"아스펜스노우 AS (인조대리석)",tags:["인조대리석"],border:!0},{id:"st2",category:"인조대리석/라미스",name:"페블프러스트",code:"PF",color:"#dcdcdc",fullName:"페블프러스트 PF (인조대리석)",tags:["인조대리석"],border:!1},{id:"st3",category:"인조대리석/라미스",name:"아스펜그레이",code:"AG",color:"#778899",fullName:"아스펜그레이 AG (인조대리석)",tags:["인조대리석"],border:!1},{id:"st4",category:"인조대리석/라미스",name:"구름무늬",code:"311",color:"#b0c4de",fullName:"구름무늬 311 (라미스)",tags:["라미스"],border:!1},{id:"st5",category:"인조대리석/라미스",name:"그레이",code:"9152",color:"#808080",fullName:"그레이 9152 (라미스)",tags:["라미스"],border:!1},{id:"gl1",category:"그라스톤",name:"그린",code:"503",color:"#98fb98",fullName:"그린 503",tags:["그라스톤"],border:!1},{id:"gl2",category:"그라스톤",name:"스카이블루",code:"006",color:"#87ceeb",fullName:"스카이블루 006",tags:["그라스톤"],border:!1},{id:"gl3",category:"그라스톤",name:"아이보리",code:"004",color:"#fffff0",fullName:"아이보리 004",tags:["그라스톤"],border:!0},{id:"msh1",category:"메쉬 (의자)",name:"화이트",code:"DM-60",color:"#ffffff",fullName:"화이트 DM-60",tags:["메쉬","의자"],border:!0},{id:"msh2",category:"메쉬 (의자)",name:"라이트그레이",code:"DM-61",color:"#d3d3d3",fullName:"라이트그레이 DM-61",tags:["메쉬","의자"],border:!1},{id:"msh3",category:"메쉬 (의자)",name:"그레이",code:"DM-64",color:"#808080",fullName:"그레이 DM-64",tags:["메쉬","의자"],border:!1},{id:"msh4",category:"메쉬 (의자)",name:"그린",code:"DM-68",color:"#7a8c3e",fullName:"그린 DM-68",tags:["메쉬","의자"],border:!1},{id:"msh5",category:"메쉬 (의자)",name:"다크그린",code:"DM4-82",color:"#314221",fullName:"다크그린 DM4-82",tags:["메쉬","의자"],border:!1},{id:"msh6",category:"메쉬 (의자)",name:"블랙",code:"DM-75",color:"#222222",fullName:"블랙 DM-75",tags:["메쉬","의자"],border:!1},{id:"msh7",category:"메쉬 (의자)",name:"스카이블루",code:"DM-71",color:"#87ceeb",fullName:"스카이블루 DM-71",tags:["메쉬","의자"],border:!1},{id:"msh8",category:"메쉬 (의자)",name:"블루",code:"DM-72",color:"#4169e1",fullName:"블루 DM-72",tags:["메쉬","의자"],border:!1},{id:"msh9",category:"메쉬 (의자)",name:"다크블루",code:"DM-73",color:"#1e335e",fullName:"다크블루 DM-73",tags:["메쉬","의자"],border:!1},{id:"msh10",category:"메쉬 (의자)",name:"오렌지",code:"DM-67",color:"#ff8c00",fullName:"오렌지 DM-67",tags:["메쉬","의자"],border:!1},{id:"msh11",category:"메쉬 (의자)",name:"레드",code:"DM-69",color:"#dc143c",fullName:"레드 DM-69",tags:["메쉬","의자"],border:!1},{id:"msh12",category:"메쉬 (의자)",name:"다크레드",code:"DM4-84",color:"#8b0000",fullName:"다크레드 DM4-84",tags:["메쉬","의자"],border:!1},{id:"fab1",category:"패브릭",name:"그레이",code:"DN812",color:"#858585",fullName:"그레이 DN812 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab2",category:"패브릭",name:"다크그레이",code:"DM1-B7",color:"#4f4f4f",fullName:"다크그레이 DM1-B7 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab3",category:"패브릭",name:"블랙",code:"DN805",color:"#171717",fullName:"블랙 DN805 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab4",category:"패브릭",name:"라이트그린",code:"DN802",color:"#a7c98f",fullName:"라이트그린 DN802 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab5",category:"패브릭",name:"그린",code:"DN830",color:"#4d7a46",fullName:"그린 DN830 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab6",category:"패브릭",name:"카키",code:"DN801",color:"#556b2f",fullName:"카키 DN801 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab7",category:"패브릭",name:"스카이블루",code:"DN829",color:"#6ca9c9",fullName:"스카이블루 DN829 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab8",category:"패브릭",name:"블루",code:"DN871A",color:"#356391",fullName:"블루 DN871A 
4316(의자)",tags:["패브릭","의자"],border:!1},{id:"fab9",category:"패브릭",name:"다크블루",code:"DN807",color:"#1a2245",fullName:"다크블루 DN807 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab10",category:"패브릭",name:"오렌지",code:"DN815",color:"#d97d25",fullName:"오렌지 DN815 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab11",category:"패브릭",name:"레드",code:"DN831",color:"#c42337",fullName:"레드 DN831 (의자)",tags:["패브릭","의자"],border:!1},{id:"fab12",category:"패브릭",name:"다크레드",code:"DN814",color:"#781a28",fullName:"다크레드 DN814 (의자)",tags:["패브릭","의자"],border:!1},{id:"lea1",category:"인조가죽",name:"블랙",code:"ABK",color:"#171717",fullName:"블랙 ABK (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea2",category:"인조가죽",name:"그레이",code:"AGY",color:"#888888",fullName:"그레이 AGY (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea3",category:"인조가죽",name:"그레이2",code:"AGY2",color:"#737373",fullName:"그레이 AGY2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea4",category:"인조가죽",name:"그린",code:"AGN",color:"#bceba4",fullName:"그린 AGN (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea5",category:"인조가죽",name:"그린2",code:"AGN2",color:"#83a86c",fullName:"그린 AGN2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea6",category:"인조가죽",name:"블루",code:"ABU",color:"#759fd9",fullName:"블루 ABU (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea7",category:"인조가죽",name:"블루2",code:"ABU2",color:"#4871a8",fullName:"블루 ABU2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea8",category:"인조가죽",name:"옐로우",code:"AYE",color:"#f5ea9a",fullName:"옐로우 AYE (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea9",category:"인조가죽",name:"옐로우2",code:"AYE2",color:"#d9cd7e",fullName:"옐로우 AYE2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea10",category:"인조가죽",name:"오렌지",code:"AOR",color:"#e89748",fullName:"오렌지 AOR (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea11",category:"인조가죽",name:"오렌지2",code:"AOR2",color:"#bd6a19",fullName:"오렌지 AOR2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea12",category:"인조가죽",name:"레드",code:"ARE",color:"#d92931",fullName:"레드 ARE (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea13",category:"인조가죽",name:"레드2",code:"ARE2",color:"#8a2727",fullName:"레드 ARE2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea14",category:"인조가죽",name:"아이보리",code:"AIV",color:"#fffae8",fullName:"아이보리 AIV (의자)",tags:["인조가죽","의자"],border:!0},{id:"lea15",category:"인조가죽",name:"브라운",code:"ALB",color:"#a67b49",fullName:"브라운 ALB (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea16",category:"인조가죽",name:"브라운2",code:"ALB2",color:"#8c612e",fullName:"브라운 ALB2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea17",category:"인조가죽",name:"진브라운",code:"ABR",color:"#59340c",fullName:"진브라운 ABR (의자)",tags:["인조가죽","의자"],border:!1},{id:"lea18",category:"인조가죽",name:"진브라운2",code:"ABR2",color:"#4a2b0a",fullName:"진브라운 ABR2 (의자)",tags:["인조가죽","의자"],border:!1},{id:"sf1",category:"소파 전용",name:"아이보리 가죽",code:"SB 9625",color:"#f5f0e1",fullName:"SB 9625 (소파 가죽)",tags:["인조가죽","소파"],border:!0},{id:"sf2",category:"소파 전용",name:"베이지 가죽",code:"SB 9208",color:"#e0cda8",fullName:"SB 9208 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf3",category:"소파 전용",name:"그레이 가죽",code:"SB 9618",color:"#869199",fullName:"SB 9618 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf4",category:"소파 전용",name:"다크그레이 가죽",code:"SB 3018",color:"#4c575e",fullName:"SB 3018 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf5",category:"소파 전용",name:"블루 가죽",code:"SB 3019",color:"#38556b",fullName:"SB 3019 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf6",category:"소파 전용",name:"블랙 가죽",code:"SB 9601",color:"#1c1c1c",fullName:"SB 9601 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf7",category:"소파 전용",name:"연두 가죽",code:"SB 9631",color:"#8fb870",fullName:"SB 9631 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf8",category:"소파 전용",name:"올리브 가죽",code:"SB 9634",color:"#688c3a",fullName:"SB 9634 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf9",category:"소파 전용",name:"딥그린 가죽",code:"SB 9207",color:"#165757",fullName:"SB 9207 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf10",category:"소파 전용",name:"브라운 가죽",code:"SB 3015",color:"#665954",fullName:"SB 3015 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf11",category:"소파 전용",name:"퍼플 가죽",code:"SB 3017",color:"#3e2c45",fullName:"SB 3017 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf12",category:"소파 전용",name:"스카이블루 가죽",code:"SB 9662",color:"#85bad9",fullName:"SB 9662 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf13",category:"소파 전용",name:"로얄블루 가죽",code:"SB 3010",color:"#2a5b9e",fullName:"SB 3010 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf14",category:"소파 전용",name:"네이비 가죽",code:"SB 9629",color:"#1c3e70",fullName:"SB 9629 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf15",category:"소파 전용",name:"레드 가죽",code:"SB 9206",color:"#b52f36",fullName:"SB 9206 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf16",category:"소파 전용",name:"오키드 가죽",code:"SB 3008",color:"#816ac2",fullName:"SB 3008 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf17",category:"소파 전용",name:"옐로우 가죽",code:"SB 3002",color:"#ebc042",fullName:"SB 3002 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf18",category:"소파 전용",name:"오렌지 가죽",code:"SB 3004",color:"#de7b31",fullName:"SB 3004 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf19",category:"소파 전용",name:"탠 가죽",code:"SB 9633",color:"#ba6438",fullName:"SB 9633 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf20",category:"소파 전용",name:"다크레드 가죽",code:"SB 3012",color:"#ad1c2a",fullName:"SB 3012 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf21",category:"소파 전용",name:"버건디 가죽",code:"SB 9659",color:"#7a1923",fullName:"SB 9659 (소파 가죽)",tags:["인조가죽","소파"],border:!1},{id:"sf22",category:"소파 전용",name:"베이지 패브릭",code:"LCE111",color:"#cecabb",fullName:"LCE111 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf23",category:"소파 전용",name:"그레이 패브릭",code:"CE022",color:"#858589",fullName:"CE022 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf24",category:"소파 전용",name:"다크그레이 패브릭",code:"CE002",color:"#575b5e",fullName:"CE002 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf25",category:"소파 전용",name:"블랙 패브릭",code:"CE009",color:"#3a3a40",fullName:"CE009 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf26",category:"소파 전용",name:"연두 패브릭",code:"CE007",color:"#8a9c68",fullName:"CE007 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf27",category:"소파 전용",name:"그린 패브릭",code:"CE077",color:"#688241",fullName:"CE077 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf28",category:"소파 전용",name:"브라운 패브릭",code:"LCE110",color:"#6b5145",fullName:"LCE110 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf29",category:"소파 전용",name:"블루 패브릭",code:"CE004",color:"#4d83a1",fullName:"CE004 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf30",category:"소파 전용",name:"스카이블루 패브릭",code:"CE044",color:"#6ab2d1",fullName:"CE044 
4316(소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf31",category:"소파 전용",name:"네이비 패브릭",code:"KA836",color:"#38486b",fullName:"KA836 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf32",category:"소파 전용",name:"퍼플 패브릭",code:"CE006",color:"#695175",fullName:"CE006 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf33",category:"소파 전용",name:"라벤더 패브릭",code:"KA813",color:"#9d8bc4",fullName:"KA813 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf34",category:"소파 전용",name:"옐로우 패브릭",code:"LCE005",color:"#e0b53d",fullName:"LCE005 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf35",category:"소파 전용",name:"오렌지 패브릭",code:"CE008",color:"#cc6a3d",fullName:"CE008 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf36",category:"소파 전용",name:"레드 패브릭",code:"CE003",color:"#b53d41",fullName:"CE003 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf37",category:"소파 전용",name:"버건디 패브릭",code:"CE033",color:"#912a36",fullName:"CE033 (소파 패브릭)",tags:["패브릭","소파"],border:!1},{id:"sf38",category:"소파 전용",name:"핑크브라운 패브릭",code:"CG003A",color:"#b88185",fullName:"CG003A (소파 패브릭)",tags:["패브릭","소파"],border:!1}]},JQ=()=>{const[n,e]=D.useState(Wu),[t,r]=D.useState(!0),[s,i]=D.useState("All"),[l,d]=D.useState(""),[h,m]=D.useState(null);D.useEffect(()=>{(async()=>{try{const b=qt(ot,"site_content","materials_page"),w=await mn(b);if(w.exists()){const _=w.data();if(_.content)try{const N=JSON.parse(_.content);e(ar(Wu,N))}catch(N){console.error("JSON parse error:",N),e(Wu)}}}catch(b){console.error("Error fetching data:",b)}finally{r(!1)}})()},[]);const g=n.materialsData.filter(p=>{const b=s==="All"||p.category===s,w=p.name.toLowerCase().includes(l.toLowerCase())||p.code.toLowerCase().includes(l.toLowerCase());return b&&w});return t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsxs("div",{className:"pt-32 pb-24 px-6 md:px-12 max-w-7xl mx-auto min-h-screen",children:[c.jsxs("div",{className:"max-w-3xl mb-16",children:[c.jsx("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight mb-6",children:n.heroTitle}),c.jsx("p",{className:"text-xl text-gray-600 font-light leading-relaxed whitespace-pre-wrap",children:n.heroDesc})]}),c.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-6 mb-12",children:[c.jsx("div",{className:"flex flex-wrap gap-2",children:n.categories.map(p=>c.jsx("button",{onClick:()=>i(p),className:`px-5 py-2.5 rounded-full text-sm font-medium transition-colors ${s===p?"bg-gray-900 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:p},p))}),c.jsxs("div",{className:"relative w-full md:w-72",children:[c.jsx(Yo,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 w-4 h-4"}),c.jsx("input",{type:"text",placeholder:"마감재 이름 또는 코드 검색",value:l,onChange:p=>d(p.target.value),className:"w-full pl-11 pr-4 py-3 bg-gray-50 border border-gray-200 rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-gray-900 focus:border-transparent transition-all"})]})]}),c.jsx(Ge.div,{layout:!0,className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-6",children:c.jsx(Cr,{children:g.map(p=>c.jsxs(Ge.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.3},onClick:()=>m(p),className:"group cursor-pointer",children:[p.image?c.jsx("div",{className:`aspect-square rounded-2xl mb-4 shadow-sm transition-transform duration-300 group-hover:scale-105 group-hover:shadow-md overflow-hidden bg-gray-100 ${p.border?"border border-gray-200":""}`,children:c.jsx(et,{src:p.image,alt:p.name,className:"w-full h-full object-cover"})}):c.jsx("div",{className:`aspect-square rounded-2xl mb-4 shadow-sm transition-transform duration-300 group-hover:scale-105 group-hover:shadow-md ${p.border?"border border-gray-200":""}`,style:{backgroundColor:p.color}}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs text-gray-500 font-medium mb-1",children:p.category}),c.jsx("h3",{className:"text-sm font-bold text-gray-900",children:p.name}),c.jsx("div",{className:"text-xs text-gray-400 mt-0.5",children:p.code})]})]}
4316,p.id))})}),g.length===0&&c.jsx("div",{className:"text-center py-24 text-gray-500",children:"검색 결과가 없습니다. 다른 검색어를 입력해 보세요."}),c.jsx(Cr,{children:h&&c.jsx(Ge.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40 backdrop-blur-sm",onClick:()=>m(null),children:c.jsxs(Ge.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},transition:{duration:.3},className:"bg-white w-full max-w-4xl shadow-2xl flex flex-col md:flex-row relative",onClick:p=>p.stopPropagation(),children:[c.jsxs("div",{className:"flex-1 p-10 md:p-16 flex flex-col justify-center",children:[c.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-gray-900 mb-4",children:h.code}),c.jsx("div",{className:"w-full h-px bg-gray-900 mb-4"}),c.jsx("p",{className:"text-sm text-gray-600 tracking-wider mb-12 uppercase",children:h.fullName}),c.jsx("div",{className:"flex flex-wrap gap-2",children:h.tags.map(p=>c.jsx("span",{className:"px-4 py-2 border border-gray-300 text-xs text-gray-600 rounded-sm",children:p},p))})]}),c.jsxs("div",{className:"flex-1 p-10 md:p-16 flex flex-col items-end justify-between bg-gray-50",children:[h.image?c.jsx("div",{className:`w-full aspect-square shadow-inner bg-gray-100 overflow-hidden ${h.border?"border border-gray-200":""}`,children:c.jsx(et,{src:h.image,alt:h.name,className:"w-full h-full object-cover"})}):c.jsx("div",{className:`w-full aspect-square shadow-inner ${h.border?"border border-gray-200":""}`,style:{backgroundColor:h.color}}),c.jsx("button",{onClick:()=>m(null),className:"mt-8 px-8 py-2.5 bg-gray-100 hover:bg-gray-200 text-gray-800 text-sm font-medium transition-colors",children:"닫기"})]})]})})})]})},Qu=[{title:"EXCELLENT PRODUCT(우수제품)",image:"https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&q=80&w=1200",description:"크로바가구의 기술력과 디자인 철학이 집약된 프리미엄 라인업입니다. 최상의 소재와 인체공학적 설계로 완성된 혁신적인 가구를 통해 차원이 다른 업무 환경을 경험해보세요."},{title:"OFFICE",image:"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&q=80&w=1200",description:"창의성과 업무 효율을 동시에 높여주는 현대적인 오피스 솔루션입니다. 유연한 공간 배치와 스마트한 기능으로 기업의 문화와 특성에 맞는 최적의 업무 환경을 조성합니다."},{title:"PARTITION",image:"https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?auto=format&fit=crop&q=80&w=1200",description:"개인의 프라이버시를 보호하면서도 원활한 소통을 지원하는 파티션 시스템입니다. 공간의 활용도를 극대화하고 시각적인 안정감을 주어 쾌적한 환경을 제공합니다."},{title:"EDUCATION",image:"https://images.unsplash.com/photo-1584697964190-7383cbee8277?auto=format&fit=crop&q=80&w=1200",description:"학생들의 집중력을 높이고 바른 자세를 유지할 수 있도록 돕는 교육용 가구입니다. 안전하고 내구성 뛰어난 친환경 소재로 학습 환경의 질을 한 단계 높입니다."},{title:"EXECUTIVE",image:"https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&q=80&w=1200",description:"리더의 품격과 권위를 표현하는 중후하고 세련된 임원용 가구입니다. 고급스러운 소재와 디테일한 마감, 흔들림 없는 견고함으로 최상의 비즈니스 공간을 완성합니다."},{title:"CHAIR",image:"https://images.unsplash.com/photo-1505843490538-5133c6c7d0e1?auto=format&fit=crop&q=80&w=1200",description:"장시간 앉아있어도 편안함을 유지하는 인체공학적 의자 컬렉션입니다. 사용자의 체형과 움직임에 맞춘 세밀한 조절 기능으로 건강한 자세를 완벽하게 지원합니다."},{title:"SOFA",image:"https://images.unsplash.com/photo-1493663284031-b7e3aefcae8e?auto=format&fit=crop&q=80&w=1200",description:"휴식과 소통을 위한 편안하고 감각적
4316인 라운지 소파입니다. 다양한 모듈 구성으로 어떤 공간에도 자연스럽게 어울리며, 방문객과 임직원 모두에게 안락함을 선사합니다."}],ZQ=()=>{const[n,e]=D.useState(Qu),[t,r]=D.useState(Wu.materialsData),[s,i]=D.useState(null),[l,d]=D.useState(!0),h=D.useRef(null),m=b=>{var w;b.preventDefault(),(w=h.current)==null||w.scrollIntoView({behavior:"smooth"})};D.useEffect(()=>{(async()=>{try{const w=mn(qt(ot,"site_content","spaces_page")),_=mn(qt(ot,"site_content","materials_page")),N=mn(qt(ot,"site_content","spaces_materials_section")),[E,j,P]=await Promise.all([w,_,N]);if(E.exists()){const A=E.data();if(A.content)try{const M=JSON.parse(A.content);e(ar(Qu,M))}catch(M){console.error(M),e(Qu)}}if(j.exists()){const A=j.data();if(A.content)try{const M=JSON.parse(A.content);M&&M.materialsData&&r(M.materialsData)}catch(M){console.error("Failed to parse materials data on spaces page:",M)}}if(P.exists()){const A=P.data();if(A.content)try{i(JSON.parse(A.content))}catch(M){console.error("Failed to parse custom materials section:",M)}}}catch(w){console.error("Failed to load spaces or materials from Firebase:",w)}finally{d(!1)}})()},[]);const g=D.useMemo(()=>{if(!t||t.length===0)return[];const b={};return t.forEach(w=>{b[w.category]||(b[w.category]=[]),b[w.category].push(w)}),Object.keys(b).slice(0,3).map(w=>{const _=b[w].slice(0,4);let N=`${w} 제품군에 최적화된 최상의 마감재 라인업입니다.`;const E=w.toLowerCase();return E.includes("lpm")?N="가장 많이 사용되는 친환경 마감재로, 내마모성과 내스크래치성이 우수합니다.":E.includes("패브릭")||E.includes("fabric")?N="다양한 질감과 우수한 내구성의 패브릭으로 공간에 편안함을 더해줍니다.":E.includes("가죽")||E.includes("leather")?N="고급스러운 텍스처와 뛰어난 내구성을 지닌 품격 있는 가죽 마감재입니다.":E.includes("대리석")||E.includes("라미스")||E.includes("stone")||E.includes("스톤")?N="견고한 내구성과 위생적인 표면 가공으로 오랫동안 품격을 유지합니다.":E.includes("그라스")||E.includes("유리")||E.includes("glass")?N="투명하고 모던한 특수 그라스톤 소재로 세련된 분위기를 극대화합니다.":E.includes("메쉬")||E.includes("mesh")?N="우수한 인장 강도와 탁월한 통기성으로 사계절 내내 쾌적함을 유지합니다.":E.includes("소파")?N="소파 제품에 최적화된 부드러운 촉감과 생활 오염 관리 기능이 적용되었습니다.":E.includes("금속")||E.includes("metal")?N="견고한 강도와 모던한 표면 마감으로 제품의 내구성을 탄탄하게 지탱합니다.":(E.includes("목재")||E.includes("wood"))&&(N="자연스러운 원목 본연의 무늬결과 내추럴한 감성으로 아늑함을 제공합니다."),{category:w,description:N,items:_.map(j=>({name:j.name,color:j.color,border:j.border}))}})},[t]),p=(b,w)=>{const _=b.toUpperCase();if(_.includes("EXCELLENT")||_.includes("우수"))return"/spaces/excellent";if(_.includes("OFFICE")||_.includes("사무용")||_.includes("DESK")||_.includes("책상"))return"/spaces/office";if(_.includes("PARTITION")||_.includes("칸막이")||_.includes("파티션"))return"/spaces/partition";if(_.includes("EDUCATION")||_.includes("교육")||_.includes("도서관"))return"/spaces/education";if(_.includes("EXECUTIVE")||_.includes("중역"))return"/spaces/executive";if(_.includes("CHAIR")||_.includes("의자")||_.includes("SEAT"))return"/spaces/chair";if(_.includes("SOFA")||_.includes("소파")||_.includes("라운지"))return"/spaces/sofa";switch(w){case 0:return"/spaces/excellent";case 1:return"/spaces/office";case 2:return"/spaces/partition";case 3:return"/spaces/education";case 4:return"/spaces/executive";case 5:return"/spaces/chair";case 6:return"/spaces/sofa";default:return null}};return l?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"pt-32 pb-4 px-6 md:px-12 max-w-full",children:c.jsxs(Ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},className:"text-center max-w-4xl mx-auto mb-12",children:[c.jsx("h4",{className:"text-[#015133] font-bold tracking-widest text-sm mb-4",children:"TOTAL SOLUTIONS"}),c.jsx("h1",{className:"text-[48px] font-bold tracking-tight mb-6 text-gray-900",children:"모든 업무 공간을 위한 제안"}),c.jsxs("p",{className:"text-lg text-gray-500 font-light leading-relaxed",children:["크로바가구의 다양한 제품 라인업과 공간 솔루션을 만나보세요.",c.jsx("br",{className:"hidden md:block"}),"우수제품부터 교육, 임원용 가구까지 모든 환경에 최적화된 최상의 가구 시스템을 제공합니다."]})]})}),c.jsxs("div",{className:"flex gap-8 justify-center bg-[#f5f5f5] pt-4 pb-0 w-full",children:[c.jsxs(bn,{to:"/spaces",className:"flex items-center gap-2 text-lg font-medium text-[#0a0a0a] transition-colors relative px-8 pb-4",children:["제품",c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]}),c.jsx("button",{onClick:m,className:"flex items-center gap-2 text-lg font-medium text-gray-500 hover:text-gray-900 transition-colors px-8 pb-4",children:"마감재"})]}),c.jsxs("div",{className:"max-w-7xl mx-auto px-6 md:px-12 py-12 min-h-screen",children:[c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:(n||[]).map((b,w)=>{const _=p(b.title,w)||"#";let N="SPACES & PRODUCTS";return b.title.includes("EXECUTIVE")?N="최고의 리더를 위한":b.title.includes("OFFICE")?N="업무 효율을 극대화하는":b.title.includes("PARTITION")?N="프라이버시와 소통의 밸런스":b.title.includes("EDUCATION")?N="집중력을 높이는 학습 공간":b.title.includes("EXCELLENT")?N="품질이 입증된 우수제품":b.title.includes("CHAIR")?N="인체공학적 편안함":b.title.includes("SOFA")&&(N="휴식과 소통의 라운지"),c.jsxs(Ge.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.6,delay:w*.1},className:"bg-white rounded-lg shadow-sm border border-gray-100 overflow-hidden flex flex-col group hover:shadow-md transition-shadow duration-300",children:[c.jsx(bn,{to:_,className:"relative aspect-[4/3] overflow-hidden block",children:b.image&&c.jsx(et,{src:b.image,alt:b.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),c.jsxs("div",{className:"p-8 flex flex-col flex-grow",children:[c.jsx("span",{className:"text-[#015133] font-bold text-xs mb-3 font-sans tracking-tight",children:N}),c.jsx("h3",{className:"text-2xl font-bold mb-4 font-sans tracking-tight text-gray-900",children:b.title}),c.jsx("p",{className:"text-gray-600 text-sm leading-relaxed mb-8 flex-grow",children:b.description}),c.jsx("div",{className:"mt-auto",children:c.jsxs(bn,{to:_,className:"inline-flex items-center gap-2 text-sm font-semibold text-gray-900 group-hover:text-[#015133] transition-colors",children:["자세히 보기",c.jsx(nd,{className:"w-4 h-4"})]})})]})]},w)})}),c.jsxs("div",{className:"mt-32 pt-24 border-t border-gray-200",ref:h,children:[c.jsxs("div",{className:"max-w-3xl mb-16",children:[c.jsx("h2",{className:"text-3xl md:text-4xl font-bold tracking-tight mb-6",children:(s==null?void 0:s.title)||"마감재 보기 (Materials & Finishes)"}),c.jsx("p",{className:"text-xl text-gray-600 font-light leading-relaxed",children:(s==null?void 0:s.description)||"크로바가구의 세심한 디테일을 완성하는 마감재 라인업입니다. 공간의 분위기와 용도에 맞는 최적의 소재와 컬러를 제안합니다."})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-12",children:s&&s.categories&&s.categories.length>0?s.categories.map((b,w)=>c.jsxs(Ge.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:w*.2},children:[c.jsx("h3",{className:"text-xl font-bold mb-3",children:b.name}),c.jsx("p",{className:"text-gray-600 text-sm mb-8 h-10",children:b.description}),c.jsx("div",{className:"grid grid-cols-2 gap-4",children:(b.colors||[]).sort((_,
4316N)=>(_.order||0)-(N.order||0)).map((_,N)=>c.jsxs("div",{className:"flex items-center gap-3",children:[_.image?c.jsx("div",{className:"w-10 h-10 rounded-full shadow-inner border border-gray-200 overflow-hidden bg-gray-50 flex items-center justify-center",children:c.jsx(et,{src:_.image,alt:_.name,className:"w-full h-full object-cover"})}):c.jsx("div",{className:"w-10 h-10 rounded-full shadow-inner border border-gray-100",style:{backgroundColor:_.color||"#cccccc"}}),c.jsx("span",{className:"text-sm font-medium text-gray-700",children:_.name})]},N))})]},w)):(g||[]).map((b,w)=>c.jsxs(Ge.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:w*.2},children:[c.jsx("h3",{className:"text-xl font-bold mb-3",children:b.category}),c.jsx("p",{className:"text-gray-600 text-sm mb-8 h-10",children:b.description}),c.jsx("div",{className:"grid grid-cols-2 gap-4",children:(b.items||[]).map((_,N)=>c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-full shadow-inner border border-gray-100",style:{backgroundColor:_.color}}),c.jsx("span",{className:"text-sm font-medium text-gray-700",children:_.name})]},N))})]},w))}),c.jsx("div",{className:"mt-16 text-center",children:c.jsxs(bn,{to:"/materials",className:"inline-flex items-center gap-2 px-8 py-4 bg-gray-900 text-white rounded-full hover:bg-gray-800 transition-colors",children:[c.jsx("span",{className:"font-medium",children:"마감재 전체보기"}),c.jsx(nd,{className:"w-4 h-4"})]})})]})]})]})},eX=({data:n})=>{const e=n||{},t=e.solutionTitle||"공간에 대한 고민부터 완성까지, 함께합니다",r=e.solutionDesc||"제품에 대한 간단한 문의부터 대규모 프로젝트를 위한 전문 상담까지, 크로바가구가 공간과 목적에 맞는 솔루션을 제안합니다",s=e.solutionButtonText||"자세히 보기 Learn More",i=!e.solutionButtonLink||e.solutionButtonLink==="/about"?"/support":e.solutionButtonLink,l=e.solutionImage;return c.jsxs("section",{className:"relative overflow-hidden bg-[#f7f8f9] py-20 md:py-28 px-6 md:px-12 border-t border-stone-200",children:[c.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-[0.08] z-0 overflow-hidden",children:c.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 1200 600",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("line",{x1:"0",y1:"100",x2:"1200",y2:"100",stroke:"#000",strokeWidth:"0.5",strokeDasharray:"4 4"}),c.jsx("line",{x1:"0",y1:"250",x2:"1200",y2:"250",stroke:"#000",strokeWidth:"0.5",strokeDasharray:"4 4"}),c.jsx("line",{x1:"0",y1:"400",x2:"1200",y2:"400",stroke:"#000",strokeWidth:"0.5",strokeDasharray:"4 4"}),c.jsx("line",{x1:"200",y1:"0",x2:"200",y2:"600",stroke:"#000",strokeWidth:"0.5",strokeDasharray:"4 4"}),c.jsx("line",{x1:"500",y1:"0",x2:"500",y2:"600",stroke:"#000",strokeWidth:"0.5",strokeDasharray:"4 4"}),c.jsx("line",{x1:"800",y1:"0",x2:"800",y2:"600",stroke:"#000",strokeWidth:"0.5",strokeDasharray:"4 4"})]})}),c.jsx("div",{className:"max-w-7xl mx-auto relative z-10",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12 items-stretch",children:[c.jsxs(Ge.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.8},className:"lg:col-span-5 flex flex-col justify-start h-full py-1",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold tracking-tight text-slate-900 leading-[1.2] mb-6 whitespace-pre-line",children:t}),c.jsx("p",{className:"text-base sm:text-lg text-gray-700 font-normal leading-relaxed mb-6 whitespace-pre-line",children:r})]}),c.jsx("div",{className:"mt-8 md:mt-12",children:c.jsx(bn,{to:i,className:"inline-block bg-black text-white px-8 py-4 rounded-full font-medium hover:bg-gray-800 transition-all duration-300 shadow-sm hover:shadow-md transform hover:-translate-y-0.5 whitespace-nowrap",children:s})})]}),c.jsx(Ge.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.8,delay:.2},className:"lg:col-span-7 w-full bg-white rounded-none shadow-sm overflow-hidden border-0 p-0",children:l?c.jsx(et,{src:l,alt:"대규모 3D 공간 솔루션 설계 도면",className:"w-full h-auto object-cover rounded-none",referrerPolicy:"no-referrer"}):c.jsx("div",{className:"relative w-full aspect-[4/3] sm:aspect-[16/10] min-h-[350px] sm:min-h-[450px] flex items-center justify-center bg-[#eae8e3] rounded-none overflow-hidden p-2 sm:p-4",children:c.jsxs("svg",{viewBox:"0 0 1200 650",className:"w-full h-full drop-shadow-2xl overflow-visible",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"epoxyFloor",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[c.jsx("stop",{offset:"0%",stopColor:"#dcd9d2"}),c.jsx("stop",{offset:"50%",stopColor:"#d2cecc"}),c.jsx("stop",{offset:"100%",stopColor:"#c5c0bd"})]}),c.jsxs("linearGradient",{id:"darkWood",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3d352e"}),c.jsx("stop",{offset:"100%",stopColor:"#28221d"})]}),c.jsxs("linearGradient",{id:"goldGlass",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[c.jsx("stop",{offset:"0%",stopColor:"#d4af37",stopOpacity:"0.4"}),c.jsx("stop",{offset:"100%",stopColor:"#aa8c2c",stopOpacity:"0.1"})]}),c.jsx("filter",{id:"main3dShadow",x:"-10%",y:"-10%",width:"120%",height:"120%",children:c.jsx("feDropShadow",{dx:"0",dy:"16",stdDeviation:"20",floodColor:"#000000",floodOpacity:"0.3"})})]}
4316),c.jsxs("g",{filter:"url(#main3dShadow)",children:[c.jsx("polygon",{points:"600,60 1140,240 600,600 60,420",fill:"url(#epoxyFloor)",stroke:"#a39e99",strokeWidth:"3"}),c.jsx("polygon",{points:"60,420 600,60 600,20 60,380",fill:"url(#darkWood)",stroke:"#1a1613",strokeWidth:"2"}),c.jsx("polygon",{points:"600,60 1140,240 1140,200 600,20",fill:"#2d2823",stroke:"#1a1613",strokeWidth:"2"}),c.jsx("polygon",{points:"90,400 300,330 300,160 90,230",fill:"url(#darkWood)",opacity:"0.9"}),c.jsx("polygon",{points:"120,330 180,310 200,320 140,340",fill:"#25201b"}),c.jsx("polygon",{points:"110,360 150,345 170,355 130,370",fill:"#a89278"}),c.jsxs("g",{transform:"translate(110, 410)",children:[c.jsx("polygon",{points:"20,20 90,-5 110,5 40,30",fill:"#ffffff",stroke:"#999",strokeWidth:"1"}),c.jsx("polygon",{points:"50,50 80,38 90,44 60,56",fill:"#c4ad93"}),c.jsx("polygon",{points:"90,30 120,18 130,24 100,36",fill:"#c4ad93"}),c.jsx("polygon",{points:"130,10 160,-2 170,4 140,16",fill:"#c4ad93"})]}),c.jsx("polygon",{points:"320,310 540,235 540,100 320,175",fill:"url(#goldGlass)",stroke:"#d4af37",strokeWidth:"2"}),c.jsx("polygon",{points:"360,260 480,220 500,230 380,270",fill:"#b09373",stroke:"#705b43",strokeWidth:"1.5"}),c.jsx("circle",{cx:"365",cy:"250",r:"6",fill:"#8c6f4e"}),c.jsx("circle",{cx:"390",cy:"240",r:"6",fill:"#8c6f4e"}),c.jsx("circle",{cx:"415",cy:"230",r:"6",fill:"#8c6f4e"}),c.jsx("circle",{cx:"440",cy:"220",r:"6",fill:"#8c6f4e"}),c.jsx("circle",{cx:"385",cy:"270",r:"6",fill:"#8c6f4e"}),c.jsx("circle",{cx:"410",cy:"260",r:"6",fill:"#8c6f4e"}),c.jsx("circle",{cx:"435",cy:"250",r:"6",fill:"#8c6f4e"}),c.jsx("circle",{cx:"460",cy:"240",r:"6",fill:"#8c6f4e"}),c.jsx("polygon",{points:"560,220 920,100 920,40 560,160",fill:"url(#goldGlass)",stroke:"#d4af37",strokeWidth:"1.5"}),c.jsx("line",{x1:"630",y1:"196",x2:"630",y2:"76",stroke:"#d4af37",strokeWidth:"1.5"}),c.jsx("line",{x1:"700",y1:"173",x2:"700",y2:"53",stroke:"#d4af37",strokeWidth:"1.5"}),c.jsx("line",{x1:"770",y1:"150",x2:"770",y2:"30",stroke:"#d4af37",strokeWidth:"1.5"}),c.jsx("line",{x1:"840",y1:"126",x2:"840",y2:"6",stroke:"#d4af37",strokeWidth:"1.5"}),c.jsxs("g",{transform:"translate(560, 240)",children:[c.jsx("polygon",{points:"20,60 160,10 200,25 60,75",fill:"#ffffff",stroke:"#666",strokeWidth:"1"}),c.jsx("polygon",{points:"60,75 200,25 240,40 100,90",fill:"#f5f5f5",stroke:"#666",strokeWidth:"1"}),c.jsx("polygon",{points:"40,68 180,18 180,5 40,55",fill:"#224328",opacity:"0.85"})]}),c.jsxs("g",{transform:"translate(720, 360)",children:[c.jsx("polygon",{points:"40,50 120,20 140,30 60,60",fill:"#ffffff",stroke:"#d4af37",strokeWidth:"1.5"}),c.jsx("polygon",{points:"100,80 200,45 250,65 150,100",fill:"#1e3a8a",stroke:"#d4af37",strokeWidth:"1.5"}),c.jsx("text",{x:"175",y:"70",fill:"#d4af37",fontSize:"12",fontWeight:"bold",fontFamily:"sans-serif",textAnchor:"middle",transform:"rotate(-20 175 70)",children:"O6 STUDIO"})]})]}),c.jsxs("g",{"font-family":"sans-serif","font-weight":"bold","font-size":"13",fill:"#1e293b","text-anchor":"middle",children:[c.jsx("text",{x:"180",y:"580",children:"BOSS CABINS 2"}),c.jsx("text",{x:"380",y:"580",children:"STAFF LUNCH AREA"}),c.jsx("text",{x:"560",y:"580",children:"CONFERENCE ROOM"}),c.jsx("text",{x:"760",y:"580",children:"WORKING AREA"}),c.jsx("text",{x:"960",y:"580",children:"RECEPTION"})]})]})})})]})})]})},d0={heroTitle:`Work better.
4317Live better.`,heroSubtitle:"크로바가구는 사람을 중심에 둔 혁신적인 디자인으로 더 나은 업무 환경을 창조합니다.",heroBgImage:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=2000",categories:[{name:"우수제품",image:"https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=800",link:"/spaces/excellent"},{name:"사무용가구",image:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=800",link:"/spaces/office"},{name:"사무실칸막이",image:"https://images.unsplash.com/photo-1518455027359-f3f8164ba6bd?auto=format&fit=crop&q=80&w=800",link:"/spaces/partition"},{name:"교육용가구",image:"https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&q=80&w=800",link:"/spaces/education"},{name:"중역용가구",image:"https://images.unsplash.com/photo-1581578731548-c64695cc6952?auto=format&fit=crop&q=80&w=800",link:"/spaces/executive"},{name:"의자",image:"https://images.unsplash.com/photo-1505797149-43b0069ec26b?auto=format&fit=crop&q=80&w=800",link:"/spaces/chair"},{name:"소파",image:"https://images.unsplash.com/photo-1555041469-a586c61ea9bc?auto=format&fit=crop&q=80&w=800",link:"/spaces/sofa"}],featureSubHeader:"NEW EXCELLENT PRODUCT 신제품 인증",featureTitle:`클로버 에르고노믹 시리즈
4318The Clover Ergonomic Series`,featureDesc:`신체의 자연스러운 움직임에 반응하도록 설계되었습니다. 클로버 시리즈는 하루 종일 사용자의 자세에 맞춰 직관적인 지지력을 제공합니다. 편안함과 집중력의 완벽한 균형을 ê²½í—
4318˜í•´ 보세요.
4319
4320Designed to respond to your body's natural movements for ultimate comfort and focus.`,featureList:["다이내믹 요추 지지대 (Dynamic Lumbar Support)","인체공학적 멀티 조절 메커니즘 (Ergonomic Adjustments)","통기성이 뛰어난 프리미엄 메쉬 (Premium Mesh)"],featureBadgeImage:"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='46' fill='none' stroke='%2316A34A' stroke-width='3' stroke-dasharray='4 2'/%3E%3Ccircle cx='50' cy='50' r='40' fill='%23F0FDF4'/%3E%3Ctext x='50' y='46' font-family='system-ui, sans-serif' font-weight='900' font-size='22' font-style='italic' fill='%2315803D' text-anchor='middle'%3ENeP%3C/text%3E%3Ctext x='50' y='66' font-family='system-ui, sans-serif' font-weight='800' font-size='10' fill='%231E293B' text-anchor='middle' letter-spacing='0.5'%3E%EC%8B%A0%EC%A0%9F%ED%92%88%EC%9D%B8%EC%A6%9D%3C/text%3E%3C/svg%3E",featureLink:"/about",features:[{subHeader:"NEW EXCELLENT PRODUCT 신제품 인증",title:`크로바가구
4321NEP 인체공학 시리즈`,desc:`오래 앉을수록 기술의 차이를 경험하세요.
4322국내 최초 NEP 좌판 전면 폴딩 기술이 허벅지의 부담을 효과적으로 분산하여 장시간 착석에도 편안함을 유지합니다.
4323좌판부터 럼버 서포트, 암레스트, 헤드레스트까지 사용자의 체형에 맞춰 세밀하게 조절되어 최적의 착석 환경을 제공합니다.`,list:["NEP 좌판 전면 폴딩 기술","인체공학적 럼버 서포트","맞춤형 멀티 조절 시스템"],image:"https://images.unsplash.com/photo-1592078615290-033ee584e267?auto=format&fit=crop&q=80&w=1000",badgeTitle:"우수 인체공학 디자인",badgeText:"Best Ergonomic Design",badgeImage:"data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='46' fill='none' stroke='%2316A34A' stroke-width='3' stroke-dasharray='4 2'/%3E%3Ccircle cx='50' cy='50' r='40' fill='%23F0FDF4'/%3E%3Ctext x='50' y='46' font-family='system-ui, sans-serif' font-weight='900' font-size='22' font-style='italic' fill='%2315803D' text-anchor='middle'%3ENeP%3C/text%3E%3Ctext x='50' y='66' font-family='system-ui, sans-serif' font-weight='800' font-size='10' fill='%231E293B' text-anchor='middle' letter-spacing='0.5'%3E%EC%8B%A0%EC%A0%9F%ED%92%88%EC%9D%B8%EC%A6%9D%3C/text%3E%3C/svg%3E",link:"/about"}],solutionTitle:"공간에 대한 고민부터 완성까지, 함께합니다",solutionDesc:"제품에 대한 간단한 문의부터 대규모 프로젝트를 위한 전문 상담까지, 크로바가구가 공간과 목적에 맞는 솔루션을 제안합니다",solutionButtonText:"자세히 보기 Learn More",solutionButtonLink:"/support",solutionImage:""},tX=({data:n})=>{const e=n.features&&n.features.length>0?n.features:[{subHeader:n.featureSubHeader,title:n.featureTitle,desc:n.featureDesc,list:n.featureList,image:n.featureImage,badgeTitle:n.featureBadgeTitle,badgeText:n.featureBadgeText,badgeImage:n.featureBadgeImage,link:n.featureLink}];return c.jsx(c.Fragment,{children:e.map((t,r)=>{const s=r%2===0,i=r===0,l=t.aspectRatio||(i?"aspect-[4/5]":"aspect-[4/3] md:aspect-[5/4] min-h-[380px] md:min-h-[540px]");return t.thumbnails,c.jsx("section",{className:`py-24 ${s?"bg-[#f5f5f4]":"bg-white"}`,children:c.jsx("div",{className:"max-w-7xl mx-auto px-6 md:px-12",children:c.jsxs("div",{className:`grid grid-cols-1 ${i?"lg:grid-cols-2 gap-16 items-stretch":"lg:grid-cols-12 gap-10 lg:gap-16 items-stretch"}`,children:[c.jsxs(Ge.div,{initial:{opacity:0,x:s?-30:30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.8},className:`order-2 ${s?"lg:order-1":"lg:order-2"} ${i?"":"lg:col-span-5"} flex flex-col justify-start py-1`,children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-sm font-bold tracking-widest uppercase text-gray-500 mb-4",children:t.subHeader}),c.jsx("h2",{className:"text-4xl md:text-5xl font-bold tracking-tight mb-6 leading-tight whitespace-pre-wrap text-slate-900",children:t.title}),c.jsx("p",{className:"text-lg text-gray-600 mb-6 font-light leading-relaxed whitespace-pre-wrap",children:t.desc}),t.list&&t.list.length>0&&c.jsx("ul",{className:"space-y-4 mb-6",children:t.list.map((d,h)=>c.jsxs("li",{className:"flex items-center gap-3 text-gray-800 font-medium",children:[c.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-black text-xs"}),d]},h))})]}),c.jsx("div",{className:"mt-2 md:mt-4",children:c.jsx(bn,{to:t.link?t.link:"/about",className:"inline-block bg-black text-white px-8 py-4 rounded-full font-medium hover:bg-gray-800 transition-colors",children:"자세히 보기 Learn More"})})]}),c.jsxs(Ge.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.8},className:`order-1 ${s?"lg:order-2":"lg:order-1"} ${i?"":"lg:col-span-7"} relative`,children:[c.jsx("div",{className:`w-full ${l} overflow-hidden rounded-none bg-stone-100/50`,children:t.image?typeof t.image=="string"&&(t.image.match(/\.(mp4|webm|mov|ogg)(\?.*)?$/i)||t.image.startsWith("data:video/"))?c.jsx(D5,{src:t.image,autoPlay:!0,loop:!0,muted:!0,playsInl
4323ine:!0,className:"w-full h-full object-cover"}):c.jsx(et,{src:t.image||null,alt:t.title,className:"w-full h-full object-cover",referrerPolicy:"no-referrer"}):null}),(t.badgeImage||t.badgeTitle||t.badgeText)&&c.jsx("div",{className:`absolute bottom-4 md:bottom-6 z-10 flex items-center justify-center pointer-events-none animate-fade-in ${t.badgePosition==="right"||!t.badgePosition&&!i||t.title&&t.title.includes("Q-SERIES")||t.subHeader&&t.subHeader.includes("PIN UP")?"right-4 md:right-6":"left-4 md:left-6"}`,children:t.badgeImage?c.jsx(et,{src:t.badgeImage,alt:"인증 마크",className:"w-20 h-20 md:w-28 md:h-28 object-contain filter drop-shadow-md",referrerPolicy:"no-referrer"}):c.jsxs("div",{className:"text-center bg-black/60 text-white backdrop-blur-md p-3 text-xs",children:[t.badgeTitle&&c.jsx("div",{className:"text-gray-300 mb-0.5",children:t.badgeTitle}),t.badgeText&&c.jsx("div",{className:"font-bold text-sm leading-tight",children:t.badgeText})]})})]})]})})},r)})})},nX=()=>{const[n,e]=D.useState(d0),[t,r]=D.useState(!0),[s,i]=D.useState(!1),l=D.useRef(null),d=m=>{if(!l.current)return;const g=l.current.scrollLeft;rB(g,m,{type:"tween",duration:1.2,ease:[.16,1,.3,1],onUpdate:p=>{l.current&&(l.current.scrollLeft=p)}})},h=m=>{if(l.current){const{scrollLeft:g,clientWidth:p}=l.current,b=p*.75,w=m==="left"?g-b:g+b;d(w)}};return D.useEffect(()=>{if(t)return;const m=setInterval(()=>{if(s||!l.current)return;const{scrollLeft:g,clientWidth:p,scrollWidth:b}=l.current;g>=b/2?l.current.scrollLeft=0:d(g+320)},2e3);return()=>clearInterval(m)},[t,s]),D.useEffect(()=>{(async()=>{try{const g=qt(ot,"site_content","home_page"),p=await mn(g);let b={...d0};if(p.exists()){const j=p.data();if(j.content)try{const P=JSON.parse(j.content);b=ar(d0,P)}catch(P){console.error("JSON parse error from Firebase:",P)}}const w=qt(ot,"site_content","spaces_page"),_=await mn(w);let N=Qu;if(_.exists()){const j=_.data();if(j.content)try{const P=JSON.parse(j.content);N=ar(Qu,P)}catch(P){console.error("JSON parse error from Firebase (spaces_page):",P)}}const E=(j,P)=>{const A=j.toUpperCase();if(A.includes("EXCELLENT")||A.includes("우수"))return"/spaces/excellent";if(A.includes("OFFICE")||A.includes("사무용")||A.includes("DESK")||A.includes("책상"))return"/spaces/office";if(A.includes("PARTITION")||A.includes("칸막이")||A.includes("파티션"))return"/spaces/partition";if(A.includes("EDUCATION")||A.includes("교육")||A.includes("도서관"))return"/spaces/education";if(A.includes("EXECUTIVE")||A.includes("중역"))return"/spaces/executive";if(A.includes("CHAIR")||A.includes("의자")||A.includes("SEAT"))return"/spaces/chair";if(A.includes("SOFA")||A.includes("소파")||A.includes("라운지"))return"/spaces/sofa";switch(P){case 0:return"/spaces/excellent";case 1:return"/spaces/office";case 2:return"/spaces/partition";case 3:return"/spaces/education";case 4:return"/spaces/executive";case 5:return"/spaces/chair";case 6:return"/spaces/sofa";default:return"/spaces"}};b.categories=(N||[]).map((j,P)=>({name:j.title,image:j.image,link:E(j.title,P)})),console.log("Home data:",b),e(b)}catch(g){console.error("Failed to load home data from Firebase:",g)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"relative h-screen min-h-[600px] flex items-center justify-center overflow-hidden",children:[c.jsxs("div",{className:"absolute inset-0 z-0",children:[n.heroBgImage&&c.jsx(et,{src:n.heroBgImage||null,alt:"",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"}),c.jsx("div",{className:"absolute inset-0 bg-black/30 pointer-events-none"})]}),c.jsxs("div",{className:"relative z-10 text-center text-white px-6 max-w-4xl mx-auto",children:[c.jsx(Ge.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},children:c.jsx("h1",{className:"text-5xl md:text-7xl font-semibold tracking-wide leading-[1.1] mb-6 whitespace-pre-line",children:n.heroTitle})}),c.jsx(Ge.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2,ease:"easeOut"},children:c.jsx("p",{className:"text-[22pt] font-light mb-10 max-w-2xl mx-auto opacity-90 whitespace-pre-line",children:n.heroSubtitle})}),c.jsx(Ge.div,{initial:{opacity:0,y:30}
4323,animate:{opacity:1,y:0},transition:{duration:.8,delay:.4,ease:"easeOut"},children:c.jsx("div",{className:"inline-block",children:c.jsxs(bn,{to:"/about",className:"bg-white text-gray-900 px-8 py-4 rounded-full font-medium hover:bg-[#224328] hover:text-white transition-colors inline-flex items-center gap-2",children:["Discover Our Story ",c.jsx(nd,{size:18})]})})})]})]}),c.jsxs("section",{className:"py-24 px-6 md:px-12 max-w-7xl mx-auto overflow-hidden",children:[c.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-end mb-12 gap-6",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-3xl md:text-4xl font-bold tracking-tight mb-2",children:"Shop by Category"}),c.jsx("p",{className:"text-gray-500 text-sm md:text-base",children:"다양한 카테고리의 크로바 제품군을 만나보세요."})]}),c.jsxs("div",{className:"flex items-center gap-3 self-end md:self-auto",children:[c.jsx("button",{onClick:()=>h("left"),className:"p-3 rounded-full border border-gray-200 hover:border-black hover:bg-black hover:text-white transition-all duration-300 focus:outline-none cursor-pointer","aria-label":"Previous Category",children:c.jsx(zw,{size:20})}),c.jsx("button",{onClick:()=>h("right"),className:"p-3 rounded-full border border-gray-200 hover:border-black hover:bg-black hover:text-white transition-all duration-300 focus:outline-none cursor-pointer","aria-label":"Next Category",children:c.jsx(Wg,{size:20})})]})]}),c.jsxs("div",{className:"relative",children:[c.jsx("div",{ref:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),className:"flex gap-6 overflow-x-auto scroll-smooth pb-6 pl-6 md:pl-12 snap-x snap-mandatory no-scrollbar",children:[...n.categories,...n.categories].map((m,g)=>c.jsx(Ge.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:g%n.categories.length*.05},className:"min-w-[240px] sm:min-w-[280px] md:min-w-[300px] lg:min-w-[260px] w-[260px] snap-start group block relative flex-shrink-0 transition-transform duration-300 hover:scale-105",children:c.jsxs(bn,{to:m.link||"#",className:"block",children:[c.jsxs("div",{className:"relative aspect-[4/5] overflow-hidden bg-gray-100 mb-4 rounded-none group/image",children:[m.image&&c.jsx(et,{src:m.image,alt:m.name,className:"w-full h-full object-cover group-hover/image:scale-105 transition-transform duration-700",referrerPolicy:"no-referrer"}),c.jsx("div",{className:"absolute inset-0 bg-black/5 group-hover/image:bg-black/10 transition-colors duration-300"})]}),c.jsxs("div",{className:"flex items-center justify-between mt-2",children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900 group-hover:text-[#224328] transition-colors",children:m.name}),c.jsx("div",{className:"w-8 h-8 rounded-full border border-transparent flex items-center justify-center group-hover:bg-[#224328] group-hover:text-white transition-all duration-300",children:c.jsx(nd,{size:14})})]})]})},g))}),c.jsx("div",{className:"absolute top-0 right-0 h-full w-16 bg-gradient-to-l from-white/60 to-transparent pointer-events-none hidden md:block"})]})]}),c.jsx(tX,{data:n}),c.jsx(eX,{data:n})]})},rX=[{value:"font-pretendard",label:"프리텐다드 (Pretendard - 모던 깔끔 추천)"},{value:"font-nanumsquare",label:"나눔스퀘어 네오 (NanumSquare Neo - 세련된 최신 고딕)"},{value:"font-scoredream",label:"에스코어 드림 (S-Core Dream - 또렷한 프리미엄)"},{value:"font-notosans",label:"노토 산스 (Noto Sans KR - 기본 정갈 고딕)"},{value:"font-gothic",label:"나눔고딕 (Nanum Gothic - 가독성 우수)"},{value:"font-suite",label:"스위트 (Suite - 부드러운 라운드)"},{value:"font-gowundodum",label:"고운돋움 (Gowun Dodum - 감성 돋움)"},{value:"font-gmarket",label:"G마켓 산스 (Gmarket Sans - 임팩트 제목)"},{value:"font-dohyeon",label:"도현체 (Do Hyeon - 볼드 제목용)"},{value:"font-ssurround",label:"카페24 서라운드 (Cafe24 - 볼드 브랜드)"},{value:"font-blackhan",label:"블랙 한 산스 (Black Han Sans - 강렬한 헤드라인)"},{value:"font-jua",label:"주아체 (Jua - 친근한 정감체)"},{value:"font-notoserif",label:"노토 세리프 (Noto Serif KR - 클래식 명조)"},{value:"font-myeongjo",label:"나눔명조 (Nanum Myeongjo - 품격 명조)"},{value:"font-batang",label:"고운바탕 (Gowun Batang - 감성 세리프)"},{value:"font-pyeongchang",label:"평창평화체 (PyeongChang - 고급 헤리티지)"},{value:"font-gulim",label:"굴림체 (Gulim - 클래식 굴림)"},{value:"font-dotum",label:"돋움체 (Dotum - 정갈한 돋움)"},{value:"font-hyheadline",label:"HY헤드라인 (HYHeadline - 강력한 헤드라인)"},{value:"font-inter",label:"Inter (깔끔 영문/숫자)"}],sX=[{value:"font-light",label:"300 - 얇게 (Light)"},{value:"font-normal",label:"400 - 보통 (Normal)"},{value:"font-medium",label:"500 - 중간 (Medium)"},{value:"font-semibold",label:"600 - 약간 굵게 (SemiBold)"},{value:"font-bold",label:"700 - 굵게 (Bold)"},{value:"font-extrabold",label:"800 - 매우 굵게 (ExtraBold)"},{value:"font-black",label:"900 - 가장 굵게 (Black)"}],aX=[{value:"text-xl",label:"작게 (XL - 20px)"},{value:"text-2xl",label:"보통 (2XL - 24px)"},{value:"text-3xl",label:"큰 제목 (3XL - 30px)"},{value:"text-4xl",label:"아주 큰 제목 (4XL - 36px)"},{value:"text-5xl",label:"히어로 거대 제목 (5XL - 48px)"},{value:"text-6xl",label:"초대형 헤드라인 (6XL - 60px)"}],iX=[{value:"text-xs",label:"아주 작게 (XS - 12px)"},{value:"text-sm",label:"작게 (SM - 14px)"},{value:"text-base",label:"보통 (Base - 16px)"},{value:"text-lg",label:"중간 (LG - 18px)"},{value:"text-xl",label:"선명하게 (XL - 20px)"},{value:"text-2xl",label:"크게 (2XL - 24px)"}],oX=[{value:"text-xs",label:"작은 본문 (XS - 12px)"},{value:"text-sm",label:"표준 본문 (SM - 14px)"},{value:"text-base",label:"가독성 본문 (Base - 16px)"},{value:"text-lg",label:"큰 본문 (LG - 18px)"},{value:"text-xl",label:"강조 본문 (XL - 20px)"}],V3=(n,e)=>{const t=(n==null?void 0:n.fontFamily)||(e==null?void 0:e.fontFamily)||"font-pretendard",r=(n==null?void 0:n.fontWeight)||(e==null?void 0:e.fontWeight)||"font-bold",s=(n==null?void 0:n.fontSize)||(e==null?void 0:e.fontSize)||"text-base";return`${t} ${r} ${s}`.trim()},lX=(n,e)=>{var t,r,s;if(n){if(n[`${e}_typography`])return n[`${e}_typography`];if(n[`${e}Typography`])return n[`${e}Typography`];if(n.typography&&n.typography[e])return n.typography[e];if(["title","heroTitle","featureTitle","header","name"].some(i=>
4323e.toLowerCase().includes(i.toLowerCase()))&&((t=n.typography)!=null&&t.title))return n.typography.title;if(["subtitle","subHeader","heroSubtitle","featureSubHeader","tagline"].some(i=>e.toLowerCase().includes(i.toLowerCase()))&&((r=n.typography)!=null&&r.subtitle))return n.typography.subtitle;if(["desc","description","heroDesc","featureDesc","content","text","body"].some(i=>e.toLowerCase().includes(i.toLowerCase()))&&((s=n.typography)!=null&&s.description))return n.typography.description}},$s=(n,e,t="")=>{const r=lX(n,e);return r?`${t} ${V3(r)}`.trim():t},F3=({title:n,image:e,className:t="w-12 h-12"})=>{if(e)return c.jsx(et,{src:e,alt:n,className:`${t} object-contain`,referrerPolicy:"no-referrer"});const r=n.replace(/\s+/g,"").toLowerCase();return r.includes("정부조달")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"46",fill:"none",stroke:"#1E3A8A",strokeWidth:"4"}),c.jsx("circle",{cx:"50",cy:"50",r:"41",fill:"none",stroke:"#E2E8F0",strokeWidth:"1"}),c.jsxs("g",{transform:"rotate(-30 50 50)",children:[c.jsx("path",{d:"M 50,15 A 35,35 0 0,1 50,85 A 17.5,17.5 0 0,1 50,50 A 17.5,17.5 0 0,0 50,15",fill:"#CD2E3A"}),c.jsx("path",{d:"M 50,85 A 35,35 0 0,1 50,15 A 17.5,17.5 0 0,0 50,50 A 17.5,17.5 0 0,1 50,85",fill:"#0047A0"})]}),c.jsx("circle",{cx:"50",cy:"50",r:"4",fill:"#FFFFFF"})]}):r.includes("우수제품")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"46",fill:"#0F4C81"}),c.jsx("circle",{cx:"50",cy:"50",r:"42",fill:"none",stroke:"#FFFFFF",strokeWidth:"1.5",strokeDasharray:"3 2"}),c.jsx("path",{d:"M68,50 C68,36 57,28 44,28 C30,28 20,38 20,51 C20,64 31,73 45,73 C57,73 66,66 68,57 L58,57 C56,61 51,64 45,64 C37,64 30,59 29,51 L68,51 Z M29,43 C31,36 37,36 44,36 C50,36 56,37 57,43 L29,43 Z",fill:"#FFFFFF"}),c.jsx("polygon",{points:"68,34 71,40 78,41 73,46 74,53 68,49 62,53 63,46 58,41 65,40",fill:"#FFD700"})]}):r.includes("nep")||r.includes("신제품")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("path",{d:"M15,50 C15,25 35,15 65,15 C50,28 45,45 45,60 C45,75 55,85 85,85 C55,85 15,75 15,50 Z",fill:"#22C55E",opacity:"0.15"}),c.jsx("path",{d:"M12,48 C12,28 28,12 50,12 C72,12 88,28 88,48 C88,68 72,84 50,84 C28,84 12,68 12,48 Z",fill:"none",stroke:"#16A34A",strokeWidth:"2",strokeDasharray:"4 2"}),c.jsx("text",{x:"50",y:"47",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"24",fontStyle:"italic",fill:"#15803D",textAnchor:"middle",children:"NeP"}),c.jsx("text",{x:"50",y:"65",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"10",fill:"#1E293B",textAnchor:"middle",letterSpacing:"1",children:"신제품인증"}),c.jsx("path",{d:"M72,25 C75,20 82,18 85,20 C85,23 80,28 75,30 C73,28 71,26 72,25 Z",fill:"#22C55E"})]}):r.includes("여성기업")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"46",fill:"none",stroke:"#EF4444",strokeWidth:"2"}),c.jsx("path",{d:"M50,18 C58,25 68,35 68,48 C68,61 58,74 50,82 C42,74 32,61 32,48 C32,35 42,25 50,18 Z",fill:"#EF4444",opacity:"0.1"}),c.jsx("path",{d:"M50,25 C54,32 64,40 64,52 C64,62 56,70 50,75 C44,70 36,62 36,52 C36,40 46,32 50,25 Z",fill:"#DC2626"}),c.jsx("circle",{cx:"50",cy:"52",r:"7",fill:"#FFFFFF"}),c.jsx("circle",{cx:"50",cy:"52",r:"3",fill:"#EF4444"})]}):r.includes("친환경")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#22C55E",strokeWidth:"4"}),c.jsx("path",{d:"M50,15 C65,15 78,28 78,45 C78,62 65,75 50,75 C35,75 25,65 25,50 C25,30 45,22 50,15 Z",fill:"none",stroke:"#15803D",strokeWidth:"2"}),c.jsx("path",{d:"M48,22 C43,28 32,35 32,48 C32,58 40,65 50,65 C60,65 68,56 68,45 C68,34 58,25 48,22 Z",fill:"#22C55E"}),c.jsx("path",{d:"M42,42 Q48,45 52,55",fill:"none",stroke:"#FFFFFF",strokeWidth:"3",strokeLinecap:"round"}),c.jsx("text",{x:"50",y:"86",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"10",fill:"#15803D",textAnchor:"middle",letterSpacing:"0.5",children:"친환경제품"})]}):r.includes("g-pass")||r.includes("gpass")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"#FFFFFF",stroke:"#1D4ED8",strokeWidth:"3"}),c.jsx("path",{d:"M8,50 H92 M14,30 Q50,42 86,30 M14,70 Q50,58 86,70",fill:"none",stroke:"#60A5FA",strokeWidth:"1.5"}),c.jsx("path",{d:"M50,8 V92 M30,14 Q42,50 30,86 M70,14 Q58,50 70,86",fill:"none",stroke:"#60A5FA",strokeWidth:"1.5"}),c.jsx("rect",{x:"10",y:"38",width:"80",height:"24",rx:"4",fill:"#1E3A8A",stroke:"#2563EB",strokeWidth:"1"}),c.jsx("text",{x:"50",y:"55",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"15",fill:"#FFFFFF",textAnchor:"middle",letterSpacing:"1",children:"G-PASS"})]}):r.includes("단체표준")||r.includes("sps")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("rect",{x:"5",y:"5",width:"90",height:"90",rx:"12",fill:"#F8FAFC",stroke:"#3B82F6",strokeWidth:"2"}),c.jsx("path",{d:"M5,40 H95",stroke:"#DBEAFE",strokeWidth:"1"}),c.jsx("path",{d:"M5,65 H95",stroke:"#DBEAFE",strokeWidth:"1"}),c.jsx("text",{x:"50",y:"48",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"26",fontStyle:"italic",fill:"#1D4ED8",textAnchor:"middle",letterSpacing:"1",children:"SPS"}),c.jsx("rect",{x:"20",y:"58",width:"60",height:"18",rx:"3",fill:"#1D4ED8"}),c.jsx("text",{x:"50",y:"71",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"9",fill:"#FFFFFF",textAnchor:"middle",children:"단체표준"})]}):r.includes("특허")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"46",fill:"none",stroke:"#F97316",strokeWidth:"2"}),c.jsx("g",{fill:"#F97316",transform:"translate(50,50)",children:[0,45,90,135,180,225,270,315].map(s=>c.jsx("rect",{x:"-6",y:"-48",width:"12",height:"10",rx:"2",transform:`rotate(${s})`},s))}),c.jsx("circle",{cx:"50",cy:"50",r:"38",fill:"#FFFFFF",stroke:"#EA580C",strokeWidth:"2"}),c.jsxs("g",{transform:"rotate(45 50 50)",children:[c.jsx("path",{d:"M 50,22 A 28,28 0 0,1 50,78 A 14,14 0 0,1 50,50 A 14,14 0 0,0 50,22",fill:"#DC2626"}),c.jsx("path",{d:"M 50,78 A 28,28 0 0,1 50,22 A 14,14 0 0,0 50,50 A 14,14 0 0,1 50,78",fill:"#2563EB"})]}),c.jsx("text",{x:"50",y:"93",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"10",fill:"#C2410C",textAnchor:"middle",children:"특허청"})]}):r.includes("성능인증")||r.includes("성능")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#E2E8F0",strokeWidth:"1"}),c.jsx("path",{d:"M50,12 A38,38 0 0,1 88,50 A38,38 0 0,1 62,84",fill:"none",stroke:"#22C55E",strokeWidth:"7",strokeLinecap:"round"}),c.jsx("path",{d:"M50,88 A38,38 0 0,1 12,50 A38,38 0 0,1 38,16",fill:"none",stroke:"#3B82F6",strokeWidth:"7",strokeLinecap:"round"}),c.jsx("polygon",{points:"50,6 56,15 44,15",fill:"#3B82F6",transform:"rotate(30 50 50)"}),c.jsx("polygon",{points:"50,94 56,85 44,85",fill:"#22C55E",transform:"rotate(30 50 50)"}),c.jsx("path",{d:"M50,32 L53,40 H62 L55,45 L58,54 L50,48 L42,54 L45,45 L38,40 H47 Z",fill:"#1D4ED8"}),c.jsx("text",{x:"50",y:"70",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"9",fill:"#1E293B",textAnchor:"middle",children:"성능인증"})]}):r.includes("핀업")||r.includes("pinup")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("path",{d:"M10,85 L85,10",stroke:"#FCA5A5",strokeWidth:"1",strokeDasharray:"2 2"}),c.jsx("path",{d:"M68,20 C80,32 78,50 62,56 L44,62 L38,44 L44,26 C60,10 56,8 68,20 Z",fill:"#DC2626"}),c.jsx("path",{d:"M38,44 L20,74 L44,38",fill:"none",stroke:"#DC2626",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("text",{x:"50",y:"85",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"11",fill:"#1E293B",textAnchor:"middle",letterSpacing:"0.5",children:"PIN UP"}),c.jsx("text",{x:"50",y:"96",fontFamily:"system-ui, sans-serif",fontWeight:"700",fontSize:"7",fill:"#64748B",textAnchor:"middle",letterSpacing:"0.2",children:"DESIGN AWARD"})]}):r.includes("ks")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("circle",{cx:"50",cy:"50",r:"44",fill:"none",stroke:"#1E293B",strokeWidth:"6"}),c.jsx("circle",{cx:"50",cy:"50",r:"36",fill:"none",stroke:"#1E293B",strokeWidth:"1.5"}),c.jsx("path",{d:"M30,26 V74 H39 V54 L58,74 H70 L48,49 L68,26 H56 L39,45 V26 H30 Z",fill:"#1E293B"}),c.jsx("path",{d:"M60,33 C53,30 46,35 46,41 C46,48 58,46 58,53 C58,58 52,62 46,59",fill:"none",stroke:"#1E293B",strokeWidth:"4",strokeLinecap:"round"}),c.jsx("text",{x:"50",y:"85",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"10",fill:"#1E293B",textAnchor:"middle",children:"KS 인증"})]}):r.includes("iso")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("rect",{x:"10",y:"10",width:"80",height:"80",rx:"12",fill:"#F0F5FF",stroke:"#2563EB",strokeWidth:"2.5"}),c.jsx("circle",{cx:"36",cy:"45",r:"18",fill:"none",stroke:"#3B82F6",strokeWidth:"1.5"}),c.jsx("circle",{cx:"64",cy:"45",r:"18",fill:"none",stroke:"#3B82F6",strokeWidth:"1.5"}),c.jsx("path",{d:"M36,27 A18,18 0 0,1 50,45 A18,18 0 0,1 64,27",fill:"none",stroke:"#1D4ED8",strokeWidth:"1.5"}),c.jsx("text",{x:"50",y:"50",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"13",fill:"#1E3A8A",textAnchor:"middle",children:"ISO 9001"}),c.jsx("text",{x:"50",y:"76",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"9",fill:"#2563EB",textAnchor:"middle",letterSpacing:"0.5",children:"품질경영시스템"})]}):r.includes("mas")||r.includes("다수공급자")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("path",{d:"M50,10 L90,50 L50,90 L10,50 Z",fill:"none",stroke:"#E2E8F0",strokeWidth:"2"}),c.jsx("path",{d:"M50,15 L15,50 L50,85",fill:"none",stroke:"#2563EB",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M50,15 L85,50 L50,85",fill:"none",stroke:"#16A34A",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("rect",{x:"30",y:"38",width:"40",height:"24",rx:"3",fill:"#FFFFFF",stroke:"#1E293B",strokeWidth:"1.5"}),c.jsx("text",{x:"50",y:"55",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"13",fill:"#1E293B",textAnchor:"middle",children:"MAS"})]}):r.includes("직접생산")||r.includes("kbiz")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("rect",{x:"8",y:"25",width:"84",height:"50",rx:"8",fill:"#DC2626"}),c.jsx("text",{x:"50",y:"58",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"24",fill:"#FFFFFF",textAnchor:"middle",letterSpacing:"0.5",children:"KBIZ"}),c.jsx("text",{x:"50",y:"90",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"10",fill:"#991B1B",textAnchor:"middle",children:"직접생산확인"})]}):r.includes("이노비즈")||r.includes("innobiz")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("rect",{x:"5",y:"5",width:"90",height:"90",rx:"12",fill:"#F8FAFC",stroke:"#E2E8F0",strokeWidth:"1"}),c.jsx("text",{x:"46",y:"48",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"18",fontStyle:"italic",fill:"#0284C7",textAnchor:"middle",letterSpacing:"-0.5",children:"INNO"}),c.jsx("text",{x:"76",y:"48",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"18",fontStyle:"italic",fill:"#EA580C",textAnchor:"middle",letterSpacing:"-0.5",children:"BIZ"}),c.jsx("rect",{x:"15",y:"60",width:"70",height:"15",rx:"3",fill:"#0F172A"}),c.jsx("text",{x:"50",y:"71",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"7.5",fill:"#FFFFFF",textAnchor:"middle",letterSpacing:"0.2",children:"기술혁신형 중소기업"}),c.jsx("circle",{cx:"15",cy:"42",r:"3",fill:"#0284C7"}),c.jsx("circle",{cx:"85",cy:"42",r:"3",fill:"#EA580C"})]}):r.includes("기술보증")||r.includes("kibo")?c.jsxs("svg",{viewBox:"0 0 100 100",className:t,children:[c.jsx("rect",{x:"5",y:"5",width:"90",height:"90",rx:"12",fill:"#F8FAFC",stroke:"#E2E8F0",strokeWidth:"1"}),c.jsx("rect",{x:"12",y:"28",width:"16",height:"32",rx:"2",fill:"#84CC16"}),c.jsx("text",{x:"20",y:"50",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"18",fill:"#FFFFFF",textAnchor:"middle",children:"1"}),c.jsx("text",{x:"56",y:"51",fontFamily:"system-ui, sans-serif",fontWeight:"900",fontSize:"22",fill:"#1E3A8A",textAnchor:"middle",letterSpacing:"0.5",children:"KIBO"}),c.jsx("text",{x:"50",y:"78",fontFamily:"system-ui, sans-serif",fontWeight:"800",fontSize:"9",fill:"#64748B",textAnchor:"middle",letterSpacing:"0.2",children:"기술보증기금"})]}):c.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`${t} text-slate-500`,children:[c.jsx("circle",{cx:"12",cy:"12",r:"10"}),c.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),c.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Nr={heroTitle:`신뢰와 기술로 만드는
4324품격 있는 사무공간`,heroSubtitle:"크로바가구는 1988년 창업 이래 혁신적인 가구 공학과 앞선 기술력으로 새로운 공간 가치를 실현해 왔습니다.",heroBgImage:"https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80",storyTitle:`공간을 채우는 가치
4325주식회사 크로바가구 스토리`,storySubtitle:"1988년부터 이어온 인간 중심의 가구 공학과 앞선 기술력으로, 더 편안하고 생산적인 공간 솔루션을 창출합니다.",historyTitle:"공간을 혁신해온 크로바가구 연혁",historySubtitle:"1988년부터 이어온 인간 중심의 가구 공학과 끊임없는 신제품 개발로 쌓아 올린 영광과 도전의 흔적입니다.",storyCards:[{num:"01",title:"EXCELLENT DESIGN",badge:"FOR COMFORT",desc:"크로바가구가 선보이는 디자인은 시각적인 아름다움을 넘어서 공간의 본질과 가장 밀접하게 소통하는 매개체, 누구나 경험하고 공감하며 공유하는 스토리가 됩니다.",image:"https://images.unsplash.com/photo-1505797149-43b0069ec26b?ixlib=rb-4.0.3&auto=format&fit=crop&q=80&w=1000",image2:""},{num:"02",title:"CRAFTSMANSHIP",badge:"FOR VALUE",desc:"크로바가구는 핵심 부품을 직접 연구하고 생산하는 장인정신으로 적극적으로 상품을 개발하고 품질 수준을 유지하면서 사용자에게 근사한 경험을 선사하는 제품을 만듭니다.",image:"https://images.unsplash.com/photo-1513694203232-719a280e022f?ixlib=rb-4.0.3&auto=format&fit=crop&q=80&w=1000",image2:""},{num:"03",title:"ECO INNOVATION",badge:"FOR SUSTAINABILITY",desc:"자연과 사람 모두에게 건강하고 안전한 공간을 제안합니다. 친환경 자재 선별과 엄격한 무독성 공정을 통해 모두가 믿고 숨 쉴 수 있는 쾌적한 친환경 가구를 완성합니다.",image:"https://images.unsplash.com/photo-149736611353-6870744d04b2?auto=format&fit=crop&q=80&w=1000",image2:""},{num:"04",title:"SMART SPACE",badge:"FOR EFFICIENCY",desc:"시시각각 변화하는 스마트 오피스 환경에 맞춤 대응합니다. 유연한 모듈 조합과 자동화된 스마트 시스템을 통해 개개인의 업무 효율과 능률을 극대화하는 혁신적인 오피스 솔루션을 제시합니다.",image:"https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&w=1000",image2:""}],historyPeriods:[{period:"2016 ~ 2020",milestone:"사무용의자 우수조달물품 지정",image1:"https://images.unsplash.com/photo-1505797149-43b0069ec26b?auto=format&fit=crop&q=80&w=1000",image2:"https://images.unsplash.com/photo-15804810
432572645-022f9a6dbf27?auto=format&fit=crop&q=80&w=1000",image3:"https://images.unsplash.com/photo-1592078615290-033ee584e267?auto=format&fit=crop&q=80&w=1000",events:[{date:"2020.09",text:"사무용의자 NEP(신제품)인증"},{date:"2020.08",text:"사무용의자 성능인증"},{date:"2020.04",text:"사무용의자 우수조달물품지정"},{date:"2019.12",text:"가족친환경 인증"},{date:"2018.12",text:"X-trans(사무용의자) PIN UP 수상"},{date:"2018.09",text:"사물함, 침대 품질보증조달물품지정"},{date:"2018.07",text:"사물함, 침대 우수조달물품지정"},{date:"2018.06",text:"사무용의자, 침대 KS인증 획득"},{date:"2017.12",text:"G-PASS 기업 지정"},{date:"2017.10",text:"경기도 유망중소기업 인증"},{date:"2017.04",text:"사물함용손잡이 외 3종 특허 등록"},{date:"2017.03",text:"드라마 ‘자체발광오피스’ 협찬"},{date:"2016.11",text:"주식회사 크로바가구로 사명 변경"},{date:"2016.08",text:"KORURN 전시회 참가"},{date:"2016.08",text:"사물함용 경첩 개발"},{date:"2016.01",text:"자동 높낮이 조절 책상 개발"}]},{period:"2012 ~ 2015",milestone:"수납가구 외 1건 KS인증 획득",image1:"https://images.unsplash.com/photo-1503602642458-232111445657?auto=format&fit=crop&q=80&w=1000",image2:"https://images.unsplash.com/photo-1567538096630-e0c55bd6374c?auto=format&fit=crop&q=80&w=1000",events:[{date:"2015.11",text:"유니버셜 디자인 박람회 참가"},{date:"2015.10",text:"G-FAIR 박람회 참가"},{date:"2015.02",text:"수납가구 외 1건 KS인증 획득"},{date:"2015.02",text:"가구체결용 앵커볼트 개발"},{date:"2014.10",text:"여성기업 인증 획득"},{date:"2014.09",text:"재능기부표창"},{date:"2014.04",text:"(주)대농크로바 법인전환"},{date:"2012.12",text:"경기도 유망중소기업 인증 획득"},{date:"2012.11",text:"의자 일체형테이블 디자인 등록"},{date:"2012.09",text:"의자 일체형테이블 의자 자동 절칩 장치 등록"},{date:"2012.07",text:"사물함 우수조달물품지정"},{date:"2012.05",text:"상표등록증 획득"}]},{period:"2009 ~ 2011",milestone:"경기도 유망중소기업 선정",image1:"https://images.unsplash.com/photo-1592078615290-033ee584e267?auto=format&fit=crop&q=80&w=1000",image2:"https://images.unsplash.com/photo-1513694203232-719a280e022f?auto=format&fit=crop&q=80&w=1000",events:[{date:"2011.09",text:"안전의 날 가구부분 지식경제부 장관표창수상"},{date:"2011.05",text:"경기도 유망중소기업 선정"},{date:"2011.01",text:"도어 닫힘 유지장치를 갖춘 사물함용 경첩 특허등록"},{date:"2010.10",text:"사물함 개폐문 록킹 장치 실용신안등록"},{date:"2010.09",text:"이중잠금보관함 실용신안등록"},{date:"2010.07",text:"품질경영 모범업체 선정"},{date:"2010.04",text:"원적외선과 음이온이 방출되는 친환경 도료제조방법 특허 등록"},{date:"2010.03",text:"버튼식 리클라이닝 사무용의자 특허 등록"},{date:"2009.08",text:"한국국제가구 및 인테리어 산업대전 참가"},{date:"2009.02",text:"경향하우징페어 경기도 가구디자인 신상 개발"},{date:"2009.02",text:"대한민국 베스트 신상품 선정"}]},{period:"1988 ~ 2008",milestone:"벤처기업확인서 / 기술혁신형 중소기업 선정",image1:"https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&q=80&w=1000",image2:"",events:[{date:"2008.11",text:"사물함 개폐문용 손잡이 디자인 등록"},{date:"2008.12",text:"컴퓨터책상 디자인 등록"},{date:"2008.03",text:"벤처기업확인서 / 기술혁신형 중소기업 선정"},{date:"2007.10",text:"조달청 마스계약 나라장터 등록(154품목)"},{date:"2007.03",text:"환경표지인증획득"},{date:"2007.01",text:"연구개발전담부서(개발실) 승인"},{date:"2002.06",text:"책상상판의 테두리 보호구조 실용신안등록"},{date:"2002.03",text:"ISO9001 인증획득"},{date:"1998.08",text:"절첩식책상 실용신안등록"},{date:"1988.07",text:"Q마크 품질보증업체지정"},{date:"1988.11",text:"크로바가구 창업 / 공장등록"}]}],certsTitle:"인증 및 특허",certsSubtitle:"철저한 검증을 통과한 크로바가구의 우수한 기술력과 신뢰를 보장하는 인증마크입니다.",certsList:[{title:"정부조달",desc:"조달청",tag:"신뢰보장",image:""},{title:"우수제품",desc:"조달청",tag:"우선구매",highlight:!0,image:""},{title:"신제품 NEP",desc:"산업통상자원부",tag:"의무구매",highlight:!0,image:""},{title:"여성기업",desc:"중소벤처기업부",tag:"우선구매",image:""},{title:"친환경제품",desc:"환경부",tag:"의무구매",highlight:!0,image:""},{title:"G-PASS",desc:"조달청",tag:"수출유망",image:""},{title:"단체표준",desc:"한국표준협회",tag:"SPS 단체표준",image:""},{title:"특허",desc:"특허청",tag:"기술보유",image:""},{title:"성능인증",desc:"중소벤처기업부",tag:"품질입증",image:""},{title:"핀업 디자인 선정",desc:"한국산업디자이너협회",tag:"PIN UP AWARDS",highlight:!0,image:""},{title:"KS인증",desc:"한국표준협회",tag:"국가표준인증",image:""},{title:"ISO9001",desc:"국제표준화기구",tag:"품질경영시스템",image:""},{title:"다수공급자 계약물품 MAS",desc:"조달청 나라장터",tag:"공공조달",image:""},{title:"직접생산",desc:"중소기업중앙회",tag:"직접생산확인",image:""},{title:"이노비즈",desc:"중소벤처기업부",tag:"기술혁신중소기업",image:""},{title:"기술보증기금",desc:"기술보증기금",tag:"기술신용우수",image:""}],patentTitle:"상표 | 특허 | 디자인등록",patentList:[],locationTitle:"오시는 길",locationSubtitle:"크로바가구 본사 및 공장 안내입니다. 주소를 클릭하면 클립보드로 복
4325사됩니다.",headquartersAddress:"경기도 양주시 칠봉산로 227번길 76-39",hqImage:"",hqDescription:"생산 기획, 관리 연구소 및 완제품 정밀 품질 조립 라인이 위치해 있습니다.",factory2Address:"경기도 양주시 화합로 1325번길 403-8(덕정동)",factory2Image:"",factory2Description:"자재 보관, 프레임 정밀 용접 가공 및 목재 원판 스마트 정밀 재단 시스템이 완비되어 있습니다.",ciImageKorean:"",ciImageEnglish:"",ciDescription:"행운과 자연을 상징하는 클로버에 가구의 본질인 목재의 결을 더해 오랜 제조 기술과 장인정신을 담았습니다.",ciDownloadUrl:"",ecoBgImage:"https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&q=80&w=2000",ecoSubtitle:"E0 ECO MATERIALS",ecoTitle:"E0 등급 친환경 자재, 건강한 공간을 만듭니다",ecoDescription:"크로바가구는 인체에 유해한 포름알데히드 방출량이 거의 없는 E0 등급 자재만을 사용합니다. 자연에서 얻은 건강한 자재로 더 안전하고 쾌적한 공간을 만들어갑니다.",ecoFeatures:[{title:"E0 등급 자재",desc:"인체에 무해한 E0 등급 목재 사용",icon:"leaf"},{title:"자연 친화적",desc:"지속가능한 산림 자원을 활용한 친환경 자재",icon:"tree"},{title:"유해물질 최소화",desc:"포름알데히드 방출량이 거의 없어 안심 사용",icon:"shield"},{title:"쾌적한 실내 환경",desc:"건강하고 쾌적한 공간을 위한 친환경 가구",icon:"home"}],ecoFooterText:"환경을 생각하는 소재 선택이 사람을 위한 가치 있는 공간을 만듭니다."},cX=()=>{const[n,e]=D.useState(Nr),[t,r]=D.useState(!0),[s,i]=D.useState("story"),[l,d]=D.useState(null);D.useEffect(()=>{(async()=>{try{const b=qt(ot,"site_content","about_page_v2"),w=await mn(b);if(w.exists()){const _=w.data();if(_.content)try{const N=JSON.parse(_.content);e(ar(Nr,N))}catch(N){console.error("JSON parse error in About:",N),e(Nr)}}}catch(b){console.error("Failed to load about data from Firebase:",b)}finally{r(!1)}})()},[]);const h=(p,b)=>{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(p).then(()=>{d(b),setTimeout(()=>d(null),2e3)}).catch(w=>{console.error("Failed to copy text: ",w),m(p,b)}):m(p,b)},m=(p,b)=>{const w=document.createElement("textarea");w.value=p,w.style.top="0",w.style.left="0",w.style.position="fixed",document.body.appendChild(w),w.focus(),w.select();try{document.execCommand("copy")&&(d(b),setTimeout(()=>d(null),2e3))}catch(_){console.error("Fallback copy failed",_)}document.body.removeChild(w)},g=p=>p.includes("우수제품")||p.includes("NEP")||p.includes("친환경")||p.includes("핀업")?{bg:"bg-amber-50/50 hover:bg-amber-50 border-amber-200/60 hover:border-amber-400/80 shadow-sm hover:shadow-md",badge:"bg-amber-100 text-amber-800 border-amber-200/50",text:"text-amber-950",iconColor:"text-amber-600",icon:oc}:p.includes("KS")||p.includes("ISO")||p.includes("성능")?{bg:"bg-blue-50/50 hover:bg-blue-50 border-blue-200/60 hover:border-blue-400/80 shadow-sm hover:shadow-md",badge:"bg-blue-100 text-blue-800 border-blue-200/50",text:"text-blue-950",iconColor:"text-blue-600",icon:zu}:p.includes("특허")||p.includes("단체")||p.includes("MAS")?{bg:"bg-emerald-50/50 hover:bg-emerald-50 border-emerald-200/60 hover:border-emerald-400/80 shadow-sm hover:shadow-md",badge:"bg-emerald-100 text-emerald-800 border-emerald-200/50",text:"text-emerald-950",iconColor:"text-emerald-600",icon:Dy}:{bg:"bg-gray-50 hover:bg-gray-100/70 border-gray-200 hover:border-gray-400/60",badge:"bg-gray-200 text-gray-700 border-transparent",text:"text-gray-950",iconColor:"text-gray-500",icon:Hw};return t?c.jsx("div",{className:"min-h-screen bg-slate-50/40"}):c.jsxs("div",{className:"pt-24 pb-16 min-h-screen bg-slate-50/40 overflow-x-hidden",children:[c.jsxs("section",{className:"relative h-[45vh] flex items-center justify-center overflow-hidden",children:[c.jsxs("div",{className:"absolute inset-0 z-0",children:[n.heroBgImage&&c.jsx(et,{src:n.heroBgImage||null,alt:"Clover Furniture Office background",className:"w-full h-full object-cover brightness-50",referrerPolicy:"no-referrer"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900/80 via-slate-900/45 to-transparent z-10 pointer-events-none"})]}),c.jsxs("div",{className:"relative z-20 text-center text-white px-6 max-w-4xl mx-auto flex flex-col items-center",children:[c.jsx(Ge.div,{initial:{opacity:0,y:15}
4325,animate:{opacity:1,y:0},transition:{duration:.8},className:"w-full",children:c.jsx("h1",{className:"text-3xl md:text-5xl font-extrabold mb-4 tracking-tight leading-tight whitespace-pre-line text-white",children:n.heroTitle})}),c.jsx(Ge.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.8,delay:.15},className:"w-full",children:c.jsx("p",{className:"text-base md:text-lg font-light text-slate-200 whitespace-pre-line max-w-2xl mx-auto",children:n.heroSubtitle})})]})]}),c.jsx("section",{className:"w-full mb-16 relative z-30",children:c.jsxs("div",{className:"bg-[#f5f5f5] flex overflow-x-auto justify-start md:justify-center items-center gap-4 md:gap-8 pt-4 pb-0 px-4 md:px-8 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:[c.jsxs("button",{onClick:()=>i("story"),className:`flex items-center gap-2 text-lg font-medium transition-colors relative pb-4 px-4 md:px-8 shrink-0 ${s==="story"?"text-[#0a0a0a]":"text-gray-500 hover:text-gray-900"}`,children:[c.jsx(Kf,{size:20}),"크로바가구 스토리",s==="story"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]}),c.jsxs("button",{onClick:()=>i("timeline"),className:`flex items-center gap-2 text-lg font-medium transition-colors relative pb-4 px-4 md:px-8 shrink-0 ${s==="timeline"?"text-[#0a0a0a]":"text-gray-500 hover:text-gray-900"}`,children:[c.jsx(mA,{size:20}),"회사 연혁",s==="timeline"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]}),c.jsxs("button",{onClick:()=>i("certs"),className:`flex items-center gap-2 text-lg font-medium transition-colors relative pb-4 px-4 md:px-8 shrink-0 ${s==="certs"?"text-[#0a0a0a]":"text-gray-500 hover:text-gray-900"}`,children:[c.jsx(oc,{size:20}),"인증 및 특허",s==="certs"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]}),c.jsxs("button",{onClick:()=>i("directions"),className:`flex items-center gap-2 text-lg font-medium transition-colors relative pb-4 px-4 md:px-8 shrink-0 ${s==="directions"?"text-[#0a0a0a]":"text-gray-500 hover:text-gray-900"}`,children:[c.jsx(Cf,{size:20}),"오시는 길",s==="directions"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]})]})}),c.jsx("main",{className:"max-w-7xl mx-auto px-6 md:px-12",children:c.jsxs(Cr,{mode:"wait",children:[s==="story"&&c.jsxs(Ge.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"space-y-16",children:[c.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12",children:[c.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-[#edfcf2] text-emerald-800 border border-emerald-200/50 uppercase tracking-wide mb-3",children:[c.jsx(S_,{size:12,className:"text-emerald-600 animate-pulse"}),"Clover Story"]}),((n.storyTitle!==void 0?n.storyTitle:Nr.storyTitle)??"").trim()!==""&&c.jsx("h2",{className:$s(n,"storyTitle","text-3xl md:text-4xl font-extrabold text-slate-900 tracking-tight leading-tight whitespace-pre-line"),children:n.storyTitle!==void 0?n.storyTitle:Nr.storyTitle}),((n.storySubtitle!==void 0?n.storySubtitle:Nr.storySubtitle)??"").trim()!==""&&c.jsx("p",{className:$s(n,"storySubtitle","text-slate-500 text-sm md:text-base mt-3 whitespace-pre-line leading-relaxed max-w-xl mx-auto font-light"),children:n.storySubtitle!==void 0?n.storySubtitle:Nr.storySubtitle})]}),c.jsx("div",{className:"relative max-w-7xl mx-auto space-y-20 md:space-y-32 py-6",children:(n.storyCards||Nr.storyCards).map((p,b)=>{const w=b%2===0;return c.jsxs("div",{className:`relative flex flex-col md:flex-row gap-8 md:gap-12 lg:gap-16 items-center ${w?"":"md:flex-row-reverse"}`,children:[c.jsx("div",{className:"w-full md:w-7/12 lg:w-2/3",children:p.image2?c.jsx("div",{className:"flex items-end gap-4 sm:gap-6 w-full",children:w?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-[48%] aspect-[4/3] overflow-hidden rounded-none bg-slate-50 relative group shadow-sm hover:shadow-md transition-shadow",children:c.jsx("img",{src:p.image||null,alt:p.title,className:"w-full h-full object-cover transition-transform duration-700 ease-out hover:scale-105",referrerPolicy:"no-referrer"})}),c.jsx("div",{className:"w-[52%] aspect-[3/4] overflow-hidden rounded-none bg-slate-50 relative group shadow-sm hover:shadow-md transition-shadow",children:c.jsx("img",{src:p.image2||null,alt:p.title,className:"w-full h-full object-cover transition-transform duration-700 ease-out hover:scale-105",referrerPolicy:"no-referrer"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-[52%] aspect-[3/4] overflow-hidden rounded-none bg-slate-50 relative group shadow-sm hover:shadow-md transition-shadow",children:c.jsx("img",{src:p.image2||null,alt:p.title,className:"w-full h-full object-cover transition-transform duration-700 ease-out hover:scale-105",referrerPolicy:"no-referrer"})}),c.jsx("div",{className:"w-[48%] aspect-[4/3] overflow-hidden rounded-none bg-slate-50 relative group shadow-sm hover:shadow-md transition-shadow",children:c.jsx("img",{src:p.image||null,alt:p.title,className:"w-full h-full object-cover transition-transform duration-700 ease-out hover:scale-105",referrerPolicy:"no-referrer"})})]})}):c.jsx("div",{className:"relative group overflow-hidden rounded-none bg-slate-100 transition-all duration-500 shadow-sm hover:shadow-md w-full",children:c.jsx("img",{src:p.image||null,alt:p.title,className:"w-full aspect-[16/10] md:aspect-[16/9] object-cover transition-transform duration-700 ease-out group-hover:scale-105",referrerPolicy:"no-referrer"})})}),c.jsxs("div",{className:"w-full md:w-5/12 lg:w-1/3 flex flex-col justify-center text-left space-y-5 pl-2 md:pl-0 pr-2 md:pr-0",children:[c.jsx("h3",{className:$s(p,"title","text-3xl md:text-4xl lg:text-5xl font-extrabold text-slate-900 tracking-tight leading-tight uppercase font-sans whitespace-pre-wrap"),children:p.title}),c.jsx("div",{className:$s(p,"badge","text-[#12A845] font-bold text-xs md:text-[13px] tracking-widest uppercase whitespace-pre-wrap"),children:p.badge}),c.jsx("p",{className:$s(p,"desc","text-[#555252] text-sm md:text-[15.5px] leading-relaxed whitespace-pre-wrap font-normal pt-2"),children:p.desc})]})]},b)})}),c.jsxs("div",{className:"relative w-screen left-1/2 right-1/2 -ml-[50vw] -mr-[50vw] mt-24 mb-0 overflow-hidden border-y border-slate-200/50 group transition-all",children:[c.jsxs("div",{className:"absolute inset-0 z-0",children:[c.jsx("img",{src:n.ecoBgImage||"https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&q=80&w=2000",alt:"Eco Backgroun
4325d",className:"w-full h-full object-cover transition-transform duration-1000 group-hover:scale-[1.02]",referrerPolicy:"no-referrer"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-white/95 via-white/85 to-white/10 md:from-white/95 md:via-white/90 md:to-white/20"})]}),c.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6 md:px-12 py-16 md:py-24 flex flex-col justify-between h-full min-h-[480px] md:min-h-[520px]",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-emerald-700 font-extrabold text-[11px] md:text-xs tracking-widest uppercase mb-3",children:n.ecoSubtitle||"E0 ECO MATERIALS"}),c.jsx("h2",{className:"text-2xl md:text-[38px] font-extrabold text-[#143d22] leading-tight tracking-tight whitespace-pre-line",children:n.ecoTitle||`E0 등급 친환경 자재,
4326건강한 공간을 만듭니다`}),c.jsx("div",{className:"w-10 h-[2px] bg-emerald-600/60 my-6"}),c.jsx("p",{className:"text-[#3a4f41] text-xs md:text-[14.5px] leading-relaxed max-w-xl whitespace-pre-line font-medium mb-10",children:n.ecoDescription||`크로바가구는 인체에 유해한 포름알데히드 방출량이 거의 없는 E0 등급 자재만을 사용합니다.
4327자연에서 얻은 건강한 자재로 더 안전하고 쾌적한 공간을 만들어갑니다.`})]}),c.jsxs("div",{className:"space-y-8 mt-auto",children:[c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 md:gap-4 pt-6 border-t border-emerald-900/10",children:(n.ecoFeatures||Nr.ecoFeatures).map((p,b)=>{let w=CI;return p.icon==="tree"&&(w=ez),p.icon==="shield"&&(w=zu),p.icon==="home"&&(w=rU),c.jsxs("div",{className:"flex flex-col text-left space-y-2.5 pl-3 border-l border-emerald-900/20",children:[c.jsx("div",{className:"w-8 h-8 rounded-full bg-emerald-500/10 flex items-center justify-center text-emerald-700",children:c.jsx(w,{className:"w-4 h-4 stroke-[2]"})}),c.jsx("h4",{className:"text-xs md:text-sm font-bold text-[#143d22]",children:p.title}),c.jsx("p",{className:"text-[10px] md:text-xs text-[#0e0b0b] leading-normal max-w-[160px] font-normal",children:p.desc})]},b)})}),c.jsx("div",{className:"text-left text-xs md:text-[14.5px] font-bold text-emerald-800 tracking-wide pt-2 whitespace-pre-line",children:n.ecoFooterText||"환경을 생각하는 소재 선택이 사람을 위한 가치 있는 공간을 만듭니다."})]})]})]}),c.jsxs("div",{className:"mt-20 pt-0 max-w-5xl mx-auto",children:[c.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-10",children:[c.jsx("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-[#edfcf2] text-[#12A845] border border-emerald-200/50 uppercase tracking-wide mb-3",children:"Corporate Identity"}),c.jsx("h2",{className:"text-2xl md:text-3xl font-extrabold text-slate-900 tracking-tight leading-tight",children:"크로바가구 CI"})]}),c.jsxs("div",{className:"bg-slate-50 rounded-[2.5rem] p-6 md:p-12 flex flex-col items-center justify-center gap-8 md:gap-10 max-w-4xl mx-auto",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6 md:gap-8 w-full max-w-3xl mx-auto",children:[c.jsxs("div",{className:"flex flex-col items-start w-full",children:[c.jsx("div",{className:"text-sm md:text-base font-bold text-slate-800 mb-2 pl-1 tracking-wider",children:"국문 로고"}),c.jsx("div",{className:"w-full bg-white border border-slate-300 rounded-xl p-6 md:p-8 flex items-center justify-center min-h-[140px] shadow-sm hover:border-slate-400 transition-all",children:n.ciImageKorean?c.jsx("div",{className:"flex items-center justify-center max-w-[240px] h-16 sm:h-20",children:c.jsx(et,{src:n.ciImageKorean||null,alt:"크로바가구 국문 로고",className:"max-h-full max-w-full object-contain",referrerPolicy:"no-referrer"})}):c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Gw,{className:"w-12 h-12 md:w-14 md:h-14 text-[#12A845] shrink-0",size:56}),c.jsx("span",{className:"text-2xl md:text-3xl font-extrabold tracking-tighter text-[#1e1e1e] font-sans",children:"크로바가구"})]})})]}),c.jsxs("div",{className:"flex flex-col items-start w-full",children:[c.jsx("div",{className:"text-sm md:text-base font-bold text-slate-800 mb-2 pl-1 tracking-wider",children:"영문 로고"}),c.jsx("div",{className:"w-full bg-white border border-slate-300 rounded-xl p-6 md:p-8 flex items-center justify-center min-h-[140px] shadow-sm hover:border-slate-400 transition-all",children:n.ciImageEnglish?c.jsx("div",{className:"flex items-center justify-center max-w-[240px] h-16 sm:h-20",children:c.jsx(et,{src:n.ciImageEnglish||null,alt:"크로바가구 영문 로고",className:"max-h-full max-w-full object-contain",referrerPolicy:"no-referrer"})}):c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Gw,{className:"w-12 h-12 md:w-14 md:h-14 text-[#12A845] shrink-0",size:56}),c.jsx("span",{className:"text-2xl md:text-3xl font-extrabold tracking-tighter text-[#1e1e1e] font-sans",children:"CLOVER"})]})})]})]}),c.jsx("div",{className:"w-full h-px bg-slate-200/80 max-w-2xl"}),c.jsx("p",{className:"text-[#373333] text-sm md:text-base leading-relaxed text-center font-normal max-w-2xl whitespace-pre-line",children:n.ciDescription||"행운과 자연을 상징하는 클로버에 가구의 본질인 목재의 결을 더해 오랜 제조 기술과 장인정신을 담았습니다."}),n.ciDownloadUrl&&c.jsxs("a",{href:n.ciDownloadUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 px-6 py-3.5 bg-[#12A845] hover:bg-[#0f8c39] text-white rounded-2xl font-bold text-sm shadow-md hover:shadow-lg transition-all duration-300 active:scale-[0.98] mt-2",children:[c.jsx(N_,{size:16}),"CI 다운받기"]})]})]})]},"story"),s==="timeline"&&c.jsxs(Ge.div,{initial:{opacity:0,y:15}
4327,animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"space-y-16",children:[c.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12",children:[c.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-[#edfcf2] text-emerald-800 border border-emerald-200/50 uppercase tracking-wide mb-3",children:[c.jsx(mA,{size:12,className:"text-emerald-600 animate-pulse"}),"Clover History"]}),((n.historyTitle!==void 0?n.historyTitle:Nr.historyTitle)??"").trim()!==""&&c.jsx("h2",{className:$s(n,"historyTitle","text-3xl md:text-4xl font-extrabold text-slate-900 tracking-tight leading-tight whitespace-pre-line"),children:n.historyTitle!==void 0?n.historyTitle:Nr.historyTitle}),((n.historySubtitle!==void 0?n.historySubtitle:Nr.historySubtitle)??"").trim()!==""&&c.jsx("p",{className:$s(n,"historySubtitle","text-slate-500 text-sm md:text-base mt-3 whitespace-pre-line leading-relaxed max-w-xl mx-auto font-light"),children:n.historySubtitle!==void 0?n.historySubtitle:Nr.historySubtitle})]}),c.jsxs("div",{className:"relative max-w-5xl mx-auto space-y-16 md:space-y-24 py-6",children:[c.jsx("div",{className:"absolute left-4 md:left-1/2 top-10 bottom-10 w-0.5 border-l border-dashed border-slate-200 -translate-x-1/2 hidden md:block"}),(n.historyPeriods||Nr.historyPeriods).map((p,b)=>{const w=b%2===0,_=p.image1||"",N=p.image2||"",E=p.image3||"";return c.jsxs("div",{className:`relative flex flex-col md:flex-row gap-8 md:gap-16 items-start ${w?"":"md:flex-row-reverse"}`,children:[c.jsx("div",{className:"absolute left-4 md:left-1/2 w-4 h-4 rounded-full bg-white border-4 border-emerald-500 -translate-x-1/2 shadow-sm z-10 hidden md:block mt-3"}),c.jsx("div",{className:"w-full md:w-1/2",children:_&&N&&E?c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsx("div",{className:"relative group overflow-hidden rounded-none bg-transparent transition-all duration-500",children:c.jsx("img",{src:_||null,alt:`${p.period} detail 1`,className:"w-full h-full object-cover aspect-[3/4] transition-transform duration-700 ease-out group-hover:scale-105",referrerPolicy:"no-referrer",loading:"lazy"})}),c.jsxs("div",{className:"flex flex-col gap-4 justify-between",children:[c.jsx("div",{className:"relative group overflow-hidden rounded-none bg-transparent transition-all duration-500",children:c.jsx("img",{src:N||null,alt:`${p.period} detail 2`,className:"w-full aspect-[4/3] object-cover transition-transform duration-700 ease-out group-hover:scale-105",referrerPolicy:"no-referrer",loading:"lazy"})}),c.jsx("div",{className:"relative group overflow-hidden rounded-none bg-transparent transition-all duration-500",children:c.jsx("img",{src:E||null,alt:`${p.period} detail 3`,className:"w-full aspect-[4/3] object-cover transition-transform duration-700 ease-out group-hover:scale-105",referrerPolicy:"no-referrer",loading:"lazy"})})]})]}):_&&N?c.jsxs("div",{className:"flex flex-col gap-5",children:[c.jsx("div",{className:`w-[60%] ${w?"ml-auto":"mr-auto"} relative group overflow-hidden rounded-none bg-transparent transition-all duration-500`,children:c.jsx("img",{src:_||null,alt:`${p.period} detail 1`,className:"w-full aspect-square object-cover transition-transform duration-700 ease-out group-hover:scale-105",referrerPolicy:"no-referrer",loading:"lazy"})}),c.jsx("div",{className:"w-full relative group overflow-hidden rounded-none bg-transparent transition-all duration-500",children:c.jsx("img",{src:N||null,alt:`${p.period} detail 2`,className:"w-full aspect-[16/10] object-cover transition-transform duration-700 ease-out group-hover:scale-105",referrerPolicy:"no-referrer",loading:"lazy"})})]}):c.jsx("div",{className:"relative group overflow-hidden rounded-none bg-transparent transition-all duration-500",children:_?c.jsx("img",{src:_||null,alt:p.period,className:"w-full aspect-[4/3] object-cover transition-transform duration-700 ease-out group-hover:scale-105",referrerPolicy:"no-referrer",loading:"lazy"}):null})}),c.jsxs("div",{className:`w-full md:w-1/2 space-y-5 pl-10 md:pl-0 pr-4 md:pr-0 flex flex-col ${w?"md:items-start":"md:items-end"}`,children:[c.jsxs("div",{className:`flex flex-col gap-2 w-full ${w?"md:items-start":"md:items-end"}`,children:[c.jsx("h3",{className:`${$s(p,"period","text-3xl md:text-4xl font-extrabold text-slate-900 tracking-tight leading-none font-sans")} ${w?"md:text-left":"md:text-right"}`,children:p.period}),p.milestone&&c.jsxs("div",{className:`inline-flex items-center gap-1.5 ${$s(p,"milestone","text-xs font-bold text-emerald-800")} bg-emerald-50 border border-emerald-100/50 px-2.5 py-1 rounded-md max-w-fit whitespace-pre-wrap`,children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse shrink-0"}),c.jsx("span",{className:"whitespace-pre-wrap",children:p.milestone})]})]}),c.jsx("div",{className:"space-y-4 md:space-y-5 pt-2 w-full",children:(p.events||[]).map((j,P)=>{const A=j.text.includes("출시");return j.text.includes("수상")||j.text.includes("선정")||j.text.includes("인증")||j.text.includes("획득"),c.jsxs("div",{className:`group flex flex-col gap-1 transition-colors ${w?"text-left border-l-2 border-slate-100 pl-4 hover:border-emerald-500/50":"text-left md:text-right border-l-2 md:border-l-0 md:border-r-2 border-slate-100 pl-4 md:pl-0 md:pr-4 hover:border-emerald-500/50"}`,children:[c.jsx("span",{className:$s(j,"date","font-sans text-[15px] font-bold text-slate-800 leading-none"),children:j.date}),c.jsx("p",{className:`whitespace-pre-wrap ${$s(j,"text","text-sm md:text-base leading-relaxed font-bold text-slate-900 tracking-tight")} ${A?"text-blue-600 font-extrabold":""}`,children:j.text})]},P)})})]})]},b)})]})]},"timeline"),s==="certs"&&c.jsxs(Ge.div,{initial:{opacity:0,y:15}
4327,animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"space-y-12",children:[c.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12",children:[c.jsx("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-amber-50 text-amber-800 border border-amber-200/50 uppercase tracking-wide mb-3",children:"Certifications"}),c.jsx("h2",{className:"text-2xl md:text-3xl font-extrabold text-slate-900 tracking-tight",children:n.certsTitle}),c.jsx("p",{className:"text-slate-500 text-sm md:text-base mt-2",children:n.certsSubtitle})]}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6 mb-16",children:(n.certsList||[]).map((p,b)=>(g(p.title),c.jsxs(Ge.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.3,delay:b*.04},className:"group p-6 rounded-2xl bg-white border border-slate-200/80 hover:border-slate-400/80 hover:bg-slate-50/50 shadow-xs hover:shadow-md transition-all duration-300 flex flex-col items-center justify-center text-center min-h-[220px] cursor-default",children:[c.jsx("div",{className:"w-20 h-20 md:w-24 md:h-24 flex items-center justify-center rounded-none bg-slate-50 group-hover:bg-white border border-slate-100 group-hover:border-slate-200 p-2 md:p-3 shadow-inner group-hover:scale-105 transition-all duration-300 mb-4",children:c.jsx(F3,{title:p.title,image:p.image,className:"w-full h-full object-contain"})}),c.jsxs("div",{className:"w-full flex flex-col items-center",children:[c.jsx("div",{className:"text-[11px] font-bold text-slate-400 tracking-wider mb-1 uppercase",children:p.desc}),c.jsx("h4",{className:"text-sm md:text-base font-extrabold text-slate-900 tracking-tight leading-tight mb-2",children:p.title}),p.highlight?c.jsx("span",{className:"inline-block text-[10px] md:text-xs font-black text-rose-600 bg-rose-50 border border-rose-100 px-2.5 py-0.5 rounded-full tracking-wider animate-pulse",children:p.tag}):c.jsx("span",{className:"inline-block text-[10px] md:text-xs font-bold text-slate-500 bg-slate-100 border border-slate-200/50 px-2 py-0.5 rounded-md",children:p.tag})]})]},b)))}),n.patentList&&n.patentList.length>0&&c.jsxs("div",{className:"space-y-8 mt-16 pt-16 border-t border-slate-200",children:[c.jsx("div",{className:"text-center",children:c.jsx("h3",{className:"text-xl font-extrabold text-slate-900",children:n.patentTitle})}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:n.patentList.map((p,b)=>c.jsxs(Ge.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:b*.1},className:"bg-white p-3 rounded-xl border border-slate-200 shadow-sm hover:shadow-lg transition-shadow relative overflow-hidden group",children:[c.jsxs("div",{className:"aspect-[3/4] w-full rounded-none overflow-hidden bg-slate-100 mb-3 relative",children:[p.image&&c.jsx(et,{src:p.image||null,alt:p.title,className:"w-full h-full object-cover group-hover:blur-sm transition-all duration-300",referrerPolicy:"no-referrer",loading:"lazy",decoding:"async"}),c.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center p-2",children:c.jsx("p",{className:"text-white font-bold text-center text-xs",children:p.title})})]}),c.jsx("p",{className:"text-xs font-bold text-center text-slate-700 truncate",children:p.title})]},b))})]}),c.jsxs("div",{className:"p-6 rounded-2xl text-slate-600 text-sm leading-relaxed max-w-3xl mx-auto text-center mt-12 flex flex-col items-center gap-3",children:[c.jsx(Hw,{size:18,className:"text-blue-400"}),c.jsx("p",{children:"크로바가구의 모든 제품은 국가 공인 검증 기관의 엄격한 유해성 평가, 피로 기계 강도 테스트 및 친환경 심사를 완료하였습니다. 우수한 조달청 및 공공기관 신뢰 가구 브랜드로 앞장서겠습니다."})]})]},"certs"),s==="directions"&&c.jsxs(Ge.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"space-y-12",children:[c.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-12",children:[c.jsx("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-blue-100 text-blue-800 border border-blue-200/40 uppercase tracking-wide mb-3",children:"Directions"}),c.jsx("h2",{className:"text-2xl md:text-3xl font-extrabold text-slate-900 tracking-tight",children:n.locationTitle}),c.jsx("p",{className:"text-slate-500 text-sm md:text-base mt-2",children:n.locationSubtitle})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-stretch",children:[c.jsxs("div",{className:"lg:col-span-6 flex flex-col justify-between bg-white rounded-3xl border border-slate-200 p-6 md:p-8 shadow-sm hover:shadow-md transition-shadow relative overflow-hidden group",children:[n.hqImage&&c.jsx("div",{className:"w-full h-64 mb-6 rounded-2xl overflow-hidden",children:c.jsx(et,{src:n.hqImage||null,alt:"Headquarters",className:"w-full h-full object-cover",referrerPolicy:"no-referrer",loading:"lazy"})}),c.jsxs("div",{children:[c.jsx("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-extrabold bg-slate-950 text-white tracking-wider mb-6",children:"MAIN HQ & FACTORY 1"}),c.jsx("h3",{className:"text-xl md:text-2xl font-extrabold text-slate-900 mb-2",children:"본사 / 제1공장"}),c.jsx("p",{className:"text-slate-500 text-sm leading-relaxed mb-6",children:n.hqDescription||"생산 기획, 관리 연구소 및 완제품 정밀 품질 조립 라인이 위치해 있습니다."}),c.jsxs("div",{onClick:()=>h(n.headquartersAddress,"hq"),className:"group/address relative flex items-center justify-between p-4 bg-slate-50 hover:bg-slate-950 border border-slate-200 hover:border-slate-950 rounded-2xl cursor-pointer transition-all mb-6 active:scale-[0.98]",title:"클릭하여 주소 복사",children:[c.jsxs("div",{className:"flex items-center gap-3 pr-4",children:[c.jsx(Cf,{size:20,className:"text-slate-400 group-hover/address:text-[#39ff14] shrink-0"}),c.jsx("span",{className:"text-sm font-bold text-slate-800 group-hover/address:text-white leading-relaxed text-left",children:n.headquartersAddress})]}),c.jsx("div",{className:"flex items-center justify-center p-2 rounded-lg bg-white group-hover/address:bg-white/10 text-slate-400 group-hover/address:text-white border border-slate-200 group-hover/address:border-white/10 shrink-0",children:l==="hq"?c.jsx(bg,{size:16,className:"text-green-500 animate-scale"}):c.jsx(hA,{size:16})}),c.jsx(Cr,{children:l==="hq"&&c.jsxs(Ge.div,{initial:{opacity:0,y:10}
4327,animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"absolute -bottom-10 left-1/2 -translate-x-1/2 bg-green-600 text-white font-bold text-xs py-1.5 px-3 rounded-lg shadow-md flex items-center gap-1.5 z-20 pointer-events-none",children:[c.jsx(bg,{size:12,className:"stroke-[3]"}),"클립보드에 복사되었습니다!"]})})]})]}),c.jsxs("a",{href:`https://map.naver.com/v5/search/${encodeURIComponent(n.headquartersAddress)}`,target:"_blank",rel:"noreferrer",className:"w-full py-4 bg-slate-900 hover:bg-black text-white rounded-2xl font-bold text-sm flex items-center justify-center gap-2 shadow-sm transition-colors text-center",children:[c.jsx(pA,{size:16,className:"text-emerald-400"}),"네이버 지도로 제1공장 길찾기",c.jsx(P0,{size:14,className:"opacity-60"})]})]}),c.jsxs("div",{className:"lg:col-span-6 flex flex-col justify-between bg-white rounded-3xl border border-slate-200 p-6 md:p-8 shadow-sm hover:shadow-md transition-shadow relative overflow-hidden group",children:[n.factory2Image&&c.jsx("div",{className:"w-full h-64 mb-6 rounded-2xl overflow-hidden",children:c.jsx(et,{src:n.factory2Image||null,alt:"Factory 2",className:"w-full h-full object-cover",referrerPolicy:"no-referrer",loading:"lazy"})}),c.jsxs("div",{children:[c.jsx("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-extrabold bg-slate-900/10 text-slate-800 border border-slate-200/50 tracking-wider mb-6",children:"PRODUCTION HUB & FACTORY 2"}),c.jsx("h3",{className:"text-xl md:text-2xl font-extrabold text-slate-900 mb-2",children:"제2공장"}),c.jsx("p",{className:"text-slate-500 text-sm leading-relaxed mb-6",children:n.factory2Description||"자재 보관, 프레임 정밀 용접 가공 및 목재 원판 스마트 정밀 재단 시스템이 완비되어 있습니다."}),c.jsxs("div",{onClick:()=>h(n.factory2Address,"f2"),className:"group/address relative flex items-center justify-between p-4 bg-slate-50 hover:bg-slate-950 border border-slate-200 hover:border-slate-950 rounded-2xl cursor-pointer transition-all mb-6 active:scale-[0.98]",title:"클릭하여 주소 복사",children:[c.jsxs("div",{className:"flex items-center gap-3 pr-4",children:[c.jsx(Cf,{size:20,className:"text-slate-400 group-hover/address:text-[#39ff14] shrink-0"}),c.jsx("span",{className:"text-sm font-bold text-slate-800 group-hover/address:text-white leading-relaxed text-left",children:n.factory2Address})]}),c.jsx("div",{className:"flex items-center justify-center p-2 rounded-lg bg-white group-hover/address:bg-white/10 text-slate-400 group-hover/address:text-white border border-slate-200 group-hover/address:border-white/10 shrink-0",children:l==="f2"?c.jsx(bg,{size:16,className:"text-green-500 animate-scale"}):c.jsx(hA,{size:16})}),c.jsx(Cr,{children:l==="f2"&&c.jsxs(Ge.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"absolute -bottom-10 left-1/2 -translate-x-1/2 bg-green-600 text-white font-bold text-xs py-1.5 px-3 rounded-lg shadow-md flex items-center gap-1.5 z-20 pointer-events-none",children:[c.jsx(bg,{size:12,className:"stroke-[3]"}),"클립보드에 복사되었습니다!"]})})]})]}),c.jsxs("a",{href:`https://map.naver.com/v5/search/${encodeURIComponent(n.factory2Address)}`,target:"_blank",rel:"noreferrer",className:"w-full py-4 bg-slate-900 hover:bg-black text-white rounded-2xl font-bold text-sm flex items-center justify-center gap-2 shadow-sm transition-colors text-center",children:[c.jsx(pA,{size:16,className:"text-emerald-400"}),"네이버 지도로 제2공장 길찾기",c.jsx(P0,{size:14,className:"opacity-60"})]})]})]})]},"directions")]})})]})},Pc=({pageTitle:n,pageSubtitle:e,pageHeroImage:t,overviewTitle:r,overviewDesc:s,categories:i,procurementUrl:l})=>{var w,_;const[d,h]=D.useState(i[0].id),m=i.find(N=>N.id===d)||i[0],g=[{kicker:"EFFICIENT LAYOUT",title:`${m.name} 특화
4328최적의 공간 구성`,desc:`업무, 휴식, 다목적 등 공간의 용도에 맞춰 자유롭게 계획하고 확장할 수 있습니다.
4329사용자의 동선과 라이프스타일을 세심히 연구하여 최적의 환경을 제공합니다.`,image:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=800"},{kicker:"SMART FUNCTION",title:`사용자를 배려한
4330스마트한 디테일`,desc:`보이지 않는 곳까지 세심하게 설계된 스마트 기능을 통해
4331편의성을 극대화하고 업무 및 휴식의 질을 한 단계 높여줍니다.`,image:"https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=800",reverse:!0}
4331,{kicker:"MODERN DESIGN",title:`어떤 공간에도 어울리는
4332감각적인 디자인`,desc:`현대적이고 세련된 디자인으로 공간의 품격을 더합니다.
4333다양한 마감재와 컬러 라인업으로 독창적인 인테리어를 완성해보세요.`,image:"https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&q=80&w=800"}],p=((w=m.featuresMain)==null?void 0:w.length)>0?m.featuresMain:g,b=((_=m.featuresSub)==null?void 0:_.length)>0?m.featuresSub:[];return c.jsxs("div",{className:"min-h-screen bg-white",children:[c.jsxs("div",{className:"relative h-[400px] flex items-center justify-center",children:[c.jsx("div",{className:"absolute inset-0 z-0",children:c.jsx(et,{src:t||"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=2000",alt:n,className:"w-full h-full object-cover brightness-50",referrerPolicy:"no-referrer"})}),c.jsxs("div",{className:"relative z-10 text-center text-white mt-16 px-6",children:[c.jsx("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight mb-4",children:n}),c.jsx("p",{className:"text-lg md:text-xl font-light text-white/90",children:e})]})]}),c.jsxs("div",{className:"max-w-7xl mx-auto px-6 md:px-12 py-12",children:[c.jsxs(bn,{to:"/spaces",className:"inline-flex items-center gap-2 text-sm font-medium text-gray-500 hover:text-gray-900 transition-colors mb-12",children:[c.jsx(fB,{className:"w-4 h-4"})," Back to All Product"]}),c.jsxs("div",{className:"mb-8",children:[c.jsx("h4",{className:"text-[#015133] font-bold tracking-widest text-xs mb-3 uppercase",children:"Space Solution Overview"}),c.jsx("h2",{className:"text-3xl md:text-4xl font-bold tracking-tight text-gray-900 mb-6",children:r}),c.jsx("p",{className:"text-gray-600 text-base md:text-lg max-w-4xl leading-relaxed",children:s})]}),c.jsx("div",{className:"flex flex-wrap gap-2 mb-8",children:i.map(N=>c.jsx("button",{onClick:()=>h(N.id),className:`px-5 py-2 rounded-full text-sm font-semibold transition-colors border ${d===N.id?"bg-[#015133] text-white border-[#015133]":"bg-white text-gray-600 border-gray-200 hover:border-gray-300"}`,children:N.name},N.id))}),l?c.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-gray-100 text-[#015133] px-6 py-3 text-sm font-bold hover:bg-[#333] hover:text-white transition-colors rounded-full text-center",children:["해당 카테고리의 조달제품 보기",c.jsx(P0,{className:"w-4 h-4 text-[#015133]"})]}):c.jsx("button",{className:"bg-gray-100 text-[#015133] px-6 py-3 text-sm font-bold hover:bg-[#333] hover:text-white transition-colors rounded-full",children:"해당 카테고리의 조달제품 보기"})]}),c.jsx(Cr,{mode:"wait",children:c.jsxs(Ge.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3},children:[c.jsxs("div",{className:"relative h-[400px] md:h-[500px] flex items-center justify-center",children:[c.jsx("div",{className:"absolute inset-0 z-0",children:c.jsx(et,{src:m.heroImage||"https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=2000",alt:m.heroTitle,className:"w-full h-full object-cover brightness-50",referrerPolicy:"no-referrer",onError:N=>{N.currentTarget.src="https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=2000"}})}),c.jsxs("div",{className:"relative z-10 text-center text-white px-6",children:[c.jsx("h2",{className:"text-5xl md:text-7xl font-bold tracking-tight mb-4",children:m.heroTitle}),c.jsx("p",{className:"text-lg md:text-2xl font-light text-white/90",children:m.heroSubtitle})]})]}),c.jsxs("div",{className:"py-20 md:py-24 px-6 text-center max-w-3xl mx-auto",children:[c.jsx("h4",{className:"text-[#015133] font-bold tracking-widest text-sm mb-6 uppercase",children:m.introKicker}),c.jsx("h3",{className:"text-2xl md:text-4xl font-bold tracking-tight text-gray-900 mb-6 leading-tight whitespace-pre-line",children:m.introTitle}),c.jsx("p",{className:"text-gray-600 text-base md:text-lg leading-relaxed whitespace-pre-line",children:m.introDesc})]}),c.jsx("div",{className:"max-w-7xl mx-auto px-6 md:px-12 py-12 space-y-20 md:space-y-32",children:p.map((N,E)=>{const j=E%2!==0;return c.jsxs("div",{className:`flex flex-col ${j?"md:flex-row-reverse":"md:flex-row"} gap-8 md:gap-16 items-center`,children:[c.jsx("div",{className:"flex-1 w-full relative",children:c.jsx("div",{className:"aspect-[4/3] w-full overflow-hidden bg-gray-100",children:N.image?c.jsx(et,{src:N.image||null,alt:"Feature",className:"w-full h-full object-cover rounded-none",referrerPolicy:"no-referrer"}):null})}),c.jsxs("div",{className:"flex-1 w-full",children:[c.jsx("h4",{className:"text-[#8
4333c94a4] font-bold tracking-widest text-xs mb-3 uppercase",children:N.kicker}),c.jsx("h3",{className:"text-2xl md:text-3xl font-bold tracking-tight text-gray-900 mb-6 whitespace-pre-line leading-tight",children:N.title}),c.jsx("p",{className:"text-gray-500 text-base leading-relaxed whitespace-pre-line",children:N.desc})]})]},E)})}),b&&b.length>0&&c.jsxs("div",{className:"max-w-7xl mx-auto px-6 md:px-12 py-20 md:py-24",children:[c.jsx("h3",{className:"text-xl md:text-2xl font-bold border-b border-gray-200 pb-4 mb-10 text-gray-900",children:"FEATURE"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:b.map((N,E)=>c.jsxs("div",{children:[c.jsx("div",{className:"aspect-[4/3] w-full mb-6 overflow-hidden bg-gray-100",children:N.image?c.jsx(et,{src:N.image||null,alt:N.title,className:"w-full h-full object-cover rounded-none",referrerPolicy:"no-referrer"}):null}),c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx("span",{className:"text-gray-300 font-bold text-lg",children:String(E+1).padStart(2,"0")}),c.jsx("h4",{className:"font-bold text-gray-900",children:N.title})]}),c.jsx("p",{className:"text-gray-500 text-sm leading-relaxed",children:N.desc})]},E))})]})]},d)})]})},h0={pageTitle:"사무용 가구",pageSubtitle:"업무 효율을 극대화하는",pageHeroImage:"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&q=80&w=2000",overviewTitle:"사무용 가구",overviewDesc:"팀 단위의 소통이 활발한 오픈형 공간과 깊은 몰입이 필요한 집중형 공간을 유연하게 넘나들 수 있는 워크스페이스입니다.",categories:[{id:"q_series",name:"Q 시리즈",heroTitle:"Q SERIES",heroSubtitle:"스마트 오피스의 기준",introKicker:"OFFICE SYSTEM",introTitle:"스마트한 사무공간 Q 시리즈.",introDesc:"업무 효율을 극대화하는 컴팩트하고 실용적인 시리즈입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&q=80&w=2000"},{id:"c_series",name:"C 시리즈",heroTitle:"C SERIES",heroSubtitle:"다양한 조합이 가능한 모듈 시스템",introKicker:"OFFICE SYSTEM",introTitle:"유연한 사고를 돕는 C 시리즈.",introDesc:"자유로운 모듈 조합으로 창의적인 공간을 연출합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=2000"},{id:"m_series",name:"M 시리즈",heroTitle:"M SERIES",heroSubtitle:"미니멀한 디자인의 데스크",introKicker:"OFFICE SYSTEM",introTitle:"심플함의 미학 M 시리즈.",introDesc:"모던한 디자인으로 세련된 오피스 인테리어를 완성합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&q=80&w=2000"},{id:"indoor_cabinet",name:"인도어형 캐비닛 시리즈",heroTitle:"인도어형 캐비닛 시리즈",heroSubtitle:"깔끔한 수납 솔루션",introKicker:"STORAGE SYSTEM",introTitle:"효율적인 수납 공간.",introDesc:"공간 활용도를 높이는 모던한 디자인의 인도어형 캐비닛입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=2000"},{id:"a_series",name:"A 시리즈",heroTitle:"A SERIES",heroSubtitle:"개방감 있는 사무 환경",introKicker:"OFFICE SYSTEM",introTitle:"새로운 시스템 A 시리즈.",introDesc:"효율적인 동선과 개방감 있는 업무 환경을 제공합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=2000"},{id:"desk_series",name:"책상 시리즈",heroTitle:"책상 시리즈",heroSubtitle:"업무에 최적화된 기초 데스크",introKicker:"BASIC DESK",introTitle:"기본에 충실한 데스크.",introDesc:"견고하고 실용적인 디자인으로 ì
4333–´ë– í•œ 오피스 환경에도 잘 어울립니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1518455027359-f3f8164ba6bd?auto=format&fit=crop&q=80&w=2000"},{id:"storage",name:"스토리지",heroTitle:"스토리지",heroSubtitle:"다양한 규격의 수납장",introKicker:"STORAGE SYSTEM",introTitle:"스마트 스토리지 솔루션.",introDesc:"개인용 서랍부터 공용 책장까지 다양한 수납을 지원합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1595515106969-1ce29566ff1c?auto=format&fit=crop&q=80&w=2000"},{id:"cabinet_series",name:"캐비닛 시리즈",heroTitle:"캐비닛 시리즈",heroSubtitle:"보안과 편의성을 갖춘 캐비닛",introKicker:"STORAGE SYSTEM",introTitle:"안전한 서류 보관.",introDesc:"중요한 문서와 비품을 안전하게 보관할 수 있습니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=2000"},{id:"locker_series",name:"사물함 시리즈",heroTitle:"사물함 시리즈",heroSubtitle:"개인 물품 보관을 위한 사물함",introKicker:"PERSONAL STORAGE",introTitle:"쾌적한 공용 공간.",introDesc:"스마트한 모듈로 확장 및 배치가 용이한 사물함입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&q=80&w=2000"},{id:"height_adjustable",name:"높낮이/각도 조절 책상",heroTitle:"높낮이/각도 조절 책상",heroSubtitle:"인체공학적 능동형 데스크",introKicker:"ERGONOMIC DESK",introTitle:"건강한 업무 환경.",introDesc:"사용자의 체형에 맞게 높낮이 및 각도를 조절할 수 있습니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1593642632823-8f785ba67e45?auto=format&fit=crop&q=80&w=2000"},{id:"meeting_table",name:"회의용탁자",heroTitle:"회의용탁자",heroSubtitle:"소통과 아이디어를 위한 테이블",introKicker:"MEETING ROOM",introTitle:"활발한 커뮤니케이션.",introDesc:"효율적인 미팅을 위한 스마트한 배선 솔루션을 제공하는 테이블입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1573164713988-8665fc963095?auto=format&fit=crop&q=80&w=2000"}]},uX=()=>{const[n,e]=D.useState(h0),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"site_content","office_system_page"),l=await mn(i);if(l.exists()){const d=l.data();if(d.content)try{const h=JSON.parse(d.content);e(ar(h0,h))}catch{e(h0)}}}catch(i){console.error("Failed to load data:",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsx(Pc,{pageTitle:n.pageTitle||"사무용 가구",pageSubtitle:n.pageSubtitle||"업무 효율을 극대화하는",pageHeroImage:n.pageHeroImage||"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&q=80&w=2000",overviewTitle:n.overviewTitle||"사무용 가구",overviewDesc:n.overviewDesc||"팀 단위의 소통이 활발한 오픈형 공간과 깊은 몰입이 필요한 집중형 공간을 유연하게 넘나들 수 있는 워크스페이스입니다.",categories:n.categories,procurementUrl:"https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000001&xview="})},f0={pageTitle:"도서관/교육용 가구",pageSubtitle:"학습 효율을 높이는 스마트한",pageHeroImage:"https://images.unsplash.com/photo-1584697964190-7383cbee8277?auto=format&fit=crop&q=80&w=2000",overviewTitle:"도서관/교육용 가구",overviewDesc:"학생들의 체형 and 학습 환경을 고려하여 집중력을 높이고 창의적인 생각을 이끌어내는 스마트한 교육 공간입니다.",categories:[{id:"dormitory",name:"기숙사가구",heroTitle:"기숙사가구",heroSubtitle:"편안한 휴식을 위한 기숙사 공간",introKicker:"DORMITORY FURNITURE",introTitle:"집처럼 편안한 공간.",introDesc:"학생들의 편안한 휴식과 안정을 위한 최적의 기숙사 가구 솔루션입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-155585487
43337-bab0e564b8d5?auto=format&fit=crop&q=80&w=2000"},{id:"student_locker",name:"학생용사물함",heroTitle:"학생용사물함",heroSubtitle:"다양한 공간 활용이 가능한 사물함",introKicker:"STUDENT LOCKER",introTitle:"스마트한 개인 수납.",introDesc:"안전하고 내구성 높은 시스템 사물함입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&q=80&w=2000"},{id:"classroom",name:"교실용가구",heroTitle:"교실용가구",heroSubtitle:"스마트한 학습 환경을 위한 제품들",introKicker:"CLASSROOM FURNITURE",introTitle:"스마트 교실의 완성.",introDesc:"다양한 수업 방식에 맞게 변형 가능한 유연한 교실용 가구입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1584697964190-7383cbee8277?auto=format&fit=crop&q=80&w=2000"},{id:"lecture_desk",name:"수강용탁자 / 강연대",heroTitle:"수강용탁자 / 강연대",heroSubtitle:"최고의 강의를 위한 솔루션",introKicker:"LECTURE SYSTEM",introTitle:"효율적인 강의 환경.",introDesc:"강의의 질을 높이는 수강용탁자와 강연대입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&q=80&w=2000"},{id:"computer_desk",name:"컴퓨터책상",heroTitle:"컴퓨터책상",heroSubtitle:"스마트 기기 활용 최적화 데스크",introKicker:"COMPUTER DESK",introTitle:"스마트 학습 솔루션.",introDesc:"컴퓨터 및 디지털 기기 활용을 위한 효율적인 시스템 데스크입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&q=80&w=2000"},{id:"library",name:"도서관 가구",heroTitle:"도서관 가구",heroSubtitle:"지식이 모이는 열람 및 수납 가구",introKicker:"LIBRARY SYSTEM",introTitle:"집중과 탐구의 공간.",introDesc:"쾌적한 열람과 방대한 장서 보관을 위한 도서관 솔루션입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&q=80&w=2000"},{id:"kids_library",name:"어린이 / 유아용 도서관 가구",heroTitle:"어린이 / 유아용 도서관 가구",heroSubtitle:"창의력을 키우는 유아 열람 가구",introKicker:"KIDS LIBRARY",introTitle:"상상력이 자라나는 공간.",introDesc:"어린이의 체형과 안전을 고려한 맞춤형 도서관 솔루션입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1512820790803-83ca734da794?auto=format&fit=crop&q=80&w=2000"},{id:"partition_table",name:"칸막이형 열람대",heroTitle:"칸막이형 열람대",heroSubtitle:"개인의 몰입을 돕는 열람대",introKicker:"PRIVATE STUDY",introTitle:"프라이빗 집중 학습.",introDesc:"칸막이가 적용되어 주변 시선을 차단하고 집중력을 높이는 열람대입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&q=80&w=2000"},{id:"lab",name:"실험실 가구",heroTitle:"실험실 가구",heroSubtitle:"안전하고 정밀한 실험을 위한 가구",introKicker:"LABORATORY SYSTEM",introTitle:"안전한 실습 환경.",introDesc:"각종 실험 기자재에 특화된 견고하고 안전한 실험실 솔루션입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&q=80&w=2000"},{id:"stool_table",name:"스툴 테이블",heroTitle:"스툴 테이블",heroSubtitle:"다목적 활용이 가능한 테이블",introKicker:"STOOL TABLE",introTitle:"다양한 다목적 공간.",introDesc:"자유로운 배치가 가능하여 다양한 형태의 그룹 활동에 적합합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&q=80&w=2000"},{id:"dining_table",name:"식탁",heroTitle:"식탁",heroSubtitle:"위생적이고 튼튼한 다이닝 가구",introKicker:"DINING SYSTEM",introTitle:"안전하고 쾌적한 식사 공간.",introDesc:"많은 인원이 사용하는 공간에 적합한 내구성 높은 식탁입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1543353071-087092ec393a?auto=format&fit=crop&q=80&w=2000"}
4333,{id:"counter",name:"카운터",heroTitle:"카운터",heroSubtitle:"교육 공간의 안내 데스크",introKicker:"COUNTER DESK",introTitle:"첫인상을 알리는 얼굴.",introDesc:"학생 및 방문객을 맞이하는 로비나 도서관을 위한 안내 데스크 시스템입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&q=80&w=2000"}]},dX=()=>{const[n,e]=D.useState(f0),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"site_content","education_system_page"),l=await mn(i);if(l.exists()){const d=l.data();if(d.content)try{const h=JSON.parse(d.content);e(ar(f0,h))}catch{e(f0)}}}catch(i){console.error("Failed to load data:",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsx(Pc,{pageTitle:n.pageTitle||"도서관/교육용 가구",pageSubtitle:n.pageSubtitle||"학습 효율을 높이는 스마트한",pageHeroImage:n.pageHeroImage||"https://images.unsplash.com/photo-1584697964190-7383cbee8277?auto=format&fit=crop&q=80&w=2000",overviewTitle:n.overviewTitle||"도서관/교육용 가구",overviewDesc:n.overviewDesc||"학생들의 체형과 학습 환경을 고려하여 집중력을 높이고 창의적인 생각을 이끌어내는 스마트한 교육 공간입니다.",categories:n.categories,procurementUrl:"https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000017&xview="})},m0={pageTitle:"우수제품",pageSubtitle:"품질이 입증된 크로바가구 우수제품",pageHeroImage:"https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&q=80&w=2000",overviewTitle:"우수제품",overviewDesc:"조달청 및 국가 기관에서 품질과 기술력을 공식 인증받은 크로바가구의 프리미엄 우수제품 라인업입니다. 최상의 소재와 인체공학적 설계로 혁신적인 가구를 제안합니다.",categories:[{id:"office",name:"우수제품 사무용",heroImage:"https://images.unsplash.com/photo-1593642632823-8f785ba67e45?auto=format&fit=crop&q=80&w=2000",heroTitle:"우수제품 사무용",heroSubtitle:"검증된 품질의 사무용 우수제품",introKicker:"EXCELLENT OFFICE",introTitle:"우수제품 사무용 가구.",introDesc:"공공기관 및 기업에서 인정받은 최고의 품질과 디자인의 사무용 가구입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[]},{id:"education",name:"우수제품 교육용",heroImage:"https://images.unsplash.com/photo-1505843490538-5133c6c7d0e1?auto=format&fit=crop&q=80&w=2000",heroTitle:"우수제품 교육용",heroSubtitle:"학습 효율을 높이는 교육용 우수제품",introKicker:"EXCELLENT EDUCATION",introTitle:"우수제품 교육용 가구.",introDesc:"안전하고 견고한 소재로 제작되어 학습에 집중할 수 있는 환경을 제공합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[]},{id:"chair",name:"우수제품 사무용 의자",heroImage:"https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?auto=format&fit=crop&q=80&w=2000",heroTitle:"우수제품 사무용 의자",heroSubtitle:"편안함을 선사하는 우수제품 의자",introKicker:"EXCELLENT CHAIR",introTitle:"우수제품 사무용 의자.",introDesc:"인체공학적 설계로 장시간 편안함을 유지해주는 사무용 의자 라인업입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[]}]},hX=()=>{const[n,e]=D.useState(m0),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"site_content","excellent_product_page"),l=await mn(i);if(l.exists()){const d=l.data();if(d.content)try{const h=JSON.parse(d.content);e(ar(m0,h))}catch{e(m0)}}}catch(i){console.error("Failed to load data:",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsx(Pc,{pageTitle:n.pageTitle||"우수제품",pageSubtitle:n.pageSubtitle||"품질이 입증된 크로바가구 우수제품",pageHeroImage:n.pageHeroImage||"https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&q=80&w=2000",overviewTitle:n.overviewTitle||"우수제품",overviewDesc:n.overviewDesc||"조달청 및 국가 기관에서 품질과 기술력을 공식 인증받은 크로바가구의 프리미엄 우수제품 라인업입니다. 최상의 소재와 인체공학적 설계로 혁신적인 가구를 제안합니다.",categories:n.categories,procurementUrl:"https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000025&xview="})},p0={pageTitle:"파티션 시스템",pageSubtitle:"개인과 팀을 잇는 유연한 경계",pageHeroImage:"https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?auto=format&fit=crop&q=80&w=2000",overviewTitle:"파티션 시스템",overviewDesc:"시각적, 공간적 분할을 넘어 팀 간의 원활한 커뮤니케이션과 개인의 프라이버시를 동시에 보호하는 인텔리전트 파티션입니다.",categories:[{id:"60t_block",name:"60T 블럭 파티션",heroTitle:"60T 블럭 파티션",heroSubtitle:"견고하고 안정적인 파티션",introKicker:"BLOCK PARTITION",introTitle:"독립적인 워크스페이스.",introDesc:"60T 두께의 견고함으로 완벽한 공간 분할을 실현합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?auto=format&fit=crop&q=80&w=2000"},{id:"66t_block",name:"66T 블럭 파티션",heroTitle:"66T 블럭 파티션",heroSubtitle:"뛰어난 차음성의 프리미엄 파티션",introKicker:"BLOCK PARTITION",introTitle:"프리미엄 공간 분할.",introDesc:"우수한 소음 차단 효과로 집중력 높은 업무 환경을 제공합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&q=80&w=2000"},{id:"14t_48t_stand",name:"14T/48T 스탠드/스크린",heroTitle:"14T/48T 스탠드/스크린",heroSubtitle:"다양한 조합이 가능한 스크린",introKicker:"STAND SCREEN",introTitle:"유연한 공간 연출.",introDesc:"다양한 두께와 형태를 조합하여 목적에 맞는 공간을 구성합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=2000"},{id:"48t_stand",name:"48T 스탠드",heroTitle:"48T 스탠드",heroSubtitle:"안정적인 48T 두께 스탠드",introKicker:"STAND PARTITION",introTitle:"안정적인 데스크 레이아웃.",introDesc:"독립성과 개방감을 동시에 만족시키는 스탠드형 파티션입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=2000"},{id:"14t_screen",name:"14T 스크린",heroTitle:"14T 스크린",heroSubtitle:"슬림하고 개방감 있는 스크린",introKicker:"SLIM SCREEN",introTitle:"소통을 위한 슬림 파티션.",introDesc:"답답함 없이 공간을 분할하는 슬림한 디자인의 데스크 스크린입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1573164713988-8665fc963095?auto=format&fit=crop&q=80&w=2000"}]},fX=()=>
4333{const[n,e]=D.useState(p0),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"site_content","partition_system_page"),l=await mn(i);if(l.exists()){const d=l.data();if(d.content)try{const h=JSON.parse(d.content);e(ar(p0,h))}catch{e(p0)}}}catch(i){console.error("Failed to load data:",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsx(Pc,{pageTitle:n.pageTitle||"파티션 시스템",pageSubtitle:n.pageSubtitle||"개인과 팀을 잇는 유연한 경계",pageHeroImage:n.pageHeroImage||"https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?auto=format&fit=crop&q=80&w=2000",overviewTitle:n.overviewTitle||"파티션 시스템",overviewDesc:n.overviewDesc||"시각적, 공간적 분할을 넘어 팀 간의 원활한 커뮤니케이션과 개인의 프라이버시를 동시에 보호하는 인텔리전트 파티션입니다.",categories:n.categories,procurementUrl:"https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000009&xview="})},g0={pageTitle:"중역용 가구",pageSubtitle:"리더의 품격을 완성하는 하이엔드",pageHeroImage:"https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&q=80&w=2000",overviewTitle:"중역용 가구",overviewDesc:"성공적인 비즈니스를 이끄는 리더에게 걸맞은 최고급 소재와 중후한 디자인의 프리미엄 임원 공간입니다.",categories:[{id:"super_series",name:"슈퍼 시리즈",heroTitle:"슈퍼 시리즈",heroSubtitle:"압도적인 존재감의 임원용 데스크",introKicker:"PREMIUM EXECUTIVE",introTitle:"최고의 리더를 위한 선택 슈퍼 시리즈.",introDesc:"중후하고 고급스러운 디자인으로 임원실의 품격을 한 차원 높여줍니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&q=80&w=2000"},{id:"first_series",name:"퍼스트 시리즈",heroTitle:"퍼스트 시리즈",heroSubtitle:"세련된 감각의 프리미엄 데스크",introKicker:"MODERN 
4333EXECUTIVE",introTitle:"혁신적인 리더의 공간.",introDesc:"모던한 디자인과 실용성으로 완성된 퍼스트 데스크 시리즈입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1524758631624-e2822e304c36?auto=format&fit=crop&q=80&w=2000"},{id:"clv_master_1",name:"CLV 마스터 시리즈 I",heroTitle:"CLV 마스터 시리즈 I",heroSubtitle:"정통 임원 가구의 마스터피스",introKicker:"CLASSIC EXECUTIVE",introTitle:"변치 않는 가치 CLV 마스터 I.",introDesc:"최고급 소재와 장인정신이 깃든 클래식 임원용 데스크입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?auto=format&fit=crop&q=80&w=2000"},{id:"clv_master_2",name:"CLV 마스터 시리즈 II",heroTitle:"CLV 마스터 시리즈 II",heroSubtitle:"디테일에 집중한 마스터 라인업",introKicker:"CLASSIC EXECUTIVE",introTitle:"세심한 아름다움 CLV 마스터 II.",introDesc:"한층 진보된 디테일과 마감으로 완성도의 정점을 보여줍니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1542314831-c6a4d14faaf2?auto=format&fit=crop&q=80&w=2000"},{id:"reception_table_desk",name:"응접탁자 / 중역용 책상",heroTitle:"응접탁자 / 중역용 책상",heroSubtitle:"성공적인 비즈니스를 위한 배려",introKicker:"EXECUTIVE LOUNGE",introTitle:"귀빈을 위한 완벽한 맞이.",introDesc:"편안한 상담 브리핑을 지원하는 응접탁자와 중역 데스크입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&q=80&w=2000"}]},mX=()=>{const[n,e]=D.useState(g0),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"site_content","executive_furniture_page"),l=await mn(i);if(l.exists()){const d=l.data();if(d.content)try{const h=JSON.parse(d.content);e(ar(g0,h))}catch{e(g0)}}}catch(i){console.error("Failed to load data:",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsx(Pc,{pageTitle:n.pageTitle||"중역용 가구",pageSubtitle:n.pageSubtitle||"리더의 품격을 완성하는 하이엔드",pageHeroImage:n.pageHeroImage||"https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&q=80&w=2000",overviewTitle:n.overviewTitle||"중역용 가구",overviewDesc:n.overviewDesc||"성공적인 비즈니스를 이끄는 리더에게 걸맞은 최고급 소재와 중후한 디자인의 프리미엄 임원 공간입니다.",categories:n.categories,procurementUrl:"https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000018&xview="})},y0={pageTitle:"의자 컬렉션",pageSubtitle:"당신의 몸을 이해하는 인체공학",pageHeroImage:"https://images.unsplash.com/photo-1505843490538-5133c6c7d0e1?auto=format&fit=crop&q=80&w=2000",overviewTitle:"의자 컬렉션",overviewDesc:"오랜 시간 앉아 대화하고 몰입하는 현대인을 위해, 인체공학적 설계로 최상의 편안함을 제공하는 시팅 컬렉션입니다.",categories:[{id:"executive_chair",name:"중역용 의자",heroTitle:"중역용 의자",heroSubtitle:"리더를 위한 프리미엄 의자",introKicker:"EXECUTIVE SEATING",introTitle:"품격을 다지는 프리미엄 체어.",introDesc:"최상급 소재와 인체공학적 설계로 완성된 중역용 의자입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1592078615290-033ee584e267?auto=format&fit=crop&q=80&w=2000"},{id:"office_chair",name:"사무용 의자",heroTitle:"사무용 의자",heroSubtitle:"장시간 업무를 위한 인체공학적 체어",introKicker:"OFFICE SEATING",introTitle:"건강한 업무 습관.",introDesc:"통기성과 세부 조절 기능으로 체형에 맞춘 편안함을 제공합니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1505843490538-5133c6c7d0e1?auto=format&fit=crop&q=80&w=2000"},{id:"meeting_chair",name:"회의용 의자",heroTitle:"회의용 의자",heroSubtitle:"원활한 소통을 지원하는 회의 시팅",introKicker:"MEETING SEATING",introTitle:"조화로운 커뮤니케이션.",introDesc:"다양한 회의 공간에 어울리는 간결하고 편안한 의자입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&q=80&w=2000"},{id:"bar_chair",name:"바체어",heroTitle:"바체어",heroSubtitle:"트렌디한 라운지와 탕비실을 위한 의자",introKicker:"BAR SEATING",introTitle:"감각적
4333인 하이 스툴.",introDesc:"스탠딩 데스크 및 아일랜드 식탁과 조화롭게 어울리는 바체어입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1512918728675-ed5a9ecdebfd?auto=format&fit=crop&q=80&w=2000"},{id:"stool_chair",name:"스툴 의자",heroTitle:"스툴 의자",heroSubtitle:"다목적으로 활용 가능한 간편스툴",introKicker:"STOOL SEATING",introTitle:"다재다능한 스툴.",introDesc:"컴팩트한 크기로 어디서나 쉽게 활용 가능한 스툴 시리즈입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1503676382389-4809596d5290?auto=format&fit=crop&q=80&w=2000"},{id:"lounge_chair",name:"라운지용 의자",heroTitle:"라운지용 의자",heroSubtitle:"편안한 휴식을 위한 라운지 시팅",introKicker:"LOUNGE SEATING",introTitle:"안락한 휴식 공간.",introDesc:"포근하게 감싸주는 디자인으로 깊은 휴식을 선사하는 의자입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1493663284031-b7e3aefcae8e?auto=format&fit=crop&q=80&w=2000"}]},pX=()=>{const[n,e]=D.useState(y0),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"site_content","chair_collection_page"),l=await mn(i);if(l.exists()){const d=l.data();if(d.content)try{const h=JSON.parse(d.content);e(ar(y0,h))}catch{e(y0)}}}catch(i){console.error("Failed to load data:",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsx(Pc,{pageTitle:n.pageTitle||"의자 컬렉션",pageSubtitle:n.pageSubtitle||"당신의 몸을 이해하는 인체공학",pageHeroImage:n.pageHeroImage||"https://images.unsplash.com/photo-1505843490538-5133c6c7d0e1?auto=format&fit=crop&q=80&w=2000",overviewTitle:n.overviewTitle||"의자 컬렉션",overviewDesc:n.overviewDesc||"오랜 시간 앉아 대화하고 몰입하는 현대인을 위해, 인체공학적 설계로 최상의 편안함을 제공하는 시팅 컬렉션입니다.",categories:n.categories,procurementUrl:"https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000019&xview="})},x0={pageTitle:"소파 & 라운지",pageSubtitle:"창의적인 휴식을 돕는",pageHeroImage:"https://images.unsplash.com/photo-1493663284031-b7e3aefcae8e?auto=format&fit=crop&q=80&w=2000",overviewTitle:"소파 & 라운지",overviewDesc:"형식적인 회의를 넘어서는 창조적 아이디어 교류와 진정한 휴식을 위한 라운지 가구 컬렉션입니다.",categories:[{id:"executive_sofa",name:"중역용 소파",heroTitle:"중역용 소파",heroSubtitle:"응접 공간의 품격을 높이는 소파",introKicker:"EXECUTIVE SOFA",introTitle:"세련된 디자인과 편안함.",introDesc:"최고급 소재로 마감하여 귀빈 응접과 편안한 휴식에 어울립니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1493663284031-b7e3aefcae8e?auto=format&fit=crop&q=80&w=2000"},{id:"lounge_sofa",name:"라운지용 소파",heroTitle:"라운지용 소파",heroSubtitle:"자유로운 배치가 가능한 모듈 소파",introKicker:"LOUNGE SOFA",introTitle:"소통과 휴식이 공존하다.",introDesc:"공간의 크기와 용도에 맞게 다채로운 레이아웃을 연출할 수 있습니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1556228453-efd6c1ff04f6?auto=format&fit=crop&q=80&w=2000"},{id:"lounge_chair",name:"라운지용 의자",heroTitle:"라운지용 의자",heroSubtitle:"라운지에 어울리는 디자인 체어",introKicker:"LOUNGE CHAIR",introTitle:"감각적인 오브제.",introDesc:"편안함은 물론 공간의 포인트를 더해주는 감각적인 라운지 체어입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1519947486511-46149fa0a254?auto=format&fit=crop&q=80&w=2000"},{id:"table",name:"테이블",heroTitle:"테이블",heroSubtitle:"라운지 및 소파용 테이블",introKicker:"LOUNGE TABLE",introTitle:"아늑한 휴게 공간의 완성.",introDesc:"다양한 소파 및 의자와 조화롭게 매칭되는 테이블 시스템입니다.",featuresMain:[],featuresSub:[],colors:[],lineup:[],heroImage:"https://images.unsplash.com/photo-1533090481720-856c6e3c1fdc?auto=format&fit=crop&q=80&w=2000"}]},gX=()=>
4333{const[n,e]=D.useState(x0),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"site_content","sofa_lounge_page"),l=await mn(i);if(l.exists()){const d=l.data();if(d.content)try{const h=JSON.parse(d.content);e(ar(x0,h))}catch{e(x0)}}}catch(i){console.error("Failed to load data:",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsx(Pc,{pageTitle:n.pageTitle||"소파 & 라운지",pageSubtitle:n.pageSubtitle||"창의적인 휴식을 돕는",pageHeroImage:n.pageHeroImage||"https://images.unsplash.com/photo-1493663284031-b7e3aefcae8e?auto=format&fit=crop&q=80&w=2000",overviewTitle:n.overviewTitle||"소파 & 라운지",overviewDesc:n.overviewDesc||"형식적인 회의를 넘어서는 창조적 아이디어 교류와 진정한 휴식을 위한 라운지 가구 컬렉션입니다.",categories:n.categories,procurementUrl:"https://cloveroa.baiceconnect.co.kr/catalog/category.php?xcate1=0000000020&xview="})},yX="modulepreload",xX=function(n){return"/"+n},yD={},df=function(e,t,r){let s=Promise.resolve();if(t&&t.length>0){let l=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),h=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));s=l(t.map(m=>{if(m=xX(m),m in yD)return;yD[m]=!0;const g=m.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${p}`))return;const b=document.createElement("link");if(b.rel=g?"stylesheet":yX,g||(b.as="script"),b.crossOrigin="",b.href=m,h&&b.setAttribute("nonce",h),document.head.appendChild(b),g)return new Promise((w,_)=>{b.addEventListener("load",w),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function i(l){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=l,window.dispatchEvent(d),!d.defaultPrevented)throw l}return s.then(l=>{for(const d of l||[])d.status==="rejected"&&i(d.reason);return e().catch(i)})},bX=({data:n,onChange:e})=>{const t=n.faqs||[],r=n.sources||[],[s,i]=D.useState(""),[l,d]=D.useState(null),[h,m]=D.useState(!1),[g,p]=D.useState(""),[b,w]=D.useState(null),[_,N]=D.useState(null);D.useEffect(()=>{fetch("/api/chat/knowledge").then(I=>I.json()).then(I=>w(I)).catch(()=>w(null))},[]);const E=I=>e({...n,faqs:t,sources:r,...I}),j=()=>E({faqs:[...t,{q:"",a:""}]}),P=(I,R,F)=>E({faqs:t.map((B,V)=>V===I?{...B,[R]:F}:B)}),A=I=>E({faqs:t.filter((R,F)=>F!==I)}),M=async I=>{const R=await M3(),F=await fetch("/api/knowledge/crawl",{method:"POST",headers:{"Content-Type":"application/json",...R?{Authorization:`Bearer ${R}`}:{}},body:JSON.stringify({url:I})}),B=await F.json();if(!F.ok)throw new Error(B.error||"가져오기 실패");return B},O=async()=>{const I=s.trim();if(!/^https?:\/\//i.test(I)){p("http(s) 로 시작하는 URL 을 입력하세요.");return}p(""),m(!0);try{const{title:R,text:F}=await M(I);E({sources:[...r,{url:I,title:R,text:F,crawledAt:Date.now()}]}),i("")}catch(R){p(R.message||"가져오기 실패")}finally{m(!1)}},q=async I=>{p(""),d(I);try{const{title:R,text:F}=await M(r[I].url);E({sources:r.map((B,V)=>V===I?{...B,title:R,text:F,crawledAt:Date.now()}:B)})}catch(R){p(R.message||"다시 읽기 실패")}finally{d(null)}},L=I=>E({sources:r.filter((R,F)=>F!==I)}),k="w-full border border-gray-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500";return c.jsxs("div",{className:"space-y-8",children:[c.jsxs("section",{className:"bg-white p-5 rounded-lg border border-gray-200 shadow-sm",children:[c.jsxs("h3",{className:"font-bold text-gray-800 mb-1",children:["챗봇이 이미 아는 것 ",c.jsx("span",{className:"text-xs font-normal text-gray-400",children:"(베이스 관리 · 읽기 전용)"})]}),c.jsxs("p",{className:"text-xs text-gray-500 mb-4",children:["아래 항목은 챗봇에 기본 내장되어 있습니다. 변경이 필요하면 베이스에 요청해 주세요.",c.jsx("br",{}),"업체가 직접 관리하는 항목은 아래 ",c.jsx("b",{children:"FAQ"}),"·",c.jsx("b",{children:"참고 URL"}
4333),", 그리고 회사정보(Footer 설정)입니다."]}),!b&&c.jsx("p",{className:"text-sm text-gray-400 py-2",children:"불러오는 중…"}),b&&c.jsxs("div",{className:"space-y-5",children:[c.jsxs("div",{children:[c.jsxs("h4",{className:"text-sm font-bold text-gray-700 mb-2",children:["즉답 사전 ",c.jsxs("span",{className:"text-xs font-normal text-gray-400",children:[b.instantReplies.length,"종 · 항목을 누르면 답변이 보입니다"]})]}),c.jsx("div",{className:"border border-gray-200 rounded-md divide-y divide-gray-100",children:b.instantReplies.map(I=>c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>N(_===I.topic?null:I.topic),className:"w-full text-left px-3 py-2 flex items-center justify-between gap-2 hover:bg-gray-50",children:[c.jsx("span",{className:"text-sm font-semibold text-gray-800 shrink-0",children:I.topic}),c.jsx("span",{className:"text-xs text-gray-400 truncate",children:I.keywords.join(", ")})]}),_===I.topic&&c.jsx("div",{className:"px-3 pb-3 pt-1 text-sm text-gray-600 whitespace-pre-line bg-gray-50",children:I.reply})]},I.topic))})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-sm font-bold text-gray-700 mb-2",children:["카탈로그 대분류 ",c.jsx("span",{className:"text-xs font-normal text-gray-400",children:"(세부 시리즈 링크는 챗봇이 자동 안내)"})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:b.catalogCategories.map(I=>c.jsx("a",{href:I.url,target:"_blank",rel:"noreferrer",className:"text-xs border border-gray-300 rounded px-2 py-1 text-blue-600 hover:bg-blue-50",children:I.name},I.url))})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-sm font-bold text-gray-700 mb-2",children:"내부 페이지 안내"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:b.internalPages.map(I=>c.jsxs("span",{className:"text-xs border border-gray-200 rounded px-2 py-1 text-gray-600",children:[I.name," ",c.jsx("span",{className:"text-gray-400",children:I.path})]},I.path))})]})]})]}),c.jsxs("section",{className:"bg-white p-5 rounded-lg border border-gray-200 shadow-sm",children:[c.jsxs("div",{className:"flex justify-between items-center mb-1",children:[c.jsx("h3",{className:"font-bold text-gray-800",children:"자주 묻는 질문 (FAQ)"}),c.jsx("button",{onClick:j,className:"text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-md px-3 py-1.5",children:"+ FAQ 추가"})]}),c.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"여기 등록한 질문·답변을 챗봇이 우선 사용합니다."}),t.length===0&&c.jsx("p",{className:"text-sm text-gray-400 py-4 text-center",children:"등록된 FAQ 가 없습니다. “+ FAQ 추가”로 시작하세요."}),c.jsx("div",{className:"space-y-4",children:t.map((I,R)=>c.jsxs("div",{className:"border border-gray-200 rounded-md p-3 bg-gray-50",children:[c.jsxs("div",{className:"flex justify-between items-start gap-2 mb-2",children:[c.jsxs("span",{className:"text-xs font-bold text-gray-500 mt-2",children:["Q",R+1]}),c.jsx("button",{onClick:()=>A(R),className:"text-xs text-red-500 hover:text-red-700 font-bold",children:"삭제"})]}),c.jsx("input",{className:k+" mb-2",placeholder:"질문 (예: 배송은 얼마나 걸리나요?)",value:I.q,onChange:F=>P(R,"q",F.target.value)}),c.jsx("textarea",{className:k,rows:2,placeholder:"답변",value:I.a,onChange:F=>P(R,"a",F.target.value)})]},R))})]}),c.jsxs("section",{className:"bg-white p-5 rounded-lg border border-gray-200 shadow-sm",children:[c.jsx("h3",{className:"font-bold text-gray-800 mb-1",children:"참고 자료 (URL)"}),c.jsxs("p",{className:"text-xs text-gray-500 mb-4",children:["URL 을 등록하면 그 페이지 내용을 읽어와 챗봇이 답변 근거로 씁니다.",c.jsx("br",{}),"※ 서버에서 화면을 그려주는 페이지(예: 카탈로그)는 잘 읽히고, 자바스크립트로만 그리는 페이지는 내용이 안 읽힐 수 있습니다."]}),c.jsxs("div",{className:"flex gap-2 mb-2",children:[c.jsx("input",{className:k,placeholder:"https://...",value:s,onChange:I=>i(I.target.value),onKeyDown:I=>I.key==="Enter"&&O()}),c.jsx("button",{onClick:O,disabled:h,className:"whitespace-nowrap text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 rounded-md px-4",children:h?"읽는 중…":"URL 추가"})]}),g&&c.jsx("p",{className:"text-xs text-red-600 mb-3",children:g}
4333),c.jsxs("div",{className:"space-y-2",children:[r.length===0&&c.jsx("p",{className:"text-sm text-gray-400 py-4 text-center",children:"등록된 참고 URL 이 없습니다."}),r.map((I,R)=>c.jsxs("div",{className:"border border-gray-200 rounded-md p-3 flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-semibold text-gray-800 truncate",children:I.title||I.url}),c.jsx("a",{href:I.url,target:"_blank",rel:"noreferrer",className:"text-xs text-blue-600 hover:underline break-all",children:I.url}),c.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:["읽어온 텍스트 ",(I.text||"").length.toLocaleString(),"자"]})]}),c.jsxs("div",{className:"flex flex-col gap-1 shrink-0",children:[c.jsx("button",{onClick:()=>q(R),disabled:l===R,className:"text-xs font-bold text-gray-600 hover:text-gray-900 border border-gray-300 rounded px-2 py-1 disabled:opacity-50",children:l===R?"…":"다시 읽기"}),c.jsx("button",{onClick:()=>L(R),className:"text-xs font-bold text-red-500 hover:text-red-700 border border-red-200 rounded px-2 py-1",children:"삭제"})]})]},R))]})]}),c.jsxs("p",{className:"text-xs text-gray-400",children:["변경 후 상단/하단의 ",c.jsx("b",{children:"저장"})," 버튼을 눌러야 반영됩니다. (챗봇 반영은 최대 2분)"]})]})},vX=["home_page","about_page_v2","spaces_page","excellent_product_page","office_system_page","partition_system_page","education_system_page","executive_furniture_page","chair_collection_page","sofa_lounge_page","materials_page","design_page_v2","sustainability_page_v2","footer_config","logo_config"],wX=()=>{const[n,e]=D.useState(!1),[t,r]=D.useState([]),s=l=>r(d=>[...d,l]),i=async()=>{if(n)return;e(!0),r([]);let l=0;for(const d of vX)try{const h=qt(ot,"site_content",d),m=await mn(h);if(!m.exists()){s(`- ${d}: 문서 없음(건너뜀)`);continue}const g=m.data();if(!g.content){s(`- ${d}: content 없음`);continue}let p;try{p=JSON.parse(g.content)}catch{s(`- ${d}: JSON 파싱 실패`);continue}const b=JSON.stringify(p),w=JSON.stringify(pw(p));w!==b?(await O2(h,{...g,content:w,updatedAt:Date.now(),updatedBy:"admin(url-cleanup)"}),l++,s(`✓ ${d}: URL 정리 완료`)):s(`- ${d}: 바꿀 URL 없음`)}catch(h){s(`✗ ${d}: 오류 ${(h==null?void 0:h.message)||h}`)}s(`
4334완료 — ${l}개 문서 정리됨. (챗봇/화면은 이미 CloudFront 사용 중, 이제 저장값도 일치)`),e(!1)};return c.jsx("div",{className:"space-y-6",children:c.jsxs("section",{className:"bg-white p-5 rounded-lg border border-gray-200 shadow-sm space-y-4",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-gray-800",children:"이미지 URL 정리 (firebasestorage → S3/CloudFront)"}),c.jsxs("p",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:["저장된 이미지 주소를 CloudFront 주소로 일괄 변환합니다.",c.jsx("br",{}),"이미지 ",c.jsx("b",{children:"표시"}),"는 이미 CloudFront로 되고 있으며, 이 작업은 저장값까지 맞춰 ",c.jsx("b",{children:"관리자 화면에도 CloudFront 주소로"})," 보이게 합니다. 안전하게 여러 번 눌러도 됩니다(이미 변환된 건 건너뜀)."]})]}),c.jsx("button",{onClick:i,disabled:n,className:"text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 rounded-md px-5 py-2.5",children:n?"정리 중…":"이미지 URL 정리 실행"}),t.length>0&&c.jsx("pre",{className:"text-xs bg-gray-50 border border-gray-200 rounded p-3 whitespace-pre-wrap max-h-96 overflow-auto font-mono",children:t.join(`
4335`)})]})})},_X=({inquiry:n,isOpen:e,onClose:t,onUpdateStatus:r,onUpdateComment:s,onDelete:i})=>{const[l,d]=ae.useState((n==null?void 0:n.adminComment)||"");return ae.useEffect(()=>{d((n==null?void 0:n.adminComment)||"")},[n]),n?c.jsx(Cr,{children:e&&c.jsxs(c.Fragment,{children:[c.jsx(Ge.div,{initial:{opacity:0}
4335,animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 bg-black/50 z-[100] backdrop-blur-sm"}),c.jsxs(Ge.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-2xl bg-white z-[110] p-6 rounded-2xl shadow-xl max-h-[90vh] overflow-y-auto",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-xl font-bold",children:"문의 상세 내용"}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:c.jsx(ds,{size:20})})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-bold text-gray-500",children:"제목"}),c.jsx("p",{className:"text-lg font-bold",children:n.title||"제목 없음"})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-bold text-gray-500",children:"회사명"}),c.jsx("p",{className:"font-semibold",children:n.company})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-bold text-gray-500",children:"담당자"}),c.jsx("p",{className:"font-semibold",children:n.name})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-bold text-gray-500",children:"연락처"}),c.jsx("p",{className:"font-semibold",children:n.phone})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-bold text-gray-500",children:"이메일"}),c.jsx("p",{className:"font-semibold",children:n.email})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-bold text-gray-500",children:"문의 내용"}),c.jsx("p",{className:"bg-gray-50 p-4 rounded-xl whitespace-pre-wrap break-words text-sm min-h-[150px]",children:n.content})]})]}),c.jsxs("div",{className:"mt-6 border-t pt-6 space-y-4",children:[c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsxs("select",{value:n.status||"대기중",onChange:h=>r(n.id,h.target.value),className:"text-sm font-bold px-3 py-2 rounded-lg border focus:outline-none",children:[c.jsx("option",{value:"대기중",children:"대기중"}),c.jsx("option",{value:"검토중",children:"검토중"}),c.jsx("option",{value:"상담완료",children:"상담완료"})]}),c.jsx("button",{onClick:()=>
4335{i(n.id),t()},className:"px-3 py-2 text-sm text-red-600 bg-red-50 rounded-lg font-bold",children:"삭제"})]}),c.jsxs("div",{className:"bg-blue-50/20 border border-blue-50 rounded-xl p-4 space-y-3",children:[c.jsxs("span",{className:"text-xs font-extrabold text-blue-700 flex items-center gap-1.5",children:[c.jsx(kI,{className:"w-3.5 h-3.5"}),"관리자 코멘트 및 메모"]}),c.jsx("input",{type:"text",placeholder:"예: 7/5 방문 상담 예약 완료, 담당 김대리",value:l,onChange:h=>d(h.target.value),className:"w-full px-3 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:border-blue-500 bg-white"}),c.jsx("button",{onClick:()=>s(n.id,l),className:"w-full py-2 bg-blue-600 hover:bg-blue-700 text-white font-bold rounded-lg text-sm transition-colors",children:"저장"})]})]})]})]})}):null},b0={heroSubtitle:"CLOVER RESOURCES & NEWS",heroTitle:"자료실 & 회사 뉴스",heroDesc:"크로바가구의 최신 제품 카탈로그, 공인인증서 다운로드 및 최신 브랜드 뉴스를 신속하고 정확하게 찾아보실 수 있습니다.",promotionalMaterials:[{id:"promo-1",title:"2026 크로바가구 종합 카탈로그",category:"카탈로그",desc:"크로바가구의 전 제품 라인업 and 사무환경 맞춤 공간 제안 가이드를 수록한 2026년도 최신 공식 종합 제품 카탈로그입니다.",fileUrl:"https://images.unsplash.com/photo-1544716278-ca5e3f4abd8c?auto=format&fit=crop&q=80&w=1200",fileSize:"24.5 MB",date:"2026.01.15",downloads:1450},{id:"promo-2",title:"스마트 오피스 가구 시스템 가이드북",category:"카탈로그",desc:"인간공학적 최적의 오피스 가구 배치 솔루션 및 스마트 오피스 레이아웃의 다양한 가이드를 제공하는 리플렛입니다.",fileUrl:"https://images.unsplash.com/photo-1586075010923-2dd4570fb338?auto=format&fit=crop&q=80&w=1200",fileSize:"12.3 MB",date:"2026.03.10",downloads:820},{id:"promo-3",title:"친환경 E0 등급 자재 환경표지인증서",category:"인증서",desc:"크로바가구 전 제품군에 엄선되어 적용된 E0 등급 친환경 합판 자재의 공식 환경성적 및 유해물질 차단 국가 공인인증서입니다.",fileUrl:"https://images.unsplash.com/photo-1589330694653-ded6df53f7ec?auto=format&fit=crop&q=80&w=1200",fileSize:"1.8 MB",date:"2026.05.02",downloads:340},{id:"promo-4",title:"중역용 프리미엄 오피스 헤리티지 컬렉션",category:"카탈로그",desc:"천연 무늬목과 정밀 가죽 수공예 마감이 결합된 최상위 VIP 중역용 헤리티지 컬렉션의 세ë
4335¶€ 사양 정보 리플렛입니다.",fileUrl:"https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&q=80&w=1200",fileSize:"8.7 MB",date:"2026.02.20",downloads:510}],companyNews:[{id:"news-1",title:"크로바가구, 2026 대한민국 우수 산업 브랜드 가구디자인 부문 대상",category:"수상내역",date:"2026.06.10",content:`크로바가구가 "2026 대한민국 우수 산업 브랜드 대상"에서 가구디자인 부문 최상위 대상을 수상하였습니다.
4336
4337이번 시상식에서 크로바가구의 특허 기술인 "자유 각도 조절 스마트 디바이스 레일"과 "친환경 제로-포름알데히드 공법"이 전 세계 오피스 인테리어 수준을 한 단계 향상시켰다는 점을 적극 평가 받았습니다.
4338
4339현대 노동자들의 건강과 업무 능률을 동시 극대화하기 위해, 보이지 않는 하드웨어 구조 프레임 하나까지 지속적으로 혁신하는 크로바가구 디자인랩 연구원들의 치열한 노력이 일궈낸 영광입니다.`,image:"https://images.unsplash.com/photo-1578575437130-527eed3abbec?auto=format&fit=crop&q=80&w=800",newsUrl:""},{id:"news-2",title:"탄소 중립 100% 실천을 위한 선행 에너지 공장 완비 및 본격 가동",category:"보도자료",date:"2026.04.18",content:`크로바가구는 "Design & Sustainability" 통합 슬로건 실천의 일환으로 총 용량 1.2MW 규모의 태양광 신재생 발전 유닛 건설을 마치고 100% 완전 전력 자립 생산에 성공했습니다.
4340
4341이번 가동으로 이산화탄소 대기 중 배출량이 기존 대비 80% 이상 획기적으로 낮아질 것으로 예상되며, 이는 산림 청정 구역을 매년 수십만 평 추가 확보하는 환경적 공헌과 다름없습니다.
4342
4343원자재뿐만 아니라 가구를 만드는 과정의 탄소 발생까지 깨끗하게 전환하여, 완전 무해하고 건강한 오피스 라이프의 새로운 기준을 열겠습니다.`,image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?auto=format&fit=crop&q=80&w=800",newsUrl:""},{id:"news-3",title:"신임 글로벌 디자인 총괄 디렉터 프란체스코 소장 공식 취임",category:"공지사항",date:"2026.02.05",content:`글로벌 공간 디자인 연구의 중추 역할을 수행할 크로바 가구 디자인랩의 신임 소장으로 이탈리아 국적의 수석 디자이너 프란체스코가 임명되었습니다.
4344
4345프란체스코 소장은 "디자인은 선과 면의 장식이 아닌, 공간 안에 살아가는 사람들이 나누는 보이지 않는 심리적 신뢰의 인프라를 빚는 행위"라고 소감을 밝혔습니다.
4346
4347다가오는 하반기부터 인체 구조의 역학적 반응성과 최첨단 감성을 정교하게 믹스한 크로바가구의 최첨단 미학 프리미엄 신작 스페이스를 감상해 보시기 바랍니다.`,image:"https://images.unsplash.com/photo-1507679799987-c73779587ccf?auto=format&fit=crop&q=80&w=800",newsUrl:""}],categories:["수상내역","보도자료","공지사항"],materialCategories:["카탈로그","인증서"]},xD=()=>{const[n,e]=D.useState(b0),[t,r]=D.useState(!0),[s,i]=D.useState("news"),[l,d]=D.useState("전체"),[h,m]=D.useState(""),[g,p]=D.useState(null),[b,w]=D.useState("전체"),[_,N]=D.useState(""),[E,j]=D.useState(null),[P,A]=D.useState(1),[M,O]=D.useState(1),q=15,L=20;D.useEffect(()=>{A(1)},[b,_]),D.useEffect(()=>{O(1)},[l,h]),D.useEffect(()=>{(async()=>{try{const X=qt(ot,"site_content","design_page_v2"),be=await mn(X);if(be.exists()){const Oe=be.data();if(Oe.content)try{const H=JSON.parse(Oe.content);e(ar(b0,H))}catch(H){console.error(H),e(b0)}}}catch(X){console.error("Failed to load archive data:",X)}finally{r(!1)}})()},[]);const k=(n.promotionalMaterials||[]).filter($=>{const X=l==="전체"||$.category===l,be=$.title.toLowerCase().includes(h.toLowerCase())||$.desc.toLowerCase().includes(h.toLowerCase());return X&&be}),I=(n.companyNews||[]).filter($=>{const X=b==="전체"||$.category===b,be=$.title.toLowerCase().includes(_.toLowerCase())||($.content||"").toLowerCase().includes(_.toLowerCase());return X&&be}),R=Math.ceil(I.length/q),F=Math.min(P,R||1),B=I.slice((F-1)*q,F*q),V=Math.ceil(k.length/L),se=Math.min(M,V||1),ye=k.slice((se-1)*L,se*L),W=($,X)=>{p(X),setTimeout(async()=>{p(null),window.open($.fileUrl,"_blank");try{const be=n.promotionalMaterials.map((Oe,H)=>H===X?{...Oe,downloads:(Oe.downloads||0)+1}:Oe);e(Oe=>({...Oe,promotionalMaterials:be})),await QM(qt(ot,"site_content","design_page_v2"),{content:JSON.stringify({...n,promotionalMaterials:be}),updatedAt:Date.now(),updatedBy:"user-download"})}catch(be){console.error("Failed to update download stats:",be)}},1500)};return t?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsxs("div",{className:"min-h-screen bg-white font-sans pb-24",children:[c.jsxs("div",{className:"relative bg-white pt-36 pb-20 border-b border-gray-100 overflow-hidden",children:[c.jsx("div",{className:"absolute top-0 right-0 w-[40%] h-full opacity-10 pointer-events-none",children:c.jsx("div",{className:"w-full h-full bg-gradient-to-l from-blue-500/20 to-transparent blur-3xl rounded-full translate-x-1/3"})}),c.jsx("div",{className:"max-w-7xl mx-auto px-6 md:px-12 relative z-10",children:c.jsxs(Ge.div,{initial:{opacity:0,y:20}
4347,animate:{opacity:1,y:0},transition:{duration:.8},className:"max-w-3xl mx-auto text-center",children:[c.jsxs("div",{className:"mb-6 flex items-center justify-center gap-1.5 text-blue-600 font-bold tracking-wider text-[10.5pt] uppercase",children:[c.jsx(S_,{className:"w-3 h-3 text-blue-500 animate-pulse"}),n.heroSubtitle]}),c.jsx("h1",{className:"text-[48px] font-black text-gray-900 tracking-tight leading-tight mb-6",children:n.heroTitle}),c.jsx("p",{className:"text-base md:text-lg text-gray-500 font-normal leading-relaxed whitespace-pre-line",children:n.heroDesc})]})})]}),c.jsxs("div",{className:"flex gap-8 justify-center bg-[#f5f5f5] pt-4 pb-0 w-full mb-20",children:[c.jsxs("button",{onClick:()=>i("news"),className:`flex items-center gap-2 text-lg font-sans transition-colors relative px-8 pb-4 ${s==="news"?"text-[#0a0a0a] font-bold":"text-gray-500 hover:text-gray-900 font-medium"}`,children:["회사뉴스",s==="news"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]}),c.jsxs("button",{onClick:()=>i("materials"),className:`flex items-center gap-2 text-lg font-sans transition-colors relative px-8 pb-4 ${s==="materials"?"text-[#0a0a0a] font-bold":"text-gray-500 hover:text-gray-900 font-medium"}`,children:["카탈로그",s==="materials"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]})]}),c.jsx("div",{className:"max-w-7xl mx-auto px-6 md:px-12",children:c.jsx(Cr,{mode:"wait",children:s==="materials"?c.jsxs(Ge.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"space-y-8",children:[c.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center border-b border-gray-200 pb-0",children:[c.jsx("div",{className:"flex gap-1.5",children:["전체",...n.materialCategories||["카탈로그","인증서"]].map($=>c.jsx("button",{onClick:()=>d($),className:`text-sm font-bold px-4 py-2 border-b-2 transition-all -mb-0.5 ${l===$?"border-blue-600 text-blue-600 font-extrabold":"border-transparent text-gray-400 hover:text-gray-600"}`,children:$},$))}),c.jsxs("div",{className:"relative w-full md:w-64",children:[c.jsx(Yo,{className:"absolute left-0 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),c.jsx("input",{type:"text",placeholder:"자료 검색하세요",value:h,onChange:$=>m($.target.value),className:"w-full pl-6 pr-2 py-1 text-sm focus:outline-none transition-all bg-transparent placeholder-gray-400"})]})]}),k.length>0?c.jsxs("div",{className:"space-y-10",children:[c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:ye.map(($,X)=>c.jsxs(Ge.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:X*.05},className:"bg-white rounded-2xl border border-gray-200/80 shadow-sm hover:shadow-md transition-all flex flex-col justify-between overflow-hidden group",children:[c.jsxs("div",{className:"relative aspect-[4/3] w-full bg-gray-100 overflow-hidden",children:[c.jsx(et,{src:$.image||$.fileUrl,alt:$.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",referrerPolicy:"no-referrer"}),c.jsx("div",{className:"absolute top-3 left-3",children:c.jsx("span",{className:`text-[10px] font-extrabold px-2.5 py-1 rounded-md uppercase tracking-wider shadow-sm ${$.category==="카탈로그"?"bg-indigo-600 text-white":$.category==="인증서"?"bg-emerald-600 text-white":"bg-blue-600 text-white"}`,children:$.category})})]}),c.jsxs("div",{className:"p-5 flex-1 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-base font-bold text-gray-900 group-hover:text-blue-600 transition-colors line-clamp-1 mb-2",children:$.title}),c.jsx("p",{className:"text-xs text-gray-400 leading-relaxed line-clamp-2 mb-4",children:$.desc})]}),c.jsx("div",{className:"pt-3 border-t border-gray-100 flex items-center justify-between text-[11px] text-gray-400 font-mono",children:c.jsx("span",{children:$.date})})]}),c.jsx("div",{className:"px-5 pb-5",children:c.jsx("button",{onClick:()=>W($,X),disabled:g!==null,className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl text-xs font-bold transition-all border border-gray-200 text-gray-700 bg-gray-50 group-hover:bg-blue-600 group-hover:text-white group-hover:border-blue-600 shadow-sm",children:g===X?c.jsxs(c.Fragment,{children:[c.jsx(No,{className:"w-3.5 h-3.5 animate-spin"}),c.jsx("span",{children:"준비 중..."})]}):c.jsxs(c.Fragment,{children:[c.jsx(N_,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:"자료 다운로드"})]})})})]},$.id||X))}),V>1&&c.jsxs("div",{className:"flex justify-center items-center gap-1.5 pt-4",children:[c.jsx("button",{onClick:()=>O($=>Math.max($-1,1)),disabled:se===1,className:`p-2 rounded-lg border border-gray-200 transition-colors ${se===1?"text-gray-300 bg-gray-50 cursor-not-allowed":"text-gray-600 hover:bg-gray-50"}`,title:"이전 페이지",children:c.jsx(zw,{className:"w-4 h-4"})}),Array.from({length:V},($,X)=>X+1).map($=>c.jsx("button",{onClick:()=>O($),className:`w-9 h-9 text-xs font-bold rounded-lg border transition-all ${se===$?"bg-blue-600 text-white border-blue-600 shadow-sm":"text-gray-600 border-gray-200 hover:bg-gray-50"}`,children:$},$)),c.jsx("button",{onClick:()=>O($=>Math.min($+1,V)),disabled:se===V,className:`p-2 rounded-lg border border-gray-200 transition-colors ${se===V?"text-gray-300 bg-gray-50 cursor-not-allowed":"text-gray-600 hover:bg-gray-50"}`,title:"다음 페이지",children:c.jsx(Wg,{className:"w-4 h-4"})})]})]}):c.jsxs("div",{className:"text-center py-20 bg-white border border-gray-200 border-dashed rounded-2xl text-gray-400",children:[c.jsx(Dy,{className:"w-10 h-10 mx-auto mb-3 stroke-[1.5]"}),c.jsx("p",{className:"text-sm font-semibold",children:"검색 ê²°ê
4347³¼ì— 맞는 홍보 자료가 없습니다."}),c.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"다른 키워드를 입력해보세요."})]})]},"materials"):c.jsxs(Ge.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"space-y-8",children:[c.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center border-b border-gray-200 pb-0",children:[c.jsx("div",{className:"flex gap-1.5",children:["전체",...n.categories||[]].map($=>c.jsx("button",{onClick:()=>w($),className:`text-sm font-bold px-4 py-2 border-b-2 transition-all -mb-0.5 ${b===$?"border-blue-600 text-blue-600 font-extrabold":"border-transparent text-gray-400 hover:text-gray-600"}`,children:$},$))}),c.jsxs("div",{className:"relative w-full md:w-64",children:[c.jsx(Yo,{className:"absolute left-0 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),c.jsx("input",{type:"text",placeholder:"검색하세요",value:_,onChange:$=>N($.target.value),className:"w-full pl-6 pr-2 py-1 text-sm focus:outline-none transition-all bg-transparent placeholder-gray-400"})]})]}),I.length>0?c.jsxs("div",{className:"space-y-10",children:[c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:B.map(($,X)=>c.jsxs(Ge.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.4,delay:X*.08},className:"bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden flex flex-col group cursor-pointer",onClick:()=>j($),children:[c.jsxs("div",{className:"relative aspect-[16/10] overflow-hidden bg-gray-100",children:[c.jsx(et,{src:$.image||"https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=800",alt:$.title,className:"w-full h-full object-cover group-hover:scale-102 transition-transform duration-500",referrerPolicy:"no-referrer"}),c.jsx("div",{className:"absolute top-4 left-4",children:c.jsx("span",{className:"text-[10px] font-extrabold text-blue-600 bg-blue-50/90 backdrop-blur-sm px-2.5 py-1 rounded-md border border-blue-100/30 uppercase tracking-wider",children:$.category})})]}),c.jsxs("div",{className:"p-6 flex-1 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-[11px] font-mono text-gray-400 block mb-2",children:$.date}),c.jsx("h3",{className:"text-lg font-bold text-gray-950 line-clamp-2 leading-snug mb-3 group-hover:text-blue-600 transition-colors",children:$.title}),c.jsx("p",{className:"text-xs text-gray-500 leading-relaxed line-clamp-3 mb-6",children:($.content||"").split(`
4348`)[0]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-blue-600 group-hover:gap-2.5 transition-all",onClick:be=>{be.stopPropagation(),j($)},children:[c.jsx("span",{children:"더 알아보기"}),c.jsx(Wg,{className:"w-3.5 h-3.5"})]})]})]},$.id||X))}),R>1&&c.jsxs("div",{className:"flex justify-center items-center gap-1.5 pt-4",children:[c.jsx("button",{onClick:()=>A($=>Math.max($-1,1)),disabled:F===1,className:`p-2 rounded-lg border border-gray-200 transition-colors ${F===1?"text-gray-300 bg-gray-50 cursor-not-allowed":"text-gray-600 hover:bg-gray-50"}`,title:"이전 페이지",children:c.jsx(zw,{className:"w-4 h-4"})}),Array.from({length:R},($,X)=>X+1).map($=>c.jsx("button",{onClick:()=>A($),className:`w-9 h-9 text-xs font-bold rounded-lg border transition-all ${F===$?"bg-blue-600 text-white border-blue-600 shadow-sm":"text-gray-600 border-gray-200 hover:bg-gray-50"}`,children:$},$)),c.jsx("button",{onClick:()=>A($=>Math.min($+1,R)),disabled:F===R,className:`p-2 rounded-lg border border-gray-200 transition-colors ${F===R?"text-gray-300 bg-gray-50 cursor-not-allowed":"text-gray-600 hover:bg-gray-50"}`,title:"다음 페이지",children:c.jsx(Wg,{className:"w-4 h-4"})})]})]}):c.jsxs("div",{className:"text-center py-20 bg-white border border-gray-200 border-dashed rounded-2xl text-gray-400",children:[c.jsx(kU,{className:"w-10 h-10 mx-auto mb-3 stroke-[1.5]"}),c.jsx("p",{className:"text-sm font-semibold",children:"선택한 카테고리에 뉴스가 존재하지 않습니다."})]})]},"news")})}),c.jsx(Cr,{children:E&&c.jsx(Ge.div,{initial:{opacity:0}
vendor: 9,742 bytes, line 4348
4348,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40 backdrop-blur-sm",children:c.jsxs(Ge.div,{initial:{scale:.95,y:15},animate:{scale:1,y:0},exit:{scale:.95,y:15},transition:{type:"spring",duration:.5},className:"bg-white w-full max-w-3xl rounded-3xl shadow-2xl flex flex-col max-h-[85vh] overflow-hidden",children:[c.jsxs("div",{className:"p-6 border-b border-gray-100 flex justify-between items-center bg-white sticky top-0 z-10",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:"text-[10px] font-extrabold text-blue-600 bg-blue-50 px-2.5 py-1 rounded-md border border-blue-100 uppercase tracking-wider",children:E.category}),c.jsx("span",{className:"text-xs font-mono text-gray-400",children:E.date})]}),c.jsx("button",{onClick:()=>j(null),className:"p-1.5 text-gray-400 hover:text-gray-900 bg-gray-50 hover:bg-gray-100 rounded-lg transition-colors",children:c.jsx(ds,{className:"w-5 h-5"})})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-8",children:[c.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-950 leading-tight",children:E.title}),E.image&&c.jsx("div",{className:"aspect-[16/10] w-full rounded-2xl overflow-hidden bg-gray-50",children:c.jsx(et,{src:E.image,alt:E.title,className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}),c.jsx("div",{className:"text-sm md:text-base text-gray-700 leading-relaxed whitespace-pre-line font-normal space-y-4",children:E.content}),E.newsUrl&&c.jsx("div",{className:"flex justify-center pt-8 pb-4",children:c.jsxs("a",{href:E.newsUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-8 py-3.5 rounded-full bg-blue-600 hover:bg-blue-700 text-white text-sm font-bold shadow-md hover:shadow-lg transition-all hover:scale-[1.02] active:scale-[0.98]",children:[c.jsx("span",{children:"기사 더보기"}),c.jsx(P0,{className:"w-4 h-4"})]})})]}),c.jsx("div",{className:"p-6 bg-gray-50 border-t border-gray-100 flex justify-end",children:c.jsx("button",{onClick:()=>j(null),className:"px-5 py-2.5 rounded-xl bg-gray-900 text-white text-xs font-bold hover:bg-gray-800 transition-colors",children:"닫기"})})]})})})]})};function B3(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(e=0;e<s;e++)n[e]&&(t=B3(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function Kn(){for(var n,e,t=0,r="",s=arguments.length;t<s;t++)(n=arguments[t])&&(e=B3(n))&&(r&&(r+=" "),r+=e);return r}const U3=6048e5,TX=864e5,lx=6e4,cx=36e5,NX=1e3,bD=Symbol.for("constructDateFrom");function Vt(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&bD in n?n[bD](e):n instanceof Date?new n.constructor(e):new Date(e)}function ze(n,e){return Vt(e||n,n)}function na(n,e,t){const r=ze(n,t==null?void 0:t.in);return isNaN(e)?Vt((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function ia(n,e,t){const r=ze(n,t==null?void 0:t.in);if(isNaN(e))return Vt(n,NaN);if(!e)return r;const s=r.getDate(),i=Vt(n,r.getTime());i.setMonth(r.getMonth()+e+1,0);const l=i.getDate();return s>=l?i:(r.setFullYear(i.getFullYear(),i.getMonth(),s),r)}function z3(n,e,t){return Vt(n,+ze(n)+e)}function EX(n,e,t){return z3(n,e*cx)}let SX={};function Oc(){return SX}function ki(n,e){var d,h,m,g;const t=Oc(),r=(e==null?void 0:e.weekStartsOn)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((g=(m=t.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,s=ze(n,e==null?void 0:e.in),i=s.getDay(),l=(i<r?7:0)+i-r;return s.setDate(s.getDate()-l),s.setHours(0,0,0,0),s}function Ed(n,e){return ki(n,{...e,weekStartsOn:1})}function q3(n,e){const t=ze(n,e==null?void 0:e.in),r=t.getFullYear(),s=Vt(t,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const i=Ed(s),l=Vt(t,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const d=Ed(l);return t.getTime()>=i.getTime()?r+1:t.getTime()>=d.getTime()?r:r-1}function ly(n){const e=ze(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function Li(n,...e){const t=Vt.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function Sc(n,e){const t=ze(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function Sd(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e),i=Sc(r),l=Sc(s),d=+i-ly(i),h=+l-ly(l);return Math.round((d-h)/TX)}function jX(n,e){const t=q3(n,e),r=Vt(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Ed(r)}function hm(n,e,t){const r=ze(n,t==null?void 0:t.in);return r.setTime(r.getTime()+e*lx),r}function $2(n,e,t){return ia(n,e*3,t)}function AX(n,e,t){return z3(n,e*1e3)}function cy(n,e,t){return na(n,e*7,t)}function ra(n,e,t){return ia(n,e*12,t)}function vD(n,e){let t,r=e==null?void 0:e.in;return n.forEach(s=>{!r&&typeof s=="object"&&(r=Vt.bind(null,s));const i=ze(s,r);(!t||t<i||isNaN(+i))&&(t=i)}),Vt(r,t||NaN)}function wD(n,e){let t,r=e==null?void 0:e.in;return n.forEach(s=>{!r&&typeof s=="object"&&(r=Vt.bind(null,s));const i=ze(s,r);(!t||t>i||isNaN(+i))&&(t=i)}),Vt(r,t||NaN)}function CX(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e);return+Sc(r)==+Sc(s)}function Ha(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function jd(n){return!(!Ha(n)&&typeof n!="number"||isNaN(+ze(n)))}function uy(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e),i=r.getFullYear()-s.getFullYear(),l=r.getMonth()-s.getMonth();return i*12+l}function Mo(n,e){const t=ze(n,e==null?void 0:e.in);return Math.trunc(t.getMonth()/3)+1}function dy(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e),i=r.getFullYear()-s.getFullYear(),l=Mo(r)-Mo(s);return i*4+l}function hy(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e);return r.getFullYear()-s.getFullYear()}function DX(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e),i=_D(r,s),l=Math.abs(Sd(r,s));r.setDate(r.getDate()-i*l);const d=+(_D(r,s)===-i),h=i*(l-d);return h===0?0:h}function _D(n,e){const t=n.getFullYear()-e.getFullYear()||n.getMonth()-e.getMonth()||n.getDate()-e.getDate()||n.getHours()-e.getHours()||n.getMinutes()-e.getMinutes()||n.getSeconds()-e.getSeconds()||n.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}function H3(n,e){const t=ze(n,e==null?void 0:e.in);return t.setHours(23,59,59,999),t}function Y3(n,e){const t=ze(n,e==null?void 0:e.in),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function C1(n,e){const t=ze(n,e==null?void 0:e.in),r=t.getMonth(),s=r-r%3;return t.setMonth(s,1),t.setHours(0,0,0,0),t}function G3(n,e){const t=ze(n,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}function $3(n,e){const t=ze(n,e==null?void 0:e.in),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function ux(n,e){const t=ze(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function kX(n,e){var d,h;const t=Oc(),r=t.weekStartsOn??((h=(d=t.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,s=ze(n,e==null?void 0:e.in),i=s.getDay(),l=(i<r?-7:0)+6-(i-r);return s.setDate(s.getDate()+l),s.setHours(23,59,59,999),s}const IX={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"}},RX=(n,e,t)=>{let r;const s=IX[n];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function tw(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const MX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},OX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},LX={date:tw({formats:MX,defaultWidth:"full"}),time:tw({formats:PX,defaultWidth:"full"}),dateTime:tw({formats:OX,defaultWidth:"full"})},VX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},FX=(n,e,t,r)=>VX[n];function hf(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let s;if(r==="formatting"&&n.formattingValues){const l=n.defaultFormattingWidth||n.defaultWidth,d=t!=null&&t.width?String(t.width):l;s=n.formattingValues[d]||n.formattingValues[l]}else{const l=n.defaultWidth,d=t!=null&&t.width?String(t.width):n.defaultWidth;s=n.values[d]||n.values[l]}const i=n.argumentCallback?n.argumentCallback(e):e;return s[i]}}const BX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},UX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]}
vendor: 16,034 bytes, line 4348
4348,zX={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"]},qX={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"]},HX={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"}},YX={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"}},GX=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},$X={ordinalNumber:GX,era:hf({values:BX,defaultWidth:"wide"}),quarter:hf({values:UX,defaultWidth:"wide",argumentCallback:n=>n-1}),month:hf({values:zX,defaultWidth:"wide"}),day:hf({values:qX,defaultWidth:"wide"}),dayPeriod:hf({values:HX,defaultWidth:"wide",formattingValues:YX,defaultFormattingWidth:"wide"})};function ff(n){return(e,t={})=>{const r=t.width,s=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],i=e.match(s);if(!i)return null;const l=i[0],d=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(d)?WX(d,p=>p.test(l)):KX(d,p=>p.test(l));let m;m=n.valueCallback?n.valueCallback(h):h,m=t.valueCallback?t.valueCallback(m):m;const g=e.slice(l.length);return{value:m,rest:g}}}function KX(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function WX(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function QX(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const s=r[0],i=e.match(n.parsePattern);if(!i)return null;let l=n.valueCallback?n.valueCallback(i[0]):i[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(s.length);return{value:l,rest:d}}}const XX=/^(\d+)(th|st|nd|rd)?/i,JX=/\d+/i,ZX={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},eJ={any:[/^b/i,/^(a|c)/i]},tJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nJ={any:[/1/i,/2/i,/3/i,/4/i]},rJ={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},sJ={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]},aJ={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},iJ={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]},oJ={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},lJ={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}},cJ={ordinalNumber:QX({matchPattern:XX,parsePattern:JX,valueCallback:n=>parseInt(n,10)}),era:ff({matchPatterns:ZX,defaultMatchWidth:"wide",parsePatterns:eJ,defaultParseWidth:"any"}),quarter:ff({matchPatterns:tJ,defaultMatchWidth:"wide",parsePatterns:nJ,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ff({matchPatterns:rJ,defaultMatchWidth:"wide",parsePatterns:sJ,defaultParseWidth:"any"}),day:ff({matchPatterns:aJ,defaultMatchWidth:"wide",parsePatterns:iJ,defaultParseWidth:"any"}),dayPeriod:ff({matchPatterns:oJ,defaultMatchWidth:"any",parsePatterns:lJ,defaultParseWidth:"any"})},K3={code:"en-US",formatDistance:RX,formatLong:LX,formatRelative:FX,localize:$X,match:cJ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function uJ(n,e){const t=ze(n,e==null?void 0:e.in);return Sd(t,ux(t))+1}function K2(n,e){const t=ze(n,e==null?void 0:e.in),r=+Ed(t)-+jX(t);return Math.round(r/U3)+1}function W2(n,e){var g,p,b,w;const t=ze(n,e==null?void 0:e.in),r=t.getFullYear(),s=Oc(),i=(e==null?void 0:e.firstWeekContainsDate)??((p=(g=e==null?void 0:e.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??s.firstWeekContainsDate??((w=(b=s.locale)==null?void 0:b.options)==null?void 0:w.firstWeekContainsDate)??1,l=Vt((e==null?void 0:e.in)||n,0);l.setFullYear(r+1,0,i),l.setHours(0,0,0,0);const d=ki(l,e),h=Vt((e==null?void 0:e.in)||n,0);h.setFullYear(r,0,i),h.setHours(0,0,0,0);const m=ki(h,e);return+t>=+d?r+1:+t>=+m?r:r-1}function dJ(n,e){var d,h,m,g;const t=Oc(),r=(e==null?void 0:e.firstWeekContainsDate)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??t.firstWeekContainsDate??((g=(m=t.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,s=W2(n,e),i=Vt((e==null?void 0:e.in)||n,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),ki(i,e)}function W3(n,e){const t=ze(n,e==null?void 0:e.in),r=+ki(t,e)-+dJ(t,e);return Math.round(r/U3)+1}function Mt(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const wo={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return Mt(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):Mt(t+1,2)},d(n,e){return Mt(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return Mt(n.getHours()%12||12,e.length)},H(n,e){return Mt(n.getHours(),e.length)},m(n,e){return Mt(n.getMinutes(),e.length)},s(n,e){return Mt(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),s=Math.trunc(r*Math.pow(10,t-3));return Mt(s,e.length)}},Du={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},TD={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),s=r>0?r:1-r;return t.ordinalNumber(s,{unit:"year"})}return wo.y(n,e)},Y:function(n,e,t,r){const s=W2(n,r),i=s>0?s:1-s;if(e==="YY"){const l=i%100;return Mt(l,2)}return e==="Yo"?t.ordinalNumber(i,{unit:"year"}):Mt(i,e.length)},R:function(n,e){const t=q3(n);return Mt(t,e.length)},u:function(n,e){const t=n.getFullYear();return Mt(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Mt(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Mt(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return wo.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return Mt(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const s=W3(n,r);return e==="wo"?t.ordinalNumber(s,{unit:"week"}):Mt(s,e.length)},I:function(n,e,t){const r=K2(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):Mt(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):wo.d(n,e)},D:function(n,e,t){const r=uJ(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):Mt(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const s=n.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Mt(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(s,{width:"short",context:"formatting"});case"eeee":default:return t.day(s,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const s=n.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Mt(i,e.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(s,{width:"narrow",context:"standalone"});case"cccccc":return t.day(s,{width:"short",context:"standalone"});case"cccc":default:return t.day(s,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return Mt(s,e.length);case"io":return t.ordinalNumber(s,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const s=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let s;switch(r===12?s=Du.noon:r===0?s=Du.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let s;switch(r>=17?s=Du.evening:r>=12?s=Du.afternoon:r>=4?s=Du.morning:s=Du.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return wo.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):wo.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):Mt(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):Mt(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):wo.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):wo.s(n,e)},S:function(n,e){return wo.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return ED(r);case"XXXX":case"XX":return $l(r);case"XXXXX":case"XXX":default:return $l(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return ED(r);case"xxxx":case"xx":return $l(r);case"xxxxx":case"xxx":default:return $l(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ND(r,":");case"OOOO":default:return"GMT"+$l(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ND(r,":");case"zzzz":default:return"GMT"+$l(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return Mt(r,e.length)},T:function(n,e,t){return Mt(+n,e.length)}};function ND(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),s=Math.trunc(r/60),i=r%60;return i===0?t+String(s):t+String(s)+e+Mt(i,2)}function ED(n,e){return n%60===0?(n>0?"-":"+")+Mt(Math.abs(n)/60,2):$l(n,e)}function $l(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),s=Mt(Math.trunc(r/60),2),i=Mt(r%60,2);return t+s+e+i}const SD=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Q3=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},hJ=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],s=t[2];if(!s)return SD(n,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",SD(r,e)).replace("{{time}}",Q3(s,e))},D1={p:Q3,P:hJ},fJ=/^D+$/,mJ=/^Y+$/,pJ=["D","DD","YY","YYYY"];function gJ(n){return fJ.test(n)}function yJ(n){return mJ.test(n)}function xJ(n,e,t){const r=bJ(n,e,t);if(console.warn(r),pJ.includes(n))throw new RangeError(r)}function bJ(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vJ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wJ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_J=/^'([^]*?)'?$/,TJ=/''/g,NJ=/[a-zA-Z]/;function jD(n,e,t){var g,p,b,w,_,N,E,j;const r=Oc(),s=(t==null?void 0:t.locale)??r.locale??K3,i=(t==null?void 0:t.firstWeekContainsDate)??((p=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((w=(b=r.locale)==null?void 0:b.options)==null?void 0:w.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((N=(_=t==null?void 0:t.locale)==null?void 0:_.options)==null?void 0:N.weekStartsOn)??r.weekStartsOn??((j=(E=r.locale)==null?void 0:E.options)==null?void 0:j.weekStartsOn)??0,d=ze(n,t==null?void 0:t.in);if(!jd(d))throw new RangeError("Invalid time value");let h=e.match(wJ).map(P=>{const A=P[0];if(A==="p"||A==="P"){const M=D1[A];return M(P,s.formatLong)}return P}).join("").match(vJ).map(P=>{if(P==="''")return{isToken:!1,value:"'"};const A=P[0];if(A==="'")return{isToken:!1,value:EJ(P)};if(TD[A])return{isToken:!0,value:P};
vendor: 26,817 bytes, line 4348
4348if(A.match(NJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:P}});s.localize.preprocessor&&(h=s.localize.preprocessor(d,h));const m={firstWeekContainsDate:i,weekStartsOn:l,locale:s};return h.map(P=>{if(!P.isToken)return P.value;const A=P.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&yJ(A)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&gJ(A))&&xJ(A,e,String(n));const M=TD[A[0]];return M(d,A,s.localize,m)}).join("")}function EJ(n){const e=n.match(_J);return e?e[1].replace(TJ,"'"):n}function AD(n,e){return ze(n,e==null?void 0:e.in).getDate()}function SJ(n,e){return ze(n,e==null?void 0:e.in).getDay()}function jJ(n,e){const t=ze(n,e==null?void 0:e.in),r=t.getFullYear(),s=t.getMonth(),i=Vt(t,0);return i.setFullYear(r,s+1,0),i.setHours(0,0,0,0),i.getDate()}function AJ(){return Object.assign({},Oc())}function gr(n,e){return ze(n,e==null?void 0:e.in).getHours()}function CJ(n,e){const t=ze(n,e==null?void 0:e.in).getDay();return t===0?7:t}function yr(n,e){return ze(n,e==null?void 0:e.in).getMinutes()}function Hr(n,e){return ze(n,e==null?void 0:e.in).getMonth()}function Uo(n){return ze(n).getSeconds()}function k1(n){return+ze(n)}function ft(n,e){return ze(n,e==null?void 0:e.in).getFullYear()}function wi(n,e){return+ze(n)>+ze(e)}function La(n,e){return+ze(n)<+ze(e)}function DJ(n,e){return+ze(n)==+ze(e)}function kJ(n,e){const t=IJ(e)?new e(0):Vt(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function IJ(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const RJ=10;class X3{constructor(){Me(this,"subPriority",0)}validate(e,t){return!0}}class MJ extends X3{constructor(e,t,r,s,i){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=s,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}}class PJ extends X3{constructor(t,r){super();Me(this,"priority",RJ);Me(this,"subPriority",-1);this.context=t||(s=>Vt(r,s))}set(t,r){return r.timestampIsSet?t:Vt(t,kJ(t,this.context))}}class Ct{run(e,t,r,s){const i=this.parse(e,t,r,s);return i?{setter:new MJ(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,r){return!0}}class OJ extends Ct{constructor(){super(...arguments);Me(this,"priority",140);Me(this,"incompatibleTokens",["R","u","t","T"])}parse(t,r,s){switch(r){case"G":case"GG":case"GGG":return s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"});case"GGGGG":return s.era(t,{width:"narrow"});case"GGGG":default:return s.era(t,{width:"wide"})||s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"})}}set(t,r,s){return r.era=s,t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}const An={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Ra={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Cn(n,e){return n&&{value:e(n.value),rest:n.rest}}function fn(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function Ma(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,s=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,l=t[5]?parseInt(t[5],10):0;return{value:r*(s*cx+i*lx+l*NX),rest:e.slice(t[0].length)}}function J3(n){return fn(An.anyDigitsSigned,n)}function vn(n,e){switch(n){case 1:return fn(An.singleDigit,e);case 2:return fn(An.twoDigits,e);case 3:return fn(An.threeDigits,e);case 4:return fn(An.fourDigits,e);default:return fn(new RegExp("^\\d{1,"+n+"}"),e)}}function fy(n,e){switch(n){case 1:return fn(An.singleDigitSigned,e);case 2:return fn(An.twoDigitsSigned,e);case 3:return fn(An.threeDigitsSigned,e);case 4:return fn(An.fourDigitsSigned,e);default:return fn(new RegExp("^-?\\d{1,"+n+"}"),e)}}function Q2(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Z3(n,e){const t=e>0,r=t?e:1-e;let s;if(r<=50)s=n||100;else{const i=r+50,l=Math.trunc(i/100)*100,d=n>=i%100;s=n+l-(d?100:0)}return t?s:1-s}function eP(n){return n%400===0||n%4===0&&n%100!==0}class LJ extends Ct{constructor(){super(...arguments);Me(this,"priority",130);Me(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,r,s){const i=l=>({year:l,isTwoDigitYear:r==="yy"});switch(r){case"y":return Cn(vn(4,t),i);case"yo":return Cn(s.ordinalNumber(t,{unit:"year"}),i);default:return Cn(vn(r.length,t),i)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,s){const i=t.getFullYear();if(s.isTwoDigitYear){const d=Z3(s.year,i);return t.setFullYear(d,0,1),t.setHours(0,0,0,0),t}const l=!("era"in r)||r.era===1?s.year:1-s.year;return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}}class VJ extends Ct{constructor(){super(...arguments);Me(this,"priority",130);Me(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,r,s){const i=l=>({year:l,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Cn(vn(4,t),i);case"Yo":return Cn(s.ordinalNumber(t,{unit:"year"}),i);default:return Cn(vn(r.length,t),i)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,s,i){const l=W2(t,i);if(s.isTwoDigitYear){const h=Z3(s.year,l);return t.setFullYear(h,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),ki(t,i)}const d=!("era"in r)||r.era===1?s.year:1-s.year;return t.setFullYear(d,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),ki(t,i)}}class FJ extends Ct{constructor(){super(...arguments);Me(this,"priority",130);Me(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,r){return fy(r==="R"?4:r.length,t)}set(t,r,s){const i=Vt(t,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),Ed(i)}}class BJ extends Ct{constructor(){super(...arguments);Me(this,"priority",130);Me(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,r){return fy(r==="u"?4:r.length,t)}set(t,r,s){return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}}class UJ extends Ct{constructor(){super(...arguments);Me(this,"priority",120);Me(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,s){switch(r){case"Q":case"QQ":return vn(r.length,t);case"Qo":return s.ordinalNumber(t,{unit:"quarter"});case"QQQ":return s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(t,{width:"wide",context:"formatting"})||s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=1&&r<=4}set(t,r,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}}class zJ extends Ct{constructor(){super(...arguments);Me(this,"priority",120);Me(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,s){switch(r){case"q":case"qq":return vn(r.length,t);case"qo":return s.ordinalNumber(t,{unit:"quarter"});case"qqq":return s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(t,{width:"wide",context:"standalone"})||s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=1&&r<=4}set(t,r,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}}class qJ extends Ct{constructor(){super(...arguments);Me(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Me(this,"priority",110)}parse(t,r,s){const i=l=>l-1;switch(r){case"M":return Cn(fn(An.month,t),i);case"MM":return Cn(vn(2,t),i);case"Mo":return Cn(s.ordinalNumber(t,{unit:"month"}),i);case"MMM":return s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(t,{width:"wide",context:"formatting"})||s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=11}set(t,r,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}class HJ extends Ct{constructor(){super(...arguments);Me(this,"priority",110);Me(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,r,s){const i=l=>l-1;switch(r){case"L":return Cn(fn(An.month,t),i);case"LL":return Cn(vn(2,t),i);case"Lo":return Cn(s.ordinalNumber(t,{unit:"month"}),i);case"LLL":return s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(t,{width:"wide",context:"standalone"})||s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=11}set(t,r,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}function YJ(n,e,t){const r=ze(n,t==null?void 0:t.in),s=W3(r,t)-e;return r.setDate(r.getDate()-s*7),ze(r,t==null?void 0:t.in)}class GJ extends Ct{constructor(){super(...arguments);Me(this,"priority",100);Me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,r,s){switch(r){case"w":return fn(An.week,t);case"wo":return s.ordinalNumber(t,{unit:"week"});default:return vn(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,s,i){return ki(YJ(t,s,i),i)}}function $J(n,e,t){const r=ze(n,t==null?void 0:t.in),s=K2(r,t)-e;return r.setDate(r.getDate()-s*7),r}class KJ extends Ct{constructor(){super(...arguments);Me(this,"priority",100);Me(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,r,s){switch(r){case"I":return fn(An.week,t);case"Io":return s.ordinalNumber(t,{unit:"week"});default:return vn(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,s){return Ed($J(t,s))}}const WJ=[31,28,31,30,31,30,31,31,30,31,30,31],QJ=[31,29,31,30,31,30,31,31,30,31,30,31];class XJ extends Ct{constructor(){super(...arguments);Me(this,"priority",90);Me(this,"subPriority",1);Me(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,r,s){switch(r){case"d":return fn(An.date,t);case"do":return s.ordinalNumber(t,{unit:"date"});default:return vn(r.length,t)}}validate(t,r){const s=t.getFullYear(),i=eP(s),l=t.getMonth();return i?r>=1&&r<=QJ[l]:r>=1&&r<=WJ[l]}set(t,r,s){return t.setDate(s),t.setHours(0,0,0,0),t}}class JJ extends Ct{constructor(){super(...arguments);Me(this,"priority",90);Me(this,"subpriority",1);Me(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,r,s){switch(r){case"D":case"DD":return fn(An.dayOfYear,t);case"Do":return s.ordinalNumber(t,{unit:"date"});default:return vn(r.length,t)}}validate(t,r){const s=t.getFullYear();return eP(s)?r>=1&&r<=366:r>=1&&r<=365}set(t,r,s){return t.setMonth(0,s),t.setHours(0,0,0,0),t}}function X2(n,e,t){var p,b,w,_;const r=Oc(),s=(t==null?void 0:t.weekStartsOn)??((b=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??r.weekStartsOn??((_=(w=r.locale)==null?void 0:w.options)==null?void 0:_.weekStartsOn)??0,i=ze(n,t==null?void 0:t.in),l=i.getDay(),h=(e%7+7)%7,m=7-s,g=e<0||e>6?e-(l+m)%7:(h+m)%7-(l+m)%7;return na(i,g,t)}class ZJ extends Ct{constructor(){super(...arguments);Me(this,"priority",90);Me(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,r,s){switch(r){case"E":case"EE":case"EEE":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,s,i){return t=X2(t,s,i),t.setHours(0,0,0,0),t}}class eZ extends Ct{constructor(){super(...arguments);Me(this,"priority",90);Me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,r,s,i){const l=d=>{const h=Math.floor((d-1)/7)*7;return(d+i.weekStartsOn+6)%7+h};switch(r){case"e":case"ee":return Cn(vn(r.length,t),l);case"eo":return Cn(s.ordinalNumber(t,{unit:"day"}),l);case"eee":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeeee":return s.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,s,i){return t=X2(t,s,i),t.setHours(0,0,0,0),t}}class tZ extends Ct{constructor(){super(...arguments);Me(this,"priority",90);Me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,r,s,i){const l=d=>{const h=Math.floor((d-1)/7)*7;return(d+i.weekStartsOn+6)%7+h};switch(r){case"c":case"cc":return Cn(vn(r.length,t),l);case"co":return Cn(s.ordinalNumber(t,{unit:"day"}),l);case"ccc":return s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"ccccc":return s.day(t,{width:"narrow",context:"standalone"});case"cccccc":return s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(t,{width:"wide",context:"standalone"})||s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=6}set(t,r,s,i){return t=X2(t,s,i),t.setHours(0,0,0,0),t}}function nZ(n,e,t){const r=ze(n,t==null?void 0:t.in),s=CJ(r,t),i=e-s;return na(r,i,t)}class rZ extends Ct{constructor(){super(...arguments);Me(this,"priority",90);Me(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,r,s){const i=l=>l===0?7:l;switch(r){case"i":case"ii":return vn(r.length,t);case"io":return s.ordinalNumber(t,{unit:"day"});case"iii":return Cn(s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return Cn(s.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Cn(s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Cn(s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),i)}}validate(t,r){return r>=1&&r<=7}set(t,r,s){return t=nZ(t,s),t.setHours(0,0,0,0),t}}class sZ extends Ct{constructor(){super(...arguments);Me(this,"priority",80);Me(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,r,s){switch(r){case"a":case"aa":case"aaa":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,s){return t.setHours(Q2(s),0,0,0),t}}class aZ extends Ct{constructor(){super(...arguments);Me(this,"priority",80);Me(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,r,s){switch(r){case"b":case"bb":case"bbb":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,s){return t.setHours(Q2(s),0,0,0),t}}class iZ extends Ct{constructor(){super(...arguments);Me(this,"priority",80);Me(this,"incompatibleTokens",["a","b","t","T"])}parse(t,r,s){switch(r){case"B":case"BB":case"BBB":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,s){return t.setHours(Q2(s),0,0,0),t}}class oZ extends Ct{constructor(){super(...arguments);Me(this,"priority",70);Me(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,r,s){switch(r){case"h":return fn(An.hour12h,t);case"ho":return s.ordinalNumber(t,{unit:"hour"});default:return vn(r.length,t)}}validate(t,r){return r>=1&&r<=12}set(t,r,s){const i=t.getHours()>=12;return i&&s<12?t.setHours(s+12,0,0,0):!i&&s===12?t.setHours(0,0,0,0):t.setHours(s,0,0,0),t}}class lZ extends Ct{constructor(){super(...arguments);Me(this,"priority",70);Me(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,r,s){switch(r){case"H":return fn(An.hour23h,t);case"Ho":return s.ordinalNumber(t,{unit:"hour"});default:return vn(r.length,t)}}validate(t,r){return r>=0&&r<=23}set(t,r,s){return t.setHours(s,0,0,0),t}}class cZ extends Ct{constructor(){super(...arguments);Me(this,"priority",70);Me(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,r,s){switch(r){case"K":return fn(An.hour11h,t);case"Ko":return s.ordinalNumber(t,{unit:"hour"});default:return vn(r.length,t)}}validate(t,r){return r>=0&&r<=11}set(t,r,s){return t.getHours()>=12&&s<12?t.setHours(s+12,0,0,0):t.setHours(s,0,0,0),t}}class uZ extends Ct{constructor(){super(...arguments);Me(this,"priority",70);Me(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,r,s){switch(r){case"k":return fn(An.hour24h,t);case"ko":return s.ordinalNumber(t,{unit:"hour"});default:return vn(r.length,t)}}validate(t,r){return r>=1&&r<=24}set(t,r,s){const i=s<=24?s%24:s;return t.setHours(i,0,0,0),t}}class dZ extends Ct{constructor(){super(...arguments);Me(this,"priority",60);Me(this,"incompatibleTokens",["t","T"])}parse(t,r,s){switch(r){case"m":return fn(An.minute,t);case"mo":return s.ordinalNumber(t,{unit:"minute"});default:return vn(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,s){return t.setMinutes(s,0,0),t}}class hZ extends Ct{constructor(){super(...arguments);Me(this,"priority",50);Me(this,"incompatibleTokens",["t","T"])}parse(t,r,s){switch(r){case"s":return fn(An.second,t);case"so":return s.ordinalNumber(t,{unit:"second"});default:return vn(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,s){return t.setSeconds(s,0),t}}class fZ extends Ct{constructor(){super(...arguments);Me(this,"priority",30);Me(this,"incompatibleTokens",["t","T"])}parse(t,r){const s=i=>Math.trunc(i*Math.pow(10,-r.length+3));return Cn(vn(r.length,t),s)}set(t,r,s){return t.setMilliseconds(s),t}}class mZ extends Ct{constructor(){super(...arguments);Me(this,"priority",10);Me(this,"incompatibleTokens",["t","T","x"])}parse(t,r){switch(r){case"X":return Ma(Ra.basicOptionalMinutes,t);case"XX":return Ma(Ra.basic,t);case"XXXX":return Ma(Ra.basicOptionalSeconds,t);case"XXXXX":return Ma(Ra.extendedOptionalSeconds,t);case"XXX":default:return Ma(Ra.extended,t)}}set(t,r,s){return r.timestampIsSet?t:Vt(t,t.getTime()-ly(t)-s)}}class pZ extends Ct{constructor(){super(...arguments);Me(this,"priority",10);Me(this,"incompatibleTokens",["t","T","X"])}parse(t,r){switch(r){case"x":return Ma(Ra.basicOptionalMinutes,t);case"xx":return Ma(Ra.basic,t);case"xxxx":return Ma(Ra.basicOptionalSeconds,t);case"xxxxx":return Ma(Ra.extendedOptionalSeconds,t);case"xxx":default:return Ma(Ra.extended,t)}}set(t,r,s){return r.timestampIsSet?t:Vt(t,t.getTime()-ly(t)-s)}}class gZ extends Ct{constructor(){super(...arguments);Me(this,"priority",40);Me(this,"incompatibleTokens","*")}parse(t){return J3(t)}set(t,r,s){return[Vt(t,s*1e3),{timestampIsSet:!0}]}}class yZ extends Ct{constructor(){super(...arguments);Me(this,"priority",20);Me(this,"incompatibleTokens","*")}parse(t){return J3(t)}set(t,r,s){return[Vt(t,s),{timestampIsSet:!0}]}}const xZ={G:new OJ,y:new LJ,Y:new VJ,R:new FJ,u:new BJ,Q:new UJ,q:new zJ,M:new qJ,L:new HJ,w:new GJ,I:new KJ,d:new XJ,D:new JJ,E:new ZJ,e:new eZ,c:new tZ,i:new rZ,a:new sZ,b:new aZ,B:new iZ,h:new oZ,H:new lZ,K:new cZ,k:new uZ,m:new dZ,s:new hZ,S:new fZ,X:new mZ,x:new pZ,t:new gZ,T:new yZ},bZ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vZ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wZ=/^'([^]*?)'?$/,_Z=/''/g,TZ=/\S/,NZ=/[a-zA-Z]/;function EZ(n,e,t,r){var E,j,P,A,M,O,q,L;const s=()=>Vt((r==null?void 0:r.in)||t,NaN),i=AJ(),l=(r==null?void 0:r.locale)??i.locale??K3,d=(r==null?void 0:r.firstWeekContainsDate)??((j=(E=r==null?void 0:r.locale)==null?void 0:E.options)==null?void 0:j.firstWeekContainsDate)??i.firstWeekContainsDate??((A=(P=i.locale)==null?void 0:P.options)==null?void 0:A.firstWeekContainsDate)??1,h=(r==null?void 0:r.weekStartsOn)??((O=(M=r==null?void 0:r.locale)==null?void 0:M.options)==null?void 0:O.weekStartsOn)??i.weekStartsOn??((L=(q=i.locale)==null?void 0:q.options)==null?void 0:L.weekStartsOn)??0;if(!e)return n?s():ze(t,r==null?void 0:r.in);const m={firstWeekContainsDate:d,weekStartsOn:h,locale:l},g=[new PJ(r==null?void 0:r.in,t)],p=e.match(vZ).map(k=>{const I=k[0];if(I in D1){const R=D1[I];return R(k,l.formatLong)}return k}).join("").match(bZ),b=[];for(let k of p){const I=k[0],R=xZ[I];if(R){const{incompatibleTokens:F}=R;if(Array.isArray(F)){const V=b.find(se=>F.includes(se.token)||se.token===I);if(V)throw new RangeError(`The format string mustn't contain \`${V.fullToken}\` and \`${k}\` at the same time`)}else if(R.incompatibleTokens==="*"&&b.length>0)throw new RangeError(`The format string mustn't contain \`${k}\` and any other token at the same time`);b.push({token:I,fullToken:k});const B=R.run(n,k,l.match,m);if(!B)return s();g.push(B.setter),n=B.rest}else{if(I.match(NZ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(k==="''"?k="'":I==="'"&&(k=SZ(k)),n.indexOf(k)===0)n=n.slice(k.length);else return s()}}if(n.length>0&&TZ.test(n))return s();const w=g.map(k=>k.priority).sort((k,I)=>I-k).filter((k,I,R)=>R.indexOf(k)===I).map(k=>g.filter(I=>I.priority===k).sort((I,R)=>R.subPriority-I.subPriority)).map(k=>k[0]);let _=ze(t,r==null?void 0:r.in);if(isNaN(+_))return s();const N={};for(const k of w){if(!k.validate(_,m))return s();const I=k.set(_,N,m);Array.isArray(I)?(_=I[0],Object.assign(N,I[1])):_=I}return _}function SZ(n){return n.match(wZ)[1].replace(_Z,"'")}function jZ(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e);return r.getFullYear()===s.getFullYear()&&r.getMonth()===s.getMonth()}function AZ(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e);return+C1(r)==+C1(s)}function CZ(n,e,t){const[r,s]=Li(t==null?void 0:t.in,n,e);return r.getFullYear()===s.getFullYear()}function fm(n,e,t){const r=+ze(n,t==null?void 0:t.in),[s,i]=[+ze(e.start,t==null?void 0:t.in),+ze(e.end,t==null?void 0:t.in)].sort((l,d)=>l-d);return r>=s&&r<=i}function DZ(n,e,t){return na(n,-1,t)}function kZ(n,e){const t=()=>Vt(e==null?void 0:e.in,NaN),s=PZ(n);let i;if(s.date){const m=OZ(s.date,2);i=LZ(m.restDateString,m.year)}if(!i||isNaN(+i))return t();const l=+i;let d=0,h;if(s.time&&(d=VZ(s.time),isNaN(d)))return t();if(s.timezone){if(h=FZ(s.timezone),isNaN(h))return t()}else{const m=new Date(l+d),g=ze(0,e==null?void 0:e.in);return g.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),g.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),g}return ze(l+d+h,e==null?void 0:e.in)}const kg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},IZ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,RZ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,MZ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function PZ(n){const e={},t=n.split(kg.dateTimeDelimiter);let r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],kg.timeZoneDelimiter.test(e.date)&&(e.date=n.split(kg.timeZoneDelimiter)[0],r=n.substr(e.date.length,n.length))),r){const s=kg.timezone.exec(r);s?(e.time=r.replace(s[1],""),e.timezone=s[1]):e.time=r}return e}function OZ(n,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=n.match(t);if(!r)return{year:NaN,restDateString:""};const s=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?s:i*100,restDateString:n.slice((r[1]||r[2]).length)}}function LZ(n,e){if(e===null)return new Date(NaN);const t=n.match(IZ);if(!t)return new Date(NaN);const r=!!t[4],s=mf(t[1]),i=mf(t[2])-1,l=mf(t[3]),d=mf(t[4]),h=mf(t[5])-1;if(r)return HZ(e,d,h)?BZ(e,d,h):new Date(NaN);{const m=new Date(0);return!zZ(e,i,l)||!qZ(e,s)?new Date(NaN):(m.setUTCFullYear(e,i,Math.max(s,l)),m)}}function mf(n){return n?parseInt(n):1}function VZ(n){const e=n.match(RZ);if(!e)return NaN;const t=nw(e[1]),r=nw(e[2]),s=nw(e[3]);return YZ(t,r,s)?t*cx+r*lx+s*1e3:NaN}function nw(n){return n&&parseFloat(n.replace(",","."))||0}function FZ(n){if(n==="Z")return 0;const e=n.match(MZ);if(!e)return 0;const t=e[1]==="+"?-1:1,r=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return GZ(r,s)?t*(r*cx+s*lx):NaN}function BZ(n,e,t){const r=new Date(0);r.setUTCFullYear(n,0,4);const s=r.getUTCDay()||7,i=(e-1)*7+t+1-s;return r.setUTCDate(r.getUTCDate()+i),r}const UZ=[31,null,31,30,31,30,31,31,30,31,30,31];
4348function tP(n){return n%400===0||n%4===0&&n%100!==0}function zZ(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(UZ[e]||(tP(n)?29:28))}function qZ(n,e){return e>=1&&e<=(tP(n)?366:365)}function HZ(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function YZ(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function GZ(n,e){return e>=0&&e<=59}function cs(n,e,t){const r=ze(n,t==null?void 0:t.in),s=r.getFullYear(),i=r.getDate(),l=Vt(n,0);l.setFullYear(s,e,15),l.setHours(0,0,0,0);const d=jJ(l);return r.setMonth(e,Math.min(i,d)),r}function v0(n,e,t){const r=ze(n,t==null?void 0:t.in);return r.setHours(e),r}function w0(n,e,t){const r=ze(n,t==null?void 0:t.in);return r.setMinutes(e),r}function Lu(n,e,t){const r=ze(n,t==null?void 0:t.in),s=Math.trunc(r.getMonth()/3)+1,i=e-s;return cs(r,r.getMonth()+i*3)}function _0(n,e,t){const r=ze(n,t==null?void 0:t.in);return r.setSeconds(e),r}function Ca(n,e,t){const r=ze(n,t==null?void 0:t.in);return isNaN(+r)?Vt(n,NaN):(r.setFullYear(e),r)}function hc(n,e,t){return ia(n,-e,t)}function nP(n,e,t){return $2(n,-1,t)}function CD(n,e,t){return cy(n,-1,t)}function tl(n,e,t){return ra(n,-e,t)}function dx(){return typeof window<"u"}function Jd(n){return rP(n)?(n.nodeName||"").toLowerCase():"#document"}function Jr(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Vi(n){var e;return(e=(rP(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function rP(n){return dx()?n instanceof Node||n instanceof Jr(n).Node:!1}function Kr(n){return dx()?n instanceof Element||n instanceof Jr(n).Element:!1}function ul(n){return dx()?n instanceof HTMLElement||n instanceof Jr(n).HTMLElement:!1}function DD(n){return!dx()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Jr(n).ShadowRoot}function hx(n){const{overflow:e,overflowX:t,overflowY:r,display:s}=oa(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&s!=="inline"&&s!=="contents"}function $Z(n){return/^(table|td|th)$/.test(Jd(n))}function fx(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const KZ=/transform|translate|scale|rotate|perspective|filter/,WZ=/paint|layout|strict|content/,Ul=n=>!!n&&n!=="none";let rw;function J2(n){const e=Kr(n)?oa(n):n;return Ul(e.transform)||Ul(e.translate)||Ul(e.scale)||Ul(e.rotate)||Ul(e.perspective)||!Z2()&&(Ul(e.backdropFilter)||Ul(e.filter))||KZ.test(e.willChange||"")||WZ.test(e.contain||"")}function QZ(n){let e=jc(n);for(;ul(e)&&!mm(e);){if(J2(e))return e;if(fx(e))return null;e=jc(e)}return null}function Z2(){return rw==null&&(rw=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rw}function mm(n){return/^(html|body|#document)$/.test(Jd(n))}function oa(n){return Jr(n).getComputedStyle(n)}function mx(n){return Kr(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function jc(n){if(Jd(n)==="html")return n;const e=n.assignedSlot||n.parentNode||DD(n)&&n.host||Vi(n);return DD(e)?e.host:e}function sP(n){const e=jc(n);return mm(e)?(n.ownerDocument||n).body:ul(e)&&hx(e)?e:sP(e)}function pm(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const s=sP(n),i=s===((r=n.ownerDocument)==null?void 0:r.body),l=Jr(s);if(i){const d=I1(l);return e.concat(l,l.visualViewport||[],hx(s)?s:[],d&&t?pm(d):[])}else return e.concat(s,pm(s,[],t))}function I1(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}const Ad=Math.min,fc=Math.max,my=Math.round,Ig=Math.floor,_i=n=>({x:n,y:n}),XZ={left:"right",right:"left",bottom:"top",top:"bottom"};function JZ(n,e,t){return fc(n,Ad(e,t))}function px(n,e){return typeof n=="function"?n(e):n}function Cd(n){return n.split("-")[0]}function zm(n){return n.split("-")[1]}function ZZ(n){return n==="x"?"y":"x"}function eT(n){return n==="y"?"height":"width"}function nc(n){const e=n[0];return e==="t"||e==="b"?"y":"x"}function tT(n){return ZZ(nc(n))}function eee(n,e,t){t===void 0&&(t=!1);const r=zm(n),s=tT(n),i=eT(s);let l=s==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(l=py(l)),[l,py(l)]}function tee(n){const e=py(n);return[R1(n),e,R1(e)]}function R1(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const kD=["left","right"],ID=["right","left"],nee=["top","bottom"],ree=["bottom","top"];function see(n,e,t){switch(n){case"top":case"bottom":return t?e?ID:kD:e?kD:ID;case"left":case"right":return e?nee:ree;default:return[]}}function aee(n,e,t,r){const s=zm(n);let i=see(Cd(n),t==="start",r);return s&&(i=i.map(l=>l+"-"+s),e&&(i=i.concat(i.map(R1)))),i}function py(n){const e=Cd(n);return XZ[e]+n.slice(e.length)}function iee(n){var e,t,r,s;return{top:(e=n.top)!=null?e:0,right:(t=n.right)!=null?t:0,bottom:(r=n.bottom)!=null?r:0,left:(s=n.left)!=null?s:0}}function aP(n){return typeof n!="number"?iee(n):{top:n,right:n,bottom:n,left:n}}function gy(n){const{x:e,y:t,width:r,height:s}=n;return{width:r,height:s,top:t,left:e,right:e+r,bottom:t+s,x:e,y:t}}var oee=typeof document<"u",lee=function(){},yy=oee?D.useLayoutEffect:lee;const cee={...c5},uee=cee.useInsertionEffect,dee=uee||(n=>n());function hee(n){const e=D.useRef(()=>{});return dee(()=>{e.current=n}),D.useCallback(function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function RD(n,e,t){let{reference:r,floating:s}=n;const i=nc(e),l=tT(e),d=eT(l),h=Cd(e),m=i==="y",g=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,b=r[d]/2-s[d]/2;let w;switch(h){case"top":w={x:g,y:r.y-s.height};break;case"bottom":w={x:g,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:p};break;case"left":w={x:r.x-s.width,y:p};break;default:w={x:r.x,y:r.y}}const _=zm(e);return _&&(w[l]+=b*(_==="end"?1:-1)*(t&&m?-1:1)),w}async function fee(n,e){var t;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:l,elements:d,strategy:h}=n,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:b=!1,padding:w=0}=px(e,n),_=aP(w),E=d[b?p==="floating"?"reference":"floating":p],j=gy(await i.getClippingRect
vendor: 4,191 bytes, line 4348
4348({element:(t=await(i.isElement==null?void 0:i.isElement(E)))==null||t?E:E.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(d.floating)),boundary:m,rootBoundary:g,strategy:h})),P=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d.floating)),M=await(i.isElement==null?void 0:i.isElement(A))&&await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1},O=gy(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:P,offsetParent:A,strategy:h}):P);return{top:(j.top-O.top+_.top)/M.y,bottom:(O.bottom-j.bottom+_.bottom)/M.y,left:(j.left-O.left+_.left)/M.x,right:(O.right-j.right+_.right)/M.x}}const mee=50,pee=async(n,e,t)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:l}=t,d=l.detectOverflow?l:{...l,detectOverflow:fee},h=await(l.isRTL==null?void 0:l.isRTL(e));let m=await l.getElementRects({reference:n,floating:e,strategy:s}),{x:g,y:p}=RD(m,r,h),b=r,w=0;const _={};for(let N=0;N<i.length;N++){const E=i[N];if(!E)continue;const{name:j,fn:P}=E,{x:A,y:M,data:O,reset:q}=await P({x:g,y:p,initialPlacement:r,placement:b,strategy:s,middlewareData:_,rects:m,platform:d,elements:{reference:n,floating:e}});g=A??g,p=M??p,_[j]={..._[j],...O},q&&w<mee&&(w++,typeof q=="object"&&(q.placement&&(b=q.placement),q.rects&&(m=q.rects===!0?await l.getElementRects({reference:n,floating:e,strategy:s}):q.rects),{x:g,y:p}=RD(m,b,h)),N=-1)}return{x:g,y:p,placement:b,strategy:s,middlewareData:_}},gee=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:s,rects:i,platform:l,elements:d,middlewareData:h}=e,{element:m,padding:g=0}=px(n,e)||{};if(m==null)return{};const p=aP(g),b={x:t,y:r},w=tT(s),_=eT(w),N=await l.getDimensions(m),E=w==="y",j=E?"top":"left",P=E?"bottom":"right",A=E?"clientHeight":"clientWidth",M=i.reference[_]+i.reference[w]-b[w]-i.floating[_],O=b[w]-i.reference[w],q=await(l.getOffsetParent==null?void 0:l.getOffsetParent(m));let L=q?q[A]:0;(!L||!await(l.isElement==null?void 0:l.isElement(q)))&&(L=d.floating[A]||i.floating[_]);const k=M/2-O/2,I=L/2-N[_]/2-1,R=Ad(p[j],I),F=Ad(p[P],I),B=L-N[_]-F,V=L/2-N[_]/2+k,se=JZ(R,V,B),ye=!h.arrow&&zm(s)!=null&&V!==se&&i.reference[_]/2-(V<R?R:F)-N[_]/2<0,W=ye?V<R?V-R:V-B:0;return{[w]:b[w]+W,data:{[w]:se,centerOffset:V-se-W,...ye&&{alignmentOffset:W}},reset:ye}}}),yee=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:s,middlewareData:i,rects:l,initialPlacement:d,platform:h,elements:m}=e,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:N=!0,...E}=px(n,e);if((t=i.arrow)!=null&&t.alignmentOffset)return{};const j=Cd(s),P=nc(d),A=Cd(d)===d,M=await(h.isRTL==null?void 0:h.isRTL(m.floating)),O=b||(A||!N?[py(d)]:tee(d)),q=_!=="none";!b&&q&&O.push(...aee(d,N,_,M));const L=[d,...O],k=await h.detectOverflow(e,E),I=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(g&&I.push(k[j]),p){const se=eee(s,l,M);I.push(k[se[0]],k[se[1]])}if(R=[...R,{placement:s,overflows:I}],!I.every(se=>se<=0)){var F,B;const se=(((F=i.flip)==null?void 0:F.index)||0)+1,ye=L[se];if(ye&&(!(p==="alignment"?P!==nc(ye):!1)||R.every(X=>nc(X.placement)===P?X.overflows[0]>0:!0)))return{data:{index:se,overflows:R},reset:{placement:ye}};let W=(B=R.filter($=>$.overflows[0]<=0).sort(($,X)=>$.overflows[1]-X.overflows[1])[0])==null?void 0:B.placement;if(!W)switch(w){case"bestFit":{var V;const $=(V=R.filter(X=>{if(q){const be=nc(X.placement);return be===P||be==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(be=>be>0).reduce((be,Oe)=>be+Oe,0)]).sort((X,be)=>X[1]-be[1])[0])==null?void 0:V[0];$&&(W=$);break}case"initialPlacement":W=d;break}if(s!==W)return{reset:{placement:W}}}return{}}}},xee=new Set(["left","top"]);async function bee(n,e){const{placement:t,platform:r,elements:s}=n,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Cd(t),d=zm(t),h=nc(t)==="y",m=xee.has(l)?-1:1,g=i&&h?-1:1,p=px(e,n);let{mainAxis:b,crossAxis:w,alignmentAxis:_}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}
vendor: 1,059 bytes, line 4348
4348:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return d&&typeof _=="number"&&(w=d==="end"?_*-1:_),h?{x:w*g,y:b*m}:{x:b*m,y:w*g}}const vee=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:s,y:i,placement:l,middlewareData:d}=e,h=await bee(e,n);return l===((t=d.offset)==null?void 0:t.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:s+h.x,y:i+h.y,data:{...h,placement:l}}}}};function iP(n){const e=oa(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=ul(n),i=s?n.offsetWidth:t,l=s?n.offsetHeight:r,d=my(t)!==i||my(r)!==l;return d&&(t=i,r=l),{width:t,height:r,$:d}}function nT(n){return Kr(n)?n:n.contextElement}function Xu(n){const e=nT(n);if(!ul(e))return _i(1);const t=e.getBoundingClientRect(),{width:r,height:s,$:i}=iP(e);let l=(i?my(t.width):t.width)/r,d=(i?my(t.height):t.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}const wee=_i(0);function oP(n){const e=Jr(n);return!Z2()||!e.visualViewport?wee:{x:e.visualVie
4348wport.offsetLeft,y:e.visualViewport.offsetTop}}function _ee(n,e,t){return e===void 0&&(e=!1),!!t&&e&&t===Jr(n)}function Ac(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const s=n.getBoundingClientRect(),i=nT(n);let l=_i(1);e&&(r?Kr(r)&&(l=Xu(r)):l=Xu(n));const d=_ee(i,t,r)?oP(i):_i(0);let h=(s.left+d.x)/l.x,m=(s.top+d.y)/l.y,g=s.width/l.x,p=s.height/l.y;if(i&&r){const b=Jr(i),w=Kr(r)?Jr(r):r;let _=b,N=I1(_);for(;N&&w!==_;){const E=Xu(N),j=N.getBoundingClientRect(),P=oa(N),A=j.left+(N.clientLeft+parseFloat(P.paddingLeft))*E.x,M=j.top+(N.clientTop+parseFloat(P.paddingTop))*E.y;h*=E.x,m*=E.y,g*=E.x,p*=E.y,h+=A,m+=M,_=Jr(N),N=I1(_)}}return gy({width:g,height:p,x:h,y:m})}function gx(n,e){const t=mx(n).scrollLeft;return e?e.left+t:Ac(Vi(n)).left+t}function lP(n,e){const t=n.getBoundingClientRect(),r=t.left+e.scrollLeft-gx(n,t),s=t.top+e.scrollTop;return{x:r,y:s}}function Tee(n){let{elements:e,rect:t,offsetParent:r,strategy:s}=n;const i=s==="fixed",l=Vi(r),d=e?fx(e.floating):!1;if(r===l||d&&i)return t;let h={scrollLeft:0,scrollTop:0},m=_i(1);const g=_i(0),p=ul(r);if((p||!i)&&((Jd(r)!=="body"||hx(l))&&(h=mx(r)),p)){const w=Ac(r);m=Xu(r),g.x=w.x+r.clientLeft,g.y=w.y+r.clientTop}const b=l&&!p&&!i?lP(l,h):_i(0);return{width:t.width*m.x,height:t.height*m.y,x:t.x*m.x-h.scrollLeft*m.x+g.x+b.x,y:t.y*m.y-h.scrollTop*m.y+g.y+b.y}}function Nee(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function Eee(n){const e=mx(n),t=n.ownerDocument.body,r=fc(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),s=fc(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+gx(n);const l=-e.scrollTop;return oa(t).direction==="rtl"&&(i+=fc(n.clientWidth,t.clientWidth)-r),{width:r,height:s,x:i,y:l}}const See=25;function jee(n,e,t){t===void 0&&(t="viewport");const r=t==="layoutViewport",s=Jr(n),i=Vi(n),l=s.visualViewport;let d=i.clientWidth,h=i.clientHeight,m=0,g=0;if(l){const b=!Z2()||e==="fixed";r?b||(m=-l.offsetLeft,g=-l.offsetTop):(d=l.width,h=l.height,b&&(m=l.offsetLeft,g=l.offsetTop))}if(gx(i)<=0){const b=i.ownerDocument,w=b.body,_=getComputedStyle(w),N=b.compatMode==="CSS1Compat"&&parseFloat(_.marginLeft)+parseFloat(_.marginRight)||0,E=Math.abs(i.clientWidth-w.clientWidth-N),j=getComputedStyle(i).scrollbarGutter==="stable both-edges"?E/2:E;j<=See&&(d-=j)}return{width:d,height:h,x:m,y:g}}function Aee(n,e){const t=Ac(n,!0,e==="fixed"),r=t.top+n.clientTop,s=t.left+n.clientLeft,i=Xu(n),l=n.clientWidth*i.x,d=n.clientHeight*i.y,h=s*i.x,m=r*i.y;return{width:l,height:d,x:h,y:m}}function MD(n,e,t){let r;if(e==="viewport"||e==="layoutViewport")r=jee(n,t,e);else if(e==="document")r=Eee(Vi(n));else if(Kr(e))r=Aee(e,t);else{const s=oP(n);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return gy(r)}function Cee(n,e){const t=e.get(n);if(t)return t;let r=pm(n,[],!1).filter(d=>Kr(d)&&Jd(d)!=="body"),s=null;const i=oa(n).position==="fixed";let l=i?jc(n):n;for(;Kr(l)&&!mm(l);){const d=oa(l),h=J2(l),m=s?s.position:i?"fixed":"";!h&&(m==="fixed"||m==="absolute"&&d.position==="static")?r=r.filter(p=>p!==l):s=d,l=jc(l)}return e.set(n,r),r}function Dee(n){let{element:e,boundary:t,rootBoundary:r,strategy:s}=n;const l=[...t==="clippingAncestors"?fx(e)?[]:Cee(e,this._c):[].concat(t),r],d=MD(e,l[0],s);let h=d.top,m=d.right,g=d.bottom,p=d.left;for(let b=1;b<l.length;b++){const w=MD(e,l[b],s);h=fc(w.top,h),m=Ad(w.right,m),g=Ad(w.bottom,g),p=fc(w.left,p)}return{width:m-p,height:g-h,x:p,y:h}}function kee(n){const{width:e,height:t}=iP(n);return{width:e,height:t}}function Iee(n,e,t){const r=ul(e),s=Vi(e),i=t==="fixed",l=Ac(n,!0,i,e);let d={scrollLeft:0,scrollTop:0};const h=_i(0);if((r||!i)&&((Jd(e)!=="body"||hx(s))&&(d=mx(e)),r)){const b=Ac(e,!0,i,e);h.x=b.x+e.clientLeft,h.y=b.y+e.clientTop}!r&&s&&(h.x=gx(s));const m=s&&!r&&!i?lP(s,d):_i(0),g=l.left+d.scrollLeft-h.x-m.x,p=l.top+d.scrollTop-h.y-m.y;return{x:g,y:p,width:l.width,height:l.height}}function sw(n){return oa(n).position==="static"}function PD(n,e){if(!ul(n)||oa(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Vi(n)===t&&(t=t.ownerDocument.body),t}function cP(n,e){const t=Jr(n);if(fx(n))return t;if(!ul(n)){let s=jc(n);for(;s&&!mm(s);
vendor: 4,436 bytes, line 4348
4348){if(Kr(s)&&!sw(s))return s;s=jc(s)}return t}let r=PD(n,e);for(;r&&$Z(r)&&sw(r);)r=PD(r,e);return r&&mm(r)&&sw(r)&&!J2(r)?t:r||QZ(n)||t}const Ree=async function(n){const e=this.getOffsetParent||cP,t=this.getDimensions,r=await t(n.floating);return{reference:Iee(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Mee(n){return oa(n).direction==="rtl"}const Pee={convertOffsetParentRelativeRectToViewportRelativeRect:Tee,getDocumentElement:Vi,getClippingRect:Dee,getOffsetParent:cP,getElementRects:Ree,getClientRects:Nee,getDimensions:kee,getScale:Xu,isElement:Kr,isRTL:Mee};function uP(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function Oee(n,e,t){let r=null,s;const i=Vi(n);function l(){var g;clearTimeout(s),(g=r)==null||g.disconnect(),r=null}function d(g,p){g===void 0&&(g=!1),p===void 0&&(p=1),l();const b=n.getBoundingClientRect(),{left:w,top:_,width:N,height:E}=b;if(g||e(),!N||!E)return;const j=Ig(_),P=Ig(i.clientWidth-(w+N)),A=Ig(i.clientHeight-(_+E)),M=Ig(w),q={rootMargin:-j+"px "+-P+"px "+-A+"px "+-M+"px",threshold:fc(0,Ad(1,p))||1};let L=!0;function k(I){const R=I[0].intersectionRatio;if(!uP(b,n.getBoundingClientRect()))return d();if(R!==p){if(!L)return d();R?d(!1,R):s=setTimeout(()=>{d(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(k,{...q,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,q)}r.observe(n)}const h=Jr(n),m=()=>d(t);return h.addEventListener("resize",m),d(!0),()=>{h.removeEventListener("resize",m),l()}}function Lee(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,m=nT(n),g=s||i?[...m?pm(m):[],...e?pm(e):[]]:[];g.forEach(j=>{s&&j.addEventListener("scroll",t),i&&j.addEventListener("resize",t)});const p=m&&d?Oee(m,t,i):null;let b=-1,w=null;l&&(w=new ResizeObserver(j=>{let[P]=j;P&&P.target===m&&w&&e&&(w.unobserve(e),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var A;(A=w)==null||A.observe(e)})),t()}),m&&!h&&w.observe(m),e&&w.observe(e));let _,N=h?Ac(n):null;h&&E();function E(){const j=Ac(n);N&&!uP(N,j)&&t(),N=j,_=requestAnimationFrame(E)}return t(),()=>{var j;g.forEach(P=>{s&&P.removeEventListener("scroll",t),i&&P.removeEventListener("resize",t)}),p==null||p(),(j=w)==null||j.disconnect(),w=null,h&&cancelAnimationFrame(_)}}const Vee=vee,Fee=yee,OD=gee,Bee=(n,e,t)=>{const r=new Map,s=t??{},i={...Pee,...s.platform,_c:r};return pee(n,e,{...s,platform:i})};var Uee=typeof document<"u",zee=function(){},T0=Uee?D.useLayoutEffect:zee;function xy(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,s;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!xy(n[r],e[r]))return!1;return!0}if(s=Object.keys(n),t=s.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=t;r--!==0;){const i=s[r];if(!(i==="_owner"&&n.$$typeof)&&!xy(n[i],e[i]))return!1}return!0}return n!==n&&e!==e}function dP(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function LD(n,e){const t=dP(n);return Math.round(e*t)/t}function aw(n){const e=D.useRef(n);return T0(()=>{e.current=n}),e}function qee(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:l}={},transform:d=!0,whileElementsMounted:h,open:m}=n,[g,p]=D.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[b,w]=D.useState(r);xy(b,r)||w(r);const[_,N]=D.useState(null),[E,j]=D.useState(null),P=D.useCallback(X=>{X!==q.current&&(q.current=X,N(X))},[]),A=D.useCallback(X=>{X!==L.current&&(L.current=X,j(X))},[]),M=i||_,O=l||E,q=D.useRef(null),L=D.useRef(null),k=D.useRef(g),I=h!=null,R=aw(h),F=aw(s),B=aw(m),V=D.useCallback(()=>{if(!q.current||!L.current)return;const X={placement:e,strategy:t,middleware:b};F.current&&(X.platform=F.current),Bee(q.current,L.current,X).then(be=>{const Oe={...be,isPositioned:B.current!==!1};se.current&&!xy(k.current,Oe)&&(k.current=Oe,C5.flushSync(()=>{p(Oe)}))})},[b,e,t,F,B]);T0(()=>{m===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(X=>({...X,isPositioned:!1})))},[m]);const se=D.useRef(!1);T0(()=>(se.current=!0,()=>{se.current=!1}),[]),T0(()=>
4348{if(M&&(q.current=M),O&&(L.current=O),M&&O){if(R.current)return R.current(M,O,V);V()}},[M,O,V,R,I]);const ye=D.useMemo(()=>({reference:q,floating:L,setReference:P,setFloating:A}),[P,A]),W=D.useMemo(()=>({reference:M,floating:O}),[M,O]),$=D.useMemo(()=>{const X={position:t,left:0,top:0};if(!W.floating)return X;const be=LD(W.floating,g.x),Oe=LD(W.floating,g.y);return d?{...X,transform:"translate("+be+"px, "+Oe+"px)",...dP(W.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:be,top:Oe}},[t,d,W.floating,g.x,g.y]);return D.useMemo(()=>({...g,update:V,refs:ye,elements:W,floatingStyles:$}),[g,V,ye,W,$])}const Hee=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:r,padding:s}=typeof n=="function"?n(t):n;return r&&e(r)?r.current!=null?OD({element:r.current,padding:s}).fn(t):{}:r?OD({element:r,padding:s}).fn(t):{}}}},Yee=(n,e)=>{const t=Vee(n);return{name:t.name,fn:t.fn,options:[n,e]}},Gee=(n,e)=>{const t=Fee(n);return{name:t.name,fn:t.fn,options:[n,e]}},$ee=(n,e)=>{const t=Hee(n);return{name:t.name,fn:t.fn,options:[n,e]}},Kee={...c5};let VD=!1,Wee=0;const FD=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Wee++;function Qee(){const[n,e]=D.useState(()=>VD?FD():void 0);return yy(()=>{n==null&&e(FD())},[]),D.useEffect(()=>{VD=!0},[]),n}const Xee=Kee.useId,hP=Xee||Qee,Jee=D.forwardRef(function(e,t){const{context:{placement:r,elements:{floating:s},middlewareData:{arrow:i,shift:l}},width:d=14,height:h=7,tipRadius:m=0,strokeWidth:g=0,staticOffset:p,stroke:b,d:w,style:{transform:_,...N}={},...E}=e,j=hP(),[P,A]=D.useState(!1);if(yy(()=>
4348{if(!s)return;oa(s).direction==="rtl"&&A(!0)},[s]),!s)return null;const[M,O]=r.split("-"),q=M==="top"||M==="bottom";let L=p;(q&&l!=null&&l.x||!q&&l!=null&&l.y)&&(L=null);const k=g*2,I=k/2,R=d/2*(m/-8+1),F=h/2*m/4,B=!!w,V=L&&O==="end"?"bottom":"top";let se=L&&O==="end"?"right":"left";L&&P&&(se=O==="end"?"left":"right");const ye=(i==null?void 0:i.x)!=null?L||i.x:"",W=(i==null?void 0:i.y)!=null?L||i.y:"",$=w||"M0,0"+(" H"+d)+(" L"+(d-R)+","+(h-F))+(" Q"+d/2+","+h+" "+R+","+(h-F))+" Z",X={top:B?"rotate(180deg)":"",left:B?"rotate(90deg)":"rotate(-90deg)",bottom:B?"":"rotate(180deg)",right:B?"rotate(-90deg)":"rotate(90deg)"}[M];return c.jsxs("svg",{...E,"aria-hidden":!0,ref:t,width:B?d:d+k,height:d,viewBox:"0 0 "+d+" "+(h>d?h:d),style:{position:"absolute",pointerEvents:"none",[se]:ye,[V]:W,[M]:q||B?"100%":"calc(100% - "+k/2+"px)",transform:[X,_].filter(be=>!!be).join(" "),...N},children:[k>0&&c.jsx("path",{clipPath:"url(#"+j+")",fill:"none",stroke:b,strokeWidth:k+(w?0:1),d:$}),c.jsx("path",{stroke:k&&!w?E.fill:"none",d:$}),c.jsx("clipPath",{id:j,children:c.jsx("rect",{x:-I,y:I*(B?-1:1),width:d+k,height:d})})]})});function Zee(){const n=new Map;return{emit(e,t){var r;(r=n.get(e))==null||r.forEach(s=>s(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var r;(r=n.get(e))==null||r.delete(t)}}}const ete=D.createContext(null),tte=D.createContext(null),nte=()=>{var n;return((n=D.useContext(ete))==null?void 0:n.id)||null},rte=()=>D.useContext(tte);function ste(n){const{open:e=!1,onOpenChange:t,elements:r}=n,s=hP(),i=D.useRef({}),[l]=D.useState(()=>Zee()),d=nte()!=null,[h,m]=D.useState(r.reference),g=hee((w,_,N)=>{i.current.openEvent=w?_:void 0,l.emit("openchange",{open:w,event:_,reason:N,nested:d}),t==null||t(w,_,N)}),p=D.useMemo(()=>({setPositionReference:m}),[]),b=D.useMemo(()=>({reference:h||r.reference||null,floating:r.floating||null,domReference:r.reference}),[h,r.reference,r.floating]);return D.useMemo(()=>({dataRef:i,open:e,onOpenChange:g,elements:b,events:l,floatingId:s,refs:p}),[e,g,b,l,s,p])}function ate(n){var e,t;let{elements:r,...s}=n===void 0?{}:n;const{nodeId:i}=s,l=ste({...s,elements:{reference:(e=r==null?void 0:r.reference)!=null?e:null,floating:(t=r==null?void 0:r.floating)!=null?t:null}}),d=s.rootContext||l,h=d.elements,[m,g]=D.useState(null),[p,b]=D.useState(null),_=(h==null?void 0:h.domReference)||m,N=D.useRef(null),E=rte();yy(()=>{_&&(N.current=_)},[_]);const j=qee({...s,elements:{...h,...p&&{reference:p}}}),P=D.useCallback(L=>{const k=Kr(L)?{getBoundingClientRect:()=>L.getBoundingClientRect(),getClientRects:()=>L.getClientRects(),contextElement:L}:L;b(k),j.refs.setReference(k)},[j.refs]),A=D.useCallback(L=>{(Kr(L)||L===null)&&(N.current=L,g(L)),(Kr(j.refs.reference.current)||j.refs.reference.current===null||L!==null&&!Kr(L))&&j.refs.setReference(L)},[j.refs]),M=D.useMemo(()=>({...j.refs,setReference:A,setPositionReference:P,domReference:N}),[j.refs,A,P]),O=D.useMemo(()=>({...j.elements,domReference:_}),[j.elements,_]),q=D.useMemo(()=>({...j,...d,refs:M,elements:O,nodeId:i}),[j,M,O,i,d]);return yy(()=>{d.dataRef.current.floatingContext=q;const L=E==null?void 0:E.nodesRef.current.find(k=>k.id===i);L&&(L.context=q)}),D.useMemo(()=>({...j,context:q,refs:M,elements:O}),[j,M,O,q])}/*!
4349  react-datepicker v9.1.0
4350  https://github.com/Hacker0x01/react-datepicker
4351  Released under the MIT License.
4352*/var M1=function(e,t){return M1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},M1(e,t)};function fr(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");M1(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var lt=function(){return lt=Object.assign||function(t){for(var r,s=1,i=arguments.length;s<i;s++){r=arguments[s];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},lt.apply(this,arguments)};function Va(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return n.concat(i||Array.prototype.slice.call(e))}var ite=function(n){var e=n.showTimeSelectOnly,t=e===void 0?!1:e,r=n.showTime,s=r===void 0?!1:r,i=n.className,l=n.children,d=n.inline,h=t?"Choose Time":"Choose Date".concat(s?" and Time":"");return ae.createElement("div",{className:i,"aria-label":h,role:d?void 0:"dialog","aria-modal":d?void 0:"true",translate:"no"},l)},ote=function(n,e){var t=D.useRef(null),r=D.useRef(n);D.useEffect(function(){r.current=n},[n]);var s=D.useCallback(function(i){var l,d=i.composed&&i.composedPath&&i.composedPath().find(function(h){return h instanceof Node})||i.target;t.current&&!t.current.contains(d)&&(e&&d instanceof HTMLElement&&d.classList.contains(e)||(l=r.current)===null||l===void 0||l.call(r,i))},[e]);return D.useEffect(function(){return document.addEventListener("mousedown",s),function(){document.removeEventListener("mousedown",s)}},[s]),t},yx=function(n){var e=n.children,t=n.onClickOutside,r=n.className,s=n.containerRef,i=n.style,l=n.ignoreClass,d=ote(t,l);return ae.createElement("div",{className:r,style:i,ref:function(h){d.current=h,s&&(s.current=h)}},e)},Rg=null,BD=!1;function fP(){if(BD)return Rg;BD=!0;try{var n="date-fns-tz";Rg=require(n)}catch{Rg=null}return Rg}function UD(n,e){if(!e)return n;var t=fP();return t?t.toZonedTime(n,e):n}function fi(n,e){if(!e)return n;var t=fP();return t?t.fromZonedTime(n,e):n}var Ae;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(Ae||(Ae={}));function mP(){var n=typeof window<"u"?window:globalThis;return n}var qm=12;function Tt(n){if(n==null)return new Date;var e=typeof n=="string"?kZ(n):ze(n);return zr(e)?e:new Date}function zl(n,e,t,r,s){s===void 0&&(s=Tt());for(var i=Dd(t)||Dd(rT()),l=Array.isArray(e)?e:[e],d=0,h=l;d<h.length;d++){var m=h[d],g=EZ(n,m,s,{locale:i});if(zr(g)&&(!r||n===sn(g,m,t)))return g}if(!r&&n&&n.length>=8){var p=new Date(n);if(jd(p))return p}return null}function lte(n,e){if(e===void 0&&(e=Tt()),!n)return null;var t=n.match(/\b(1\d{3}|2\d{3})\b/);if(!t||!t[1])return null;var r=parseInt(t[1],10),s=n.match(/(?:^|[/\-\s])?(0?[1-9]|1[0-2])(?:[/\-\s]|$)/),i=s&&s[1]?parseInt(s[1],10)-1:e.getMonth();return new Date(r,i,1)}function zr(n){return jd(n)}function rc(n){return n==null?null:Ha(n)&&jd(n)?n:null}function sn(n,e,t){if(t==="en")return jD(n,e,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var r=t?Dd(t):void 0;return t&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),r=r||Dd(rT()),jD(n,e,{locale:r,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Ur(n,e){var t=e.dateFormat,r=e.locale,s=Array.isArray(t)&&t.length>0?t[0]:t;return n&&sn(n,s,r)||""}var pP=" - ";function cte(n,e,t){if(!n&&!e)return"";var r=n?Ur(n,t):"",s=e?Ur(e,t):"",i=t.rangeSeparator||pP;
4352return"".concat(r).concat(i).concat(s)}function ute(n,e){if(!(n!=null&&n.length))return"";var t=n[0]?Ur(n[0],e):"";if(n.length===1)return t;if(n.length===2&&n[1]){var r=Ur(n[1],e);return"".concat(t,", ").concat(r)}var s=n.length-1;return"".concat(t," (+").concat(s,")")}function mi(n,e){var t=e.hour,r=t===void 0?0:t,s=e.minute,i=s===void 0?0:s,l=e.second,d=l===void 0?0:l;return v0(w0(_0(n,d),i),r)}function dte(n){return K2(n)}function hte(n,e){return sn(n,"ddd",e)}function _f(n){return Sc(n)}function zo(n,e,t){var r=Dd(e||rT());return ki(n,{locale:r,weekStartsOn:t})}function Ti(n){return G3(n)}function Tf(n){return ux(n)}function zD(n){return C1(n)}function qD(){return Sc(Tt())}function HD(n){return H3(n)}function fte(n){return kX(n)}function mte(n){return Y3(n)}function Ia(n,e){return n&&e?CZ(n,e):!n&&!e}function Sr(n,e){return n&&e?jZ(n,e):!n&&!e}function by(n,e){return n&&e?AZ(n,e):!n&&!e}function yt(n,e){return n&&e?CX(n,e):!n&&!e}function sc(n,e){return n&&e?DJ(n,e):!n&&!e}function Kl(n,e,t){var r,s=Sc(e),i=H3(t);try{r=fm(n,{start:s,end:i})}catch{r=!1}return r}function rT(){var n=mP();return n.__localeId__}function Dd(n){if(typeof n=="string"){var e=mP();return e.__localeData__?e.__localeData__[n]:void 0}else return n}function pte(n,e,t){return e(sn(n,"EEEE",t))}function gte(n,e){return sn(n,"EEEEEE",e)}function yte(n,e){return sn(n,"EEE",e)}function sT(n,e){return sn(cs(Tt(),n),"LLLL",e)}function gP(n,e){return sn(cs(Tt(),n),"LLL",e)}function xte(n,e){return sn(Lu(Tt(),n),"QQQ",e)}function ks(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.maxDate,i=t.excludeDates,l=t.excludeDateIntervals,d=t.includeDates,h=t.includeDateIntervals,m=t.filterDate,g=t.disabled;return g?!0:Hm(n,{minDate:r,maxDate:s})||i&&i.some(function(p){return p instanceof Date?yt(n,p):yt(n,p.date)})||l&&l.some(function(p){var b=p.start,w=p.end;return fm(n,{start:b,end:w})})||d&&!d.some(function(p){return yt(n,p)})||h&&!h.some(function(p){var b=p.start,w=p.end;return fm(n,{start:b,end:w})})||m&&!m(Tt(n))||!1}function aT(n,e){var t=e===void 0?{}:e,r=t.excludeDates,s=t.excludeDateIntervals;return s&&s.length>0?s.some(function(i){var l=i.start,d=i.end;return fm(n,{start:l,end:d})}):r&&r.some(function(i){var l;return i instanceof Date?yt(n,i):yt(n,(l=i.date)!==null&&l!==void 0?l:new Date)})||!1}function yP(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.maxDate,i=t.excludeDates,l=t.includeDates,d=t.filterDate;return Hm(n,{minDate:r?G3(r):void 0,maxDate:s?Y3(s):void 0})||(i==null?void 0:i.some(function(h){return Sr(n,h instanceof Date?h:h.date)}))||l&&!l.some(function(h){return Sr(n,h)})||d&&!d(Tt(n))||!1}function Mg(n,e,t,r){var s=ft(n),i=Hr(n),l=ft(e),d=Hr(e),h=ft(r);return s===l&&s===h?i<=t&&t<=d:s<l?h===s&&i<=t||h===l&&d>=t||h<l&&h>s:!1}function bte(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.maxDate,i=t.excludeDates,l=t.includeDates;return Hm(n,{minDate:r,maxDate:s})||i&&i.some(function(d){return Sr(d instanceof Date?d:d.date,n)})||l&&!l.some(function(d){return Sr(d,n)})||!1}function Pg(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.maxDate,i=t.excludeDates,l=t.includeDates,d=t.filterDate,h=t.disabled;return h?!0:Hm(n,{minDate:r,maxDate:s})||(i==null?void 0:i.some(function(m){return by(n,m instanceof Date?m:m.date)}))||l&&!l.some(function(m){return by(n,m)})||d&&!d(Tt(n))||!1}function Og(n,e,t){if(!e||!t||!jd(e)||!jd(t))return!1;var r=ft(e),s=ft(t);return r<=n&&s>=n}function N0(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.maxDate,i=t.excludeDates,l=t.includeDates,d=t.filterDate,h=t.disabled;if(h)return!0;var m=new Date(n,0,1);return Hm(m,{minDate:r?ux(r):void 0,maxDate:s?$3(s):void 0})||(i==null?void 0:i.some(function(g){return Ia(m,g instanceof Date?g:g.date)}))||l&&!l.some(function(g){return Ia(m,g)})||d&&!d(Tt(m))||!1}function Lg(n,e,t,r){var s=ft(n),i=Mo(n),l=ft(e),d=Mo(e),h=ft(r);return s===l&&s===h?i<=t&&t<=d:s<l?h===s&&i<=t||h===l&&d>=t||h<l&&h>s:!1}function Hm(n,e){var t,r=e===void 0?{}:e,s=r.minDate,i=r.maxDate;return(t=s&&Sd(n,s)<0||i&&Sd(n,i)>0)!==null&&t!==void 0?t:!1}function YD(n,e){return e.some(function(t){return gr(t)===gr(n)&&yr(t)===yr(n)&&Uo(t)===Uo(n)})}function GD(n,e){var t=e===void 0?{}:e,r=t.excludeTimes,s=t.includeTimes,i=t.filterTime;return r&&YD(n,r)||s&&!YD(n,s)||i&&!i(n)||!1}function $D(n,e){var t=e.minTime,r=e.maxTime;if(!t||!r)throw new Error("Both minTime and maxTime props required");var s=Tt();s=v0(s,gr(n)),s=w0(s,yr(n)),s=_0(s,Uo(n));var i=Tt();i=v0(i,gr(t)),i=w0(i,yr(t)),i=_0(i,Uo(t));var l=Tt();l=v0(l,gr(r)),l=w0(l,yr(r)),l=_0(l,Uo(r));var d;try{d=!fm(s,{start:i,end:l})}catch{d=!1}return d}function KD(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.includeDates,i=hc(n,1);return r&&uy(r,i)>0||s&&s.every(function(l){return uy(l,i)>0})||!1}function WD(n,e){var t=e===void 0?{}:e,r=t.maxDate,s=t.includeDates,i=ia(n,1);return r&&uy(i,r)>0||s&&s.every(function(l){return uy(i,l)>0})||!1}function vte(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.includeDates,i=ux(n),l=nP(i);return r&&dy(r,l)>0||s&&s.every(function(d){return dy(d,l)>0})||!1}function wte(n,e){var t=e===void 0?{}:e,r=t.maxDate,s=t.includeDates,i=$3(n),l=$2(i,1);return r&&dy(l,r)>0||s&&s.every(function(d){return dy(l,d)>0})||!1}function QD(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.includeDates,i=tl(n,1);return r&&hy(r,i)>0||s&&s.every(function(l){return hy(l,i)>0})||!1}function _te(n,e){var t=e===void 0?{}:e,r=t.minDate,s=t.yearItemNumber,i=s===void 0?qm:s,l=Tf(tl(n,i)),d=vi(l,i).endPeriod,h=r&&ft(r);return h&&h>d||!1}function XD(n,e){var t=e===void 0?{}:e,r=t.maxDate,s=t.includeDates,i=ra(n,1);return r&&hy(i,r)>0||s&&s.every(function(l){return hy(i,l)>0})||!1}function Tte(n,e){var t=e===void 0?{}:e,r=t.maxDate,s=t.yearItemNumber,i=s===void 0?qm:s,l=ra(n,i),d=vi(l,i).startPeriod,h=r&&ft(r);return h&&h<d||!1}function xP(n){var e=n.minDate,t=n.includeDates;if(t&&e){var r=t.filter(function(s){return Sd(s,e)>=0});return wD(r)}else return t?wD(t):e}function bP(n){var e=n.maxDate,t=n.includeDates;if(t&&e){var r=t.filter(function(s){return Sd(s,e)<=0});return vD(r)}else return t?vD(t):e}function JD(n,e){var t;n===void 0&&(n=[]),e===void 0&&(e="react-datepicker__day--highlighted");for(var r=new Map,s=0,i=n.length;s<i;s++){var l=n[s];if(Ha(l)){var d=sn(l,"MM.dd.yyyy"),h=r.get(d)||[];h.includes(e)||(h.push(e),r.set(d,h))}else if(typeof l=="object"){var m=Object.keys(l),g=(t=m[0])!==null&&t!==void 0?t:"",p=l[g];if(typeof g=="string"&&Array.isArray(p))for(var b=0,w=p.length;b<w;b++){var _=p[b];if(_){var d=sn(_,"MM.dd.yyyy"),h=r.get(d)||[];h.includes(g)||(h.push(g),r.set(d,h))}}}}return r}function Nte(n,e){return n.length!==e.length?!1:n.every(function(t,r){return t===e[r]})}function Ete(n,e){n===void 0&&(n=[]),e===void 0&&(e="react-datepicker__day--holidays");var t=new Map;
4352return n.forEach(function(r){var s=r.date,i=r.holidayName;if(Ha(s)){var l=sn(s,"MM.dd.yyyy"),d=t.get(l)||{className:"",holidayNames:[]};if(!("className"in d&&d.className===e&&Nte(d.holidayNames,[i]))){d.className=e;var h=d.holidayNames;d.holidayNames=h?Va(Va([],h,!0),[i],!1):[i],t.set(l,d)}}}),t}function Ste(n,e,t,r,s){for(var i=s.length,l=[],d=0;d<i;d++){var h=n,m=s[d];m&&(h=EX(h,gr(m)),h=hm(h,yr(m)),h=AX(h,Uo(m)));var g=hm(n,(t+1)*r);wi(h,e)&&La(h,g)&&m!=null&&l.push(m)}return l}function ku(n){return n<10?"0".concat(n):"".concat(n)}function vi(n,e){e===void 0&&(e=qm);var t=Math.ceil(ft(n)/e)*e,r=t-(e-1);return{startPeriod:r,endPeriod:t}}function jte(n){var e=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+t-+e)/36e5)}function ZD(n){var e=n.getSeconds(),t=n.getMilliseconds();return ze(n.getTime()-e*1e3-t)}function vP(n,e){return ZD(n).getTime()===ZD(e).getTime()}function e5(n){if(!Ha(n))throw new Error("Invalid date");var e=new Date(n);return e.setHours(0,0,0,0),e}function iw(n,e){if(!Ha(n)||!Ha(e))throw new Error("Invalid date received");var t=e5(n),r=e5(e);return La(t,r)}function wP(n){return n.key===Ae.Space}var ow=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;return r.inputRef=ae.createRef(),r.onTimeChange=function(s){var i,l;r.setState({time:s});var d=r.props.date,h=d instanceof Date&&!isNaN(+d),m=h?d:new Date;if(s!=null&&s.includes(":")){var g=s.split(":"),p=g[0],b=g[1];m.setHours(Number(p)),m.setMinutes(Number(b))}(l=(i=r.props).onChange)===null||l===void 0||l.call(i,m)},r.renderTimeInput=function(){var s=r.state.time,i=r.props,l=i.date,d=i.timeString,h=i.customTimeInput;return h?D.cloneElement(h,{date:l,value:s,onChange:r.onTimeChange}):ae.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:r.inputRef,onClick:function(){var m;(m=r.inputRef.current)===null||m===void 0||m.focus()},required:!0,value:s,onChange:function(m){r.onTimeChange(m.target.value||d)}})},r.state={time:r.props.timeString},r}return e.getDerivedStateFromProps=function(t,r){return t.timeStr
4352ing!==r.time?{time:t.timeString}:null},e.prototype.render=function(){return ae.createElement("div",{className:"react-datepicker__input-time-container"},ae.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),ae.createElement("div",{className:"react-datepicker-time__input-container"},ae.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},e})(D.Component),Ate=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.dayEl=D.createRef(),t.handleClick=function(r){!t.isDisabled()&&t.props.onClick&&t.props.onClick(r)},t.handleMouseEnter=function(r){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(r)},t.handleOnKeyDown=function(r){var s,i,l=r.key;l===Ae.Space&&(r.preventDefault(),r.key=Ae.Enter),(i=(s=t.props).handleOnKeyDown)===null||i===void 0||i.call(s,r)},t.isSameDay=function(r){return yt(t.props.day,r)},t.isKeyboardSelected=function(){var r;if(t.props.disabledKeyboardNavigation)return!1;var s=t.props.selectsMultiple?(r=t.props.selectedDates)===null||r===void 0?void 0:r.some(function(l){return t.isSameDayOrWeek(l)}):t.isSameDayOrWeek(t.props.selected),i=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!s&&t.isSameDayOrWeek(t.props.preSelection)&&!i},t.isDisabled=function(r){return r===void 0&&(r=t.props.day),ks(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate,disabled:t.props.disabled})},t.isExcluded=function(){return aT(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return yt(t.props.day,zo(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(r){return t.props.showWeekPicker&&yt(r,zo(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(r){return t.isSameDay(r)||t.isSameWeek(r)},t.getHighLightedClass=function(){var r=t.props,s=r.day,i=r.highlightDates;if(!i)return!1;var l=sn(s,"MM.dd.yyyy");return i.get(l)},t.getHolidaysClass=function(){var r,s=t.props,i=s.day,l=s.holidays;if(!l)return[void 0];var d=sn(i,"MM.dd.yyyy");return l.has(d)?[(r=l.get(d))===null||r===void 0?void 0:r.className]:[void 0]},t.isInRange=function(){var r=t.props,s=r.day,i=r.startDate,l=r.endDate;return!i||!l?!1:Kl(s,i,l)},t.isInSelectingRange=function(){var r,s=t.props,i=s.day,l=s.selectsStart,d=s.selectsEnd,h=s.selectsRange,m=s.selectsDisabledDaysInRange,g=s.startDate,p=s.swapRange,b=s.endDate,w=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;if(t.isAfterMonth()||t.isBeforeMonth()||!(l||d||h)||!w||!m&&t.isDisabled())return!1;if(l&&b&&(La(w,b)||sc(w,b)))return Kl(i,w,b);if(d&&g&&(wi(w,g)||sc(w,g)))return Kl(i,g,w);if(h&&g&&!b){if(sc(w,g)||wi(w,g))return Kl(i,g,w);if(p&&La(w,g))return Kl(i,w,g)}return!1},t.isSelectingRangeStart=function(){var r;if(!t.isInSelectingRange())return!1;var s=t.props,i=s.day,l=s.startDate,d=s.selectsStart,h=s.swapRange,m=s.selectsRange,g=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return d?yt(i,g):m&&h&&l&&g?yt(i,La(g,l)?g:l):yt(i,l)},t.isSelectingRangeEnd=function(){var r;if(!t.isInSelectingRange())return!1;var s=t.props,i=s.day,l=s.endDate,d=s.selectsEnd,h=s.selectsRange,m=s.swapRange,g=s.startDate,p=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return d?yt(i,p):h&&m&&g&&p?yt(i,La(p,g)?g:p):h?yt(i,p):yt(i,l)},t.isRangeStart=function(){var r=t.props,s=r.day,i=r.startDate,l=r.endDate;return!i||!l?!1:yt(i,s)},t.isRangeEnd=function(){var r=t.props,s=r.day,i=r.startDate,l=r.endDate;return!i||!l?!1:yt(l,s)},t.isWeekend=function(){var r=SJ(t.props.day);return r===0||r===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===Hr(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(Hr(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(Tt())},t.isSelected=function(){var r;return t.props.selectsMultiple?(r=t.props.selectedDates)===null||r===void 0?void 0:r.some(function(s){return t.isSameDayOrWeek(s)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(r){var s=t.props.dayClassName?t.props.dayClassName(r):void 0;return Kn("react-datepicker__day",s,"react-datepicker__day--"+hte(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var r=t.props,s=r.day,i=r.ariaLabelPrefixWhenEnabled,l=i===void 0?"Choose":i,d=r.ariaLabelPrefixWhenDisabled,h=d===void 0?"Not available":d,m=t.isDisabled()||t.isExcluded()?h:l;return"".concat(m," ").concat(sn(s,"PPPP",t.props.locale))},t.getTitle=function(){var r=t.props,s=r.day,i=r.holidays,l=i===void 0?new Map:i,d=r.excludeDates,h=sn(s,"MM.dd.yyyy"),m=[];return l.has(h)&&m.push.apply(m,l.get(h).holidayNames),t.isExcluded()&&m.push(d==null?void 0:d.filter(function(g){return g instanceof Date?yt(g,s):yt(g==null?void 0:g.date,
4352s)}).map(function(g){if(!(g instanceof Date))return g==null?void 0:g.message})),m.join(", ")},t.getTabIndex=function(){var r=t.props.selected,s=t.props.preSelection,i=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(r)&&yt(s,r))?0:-1;return i},t.handleFocusDay=function(){var r;t.shouldFocusDay()&&((r=t.dayEl.current)===null||r===void 0||r.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(AD(t.props.day),t.props.day):AD(t.props.day)},t.render=function(){return ae.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"gridcell",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&ae.createElement("span",{className:"overlay"},t.getTitle()))},t}return e.prototype.componentDidMount=function(){this.handleFocusDay()},e.prototype.componentDidUpdate=function(){this.handleFocusDay()},e.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},e.prototype.isDayActiveElement=function(){var t,r,s;return((r=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||r===void 0?void 0:r.contains(document.activeElement))&&((s=document.activeElement)===null||s===void 0?void 0:s.classList.contains("react-datepicker__day"))},e.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},e})(D.Component),Cte=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.weekNumberEl=D.createRef(),t.handleClick=function(r){t.props.onClick&&t.props.onClick(r)},t.handleOnKeyDown=function(r){var s,i,l=r.key;l===Ae.Space&&(r.preventDefault(),r.key=Ae.Enter),(i=(s=t.props).handleOnKeyDown)===null||i===void 0||i.call(s,r)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!yt(t.props.date,t.props.selected)&&yt(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||yt(t.props.date,t.props.selected)&&yt(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(r){var s=!1;t.getTabIndex()===0&&!(r!=null&&r.isInputFocused)&&yt(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(s=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(s=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(s=!0)),s&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(e,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},e.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},e.prototype.render=function(){var t=this.props,r=t.weekNumber,s=t.isWeekDisabled,i=t.ariaLabelPrefix,l=i===void 0?e.defaultProps.ariaLabelPrefix:i,d=t.onClick,h={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!d&&!s,"react-datepicker__week-number--selected":!!d&&yt(this.props.date,this.props.selected)};
4352return ae.createElement("div",{ref:this.weekNumberEl,className:Kn(h),"aria-label":"".concat(l," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},r)},e})(D.Component),Dte=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDisabled=function(r){return ks(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.handleDayClick=function(r,s){t.props.onDayClick&&t.props.onDayClick(r,s)},t.handleDayMouseEnter=function(r){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(r)},t.handleWeekClick=function(r,s,i){for(var l,d,h,m=new Date(r),g=0;g<7;g++){var p=new Date(r);p.setDate(p.getDate()+g);var b=!t.isDisabled(p);if(b){m=p;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(m,s,i),t.props.showWeekPicker&&t.handleDayClick(m,i),((l=t.props.shouldCloseOnSelect)!==null&&l!==void 0?l:e.defaultProps.shouldCloseOnSelect)&&((h=(d=t.props).setOpen)===null||h===void 0||h.call(d,!1))},t.formatWeekNumber=function(r){return t.props.formatWeekNumber?t.props.formatWeekNumber(r):dte(r)},t.isWeekDisabled=function(){for(var r=t.startOfWeek(),s=na(r,6),i=new Date(r);i<=s;){if(!t.isDisabled(i))return!1;i=na(i,1)}return!0},t.renderDays=function(){var r=t.startOfWeek(),s=[],i=t.formatWeekNumber(r);
4352if(t.props.showWeekNumber){var l=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,r,i):void 0;s.push(ae.createElement(Cte,lt({key:"W"},e.defaultProps,t.props,{weekNumber:i,isWeekDisabled:t.isWeekDisabled(),date:r,onClick:l})))}return s.concat([0,1,2,3,4,5,6].map(function(d){var h=na(r,d);return ae.createElement(Ate,lt({},e.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:h.valueOf(),day:h,onClick:t.handleDayClick.bind(t,h),onMouseEnter:t.handleDayMouseEnter.bind(t,h)}))}))},t.startOfWeek=function(){return zo(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!yt(t.startOfWeek(),t.props.selected)&&yt(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(e,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),e.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":yt(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},r=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return ae.createElement("div",{className:Kn(t,r),role:"row"},this.renderDays())},e})(D.Component),pf,kte=6,Ju={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},lw=(pf={},pf[Ju.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},pf[Ju.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},pf[Ju.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},pf),Vg=1;function t5(n,e){return n?Ju.FOUR_COLUMNS:e?Ju.TWO_COLUMNS:Ju.THREE_COLUMNS}var Ite=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.MONTH_REFS=Va([],Array(12),!0).map(function(){return D.createRef()}),t.QUARTER_REFS=Va([],Array(4),!0).map(function(){return D.createRef()}),t.isDisabled=function(r){return ks(r,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate,disabled:t.props.disabled})},t.isExcluded=function(r){return aT(r,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(r,s){var i,l;
4352(l=(i=t.props).onDayClick)===null||l===void 0||l.call(i,r,s,t.props.orderInDisplay)},t.handleDayMouseEnter=function(r){var s,i;(i=(s=t.props).onDayMouseEnter)===null||i===void 0||i.call(s,r)},t.handleMouseLeave=function(){var r,s;(s=(r=t.props).onMouseLeave)===null||s===void 0||s.call(r)},t.isRangeStartMonth=function(r){var s=t.props,i=s.day,l=s.startDate,d=s.endDate;return!l||!d?!1:Sr(cs(i,r),l)},t.isRangeStartQuarter=function(r){var s=t.props,i=s.day,l=s.startDate,d=s.endDate;return!l||!d?!1:by(Lu(i,r),l)},t.isRangeEndMonth=function(r){var s=t.props,i=s.day,l=s.startDate,d=s.endDate;return!l||!d?!1:Sr(cs(i,r),d)},t.isRangeEndQuarter=function(r){var s=t.props,i=s.day,l=s.startDate,d=s.endDate;return!l||!d?!1:by(Lu(i,r),d)},t.isInSelectingRangeMonth=function(r){var s,i=t.props,l=i.day,d=i.selectsStart,h=i.selectsEnd,m=i.selectsRange,g=i.startDate,p=i.endDate,b=(s=t.props.selectingDate)!==null&&s!==void 0?s:t.props.preSelection;return!(d||h||m)||!b?!1:d&&p?Mg(b,p,r,l):h&&g||m&&g&&!p?Mg(g,b,r,l):!1},t.isSelectingMonthRangeStart=function(r){var s;if(!t.isInSelectingRangeMonth(r))return!1;var i=t.props,l=i.day,d=i.startDate,h=i.selectsStart,m=cs(l,r),g=(s=t.props.selectingDate)!==null&&s!==void 0?s:t.props.preSelection;return h?Sr(m,g):Sr(m,d)},t.isSelectingMonthRangeEnd=function(r){var s;if(!t.isInSelectingRangeMonth(r))return!1;var i=t.props,l=i.day,d=i.endDate,h=i.selectsEnd,m=i.selectsRange,g=cs(l,r),p=(s=t.props.selectingDate)!==null&&s!==void 0?s:t.props.preSelection;return h||m?Sr(g,p):Sr(g,d)},t.isInSelectingRangeQuarter=function(r){var s,i=t.props,l=i.day,d=i.selectsStart,h=i.selectsEnd,m=i.selectsRange,g=i.startDate,p=i.endDate,b=(s=t.props.selectingDate)!==null&&s!==void 0?s:t.props.preSelection;return!(d||h||m)||!b?!1:d&&p?Lg(b,p,r,l):h&&g||m&&g&&!p?Lg(g,b,r,l):!1},t.isWeekInMonth=function(r){var s=t.props.day,i=na(r,6);return Sr(r,s)||Sr(i,s)},t.isCurrentMonth=function(r,s){return ft(r)===ft(Tt())&&s===Hr(Tt())},t.isCurrentQuarter=function(r,s){return ft(r)===ft(Tt())&&s===Mo(Tt())},t.isSelectedMonth=function(r,s,i){return Hr(i)===s&&ft(r)===ft(i)},t.isSelectMonthInList=function(r,s,i){return i.some(function(l){return t.isSelectedMonth(r,s,l)})},t.isSelectedQuarter=function(r,s,i){return Mo(i)===s&&ft(r)===ft(i)},t.isSelectQuarterInList=function(r,s,i){return i.some(function(l){return t.isSelectedQuarter(r,s,l)})},t.isMonthSelected=function(){var r=t.props,s=r.day,i=r.selected,l=r.selectedDates,d=r.selectsMultiple,h=Hr(s);return d?l==null?void 0:l.some(function(m){return t.isSelectedMonth(s,h,m)}):!!i&&t.isSelectedMonth(s,h,i)},t.isQuarterSelected=function(){var r=t.props,s=r.day,i=r.selected,l=r.selectedDates,d=r.selectsMultiple,h=Mo(s);return d?l==null?void 0:l.some(function(m){return t.isSelectedQuarter(s,h,m)}):!!i&&t.isSelectedQuarter(s,h,i)},t.renderWeeks=function(){if(!zr(t.props.day))return[];for(var r=[],s=t.props.fixedHeight,i=0,l=!1,d=zo(Ti(t.props.day),t.props.locale,t.props.calendarStartDay),h=function(_){return t.props.showWeekPicker?zo(_,t.props.locale,t.props.calendarStartDay):t.props.preSelection},m=function(_){return t.props.showWeekPicker?zo(_,t.props.locale,t.props.calendarStartDay):t.props.selected},g=t.props.selected?m(t.props.selected):void 0,p=t.props.preSelection?h(t.props.preSelection):void 0;r.push(ae.createElement(Dte,lt({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:i,day:d,month:Hr(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:g,preSelection:p,showWeekNumber:t.props.showWeekNumbers}))),!l;){i++,d=cy(d,1);var b=s&&i>=kte,w=!s&&!t.isWeekInMonth(d);if(b||w)if(t.props.peekNextMonth)l=!0;else break}return r},t.onMonthClick=function(r,s){var i=t.isMonthDisabledForLabelDate(s),l=i.isDisabled,d=i.labelDate;l||t.handleDayClick(Ti(d),r)},t.onMonthMouseEnter=function(r){var s=t.isMonthDisabledForLabelDate(r),i=s.isDisabled,l=s.labelDate;i||t.handleDayMouseEnter(Ti(l))},t.handleMonthNavigation=function(r,s){var i,l,d,h;(l=(i=t.props).setPreSelection)===null||l===void 0||l.call(i,s),(h=(d=t.MONTH_REFS[r])===null||d===void 0?void 0:d.current)===null||h===void 0||h.focus()},t.handleKeyboardNavigation=function(r,s,i){var l,d=t.props,h=d.selected,m=d.preSelection,g=d.setPreSelection,p=d.minDate,b=d.maxDate,w=d.showFourColumnMonthYearPicker,_=d.showTwoColumnMonthYearPicker;if(m){var N=t5(w,_),E=t.getVerticalOffset(N),j=(l=lw[N])===null||l===void 0?void 0:l.grid,P=function(L,k,I){var R,F,B=k,V=I;switch(L){case Ae.ArrowRight:B=ia(k,Vg),V=I===11?0:I+Vg;break;case Ae.ArrowLeft:B=hc(k,Vg),V=I===0?11:I-Vg;break;case Ae.ArrowUp:B=hc(k,E),V=!((R=j==null?void 0:j[0])===null||R===void 0)&&R.includes(I)?I+12-E:I-E;break;case Ae.ArrowDown:B=ia(k,E),V=!((F=j==null?void 0:j[j.length-1])===null||F===void 0)&&F.includes(I)?I-12+E:I+E;break}return{newCalculatedDate:B,newCalculatedMonth:V}},A=function(L,k,I){for(var R=40,F=L,B=!1,V=0,se=P(F,k,I),ye=se.newCalculatedDate,W=se.newCalculatedMonth;!B;){if(V>=R){ye=k,W=I;break}if(p&&ye<p){F=Ae.ArrowRight;var $=P(F,ye,W);ye=$.newCalculatedDate,W=$.newCalculatedMonth}if(b&&ye>b){F=Ae.ArrowLeft;var $=P(F,ye,W);ye=$.newCalculatedDate,W=$.newCalculatedMonth}if(bte(ye,t.props)){var $=P(F,ye,W);ye=$.newCalculatedDate,W=$.newCalculatedMonth}else B=!0;V++}return{newCalculatedDate:ye,newCalculatedMonth:W}};if(s===Ae.Enter){t.isMonthDisabled(i)||(t.onMonthClick(r,i),g==null||g(h));return}var M=A(s,m,i),O=M.newCalculatedDate,q=M.newCalculatedMonth;switch(s){case Ae.ArrowRight:case Ae.ArrowLeft:case Ae.ArrowUp:case Ae.ArrowDown:t.handleMonthNavigation(q,O);break}}},t.getVerticalOffset=function(r){var s,i;return(i=(s=lw[r])===null||s===void 0?void 0:s.verticalNavigationOffset)!==null&&i!==void 0?i:0},t.onMonthKeyDown=function(r,s){var i=t.props,l=i.disabledKeyboardNavigation,d=i.handleOnMonthKeyDown,h=r.key;h!==Ae.Tab&&r.preventDefault(),l||t.handleKeyboardNavigation(r,h,s),d&&d(r)},t.onQuarterClick=function(r,s){var i=Lu(t.props.day,s);Pg(i,t.props)||t.handleDayClick(zD(i),r)},t.onQuarterMouseEnter=function(r){var s=Lu(t.props.day,r);Pg(s,t.props)||t.handleDayMouseEnter(zD(s))},t.handleQuarterNavigation=function(r,s){var i,l,d,h;t.isDisabled(s)||t.isExcluded(s)||((l=(i=t.props).setPreSelection)===null||l===void 0||l.call(i,s),(h=(d=t.QUARTER_REFS[r-1])===null||d===void 0?void 0:d.current)===null||h===void 0||h.focus())},t.onQuarterKeyDown=function(r,s){var i,l,d=r.key;if(!t.props.disabledKeyboardNavigation)switch(d){case Ae.Enter:t.onQuarterClick(r,s),(l=(i=t.props).setPreSelection)===null||l===void 0||l.call(i,t.props.selected);break;case Ae.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(s===4?1:s+1,$2(t.props.preSelection,1));break;case Ae.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(s===1?4:s-1,nP(t.props.preSelection));break}},t.isMonthDisabledForLabelDate=function(r){var s,i=t.props,l=i.day,d=i.disabled,h=i.minDate,m=i.maxDate,g
4352=i.excludeDates,p=i.includeDates,b=cs(l,r);return d?{isDisabled:!0,labelDate:cs(l,r)}:{isDisabled:(s=(h||m||g||p)&&yP(b,t.props))!==null&&s!==void 0?s:!1,labelDate:b}},t.isMonthDisabled=function(r){var s=t.isMonthDisabledForLabelDate(r).isDisabled;return s},t.getMonthClassNames=function(r){var s=t.props,i=s.day,l=s.startDate,d=s.endDate,h=s.preSelection,m=s.monthClassName,g=m?m(cs(i,r)):void 0,p=t.getSelection();return Kn("react-datepicker__month-text","react-datepicker__month-".concat(r),g,{"react-datepicker__month-text--disabled":t.isMonthDisabled(r),"react-datepicker__month-text--selected":p?t.isSelectMonthInList(i,r,p):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&h&&t.isSelectedMonth(i,r,h)&&!t.isMonthSelected()&&!t.isMonthDisabled(r),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(r),"react-datepicker__month-text--in-range":l&&d?Mg(l,d,r,i):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(r),"react-datepicker__month-text--range-end":t.isRangeEndMonth(r),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(r),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(r),"react-datepicker__month-text--today":t.isCurrentMonth(i,r)})},t.getTabIndex=function(r){if(t.props.preSelection==null)return"-1";var s=Hr(t.props.preSelection),i=t.isMonthDisabledForLabelDate(s).isDisabled,l=r===s&&!(i||t.props.disabledKeyboardNavigation)?"0":"-1";return l},t.getQuarterTabIndex=function(r){if(t.props.preSelection==null)return"-1";var s=Mo(t.props.preSelection),i=Pg(t.props.day,t.props),l=r===s&&!(i||t.props.disabledKeyboardNavigation)?"0":"-1";return l},t.getAriaLabel=function(r){var s=t.props,i=s.chooseDayAriaLabelPrefix,l=i===void 0?"Choose":i,d=s.disabledDayAriaLabelPrefix,h=d===void 0?"Not available":d,m=s.day,g=s.locale,p=cs(m,r),b=t.isDisabled(p)||t.isExcluded(p)?h:l;return"".concat(b," ").concat(sn(p,"MMMM yyyy",g))},t.getQuarterClassNames=function(r){var s=t.props,i=s.day,l=s.startDate,d=s.endDate,h=s.minDate,m=s.maxDate,g=s.excludeDates,p=s.includeDates,b=s.filterDate,w=s.preSelection,_=s.disabledKeyboardNavigation,N=s.disabled,E=(h||m||g||p||b||N)&&Pg(Lu(i,r),t.props),j=t.getSelection();return Kn("react-datepicker__quarter-text","react-datepicker__quarter-".concat(r),{"react-datepicker__quarter-text--disabled":E,"react-datepicker__quarter-text--selected":j?t.isSelectQuarterInList(i,r,j):void 0,"react-datepicker__quarter-text--keyboard-selected":!_&&w&&t.isSelectedQuarter(i,r,w)&&!t.isQuarterSelected()&&!E,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(r),"react-datepicker__quarter-text--in-range":l&&d?Lg(l,d,r,i):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(r),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(r),"react-datepicker__quarter-text--today":t.isCurrentQuarter(i,r)})},t.getMonthContent=function(r){var s=t.props,i=s.showFullMonthYearPicker,l=s.renderMonthContent,d=s.locale,h=s.day,m=gP(r,d),g=sT(r,d);return l?l(r,m,g,h):i?g:m},t.getQuarterContent=function(r){var s,i=t.props,l=i.renderQuarterContent,d=i.locale,h=xte(r,d);return(s=l==null?void 0:l(r,h))!==null&&s!==void 0?s:h},t.renderMonths=function(){var r,s=t.props,i=s.showTwoColumnMonthYearPicker,l=s.showFourColumnMonthYearPicker,d=s.day,h=s.selected,m=(r=lw[t5(l,i)])===null||r===void 0?void 0:r.grid;return m==null?void 0:m.map(function(g,p){return ae.createElement("div",{className:"react-datepicker__month-wrapper",key:p},g.map(function(b,w){return ae.createElement("div",{ref:t.MONTH_REFS[b],key:w,onClick:function(_){t.onMonthClick(_,b)},onKeyDown:function(_){wP(_)&&(_.preventDefault(),_.key=Ae.Enter),t.onMonthKeyDown(_,b)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(b)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(b)}:void 0,tabIndex:Number(t.getTabIndex(b)),className:t.getMonthClassNames(b),"aria-disabled":t.isMonthDisabled(b),role:"option","aria-label":t.getAriaLabel(b),"aria-current":t.isCurrentMonth(d,b)?"date":void 0,"aria-selected":h?t.isSelectedMonth(d,b,h):void 0},t.getMonthContent(b))}))})},t.renderQuarters=function(){var r=t.props,s=r.day,i=r.selected,l=[1,2,3,4];return ae.createElement("div",{className:"react-datepicker__quarter-wrapper"},l.map(function(d,h){return ae.createElement("div",{key:h,ref:t.QUARTER_REFS[h],role:"option",onClick:function(m){t.onQuarterClick(m,d)},onKeyDown:function(m){t.onQuarterKeyDown(m,d)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(d)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(d)}:void 0,className:t.getQuarterClassNames(d),"aria-selected":i?t.isSelectedQuarter(s,d,i):void 0,tabIndex:Number(t.getQuarterTabIndex(d)),"aria-current":t.isCurrentQuarter(s,d)?"date":void 0},t.getQuarterContent(d))}
4352))},t.getClassNames=function(){var r=t.props,s=r.selectingDate,i=r.selectsStart,l=r.selectsEnd,d=r.showMonthYearPicker,h=r.showQuarterYearPicker,m=r.showWeekPicker;return Kn("react-datepicker__month",{"react-datepicker__month--selecting-range":s&&(i||l)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":h},{"react-datepicker__weekPicker":m})},t}return e.prototype.getSelection=function(){var t=this.props,r=t.selected,s=t.selectedDates,i=t.selectsMultiple;if(i)return s;if(r)return[r]},e.prototype.render=function(){var t=this.props,r=t.showMonthYearPicker,s=t.showQuarterYearPicker,i=t.day,l=t.ariaLabelPrefix,d=l===void 0?"Month ":l,h=d?d.trim()+" ":"",m=zr(i)?"".concat(h).concat(sn(i,"MMMM, yyyy",this.props.locale)):"",g=r||s;return g?ae.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":m,role:"listbox"},r?this.renderMonths():this.renderQuarters()):ae.createElement("div",{role:"table"},this.props.dayNamesHeader&&ae.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),this.props.monthHeader&&ae.createElement("div",{role:"rowgroup"},this.props.monthHeader),ae.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":m,role:"rowgroup"},this.renderWeeks()),this.props.monthFooter&&ae.createElement("div",{role:"rowgroup"},this.props.monthFooter))},e})(D.Component),Rte=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.monthOptionButtonsRef={},t.isSelectedMonth=function(r){return t.props.month===r},t.handleOptionKeyDown=function(r,s){var i;switch(s.key){case"Enter":s.preventDefault(),t.onChange(r);break;case"Escape":s.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{s.preventDefault();var l=(r+(s.key==="ArrowUp"?-1:1)+t.props.monthNames.length)%t.props.monthNames.length;(i=t.monthOptionButtonsRef[l])===null||i===void 0||i.focus();break}}},t.renderOptions=function(){return t.monthOptionButtonsRef={},t.props.monthNames.map(function(r,s){return ae.createElement("div",{ref:function(i){t.monthOptionButtonsRef[s]=i,t.isSelectedMonth(s)&&(i==null||i.focus())},role:"button",tabIndex:0,className:t.isSelectedMonth(s)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:r,onClick:t.onChange.bind(t,s),onKeyDown:t.handleOptionKeyDown.bind(t,s),"aria-selected":t.isSelectedMonth(s)?"true":void 0},t.isSelectedMonth(s)?ae.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",r)})},t.onChange=function(r){return t.props.onChange(r)},t.handleClickOutside=function(){return t.props.onCancel()},t}return e.prototype.render=function(){return ae.createElement(yx,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},e})(D.Component),Mte=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(r){return r.map(function(s,i){return ae.createElement("option",{key:s,value:i},s)})},t.renderSelectMode=function(r){return ae.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(s){return t.onChange(parseInt(s.target.value))}},t.renderSelectOptions(r))},t.renderReadView=function(r,s){return ae.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},ae.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),ae.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},s[t.props.month]))},t.renderDropdown=function(r){return ae.createElement(Rte,lt({key:"dropdown"},t.props,{monthNames:r,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(r){var s=t.state.dropdownVisible,i=[t.renderReadView(!s,r)];return s&&i.unshift(t.renderDropdown(r)),i},t.onChange=function(r){t.toggleDropdown(),r!==t.props.month&&t.props.onChange(r)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return e.prototype.render=function(){var t=this,r=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(i){return gP(i,t.props.locale)}:function(i){return sT(i,t.props.locale)}),s;switch(this.props.dropdownMode){case"scroll":s=this.renderScrollMode(r);break;case"select":s=this.renderSelectMode(r);break}return ae.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},s)},e})(D.Component),n5=5;function Pte(n,e,t){for(var r=[],s=n??tl(t,n5),i=e??ra(t,n5),l=Ti(s),d=Ti(i);!wi(l,d);)r.push(Tt(l)),l=ia(l,1);return r}var Ote=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;return r.renderOptions=function(){return r.state.monthYearsList.map(function(s){var i=k1(s),l=Ia(r.props.date,s)&&Sr(r.props.date,s);return ae.createElement("div",{className:l?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:i,onClick:r.onChange.bind(r,i),"aria-selected":l?"true":void 0},l?ae.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",sn(s,r.props.dateFormat,r.props.locale))})},r.onChange=function(s){return r.props.onChange(s)},r.handleClickOutside=function(){r.props.onCancel()},r.state={monthYearsList:Pte(r.props.minDate,r.props.maxDate,r.props.date)},r}return e.prototype.render=function(){var t=Kn({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return ae.createElement(yx,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},e})(D.Component),r5=5,Lte=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var r,s,i=(r=t.props.minDate)!==null&&r!==void 0?r:tl(t.props.date,r5),l=(s=t.props.maxDate)!==null&&s!==void 0?s:ra(t.props.date,r5),d=Ti(i),h=Ti(l),m=[];!wi(d,h);){var g=k1(d);m.push(ae.createElement("option",{key:g,value:g},sn(d,t.props.dateFormat,t.props.locale))),d=ia(d,1)}return m},t.onSelectChange=function(r){t.onChange(parseInt(r.target.value))},t.renderSelectMode=function(){return ae.createElement("select",{value:k1(Ti(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(r){var s=sn(t.props.date,t.props.dateFormat,t.props.locale);return ae.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},ae.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),ae.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},s))},t.renderDropdown=function(){return ae.createElement(Ote,lt({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var r=t.state.dropdownVisible,s=[t.renderReadView(!r)];return r&&s.unshift(t.renderDropdown()),s},t.onChange=function(r){t.toggleDropdown();var s=Tt(r);Ia(t.props.date,s)&&Sr(t.props.date,s)||t.props.onChange(s)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return e.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return ae.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},e})(D.Component),Vte=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var r,s,i;t.list&&(t.list.scrollTop=(i=t.centerLi&&e.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((s=(r=t.header)===null||r===void 0?void 0:r.clientHeight)!==null&&s!==void 0?s:0):t.list.clientHeight,t.centerLi))!==null&&i!==void 0?i:0)})},t.handleClick=function(r){var s,i;(t.props.minTime||t.props.maxTime)&&$D(r,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&GD(r,t.props)||(i=(s=t.props).onChange)===null||i===void 0||i.call(s,r)},t.isSelectedTime=function(r){var s=rc(t.props.selected);return s&&vP(s,r)},t.isDisabledTime=function(r){return(t.props.minTime||t.props.maxTime)&&$D(r,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&GD(r,t.props)},t.liClasses=function(r){var s,i=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(r):void 0];return t.isSelectedTime(r)&&i.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(r)&&i.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(gr(r)*3600+yr(r)*60+Uo(r))%(((s=t.props.intervals)!==null&&s!==void 0?s:e.defaultProps.intervals)*60)!==0&&i.push("react-datepicker__time-list-item--injected"),i.join(" ")},t.handleOnKeyDown=function(r,s){var i,l;
4352r.key===Ae.Space&&(r.preventDefault(),r.key=Ae.Enter),(r.key===Ae.ArrowUp||r.key===Ae.ArrowLeft)&&r.target instanceof HTMLElement&&r.target.previousSibling&&(r.preventDefault(),r.target.previousSibling instanceof HTMLElement&&r.target.previousSibling.focus()),(r.key===Ae.ArrowDown||r.key===Ae.ArrowRight)&&r.target instanceof HTMLElement&&r.target.nextSibling&&(r.preventDefault(),r.target.nextSibling instanceof HTMLElement&&r.target.nextSibling.focus()),r.key===Ae.Enter&&t.handleClick(s),(l=(i=t.props).handleOnKeyDown)===null||l===void 0||l.call(i,r)},t.renderTimes=function(){for(var r,s=[],i=typeof t.props.format=="string"?t.props.format:"p",l=(r=t.props.intervals)!==null&&r!==void 0?r:e.defaultProps.intervals,d=rc(t.props.selected)||rc(t.props.openToDate)||Tt(),h=_f(d),m=t.props.injectTimes&&t.props.injectTimes.sort(function(E,j){return E.getTime()-j.getTime()}),g=60*jte(d),p=g/l,b=0;b<p;b++){var w=hm(h,b*l);if(s.push(w),m){var _=Ste(h,w,b,l,m);s=s.concat(_)}}var N=s.reduce(function(E,j){return j.getTime()<=d.getTime()?j:E},s[0]);return s.map(function(E){return ae.createElement("li",{key:E.valueOf(),onClick:t.handleClick.bind(t,E),className:t.liClasses(E),ref:function(j){E===N&&(t.centerLi=j)},onKeyDown:function(j){t.handleOnKeyDown(j,E)},tabIndex:E===N?0:-1,role:"option","aria-selected":t.isSelectedTime(E)?"true":void 0,"aria-disabled":t.isDisabledTime(E)?"true":void 0},sn(E,i,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?ae.createElement(ae.Fragment,null):ae.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(r){t.header=r}},ae.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(e,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeight
4352Changes()},e.prototype.componentWillUnmount=function(){var t;(t=this.resizeObserver)===null||t===void 0||t.disconnect()},e.prototype.observeDatePickerHeightChanges=function(){var t=this,r=this.props.monthRef;this.updateContainerHeight(),r&&(this.resizeObserver=new ResizeObserver(function(){t.updateContainerHeight()}),this.resizeObserver.observe(r))},e.prototype.updateContainerHeight=function(){if(this.props.monthRef&&this.header){var t=this.props.monthRef.clientHeight-this.header.clientHeight;this.state.height!==t&&this.setState({height:t})}},e.prototype.render=function(){var t=this,r,s=this.state.height;return ae.createElement("div",{className:"react-datepicker__time-container ".concat(((r=this.props.todayButton)!==null&&r!==void 0?r:e.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),ae.createElement("div",{className:"react-datepicker__time"},ae.createElement("div",{className:"react-datepicker__time-box"},ae.createElement("ul",{className:"react-datepicker__time-list",ref:function(i){t.list=i},style:s?{height:s}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},e.calcCenterPosition=function(t,r){return r.offsetTop-(t/2-r.clientHeight/2)},e})(D.Component),s5=3,Fte=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;return r.YEAR_REFS=Va([],Array(r.props.yearItemNumber),!0).map(function(){return D.createRef()}),r.isDisabled=function(s){return ks(s,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(s){return aT(s,{excludeDates:r.props.excludeDates})},r.selectingDate=function(){var s;return(s=r.props.selectingDate)!==null&&s!==void 0?s:r.props.preSelection},r.updateFocusOnPaginate=function(s){var i=function(){var l,d;(d=(l=r.YEAR_REFS[s])===null||l===void 0?void 0:l.current)===null||d===void 0||d.focus()};window.requestAnimationFrame(i)},r.handleYearClick=function(s,i){r.props.onDayClick&&r.props.onDayClick(s,i)},r.handleYearNavigation=function(s,i){var l,d,h,m,g=r.props,p=g.date,b=g.yearItemNumber;if(!(p===void 0||b===void 0)){var w=vi(p,b).startPeriod;r.isDisabled(i)||r.isExcluded(i)||((d=(l=r.props).setPreSelection)===null||d===void 0||d.call(l,i),s-w<0?r.updateFocusOnPaginate(b-(w-s)):s-w>=b?r.updateFocusOnPaginate(Math.abs(b-(s-w))):(m=(h=r.YEAR_REFS[s-w])===null||h===void 0?void 0:h.current)===null||m===void 0||m.focus())}},r.isSameDay=function(s,i){return yt(s,i)},r.isCurrentYear=function(s){return s===ft(Tt())},r.isRangeStart=function(s){return r.props.startDate&&r.props.endDate&&Ia(Ca(Tt(),s),r.props.startDate)},r.isRangeEnd=function(s){return r.props.startDate&&r.props.endDate&&Ia(Ca(Tt(),s),r.props.endDate)},r.isInRange=function(s){return Og(s,r.props.startDate,r.props.endDate)},r.isInSelectingRange=function(s){var i=r.props,l=i.selectsStart,d=i.selectsEnd,h=i.selectsRange,m=i.startDate,g=i.endDate;return!(l||d||h)||!r.selectingDate()?!1:l&&g?Og(s,r.selectingDate(),g):d&&m||h&&m&&!g?Og(s,m,r.selectingDate()):!1},r.isSelectingRangeStart=function(s){var i;if(!r.isInSelectingRange(s))return!1;var l=r.props,d=l.startDate,h=l.selectsStart,m=Ca(Tt(),s);return h?Ia(m,(i=r.selectingDate())!==null&&i!==void 0?i:null):Ia(m,d??null)},r.isSelectingRangeEnd=function(s){var i;if(!r.isInSelectingRange(s))return!1;var l=r.props,d=l.endDate,h=l.selectsEnd,m=l.selectsRange,g=Ca(Tt(),s);return h||m?Ia(g,(i=r.selectingDate())!==null&&i!==void 0?i:null):Ia(g,d??null)},r.isKeyboardSelected=function(s){if(!(r.props.disabledKeyboardNavigation||r.props.date===void 0||r.props.preSelection==null)){var i=r.props,l=i.minDate,d=i.maxDate,h=i.excludeDates,m=i.includeDates,g=i.filterDate,p=i.selected,b=Tf(Ca(r.props.date,s)),w=(l||d||h||m||g)&&N0(s,r.props),_=!!p&&yt(b,Tf(p)),N=yt(b,Tf(r.props.preSelection));return!r.props.inline&&!_&&N&&!w}},r.isSelectedYear=function(s){var i=r.props,l=i.selectsMultiple,d=i.selected,h=i.selectedDates;return l?h==null?void 0:h.some(function(m){return s===ft(m)}):!!d&&s===ft(d)},r.onYearClick=function(s,i){var l=r.props.date;l!==void 0&&r.handleYearClick(Tf(Ca(l,i)),s)},r.onYearKeyDown=function(s,i){var l,d,h=s.key,m=r.props,g=m.date,p=m.yearItemNumber,b=m.handleOnKeyDown;if(h!==Ae.Tab&&s.preventDefault(),!r.props.disabledKeyboardNavigation)switch(h){case Ae.Enter:if(r.props.selected==null)break;r.onYearClick(s,i),(d=(l=r.props).setPreSelection)===null||d===void 0||d.call(l,r.props.selected);break;case Ae.ArrowRight:if(r.props.preSelection==null)break;r.handleYearNavigation(i+1,ra(r.props.preSelection,1));break;case Ae.ArrowLeft:if(r.props.preSelection==null)break;r.handleYearNavigation(i-1,tl(r.props.preSelection,1));break;case Ae.ArrowUp:{if(g===void 0||p===void 0||r.props.preSelection==null)break;var w=vi(g,p).startPeriod,_=s5,N=i-_;if(N<w){var E=p%_;i>=w&&i<w+E?_=E:_+=E,N=i-_}r.handleYearNavigation(N,tl(r.props.preSelection,_));break}case Ae.ArrowDown:{if(g===void 0||p===void 0||r.props.preSelection==null)break;var j=vi(g,p).endPeriod,_=s5,N=i+_;if(N>j){var E=p%_;i<=j&&i>j-E?_=E:_+=E,N=i+_}r.handleYearNavigation(N,ra(r.props.preSelection,_));break}}b&&b(s)},r.getYearClassNames=function(s){var i=r.props,l=i.date,d=i.disabled,h=i.minDate,m=i.maxDate,g
4352=i.excludeDates,p=i.includeDates,b=i.filterDate,w=i.yearClassName;return Kn("react-datepicker__year-text","react-datepicker__year-".concat(s),l?w==null?void 0:w(Ca(l,s)):void 0,{"react-datepicker__year-text--selected":r.isSelectedYear(s),"react-datepicker__year-text--disabled":(h||m||g||p||b||d)&&N0(s,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(s),"react-datepicker__year-text--range-start":r.isRangeStart(s),"react-datepicker__year-text--range-end":r.isRangeEnd(s),"react-datepicker__year-text--in-range":r.isInRange(s),"react-datepicker__year-text--in-selecting-range":r.isInSelectingRange(s),"react-datepicker__year-text--selecting-range-start":r.isSelectingRangeStart(s),"react-datepicker__year-text--selecting-range-end":r.isSelectingRangeEnd(s),"react-datepicker__year-text--today":r.isCurrentYear(s)})},r.getYearTabIndex=function(s){if(r.props.disabledKeyboardNavigation||r.props.preSelection==null)return"-1";var i=ft(r.props.preSelection),l=N0(s,r.props);return s===i&&!l?"0":"-1"},r.getYearContent=function(s){return r.props.renderYearContent?r.props.renderYearContent(s):s},r}return e.prototype.render=function(){var t=this,r=[],s=this.props,i=s.date,l=s.yearItemNumber,d=s.onYearMouseEnter,h=s.onYearMouseLeave;if(i===void 0)return null;for(var m=vi(i,l),g=m.startPeriod,p=m.endPeriod,b=function(N){r.push(ae.createElement("div",{ref:w.YEAR_REFS[N-g],onClick:function(E){t.onYearClick(E,N)},onKeyDown:function(E){wP(E)&&(E.preventDefault(),E.key=Ae.Enter),t.onYearKeyDown(E,N)},tabIndex:Number(w.getYearTabIndex(N)),className:w.getYearClassNames(N),onMouseEnter:w.props.usePointerEvent?void 0:function(E){return d(E,N)},onPointerEnter:w.props.usePointerEvent?function(E){return d(E,N)}:void 0,onMouseLeave:w.props.usePointerEvent?void 0:function(E){return h(E,N)},onPointerLeave:w.props.usePointerEvent?function(E){return h(E,N)}:void 0,key:N,"aria-current":w.isCurrentYear(N)?"date":void 0},w.getYearContent(N)))},w=this,_=g;_<=p;_++)b(_);return ae.createElement("div",{className:"react-datepicker__year"},ae.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},r))},e})(D.Component);function Bte(n,e,t,r){for(var s=[],i=0;i<2*e+1;i++){var l=n+e-i,d=!0;t&&(d=ft(t)<=l),r&&d&&(d=ft(r)>=l),d&&s.push(l)}return s}var Ute=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;r.yearOptionButtonsRef={},r.handleOptionKeyDown=function(d,h){var m;switch(h.key){case"Enter":h.preventDefault(),r.onChange(d);break;case"Escape":h.preventDefault(),r.props.onCancel();break;case"ArrowUp":case"ArrowDown":{h.preventDefault();var g=d+(h.key==="ArrowUp"?1:-1);r.yearOptionButtonsRef[g]&&((m=r.yearOptionButtonsRef[g])===null||m===void 0||m.focus());break}}},r.renderOptions=function(){r.yearOptionButtonsRef={};var d=r.props.year,h=r.state.yearsList.map(function(p){return ae.createElement("div",{ref:function(b){r.yearOptionButtonsRef[p]=b,p===d&&(b==null||b.focus())},role:"button",tabIndex:0,className:d===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:r.onChange.bind(r,p),onKeyDown:r.handleOptionKeyDown.bind(r,p),"aria-selected":d===p?"true":void 0},d===p?ae.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),m=r.props.minDate?ft(r.props.minDate):null,g=r.props.maxDate?ft(r.props.maxDate):null;return(!g||!r.state.yearsList.find(function(p){return p===g}))&&h.unshift(ae.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},ae.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!m||!r.state.yearsList.find(function(p){return p===m}))&&h.push(ae.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},ae.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),h},r.onChange=function(d){r.props.onChange(d)},r.handleClickOutside=function(){r.props.onCancel()},r.shiftYears=function(d){var h=r.state.yearsList.map(function(m){return m+d});r.setState({yearsList:h})},r.incrementYears=function(){return r.shiftYears(1)},r.decrementYears=function(){return r.shiftYears(-1)};var s=t.yearDropdownItemNumber,i=t.scrollableYearDropdown,l=s||(i?10:5);return r.state={yearsList:Bte(r.props.year,l,r.props.minDate,r.props.maxDate)},r.dropdownRef=D.createRef(),r}return e.prototype.componentDidMount=function(){var t=this.dropdownRef.current;
vendor: 5,347 bytes, line 4352
4352if(t){var r=t.children?Array.from(t.children):null,s=r?r.find(function(i){return i.ariaSelected}):null;t.scrollTop=s&&s instanceof HTMLElement?s.offsetTop+(s.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},e.prototype.render=function(){var t=Kn({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return ae.createElement(yx,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},e})(D.Component),zte=(function(n){fr(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var r=t.props.minDate?ft(t.props.minDate):1900,s=t.props.maxDate?ft(t.props.maxDate):2100,i=[],l=r;l<=s;l++)i.push(ae.createElement("option",{key:l,value:l},l));return i},t.onSelectChange=function(r){t.onChange(parseInt(r.target.value))},t.renderSelectMode=function(){return ae.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(r){return ae.createElement("button",{key:"read",type:"button",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:t.toggleDropdown},ae.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),ae.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return ae.createElement(Ute,lt({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var r=t.state.dropdownVisible,s=[t.renderReadView(!r)];return r&&s.unshift(t.renderDropdown()),s},t.onChange=function(r){t.toggleDropdown(),r!==t.props.year&&t.props.onChange(r)},t.toggleDropdown=function(r){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,r)})},t.handleYearChange=function(r,s){var i;(i=t.onSelect)===null||i===void 0||i.call(t,r,s),t.setOpen()},t.onSelect=function(r,s){var i,l;(l=(i=t.props).onSelect)===null||l===void 0||l.call(i,r,s)},t.setOpen=function(){var r,s;(s=(r=t.props).setOpen)===null||s===void 0||s.call(r,!0)},t}return e.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return ae.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},e})(D.Component),qte=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],_P="react-datepicker-ignore-onclickoutside",Hte=function(n){var e=(n.className||"").split(/\s+/);return qte.some(function(t){return e.indexOf(t)>=0})},Yte=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;return r.monthContainer=void 0,r.handleClickOutside=function(s){r.props.onClickOutside(s)},r.setClickOutsideRef=function(){return r.containerRef.current},r.handleDropdownFocus=function(s){var i,l;Hte(s.target)&&((l=(i=r.props).onDropdownFocus)===null||l===void 0||l.call(i,s))},r.getDateInView=function(){var s=r.props,i=s.preSelection,l=s.selected,d=s.openToDate,h=xP(r.props),m=bP(r.props),g=Tt(),p=d||l||i;return p||(h&&La(g,h)?h:m&&wi(g,m)?m:g)},r.increaseMonth=function(){r.setState(function(s){var i=s.date;return{date:ia(i,1)}},function(){return r.handleMonthChange(r.state.date)})},r.decreaseMonth=function(){r.setState(function(s){var i=s.date;return{date:hc(i,1)}},function(){return r.handleMonthChange(r.state.date)})},r.handleDayClick=function(s,i,l){r.props.onSelect(s,i,l),r.props.setPreSelection&&r.props.setPreSelection(s)},r.handleDayMouseEnter=function(s){r.setState({selectingDate:s}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(s)},r.handleMonthMouseLeave=function(){r.setState({selectingDate:void 0}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()},r.handleYearMouseEnter=function(s,i){r.setState({selectingDate:Ca(Tt(),i)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(s,i)},r.handleYearMouseLeave=function(s,i){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(s,i)},r.handleYearChange=function(s){var i,l,d,h;(l=(i=r.props).onYearChange)===null||l===void 0||l.call(i,s),r.setState({isRenderAriaLiveMessage:!0}),r.props.adjustDateOnChange&&(r.props.onSelect(s),(h=(d=r.props).setOpen)===null||h===void 0||h.call(d,!0)),r.props.setPreSelection&&r.props.setPreSelection(s)},r.getEnabledPreSelectionDateForMonth=function(s){if(!ks(s,r.props))return s;for(var i=Ti(s),l=mte(s),d=DX(l,i),h=null,m=0;m<=d;m++){var g=na(i,m);if(!ks(g,r.props)){h=g;break}}return h},r.handleMonthChange=function(s){var i,l,d,h=(i=r.getEnabledPreSelectionDateForMonth(s))!==null&&i!==void 0?i:s;r.handleCustomMonthChange(h),r.props.adjustDateOnChange&&(r.props.onSelect(h),(d=(l=r.props).setOpen)===null||d===void 0||d.call(l,!0)),r.props.setPreSelection&&r.props.setPreSelection(h)},r.handleCustomMonthChange=function(s){var i,l;(l=(i=r.props).onMonthChange)===null||l===void 0||l.call(i,s),r.setState({isRenderAriaLiveMessage:!0})},r.handleMonthYearChange=function(s){r.handleYearChange(s),r.handleMonthChange(s)},r.changeYear=function(s){r.setState(function(i){var l=i.date;
4352return{date:Ca(l,Number(s))}},function(){return r.handleYearChange(r.state.date)})},r.changeMonth=function(s){r.setState(function(i){var l=i.date;return{date:cs(l,Number(s))}},function(){var i,l;r.handleMonthChange(r.state.date),(l=(i=r.props).onMonthSelectedInChange)===null||l===void 0||l.call(i,0)})},r.changeMonthYear=function(s){r.setState(function(i){var l=i.date;return{date:Ca(cs(l,Hr(s)),ft(s))}},function(){return r.handleMonthYearChange(r.state.date)})},r.header=function(s,i){if(s===void 0&&(s=r.state.date),i===void 0&&(i=0),!zr(s))return[];var l=r.props.disabled,d=zo(s,r.props.locale,r.props.calendarStartDay),h=[];return r.props.showWeekNumbers&&h.push(ae.createElement("div",{key:"W",className:"react-datepicker__day-name ".concat(l?"react-datepicker__day-name--disabled":""),role:"columnheader"},ae.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),ae.createElement("span",{"aria-hidden":"true"},r.props.weekLabel||"#"))),h.concat([0,1,2,3,4,5,6].map(function(m){var g=na(d,m),p=r.formatWeekday(g,r.props.locale),b=sn(g,"EEEE",r.props.locale),w=r.props.weekDayClassName?r.props.weekDayClassName(g):void 0;if(r.props.renderCustomDayName){var _=r.props.renderCustomDayName({day:g,shortName:p,fullName:b,locale:r.props.locale,customDayNameCount:i});return ae.createElement("div",{key:m,role:"columnheader",className:Kn("react-datepicker__day-name",w,l?"react-datepicker__day-name--disabled":"")},_)}return ae.createElement("div",{key:m,role:"columnheader",className:Kn("react-datepicker__day-name",w,l?"react-datepicker__day-name--disabled":"")},ae.createElement("span",{className:"react-datepicker__sr-only"},b),ae.createElement("span",{"aria-hidden":"true"},p))}))},r.formatWeekday=function(s,i){return r.props.formatWeekDay?pte(s,r.props.formatWeekDay,i):r.props.useWeekdaysShort?yte(s,i):gte(s,i)},r.decreaseYear=function(){r.setState(function(s){var i,l=s.date;return{date:tl(l,r.props.showYearPicker?(i=r.props.yearItemNumber)!==null&&i!==void 0?i:e.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.clearSelectingDate=function(){r.setState({selectingDate:void 0})},r.renderPreviousButton=function(){var s,i,l;if(!r.props.renderCustomHeader){var d=(s=r.props.monthsShown)!==null&&s!==void 0?s:e.defaultProps.monthsShown,h=r.props.showPreviousMonths?d-1:0,m=(i=r.props.monthSelectedIn)!==null&&i!==void 0?i:h,g=hc(r.state.date,m),p;switch(!0){case r.props.disabled:p=!0;break;case r.props.showMonthYearPicker:p=QD(r.state.date,r.props);break;case r.props.showYearPicker:p=_te(r.state.date,r.props);break;case r.props.showQuarterYearPicker:p=vte(r.state.date,r.props);break;default:p=KD(g,r.props);break}if(!(!((l=r.props.forceShowMonthNavigation)!==null&&l!==void 0?l:e.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&p||r.props.showTimeSelectOnly)){var b=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],w=["react-datepicker__navigation","react-datepicker__navigation--previous"],_=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(_=r.decreaseYear),p&&r.props.showDisabledMonthNavigation&&(w.push("react-datepicker__navigation--previous--disabled"),_=void 0);var N=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,E=r.props,j=E.previousMonthButtonLabel,P=j===void 0?e.defaultProps.previousMonthButtonLabel:j,A=E.previousYearButtonLabel,M=A===void 0?e.defaultProps.previousYearButtonLabel:A,O=r.props,q=O.previousMonthAriaLabel,L=q===void 0?typeof P=="string"?P:"Previous Month":q,k=O.previousYearAriaLabel,I=k===void 0?typeof M=="string"?M:"Previous Year":k;return ae.createElement("button",{type:"button",className:w.join(" "),onClick:_,onKeyDown:r.props.handleOnKeyDown,"aria-label":N?I:L},ae.createElement("span",{className:b.join(" ")},N?M:P))}}},r.increaseYear=function(){r.setState(function(s){var i,l=s.date;return{date:ra(l,r.props.showYearPicker?(i=r.props.yearItemNumber)!==null&&i!==void 0?i:e.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.renderNextButton=function(){var s;if(!r.props.renderCustomHeader){var i;switch(!0){case r.props.disabled:i=!0;break;case r.props.showMonthYearPicker:i=XD(r.state.date,r.props);break;case r.props.showYearPicker:i=Tte(r.state.date,r.props);break;case r.props.showQuarterYearPicker:i=wte(r.state.date,r.props);break;default:i=WD(r.state.date,r.props);break}if(!(!((s=r.props.forceShowMonthNavigation)!==null&&s!==void 0?s:e.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&i||r.props.showTimeSelectOnly)){var l=["react-datepicker__navigation","react-datepicker__navigation--next"],d=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];r.props.showTimeSelect&&l.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&l.push("react-datepicker__navigation--next--with-today-button");var h=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(h=r.increaseYear),i&&r.props.showDisabledMonthNavigation&&(l.push("react-datepicker__navigation--next--disabled"),h=void 0);var m=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,g=r.props,p=g.nextMonthButtonLabel,b=p===void 0?e.defaultProps.nextMonthButtonLabel:p,w=g.nextYearButtonLabel,_=w===void 0?e.defaultProps.nextYearButtonLabel:w,N=r.props,E=N.nextMonthAriaLabel,j=E===void 0?typeof b=="string"?b:"Next Month":E,P=N.nextYearAriaLabel,A=P===void 0?typeof _=="string"?_:"Next Year":P;return ae.createElement("button",{type:"button",className:l.join(" "),onClick:h,onKeyDown:r.props.handleOnKeyDown,"aria-label":m?A:j},ae.createElement("span",{className:d.join(" ")},m?_:b))}}},r.renderCurrentMonth=function(s){s===void 0&&(s=r.state.date);var i=["react-datepicker__current-month"];return r.props.showYearDropdown&&i.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&i.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&i.push("react-datepicker__current-month--hasMonthYearDropdown"),ae.createElement("h2",{className:i.join(" ")},zr(s)?sn(s,r.props.dateFormat,r.props.locale):"")},r.renderYearDropdown=function(s){if(s===void 0&&(s=!1),!(!r.props.showYearDropdown||s))return ae.createElement(zte,lt({},e.defaultProps,r.props,{date:r.state.date,onChange:r.changeYear,year:ft(r.state.date)}))},r.renderMonthDropdown=function(s){if(s===void 0&&(s=!1),!(!r.props.showMonthDropdown||s))return ae.createElement(Mte,lt({},e.defaultProps,r.props,{month:Hr(r.state.date),onChange:r.changeMonth}))},r.renderMonthYearDropdown=function(s){if(s===void 0&&(s=!1),!(!r.props.showMonthYearDropdown||s))return ae.createElement(Lte,lt({},e.defaultProps,r.props,{date:r.state.date,onChange:r.changeMonthYear}))},r.handleTodayButtonClick=function(s){r.props.onSelect(qD(),s),r.props.setPreSelection&&r.props.setPreSelection(qD())},r.renderTodayButton=function(){if(!(!r.props.todayButton||r.props.showTimeSelectOnly))return ae.createElement("div",{className:"react-datepicker__today-button",onClick:r.handleTodayButtonClick},r.props.todayButton)},r.renderDayNamesHeader=function(s,i){return i===void 0&&(i=0),ae.createElement("div",{className:"react-datepicker__day-names",role:"row"},r.header(s,i))},r.renderDefaultHeader=function(s){var i=s.monthDate,l=s.i,d=ae.createElement("div",{className:Kn("react-datepicker__header",{"react-datepicker__header--has-time-select":r.props.showTimeSelect,"react-datepicker__header--middle":r.props.monthHeaderPosition==="middle","react-datepicker__header--bottom":r.props.monthHeaderPosition==="bottom"})},r.renderCurrentMonth(i),ae.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(l!==0),r.renderMonthYearDropdown(l!==0),r.renderYearDropdown(l!==0)));return r.props.monthHeaderPosition==="top"?d:ae.createElement("div",{className:"react-datepicker__header-wrapper"},r.renderPreviousButton()||null,r.renderNextButton()||null,d)},r.renderCustomHeader=function(s){var i,l,d=s.monthDate,h=s.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var m=r.props,g=m.showYearPicker,p=m.yearItemNumber,b;if(g){var w=vi(d,p),_=w.startPeriod,N=w.endPeriod;b={startYear:_,endYear:N}}var E=KD(r.state.date,r.props),j=WD(r.state.date,r.props),P=QD(r.state.date,r.props),A=XD(r.state.date,r.props);return ae.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},(l=(i=r.props).renderCustomHeader)===null||l===void 0?void 0:l.call(i,lt(lt(lt({},r.state),g&&{visibleYearsRange:b}),{customHeaderCount:h,monthDate:d,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:E,nextMonthButtonDisabled:j,prevYearButtonDisabled:P,nextYearButtonDisabled:A})))},r.renderYearHeader=function(s){var i=s.monthDate,l=r.props,d=l.showYearPicker,h=l.yearItemNumber,m=h===void 0?e.defaultProps.yearItemNumber:h,g=vi(i,m),p=g.startPeriod,b=g.endPeriod;return ae.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},d?"".concat(p," - ").concat(b):ft(i))},r.renderHeader=function(s){var i=s.monthDate,l=s.i,d=l===void 0?0:l,h={monthDate:i,i:d};switch(!0){case r.props.renderCustomHeader!==void 0:return r.renderCustomHeader(h);case(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker):return r.renderYearHeader(h);default:return r.renderDefaultHeader(h)}},r.renderMonths=function(){var s,i;if(!(r.props.showTimeSelectOnly||r.props.showYearPicker)){for(var l=[],d=(s=r.props.monthsShown)!==null&&s!==void 0?s:e.defaultProps.monthsShown,h=r.props.showPreviousMonths?d-1:0,m=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?ra(r.state.date,h):hc(r.state.date,h),g=(i=r.props.monthSelectedIn)!==null&&i!==void 0?i:h,p=0;p<d;++p){var b=p-g+h,w=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?ra(m,b):ia(m,b),_="month-".concat(p),N=p<d-1,E=p>0;l.push(ae.createElement("div",{key:_,ref:function(j){r.monthContainer=j??void 0},className:"react-datepicker__month-container"},r.props.monthHeaderPosition==="top"&&r.renderHeader({monthDate:w,i:p}),ae.createElement(Ite,lt({},e.defaultProps,r.props,{containerRef:r.containerRef,ariaLabelPrefix:r.props.monthAriaLabelPrefix,day:w,onDayCl
4352ick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,handleOnMonthKeyDown:r.props.handleOnKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,orderInDisplay:p,selectingDate:r.state.selectingDate,monthShowsDuplicateDaysEnd:N,monthShowsDuplicateDaysStart:E,dayNamesHeader:r.renderDayNamesHeader(w,p),monthHeader:r.props.monthHeaderPosition==="middle"?r.renderHeader({monthDate:w,i:p}):void 0,monthFooter:r.props.monthHeaderPosition==="bottom"?r.renderHeader({monthDate:w,i:p}):void 0}))))}return l}},r.renderYears=function(){if(!r.props.showTimeSelectOnly&&r.props.showYearPicker)return ae.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader({monthDate:r.state.date}),ae.createElement(Fte,lt({},e.defaultProps,r.props,{selectingDate:r.state.selectingDate,date:r.state.date,onDayClick:r.handleDayClick,clearSelectingDate:r.clearSelectingDate,onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave})))},r.renderTimeSection=function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return ae.createElement(Vte,lt({},e.defaultProps,r.props,{onChange:r.props.onTimeChange,format:r.props.timeFormat,intervals:r.props.timeIntervals,monthRef:r.state.monthContainer}))},r.renderInputTimeSection=function(){var s,i;if(r.props.showTimeInput){if(r.props.selectsRange){var l=r.props,d=l.startDate,h=l.endDate,m=d?new Date(d):void 0,g=m&&zr(m)&&!!d,p=g?"".concat(ku(m.getHours()),":").concat(ku(m.getMinutes())):"",b=h?new Date(h):void 0,w=b&&zr(b)&&!!h,_=w?"".concat(ku(b.getHours()),":").concat(ku(b.getMinutes())):"";return ae.createElement(ae.Fragment,null,ae.createElement(ow,lt({},e.defaultProps,r.props,{date:m,timeString:p,onChange:function(P){var A,M;(M=(A=r.props).onTimeChange)===null||M===void 0||M.call(A,P,"start")},timeInputLabel:((s=r.props.timeInputLabel)!==null&&s!==void 0?s:"Time")+" (Start)"})),ae.createElement(ow,lt({},e.defaultProps,r.props,{date:b,timeString:_,onChange:function(P){var A,M;(M=(A=r.props).onTimeChange)===null||M===void 0||M.call(A,P,"end")},timeInputLabel:((i=r.props.timeInputLabel)!==null&&i!==void 0?i:"Time")+" (End)"})))}var N=r.props.selected?new Date(r.props.selected):void 0,E=N&&zr(N)&&!!r.props.selected,j=E?"".concat(ku(N.getHours()),":").concat(ku(N.getMinutes())):"";return ae.createElement(ow,lt({},e.defaultProps,r.props,{date:N,timeString:j,onChange:function(P){var A,M;(M=(A=r.props).onTimeChange)===null||M===void 0||M.call(A,P)}}))}},r.renderAriaLiveRegion=function(){var s;if(!zr(r.state.date))return ae.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"});var i=vi(r.state.date,(s=r.props.yearItemNumber)!==null&&s!==void 0?s:e.defaultProps.yearItemNumber),l=i.startPeriod,d=i.endPeriod,h;return r.props.showYearPicker?h="".concat(l," - ").concat(d):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?h=ft(r.state.date):h="".concat(sT(Hr(r.state.date),r.props.locale)," ").concat(ft(r.state.date)),ae.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&h)},r.renderChildren=function(){if(r.props.children)return ae.createElement("div",{className:"react-datepicker__children-container"},r.props.children)},r.containerRef=D.createRef(),r.state={date:r.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},r}return Object.defineProperty(e,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:_P,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:qm,monthHeaderPosition:"top"}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){t.setState({monthContainer:t.monthContainer})})())},e.prototype.componentDidUpdate=function(t){var r=this;if(this.props.preSelection&&zr(this.props.preSelection)&&(!yt(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var s=!Sr(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return s&&r.handleCustomMonthChange(r.state.date)})}else this.props.openToDate&&!yt(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},e.prototype.render=function(){var t=this.props.container||ite;return ae.createElement(yx,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},ae.createElement("div",{style:{display:"contents"},ref:this.containerRef},ae.createElement(t,{className:Kn("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly,inline:this.props.inline},this.renderAriaLiveRegion(),this.props.monthHeaderPosition==="top"&&this.renderPreviousButton(),this.props.monthHeaderPosition==="top"&&this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},e})(D.Component),Gte=function(n){var e=n.icon,t=n.className,r=t===void 0?"":t,s=n.onClick,i="react-datepicker__calendar-icon";if(typeof e=="string")return ae.createElement("i",{className:"".concat(i," ").concat(e," ").concat(r),"aria-hidden":"true",onClick:s});if(ae.isValidElement(e)){var l=e;return ae.cloneElement(l,{className:"".concat(l.props.className||""," ").concat(i," ").concat(r),onClick:function(d){typeof l.props.onClick=="function"&&l.props.onClick(d),typeof s=="function"&&s(d)}})}return ae.createElement("svg",{className:"".concat(i," ").concat(r),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:s},ae.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 9
43526 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},TP=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;return r.portalRoot=null,r.el=document.createElement("div"),r}return e.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},e.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},e.prototype.render=function(){return HL.createPortal(this.props.children,this.el)},e})(D.Component),$te="[tabindex], a, button, input, select, textarea",Kte=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},NP=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;return r.getTabChildren=function(){var s;return Array.prototype.slice.call((s=r.tabLoopRef.current)===null||s===void 0?void 0:s.querySelectorAll($te),1,-1).filter(Kte)},r.handleFocusStart=function(){var s=r.getTabChildren();s&&s.length>1&&s[s.length-1].focus()},r.handleFocusEnd=function(){var s=r.getTabChildren();s&&s.length>1&&s[0].focus()},r.tabLoopRef=D.createRef(),r}return e.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:e.defaultProps.enableTabLoop)?ae.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},ae.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,ae.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},e.defaultProps={enableTabLoop:!0},e})(D.Component);function Wte(n){function e(t){var r,s=typeof t.hidePopper=="boolean"?t.hidePopper:!0,i=D.useRef(null),l=ate(lt({open:!s,whileElementsMounted:Lee,placement:t.popperPlacement,middleware:Va([Gee({padding:15}),Yee(10),$ee({element:i})],(r=t.popperModifiers)!==null&&r!==void 0?r:[],!0)},t.popperProps)),d=lt(lt({},t),{hidePopper:s,popperProps:lt(lt({},l),{arrowRef:i})});return ae.createElement(n,lt({},d))}return e.displayName="withFloating(".concat(n.displayName||n.name||"Component",")"),e}var Qte=function(n){var e=n.className,t=n.wrapperClassName,r=n.hidePopper,s=r===void 0?!0:r,i=n.popperComponent,l=n.targetComponent,d=n.enableTabLoop,h=n.popperOnKeyDown,m=n.portalId,g=n.portalHost,p=n.popperProps,b=n.showArrow,w=n.popperTargetRef,_=n.monthHeaderPosition;D.useEffect(function(){w!=null&&w.current&&p.refs.setPositionReference(w.current)},[w,p.refs]);var N=void 0;if(!s){var E=Kn("react-datepicker-popper",!b&&"react-datepicker-popper-offset",_==="middle"&&"react-datepicker-popper--header-middle",_==="bottom"&&"react-datepicker-popper--header-bottom",e);N=ae.createElement(NP,{enableTabLoop:d},ae.createElement("div",{ref:p.refs.setFloating,style:p.floatingStyles,className:E,"data-placement":p.placement,onKeyDown:h},i,b&&ae.createElement(Jee,{ref:p.arrowRef,context:p.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}n.popperContainer&&(N=D.createElement(n.popperContainer,{},N)),m&&!s&&(N=ae.createElement(TP,{portalId:m,portalHost:g},N));var j=Kn("react-datepicker-wrapper",t);return ae.createElement(ae.Fragment,null,ae.createElement("div",{ref:p.refs.setReference,className:j},l),N)},Xte=Wte(Qte);function a5(n,e){return n&&e?Hr(n)!==Hr(e)||ft(n)!==ft(e):n!==e}var cw="Date input not valid.",Jte=(function(n){fr(e,n);function e(t){var r=n.call(this,t)||this;return r.calendar=null,r.input=null,r.getPreSelection=function(){var s=r.props.timeZone,i=r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:Tt();return s?UD(i,s):i},r.modifyHolidays=function(){var s;return(s=r.props.holidays)===null||s===void 0?void 0:s.reduce(function(i,l){var d=zl(l.date,"yyyy-MM-dd",void 0,!1);return d?Va(Va([],i,!0),[lt(lt({},l),{date:d})],!1):i},[])},r.calcInitialState=function(){var s=r.props.timeZone,i=r.getPreSelection(),l=xP(r.props),d=bP(r.props),h=l&&La(i,_f(l))?l:d&&wi(i,HD(d))?d:i,m=r.props.selectsRange?r.props.startDate:r.props.selected;return m&&s&&(m=UD(m,s)),{open:r.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:m??h,highlightDates:JD(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},r.getInputValue=function(){var s,i=r.props,l=i.locale,d=i.startDate,h=i.endDate,m=i.rangeSeparator,g=i.selected,p=i.selectedDates,b=i.selectsMultiple,w=i.selectsRange,_=i.formatMultipleDates,N=i.value,E=(s=r.props.dateFormat)!==null&&s!==void 0?s:e.defaultProps.dateFormat,j=r.state.inputValue;if(typeof N=="string")return N;if(typeof j=="string")return j;if(w)return cte(d,h,{dateFormat:E,locale:l,rangeSeparator:m});if(b){if(_){var P=function(A){return Ur(A,{dateFormat:E,locale:l})};return _(p??[],P)}return ute(p??[],{dateFormat:E,locale:l})}return Ur(g,{dateFormat:E,locale:l})},r.resetHiddenStatus=function(){r.setState(lt(lt({},r.state),{wasHidden:!1}))},r.setHiddenStatus=function(){r.setState(lt(lt({},r.state),{wasHidden:!0}))},r.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&r.setHiddenStatus()},r.clearPreventFocusTimeout=function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)},r.setFocus=function(){var s,i;(i=(s=r.input)===null||s===void 0?void 0:s.focus)===null||i===void 0||i.call(s,{preventScroll:!0})},r.setBlur=function(){var s,i;(i=(s=r.input)===null||s===void 0?void 0:s.blur)===null||i===void 0||i.call(s),r.cancelFocusInput()},r.deferBlur=function(){requestAnimationFrame(function(){r.setBlur()})},r.setOpen=function(s,i){i===void 0&&(i=!1),r.setState({open:s,preSelection:s&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:uw},function(){s||r.setState(function(l){return{focused:i?l.focused:!1}},function(){!i&&r.deferBlur(),r.setState({inputValue:null})})})},r.inputOk=function(){return Ha(r.state.preSelection)},r.isCalendarOpen=function(){return r.props.open===void 0?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open}
4352,r.handleFocus=function(s){var i,l,d=r.state.wasHidden,h=d?r.state.open:!0;d&&r.resetHiddenStatus(),r.state.preventFocus||((l=(i=r.props).onFocus)===null||l===void 0||l.call(i,s),h&&!r.props.preventOpenOnFocus&&!r.props.readOnly&&r.setOpen(!0)),r.setState({focused:!0})},r.sendFocusBackToInput=function(){r.preventFocusTimeout&&r.clearPreventFocusTimeout(),r.setState({preventFocus:!0},function(){r.preventFocusTimeout=setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})})},r.cancelFocusInput=function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=void 0},r.deferFocusInput=function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout(function(){return r.setFocus()},1)},r.handleDropdownFocus=function(){r.cancelFocusInput()},r.resetInputValue=function(){r.setState(lt(lt({},r.state),{inputValue:null}))},r.handleBlur=function(s){var i,l;(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&((l=(i=r.props).onBlur)===null||l===void 0||l.call(i,s));var d=r.state.inputValue;if(typeof d=="string"&&d.length>0){var h=/[a-zA-Z0-9]/.test(d);!h&&r.props.selected&&r.setSelected(null,void 0,!0)}r.resetInputValue(),r.state.open&&r.props.open===!1&&r.setOpen(!1),r.setState({focused:!1})},r.handleCalendarClickOutside=function(s){var i,l;(l=(i=r.props).onClickOutside)===null||l===void 0||l.call(i,s),!r.props.inline&&!s.defaultPrevented&&r.setOpen(!1),r.props.withPortal&&s.preventDefault()},r.handleChange=function(){for(var s,i,l,d,h,m,g,p,b=[],w=0;w<arguments.length;w++)b[w]=arguments[w];var _=b[0];if(!(r.props.onChangeRaw&&(r.props.onChangeRaw.apply(r,b),!_||typeof _.isDefaultPrevented!="function"||_.isDefaultPrevented()))){r.setState({inputValue:(_==null?void 0:_.target)instanceof HTMLInputElement?_.target.value:null,lastPreSelectChange:Zte});var N=r.props,E=N.selectsRange,j=N.startDate,P=N.endDate,A=(s=r.props.dateFormat)!==null&&s!==void 0?s:e.defaultProps.dateFormat,M=(i=r.props.strictParsing)!==null&&i!==void 0?i:e.defaultProps.strictParsing,O=(_==null?void 0:_.target)instanceof HTMLInputElement?_.target.value:"";if(E){var q=r.props.rangeSeparator,L=q.trim(),k=O.split(A.includes(L)?q:L,2).map(function($){return $.trim()}),I=k[0],R=k[1],F=zl(I??"",A,r.props.locale,M),B=F?zl(R??"",A,r.props.locale,M):null,V=((l=rc(j))===null||l===void 0?void 0:l.getTime())!==(F==null?void 0:F.getTime()),se=((d=rc(P))===null||d===void 0?void 0:d.getTime())!==(B==null?void 0:B.getTime());if(!V&&!se||F&&ks(F,r.props)||B&&ks(B,r.props))return;F&&r.setState({preSelection:F}),(m=(h=r.props).onChange)===null||m===void 0||m.call(h,[F,B],_)}else{var ye=zl(O,A,r.props.locale,M,(g=r.props.selected)!==null&&g!==void 0?g:void 0);if(ye||!O)r.setSelected(ye,_,!0);else if(!r.props.inline){var W=lte(O,(p=r.state.preSelection)!==null&&p!==void 0?p:void 0);W&&(!r.props.minDate||!La(W,r.props.minDate))&&(!r.props.maxDate||!wi(W,r.props.maxDate))&&r.setState({preSelection:W})}}}},r.handleSelect=function(s,i,l){var d;if(!r.props.readOnly){var h=r.props,m=h.selectsRange,g=h.startDate,p=h.endDate,b=h.locale,w=h.swapRange,_=(d=r.props.dateFormat)!==null&&d!==void 0?d:e.defaultProps.dateFormat,N=!m||g&&!p&&(w||!iw(s,g));if(r.props.shouldCloseOnSelect&&!r.props.showTimeSelect&&N&&r.sendFocusBackToInput(),r.props.onChangeRaw){var E=Ur(s,{dateFormat:_,locale:b});r.props.onChangeRaw(i,{date:s,formattedDate:E})}r.setSelected(s,i,!1,l),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect?r.setPreSelection(s):N&&r.setOpen(!1)}},r.setSelected=function(s,i,l,d){var h,m,g=r.props.timeZone,p=s;if(p&&g&&(p=fi(p,g)),r.props.showYearPicker){if(p!==null&&N0(ft(p),r.props))return}else if(r.props.showMonthYearPicker){if(p!==null&&yP(p,r.props))return}else if(p!==null&&ks(p,r.props))return;var b=r.props,w=b.onChange,_=b.selectsRange,N=b.startDate,E=b.endDate,j=b.selectsMultiple,P=b.selectedDates,A=b.minTime,M=b.swapRange;if(!sc(r.props.selected,p)||r.props.allowSameDay||_||j)if(p!==null&&(r.props.selected&&(!l||!r.props.showTimeSelect&&!r.props.showTimeSelectOnly&&!r.props.showTimeInput)&&(p=mi(p,{hour:gr(r.props.selected),minute:yr(r.props.selected),second:Uo(r.props.selected)})),!l&&(r.props.showTimeSelect||r.props.showTimeSelectOnly)&&A&&(p=mi(p,{hour:A.getHours(),minute:A.getMinutes(),second:A.getSeconds()})),r.props.inline||r.setState({preSelection:p}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:d})),_){var O=w,q=!N&&!E,L=N&&!E,k=!N&&!!E,I=N&&E;q?O==null||O([p,null],i):L?p===null?O==null||O([null,null],i):iw(p,N)?M?O==null||O([p,N],i):O==null||O([p,null],i):O==null||O([N,p],i):k&&(p&&iw(p,E)?O==null||O([p,E],i):O==null||O([p,null],i)),I&&(O==null||O([p,null],i))}else if(j){var R=w;if(p!==null)if(!(P!=null&&P.length))R==null||R([p],i);else{var F=P.some(function(V){return yt(V,p)});if(F){var B=P.filter(function(V){return!yt(V,p)});R==null||R(B,i)}else R==null||R(Va(Va([],P,!0),[p],!1),i)}}else w==null||w(p,i);l||((m=(h=r.props).onSelect)===null||m===void 0||m.call(h,p,i),r.setState({inputValue:null}))}
4352,r.setPreSelection=function(s){if(!r.props.readOnly){var i=Ha(r.props.minDate),l=Ha(r.props.maxDate),d=!0;if(s){var h=_f(s);if(i&&l)d=Kl(s,r.props.minDate,r.props.maxDate);else if(i){var m=_f(r.props.minDate);d=wi(s,m)||sc(h,m)}else if(l){var g=HD(r.props.maxDate);d=La(s,g)||sc(h,g)}}d&&r.setState({preSelection:s})}},r.toggleCalendar=function(){r.setOpen(!r.state.open)},r.handleTimeChange=function(s,i){var l,d;if(!r.props.selectsMultiple){var h=r.props,m=h.selectsRange,g=h.startDate,p=h.endDate,b=h.onChange,w=h.timeZone;if(m){var _=b;if(i==="start"){if(g){var N=mi(g,{hour:gr(s),minute:yr(s)});r.setState({preSelection:N}),w&&(N=fi(N,w)),_==null||_([N,p?w?fi(p,w):p:null],void 0)}}else if(i==="end"){if(p){var E=mi(p,{hour:gr(s),minute:yr(s)});r.setState({preSelection:E}),w&&(E=fi(E,w)),_==null||_([g?w?fi(g,w):g:null,E],void 0)}}else{var j=g&&!p;if(j){var N=mi(g,{hour:gr(s),minute:yr(s)});r.setState({preSelection:N}),w&&(N=fi(N,w)),_==null||_([N,null],void 0)}else if(g&&p){var E=mi(p,{hour:gr(s),minute:yr(s)});r.setState({preSelection:E}),w&&(E=fi(E,w)),_==null||_([w?fi(g,w):g,E],void 0)}else{var P=mi(r.getPreSelection(),{hour:gr(s),minute:yr(s)});r.setState({preSelection:P})}}}else{var A=r.props.selected?r.props.selected:r.getPreSelection(),P=r.props.selected?s:mi(A,{hour:gr(s),minute:yr(s)});r.setState({preSelection:P}),P&&w&&(P=fi(P,w)),(d=(l=r.props).onChange)===null||d===void 0||d.call(l,P)}r.props.shouldCloseOnSelect&&!r.props.showTimeInput&&(r.sendFocusBackToInput(),r.setOpen(!1)),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})}},r.onInputClick=function(){var s,i;!r.props.disabled&&!r.props.readOnly&&r.setOpen(!0),(i=(s=r.props).onInputClick)===null||i===void 0||i.call(s)},r.handleTimeOnlyArrowKey=function(s){var i,l,d,h,m=rc(r.props.selected)||r.state.preSelection||Tt(),g=(i=r.props.timeIntervals)!==null&&i!==void 0?i:30,p=(l=r.props.dateFormat)!==null&&l!==void 0?l:e.defaultProps.dateFormat,b=Array.isArray(p)?p[0]:p,w=_f(m),_=gr(m)*60+yr(m),N=1440-g,E;if(s===Ae.ArrowUp){var j=Math.max(0,_-g);E=hm(w,j)}else{var j=Math.min(N,_+g);E=hm(w,j)}var P=sn(E,b||e.defaultProps.dateFormat,r.props.locale);if(r.setState({preSelection:E,inputValue:P}),!(r.props.selectsRange||r.props.selectsMultiple)){var A=r.props.selected?r.props.selected:r.getPreSelection(),M=r.props.selected?E:mi(A,{hour:gr(E),minute:yr(E)});(h=(d=r.props).onChange)===null||h===void 0||h.call(d,M),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),requestAnimationFrame(function(){r.scrollToTimeOption(E)})}},r.handleTimeOnlyEnterKey=function(s){var i,l,d,h,m=s.target,g=m.value,p=(i=r.props.dateFormat)!==null&&i!==void 0?i:e.defaultProps.dateFormat,b=r.props.timeFormat||"p",w=r.state.preSelection||rc(r.props.selected)||Tt(),_=zl(g,p,r.props.locale,(l=r.props.strictParsing)!==null&&l!==void 0?l:!1,w),N=w;if(_&&zr(_))N=_;else{var E=((d=r.calendar)===null||d===void 0?void 0:d.containerRef.current)instanceof Element&&r.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");if(E instanceof HTMLElement){var j=(h=E.textContent)===null||h===void 0?void 0:h.trim();if(j){var P=zl(j,b,r.props.locale,!1,w);P&&zr(P)&&(N=P)}}}r.handleTimeChange(N),r.setOpen(!1),r.sendFocusBackToInput()},r.scrollToTimeOption=function(s){var i,l;
4352if(!((i=r.calendar)===null||i===void 0)&&i.containerRef.current){for(var d=r.calendar.containerRef.current,h=Array.from(d.querySelectorAll(".react-datepicker__time-list-item")),m=null,g=1/0,p=r.props.timeFormat||"p",b=0,w=h;b<w.length;b++){var _=w[b],N=(l=_.textContent)===null||l===void 0?void 0:l.trim();if(N){var E=zl(N,p,r.props.locale,!1,s);if(E&&zr(E)){if(vP(E,s)){m=_;break}var j=Math.abs(E.getTime()-s.getTime());j<g&&(g=j,m=_)}}}m&&(h.forEach(function(P){P.setAttribute("tabindex","-1")}),m.setAttribute("tabindex","0"),m.scrollIntoView({behavior:"smooth",block:"center"}))}},r.onInputKeyDown=function(s){var i,l,d,h,m,g;(l=(i=r.props).onKeyDown)===null||l===void 0||l.call(i,s);var p=s.key;if(!r.state.open&&!r.props.inline&&!r.props.preventOpenOnFocus){(p===Ae.ArrowDown||p===Ae.ArrowUp||p===Ae.Enter)&&((d=r.onInputClick)===null||d===void 0||d.call(r));return}if(r.state.open&&r.props.showTimeSelectOnly){if(p===Ae.ArrowDown||p===Ae.ArrowUp){s.preventDefault(),r.handleTimeOnlyArrowKey(p);return}if(p===Ae.Enter){s.preventDefault(),r.handleTimeOnlyEnterKey(s);return}}if(r.state.open){if(p===Ae.ArrowDown||p===Ae.ArrowUp){s.preventDefault();var b=r.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":r.props.showWeekPicker&&r.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':r.props.showFullMonthYearPicker||r.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',w=((h=r.calendar)===null||h===void 0?void 0:h.containerRef.current)instanceof Element&&r.calendar.containerRef.current.querySelector(b);w instanceof HTMLElement&&w.focus({preventScroll:!0});return}var _=Tt(r.state.preSelection);p===Ae.Enter?(s.preventDefault(),s.target.blur(),r.inputOk()&&r.state.lastPreSelectChange===uw?(r.handleSelect(_,s),!r.props.shouldCloseOnSelect&&r.setPreSelection(_)):r.setOpen(!1)):p===Ae.Escape?(s.preventDefault(),s.target.blur(),r.sendFocusBackToInput(),r.setOpen(!1)):p===Ae.Tab&&r.setOpen(!1),r.inputOk()||(g=(m=r.props).onInputError)===null||g===void 0||g.call(m,{code:1,msg:cw})}},r.onPortalKeyDown=function(s){var i=s.key;i===Ae.Escape&&(s.preventDefault(),r.setState({preventFocus:!0},function(){r.setOpen(!1),setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})}))},r.onDayKeyDown=function(s){var i,l,d,h,m,g,p=r.props,b=p.minDate,w=p.maxDate,_=p.disabledKeyboardNavigation,N=p.showWeekPicker,E=p.shouldCloseOnSelect,j=p.locale,P=p.calendarStartDay,A=p.adjustDateOnChange,M=p.inline;if((l=(i=r.props).onKeyDown)===null||l===void 0||l.call(i,s),!_){var O=s.key,q=s.shiftKey,L=Tt(r.state.preSelection),k=function(F,B){var V=B;switch(F){case Ae.ArrowRight:V=N?cy(B,1):na(B,1);break;case Ae.ArrowLeft:V=N?CD(B):DZ(B);break;case Ae.ArrowUp:V=CD(B);break;case Ae.ArrowDown:V=cy(B,1);break;case Ae.PageUp:V=q?tl(B,1):hc(B,1);break;case Ae.PageDown:V=q?ra(B,1):ia(B,1);break;case Ae.Home:V=zo(B,j,P);break;case Ae.End:V=fte(B);break}return V},I=function(F,B){for(var V=40,se=F,ye=!1,W=0,$=k(F,B);!ye;){if(W>=V){$=B;break}b&&$<b&&(se=Ae.ArrowRight,$=ks(b,r.props)?k(se,$):b),w&&$>w&&(se=Ae.ArrowLeft,$=ks(w,r.props)?k(se,$):w),ks($,r.props)?((se===Ae.PageUp||se===Ae.Home)&&(se=Ae.ArrowRight),(se===Ae.PageDown||se===Ae.End)&&(se=Ae.ArrowLeft),$=k(se,$)):ye=!0,W++}return $};if(O===Ae.Enter){s.preventDefault(),r.handleSelect(L,s),!E&&r.setPreSelection(L);return}else if(O===Ae.Escape){s.preventDefault(),r.setOpen(!1),r.inputOk()||(h=(d=r.props).onInputError)===null||h===void 0||h.call(d,{code:1,msg:cw});return}var R=null;switch(O){case Ae.ArrowLeft:case Ae.ArrowRight:case Ae.ArrowUp:case Ae.ArrowDown:case Ae.PageUp:case Ae.PageDown:case Ae.Home:case Ae.End:R=I(O,L);break}if(!R){(g=(m=r.props).onInputError)===null||g===void 0||g.call(m,{code:1,msg:cw});return}s.preventDefault(),r.setState({lastPreSelectChange:uw}),A&&r.setSelected(R),r.setPreSelection(R),M&&r.setState({shouldFocusDayInline:!0})}},r.onPopperKeyDown=function(s){var i=s.key;i===Ae.Escape&&(s.preventDefault(),r.sendFocusBackToInput(),r.setOpen(!1))},r.onClearClick=function(s){s&&s.preventDefault&&s.preventDefault(),r.sendFocusBackToInput();var i=r.props,l=i.selectsRange,d=i.onChange;
4352l?d==null||d([null,null],s):d==null||d(null,s),r.setState({inputValue:null})},r.clear=function(){r.onClearClick()},r.onScroll=function(s){typeof r.props.closeOnScroll=="boolean"&&r.props.closeOnScroll?(s.target===document||s.target===document.documentElement||s.target===document.body)&&r.setOpen(!1):typeof r.props.closeOnScroll=="function"&&r.props.closeOnScroll(s)&&r.setOpen(!1)},r.handleMonthSelectedInChange=function(s){r.setState({monthSelectedIn:s})},r.renderCalendar=function(){var s,i;return!r.props.inline&&!r.isCalendarOpen()?null:ae.createElement(Yte,lt({showMonthYearDropdown:void 0,ref:function(l){r.calendar=l}},r.props,r.state,{setOpen:r.setOpen,dateFormat:(s=r.props.dateFormatCalendar)!==null&&s!==void 0?s:e.defaultProps.dateFormatCalendar,onSelect:r.handleSelect,onClickOutside:r.handleCalendarClickOutside,holidays:Ete(r.modifyHolidays()),outsideClickIgnoreClass:r.props.outsideClickIgnoreClass,onDropdownFocus:r.handleDropdownFocus,onTimeChange:r.handleTimeChange,className:r.props.calendarClassName,container:r.props.calendarContainer,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,setPreSelection:r.setPreSelection,dropdownMode:(i=r.props.dropdownMode)!==null&&i!==void 0?i:e.defaultProps.dropdownMode,onMonthSelectedInChange:r.handleMonthSelectedInChange}),r.props.children)},r.renderAriaLiveRegion=function(){var s,i=r.props.locale,l=(s=r.props.dateFormat)!==null&&s!==void 0?s:e.defaultProps.dateFormat,d=r.props.showTimeInput||r.props.showTimeSelect,h=d?"PPPPp":"PPPP",m;return r.props.selectsRange?m="Selected start date: ".concat(Ur(r.props.startDate,{dateFormat:h,locale:i}),". ").concat(r.props.endDate?"End date: "+Ur(r.props.endDate,{dateFormat:h,locale:i}):""):r.props.showTimeSelectOnly?m="Selected time: ".concat(Ur(r.props.selected,{dateFormat:l,locale:i})):r.props.showYearPicker?m="Selected year: ".concat(Ur(r.props.selected,{dateFormat:"yyyy",locale:i})):r.props.showMonthYearPicker?m="Selected month: ".concat(Ur(r.props.selected,{dateFormat:"MMMM yyyy",locale:i})):r.props.showQuarterYearPicker?m="Selected quarter: ".concat(Ur(r.props.selected,{dateFormat:"yyyy, QQQ",locale:i})):m="Selected date: ".concat(Ur(r.props.selected,{dateFormat:h,locale:i})),ae.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},m)},r.renderDateInput=function(){var s,i,l,d,h,m,g,p=Kn(r.props.className,(s={},s[r.props.outsideClickIgnoreClass||e.defaultProps.outsideClickIgnoreClass]=r.state.open,s)),b=r.props.customInput||ae.createElement("input",{type:"text"}),w=r.props.customInputRef||"ref",_={},N=(l=r.props["aria-describedby"])!==null&&l!==void 0?l:r.props.ariaDescribedBy,E=(d=r.props["aria-invalid"])!==null&&d!==void 0?d:r.props.ariaInvalid,j=(h=r.props["aria-label"])!==null&&h!==void 0?h:r.props.ariaLabel,P=(m=r.props["aria-labelledby"])!==null&&m!==void 0?m:r.props.ariaLabelledBy,A=(g=r.props["aria-required"])!==null&&g!==void 0?g:r.props.ariaRequired;return N!=null&&(_["aria-describedby"]=N),E!=null&&(_["aria-invalid"]=E),j!=null&&(_["aria-label"]=j),P!=null&&(_["aria-labelledby"]=P),A!=null&&(_["aria-required"]=A),D.cloneElement(b,lt((i={},i[w]=function(M){r.input=M},i.value=r.getInputValue(),i.onBlur=r.handleBlur,i.onChange=r.handleChange,i.onClick=r.onInputClick,i.onFocus=r.handleFocus,i.onKeyDown=r.onInputKeyDown,i.id=r.props.id,i.name=r.props.name,i.form=r.props.form,i.autoFocus=r.props.autoFocus,i.placeholder=r.props.placeholderText,i.disabled=r.props.disabled,i.autoComplete=r.props.autoComplete,i.className=Kn(b.props.className,p),i.title=r.props.title,i.readOnly=r.props.readOnly,i.required=r.props.required,i.tabIndex=r.props.tabIndex,i),_))},r.renderClearButton=function(){var s=r.props,i=s.isClearable,l=s.disabled,d=s.selected,h=s.startDate,m=s.endDate,g=s.clearButtonTitle,p=s.clearButtonClassName,b=p===void 0?"":p,w=s.ariaLabelClose,_=w===void 0?"Close":w,N=s.selectedDates,E=s.readOnly;return i&&!E&&(d!=null||h!=null||m!=null||N!=null&&N.length)?ae.createElement("button",{type:"button",className:Kn("react-datepicker__close-icon",b,{"react-datepicker__close-icon--disabled":l}),disabled:l,"aria-label":_,onClick:r.onClearClick,title:g,tabIndex:-1}):null},r.state=r.calcInitialState(),r.preventFocusTimeout=void 0,r}return Object.defineProperty(e,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:_P,readOnly:!1,rangeSeparator:pP,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:qm,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}}
4352,enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},e.prototype.componentDidUpdate=function(t,r){var s,i,l,d;this.props.selectsRange&&a5(t.startDate,this.props.startDate)?this.setPreSelection(this.props.startDate):a5(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),this.props.selectsRange&&r.open===!1&&this.state.open===!0&&this.state.monthSelectedIn!==0&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:JD(this.props.highlightDates)}),!r.focused&&!sc(t.selected,this.props.selected)&&this.setState({inputValue:null}),r.open!==this.state.open&&(r.open===!1&&this.state.open===!0&&((i=(s=this.props).onCalendarOpen)===null||i===void 0||i.call(s)),r.open===!0&&this.state.open===!1&&((d=(l=this.props).onCalendarClose)===null||d===void 0||d.call(l)))},e.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},e.prototype.renderInputContainer=function(){var t=this.props,r=t.showIcon,s=t.icon,i=t.calendarIconClassname,l=t.calendarIconClassName,d=t.toggleCalendarOnIconClick,h=this.state.open;return i&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),ae.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&ae.createElement(Gte,lt({icon:s,className:Kn(l,!l&&i,h&&"react-datepicker-ignore-onclickoutside")},d?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},e.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var r=this.state.open?ae.createElement(NP,{enableTabLoop:this.props.enableTabLoop},ae.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(r=ae.createElement(TP,lt({portalId:this.props.portalId},this.props),r)),ae.createElement(ae.Fragment,null,this.renderInputContainer(),r)}return ae.createElement(Xte,lt({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow,monthHeaderPosition:this.props.monthHeaderPosition}))},e})(D.Component),Zte="input",uw="navigate";const dw={};function i5(n,e,t){var s,i,l,d,h,m,g;const r={error:n instanceof Error?n.message:String(n),authInfo:{userId:(s=pi.currentUser)==null?void 0:s.uid,email:(i=pi.currentUser)==null?void 0:i.email,emailVerified:(l=pi.currentUser)==null?void 0:l.emailVerified,isAnonymous:(d=pi.currentUser)==null?void 0:d.isAnonymous,tenantId:(h=pi.currentUser)==null?void 0:h.tenantId,providerInfo:((g=(m=pi.currentUser)==null?void 0:m.providerData)==null?void 0:g.map(p=>({providerId:p.providerId,email:p.email})))||[]},operationType:e,path:t};throw console.error("Firestore Error: ",JSON.stringify(r)),new Error(JSON.stringify(r))}const Nf={kakaoTitle:"크로바가구 카카오톡 1:1 채팅 문의",kakaoDesc:"전화 연결 기다림 없이 스마트폰 하나로 가볍게 질문하세요. 크로바가구 전담 상담사가 1:1 채팅을 통해 제품 상담 및 견적 안내를 도와드립니다.",kakaoUrl:"https://pf.kakao.com/_lxksyxj",kakaoQrImage:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://pf.kakao.com/_lxksyxj",counselingHours:"평일 09:00 ~ 17:00",b2bHeroTitle:`공공기관 · 기업 맞춤
4353스마트 공간 솔루션, CLOVER`,b2bHeroDesc:`단순히 가구를 납품하는 것을 넘어, 기업의 고유문화와 동선을 연구합니다.
4354전국 어디든 무상 방문 실측 및 2D/3D 레이아웃 최적 설계를 무상 지원합니다.`,b2bHeroBgImage:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80",b2bWhyTitle:`공공기관 공간 컨설íŒ
4354…,
4355왜 크로바가구 일까요?`,b2bWhyDesc:"20년 이상의 현장 노하우를 지닌 베테랑 설계 엔지니어와 직접 제조 공장을 보유한 강점을 바탕으로 차별화된 오피스를 선사합니다.",b2bFormTitle:"CLOVER 1:1 공간 솔루션 의뢰서",b2bFormDesc:"필수 항목을 기재해 주시면 크로바 전담 기획팀이 최적의 프리미엄 파트너로서 응대하겠습니다.",provenRecordTitle:"실제 납품 사례로 증명합니다.",provenRecordDesc:"수많은 공공기관, 청사, 학교, 대기업의 신축 및 이전을 성공적으로 조달한 크로바의 완벽한 결과물입니다.",provenRecordButtonText:"+ 납품사례 확인하러 가기",provenRecordButtonUrl:"https://cloveroa.baiceconnect.co.kr/blog/index.php",provenRecordCards:[{id:"1",category:"사무공간 / 중역실",title:"공공기관 행정복지센터",description:"부서 칸막이형 데스크 배치 및 민원실 친환경 소파 커스텀 납품 완료",tags:["#가구 제안","#3D 레이아웃"],imageUrl:"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=600&q=80"},{id:"2",category:"교육기관 / 대학교",title:"초·중·고 다목적 러닝 센터",description:"안정성이 가미된 가변식 회의 데스크 및 다목적 이동용 의자 일체 납품 완료",tags:["#러닝 가구","#자체 시공"],imageUrl:"https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&w=600&q=80"},{id:"3",category:"어메니티 / 라운지",title:"대기업 본사 카페테리아 & 라운지",description:"감각적 카페테리아 구성의 바 테이블, 우드 톤 가구, 라운지 소파 완벽 시공 완료",tags:["#커스텀 제작","#공간 혁신"],imageUrl:"https://images.unsplash.com/photo-1556911220-e15b29be8c8f?auto=format&fit=crop&w=600&q=80"}]},o5=()=>{const[n,e]=D.useState("b2b"),[t,r]=D.useState(Nf),[s,i]=D.useState(!0);D.useEffect(()=>{(async()=>{try{const O=qt(ot,"site_content","sustainability_page_v2"),q=await mn(O);if(q.exists()&&q.data().content)try{const L=JSON.parse(q.data().content);r(ar(Nf,L))}catch(L){console.error(L)}}catch(O){i5(O,"get","site_content/sustainability_page_v2")}finally{i(!1)}})()},[]);const[l,d]=D.useState({name:"",company:"",phone:"",emailId:"",emailDomain:"gmail.com",customDomain:"",businessType:"일반기업",spaceType:["사무공간"],budget:"1천만원 ~ 3천만원",title:"",content:"",preferredDate:""}),[h,m]=D.useState(null),[g,p]=D.useState(!1),[b,w]=D.useState(!1),[_,N]=D.useState(!1),[E,j]=D.useState(""),P=M=>{const{name:O,value:q}=M.target;d(L=>({...L,[O]:q}))},A=async M=>{M.preventDefault();const O=l.emailDomain==="custom"?`${l.emailId}@${l.customDomain}`:`${l.emailId}@${l.emailDomain}`;if(!l.name||!l.company||!l.phone||!l.emailId||!l.content){j("필수 기입 항목들을 기입해 주세요.");return}if(!l.spaceType||l.spaceType.length===0){j("컨설팅 대상 오피스 공간 유형을 최소 1개 이상 선택해 주세요.");return}w(!0),j("");let q=(dw==null?void 0:dw.VITE_ADMIN_EMAIL)||"[email protected]",L=!0;try{const I=await mn(qt(ot,"site_content","mail_settings"));if(I.exists()){const R=I.data();if(R.content){const F=JSON.parse(R.content);F.adminEmail&&(q=F.adminEmail),F.receiveNotifications!==void 0&&(L=F.receiveNotifications)}}}catch(I){console.error("Failed to load admin email setting, using default:",I)}const k="[email protected]";try{if(await i0(dc(ot,"b2b_inquiries"),{...l,email:O,spaceType:l.spaceType.join(", "),fileName:(h==null?void 0:h.name)||null,fileUrl:(h==null?void 0:h.content)||null,status:"대기중",adminComment:"",createdAt:Date.now()}),L){const I={to:q,replyTo:O,headers:{"Reply-To":O,"reply-to":O},createdAt:Date.now(),message:{replyTo:O,headers:{"Reply-To":O,"reply-to":O},subject:`[크로바가구] 새로운 B2B 상담 신청이 접수되었습니다: ${l.company}`,html:`
4356            <div style="font-family: 'Malgun Gothic', Arial, sans-serif; max-width: 600px; margin: 0 auto; border: 1px solid #e5e7eb; padding: 24px; border-radius: 12px; color: #1f2937; background-color: #ffffff;">
4357              <h2 style="color: #059669; border-bottom: 2px solid #10b981; padding-bottom: 12px; margin-top: 0; font-size: 20px;">🍀 새로운 B2B 상담 신청 접수</h2>
4358              <table style="width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px;">
4359                <tr style="border-bottom: 1px solid #f3f4f6;">
4360                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563; width: 130px;">신청자명</td>
4361                  <td style="padding: 10px 0; color: #111827;">${l.name}</td>
4362                </tr>
4363                <tr style="border-bottom: 1px solid #f3f4f6;">
4364                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">회사/단체명</td>
4365                  <td style="padding: 10px 0; color: #111827;">${l.company}</td>
4366                </tr>
4367                <tr style="border-bottom: 1px solid #f3f4f6;">
4368                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">연락처</td>
4369                  <td style="padding: 10px 0; color: #111827;">${l.phone}</td>
4370                </tr>
4371                <tr style="border-bottom: 1px solid #f3f4f6;">
4372                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">이메일</td>
4373                  <td style="padding: 10px 0; color: #111827;">
4374                    <a href="mailto:${O}" style="color: #059669; text-decoration: underline; font-weight: bold;">${O}</a>
4375                  </td>
4376                </tr>
4377                <tr style="border-bottom: 1px solid #f3f4f6;">
4378                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">기업 구분</td>
4379                  <td style="padding: 10px 0; color: #111827;">${l.businessType}</td>
4380                </tr>
4381                <tr style="border-bottom: 1px solid #f3f4f6;">
4382                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">공간 유형</td>
4383                  <td style="padding: 10px 0; color: #111827;">${l.spaceType.join(", ")}</td>
4384                </tr>
4385                <tr style="border-bottom: 1px solid #f3f4f6;">
4386                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">예상 예산</td>
4387                  <td style="padding: 10px 0; color: #111827;">${l.budget}</td>
4388                </tr>
4389                <tr style="border-bottom: 1px solid #f3f4f6;">
4390                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">희망 미팅일</td>
4391                  <td style="padding: 10px 0; color: #111827;">${l.preferredDate||"협의 필요"}</td>
4392                </tr>
4393                <tr style="border-bottom: 1px solid #f3f4f6;">
4394                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563;">제목</td>
4395                  <td style="padding: 10px 0; color: #111827; font-weight: bold;">${l.title}</td>
4396                </tr>
4397                <tr>
4398                  <td style="padding: 10px 0; font-weight: bold; color: #4b5563; vertical-align: top;">문의 내용</td>
4399                  <td style="padding: 10px 0; color: #111827; white-space: pre-wrap; line-height: 1.5;">${l.content}</td>
4400                </tr>
4401              </table>
4402
4403
4404              <div style="margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e7eb; font-size: 12px; color: #9ca3af; text-align: center;">
4405                본 메일은 크로바가구 시스템에서 자동으로 발송되었습니다.
4406              </div>
4407            </div>
4408          `}};await i0(dc(ot,"mail"),I)}await i0(dc(ot,"mail"),{from:k,to:O,replyTo:q,headers:{"Reply-To":q,"reply-to":q},createdAt:Date.now(),message:{replyTo:q,headers:{"Reply-To":q,"reply-to":q}
4408,subject:"[크로바가구] B2B 전문 공간 컨설팅 신청이 접수되었습니다.",html:`
4409            <div style="font-family: 'Malgun Gothic', Arial, sans-serif; max-width: 600px; margin: 0 auto; border: 1px solid #e5e7eb; padding: 24px; border-radius: 12px; color: #1f2937; background-color: #ffffff;">
4410              <h2 style="color: #059669; border-bottom: 2px solid #10b981; padding-bottom: 12px; margin-top: 0; font-size: 18px;">안녕하세요, ${l.name}님!</h2>
4411              <p style="line-height: 1.6; font-size: 14px; color: #374151;">
4412                크로바가구 B2B 공간 컨설팅 서비스에 관심을 가져주셔서 대단히 감사드립니다.<br/>
4413                신청하신 예약이 아래와 같이 정상적으로 접수되었습니다.
4414              </p>
4415              
4416              <div style="margin: 20px 0; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; font-size: 14px;">
4417                <div style="background-color: #f0fdf4; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; font-weight: bold; color: #166534; text-align: left;">
4418                  📌 신청 정보 상세 내용 (의뢰서 접수 완료)
4419                </div>
4420                <table style="width: 100%; border-collapse: collapse; background-color: #ffffff; text-align: left;">
4421                  <tr style="border-bottom: 1px solid #f3f4f6;">
4422                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; width: 130px; background-color: #fafafa;">신청자명</td>
4423                    <td style="padding: 10px 16px; color: #111827;">${l.name}</td>
4424                  </tr>
4425                  <tr style="border-bottom: 1px solid #f3f4f6;">
4426                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">회사/단체명</td>
4427                    <td style="padding: 10px 16px; color: #111827;">${l.company}</td>
4428                  </tr>
4429                  <tr style="border-bottom: 1px solid #f3f4f6;">
4430                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">연락처</td>
4431                    <td style="padding: 10px 16px; color: #111827;">${l.phone}</td>
4432                  </tr>
4433                  <tr style="border-bottom: 1px solid #f3f4f6;">
4434                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">이메일</td>
4435                    <td style="padding: 10px 16px; color: #111827;">${O}</td>
4436                  </tr>
4437                  <tr style="border-bottom: 1px solid #f3f4f6;">
4438                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">기업 구분</td>
4439                    <td style="padding: 10px 16px; color: #111827;">${l.businessType}</td>
4440                  </tr>
4441                  <tr style="border-bottom: 1px solid #f3f4f6;">
4442                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">공간 유형</td>
4443                    <td style="padding: 10px 16px; color: #111827;">${l.spaceType.join(", ")}</td>
4444                  </tr>
4445                  <tr style="border-bottom: 1px solid #f3f4f6;">
4446                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">예상 예산</td>
4447                    <td style="padding: 10px 16px; color: #111827;">${l.budget}</td>
4448                  </tr>
4449                  <tr style="border-bottom: 1px solid #f3f4f6;">
4450                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">희망 미팅일</td>
4451                    <td style="padding: 10px 16px; color: #111827;">${l.preferredDate||"협의 필요"}</td>
4452                  </tr>
4453                  <tr style="border-bottom: 1px solid #f3f4f6;">
4454                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; background-color: #fafafa;">의뢰 제목</td>
4455                    <td style="padding: 10px 16px; color: #111827; font-weight: bold;">${l.title||"일반 문의"}</td>
4456                  </tr>
4457                  <tr>
4458                    <td style="padding: 10px 16px; font-weight: bold; color: #4b5563; vertical-align: top; background-color: #fafafa;">상세 요구사항</td>
4459                    <td style="padding: 10px 16px; color: #111827; white-space: pre-wrap; line-height: 1.5;">${l.content}</td>
4460                  </tr>
4461                </table>
4462              </div>
4463
4464              <p style="line-height: 1.6; font-size: 14px; color: #374151;">
4465                배정된 전문 매니저가 기재해주신 연락처(<strong>${l.phone}</strong>) 또는 이메일(<strong>${O}</strong>)로 신속히 연락해 상세 일정을 조율할 예정입니다.
4466              </p>
4467              
4468              <div style="margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e7eb; font-size: 12px; color: #9ca3af; text-align: center; line-height: 1.5;">
4469                <strong>주식회사 크로바가구</strong><br/>
4470                고객센터: 02-1234-5678 | 이메일: [email protected]
4471              </div>
4472            </div>
4473          `}}),N(!0),d({name:"",company:"",phone:"",emailId:"",emailDomain:"gmail.com",customDomain:"",businessType:"일반기업",spaceType:["사무공간"],budget:"1천만원 ~ 3천만원",title:"",content:"",preferredDate:""}),m(null)}catch(I){i5(I,"create","b2b_inquiries")}finally{w(!1)}};return s?c.jsx("div",{className:"min-h-screen bg-white"}):c.jsxs("div",{className:"min-h-screen bg-white font-sans pb-24",children:[c.jsxs("div",{className:"relative bg-white pt-36 pb-20 border-b border-gray-100 overflow-hidden",children:[c.jsx("div",{className:"absolute top-0 right-0 w-[40%] h-full opacity-10 pointer-events-none",children:c.jsx("div",{className:"w-full h-full bg-gradient-to-l from-emerald-500/20 to-transparent blur-3xl rounded-full translate-x-1/3"})}),c.jsx("div",{className:"max-w-7xl mx-auto px-6 md:px-12 relative z-10",children:c.jsxs(Ge.div,{initial:{opacity:0,y:20}
4473,animate:{opacity:1,y:0},transition:{duration:.8},className:"max-w-3xl mx-auto text-center",children:[c.jsxs("div",{className:"mb-6 flex items-center justify-center gap-1.5 text-emerald-600 font-bold tracking-wider text-[10.5pt] uppercase",children:[c.jsx(S_,{className:"w-3 h-3 text-emerald-500 animate-pulse"}),"CLOVER CUSTOMER CARE & CONSULTING"]}),c.jsx("h1",{className:"text-[48px] font-black text-gray-900 tracking-tight leading-tight mb-6",children:"고객지원 & 상담 센터"}),c.jsx("p",{className:"text-base md:text-lg text-gray-500 font-normal leading-relaxed whitespace-pre-line",children:"크로바가구는 전문 공간 매니저의 신속한 1:1 상담부터 맞춤 B2B 공간 설계 컨설팅까지 차원 높은 고객 감동 파트너십을 보장합니다."})]})})]}),c.jsxs("div",{className:"flex gap-8 justify-center bg-[#f5f5f5] pt-4 pb-0 w-full mb-12",children:[c.jsxs("button",{onClick:()=>e("b2b"),className:`flex items-center gap-2 text-lg transition-colors relative px-8 pb-4 ${n==="b2b"?"text-[#0a0a0a] font-bold":"text-gray-500 hover:text-gray-900 font-medium"}`,children:["B2B 상담신청",n==="b2b"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]}),c.jsxs("button",{onClick:()=>e("kakao"),className:`flex items-center gap-2 text-lg transition-colors relative px-8 pb-4 ${n==="kakao"?"text-[#0a0a0a] font-bold":"text-gray-500 hover:text-gray-900 font-medium"}`,children:["카카오 채널 안내",n==="kakao"&&c.jsx("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-[#0a0a0a]"})]})]}),c.jsx("div",{className:"max-w-7xl mx-auto px-6 md:px-12 pb-24 bg-white",children:c.jsx("div",{className:"bg-white p-0",children:c.jsx(Cr,{mode:"wait",children:n==="kakao"?c.jsx(Ge.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-stretch",children:c.jsx("div",{className:"lg:col-span-12 bg-white p-8 md:p-12 rounded-3xl border border-gray-200 shadow-sm flex flex-col justify-between hover:shadow-md transition-all duration-300",children:c.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start gap-6 w-full",children:[c.jsxs("div",{className:"space-y-4 flex-1",children:[c.jsxs("div",{className:"inline-flex items-center gap-2 bg-[#FEE500]/10 border border-[#FEE500]/30 px-3.5 py-1.5 rounded-full text-[11px] font-black text-amber-900",children:[c.jsx("span",{className:"w-2 h-2 rounded-full bg-[#FEE500] animate-pulse"}),"KakaoTalk 1:1 Support"]}),c.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-gray-950 tracking-tight leading-snug",children:t.kakaoTitle}),c.jsx("p",{className:"text-base text-gray-500 leading-relaxed font-normal max-w-2xl",children:t.kakaoDesc})]}),c.jsx("div",{className:"w-[1px] bg-gray-200 self-stretch hidden md:block"}),c.jsxs("div",{className:"flex flex-col gap-6 shrink-0 items-end",children:[c.jsxs("div",{className:"flex flex-col items-end",children:[c.jsx("span",{className:"text-lg font-bold text-[#9e9e9e]",children:"상담 가능 시간"}),c.jsx("span",{className:"text-3xl font-bold",children:t.counselingHours}),c.jsx("span",{className:"text-sm text-gray-500",children:"점심시간 : 12:00~13:00"})]}),c.jsxs("div",{className:"flex items-center gap-6",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2",title:"카메라로 스캔하여 즉시 추가하기",children:[c.jsx("div",{className:"w-24 h-24 bg-white rounded-xl flex items-center justify-center p-1 shadow-sm border border-gray-100",children:c.jsx(et,{src:t.kakaoQrImage,alt:"Clover QR",className:"w-full h-full object-contain"})}),c.jsx("span",{className:"text-xs font-medium text-gray-600",children:"스마트폰 스캔"})]}),c.jsx("div",{className:"flex flex-col items-end gap-2",children:c.jsxs("a",{href:t.kakaoUrl,target:"_blank",rel:"noreferrer",className:"flex flex-col items-center justify-center gap-1 h-24 px-8 rounded-2xl bg-[#FEE500] hover:bg-[#F3D100] text-[#191919] font-bold text-base transition-all shadow-sm hover:shadow-md hover:-translate-y-0.5 active:translate-y-0",children:[c.jsxs("div",{className:"flex items-center gap-2 text-lg",children:[c.jsx(DI,{className:"w-5 h-5 fill-current"}),"채널 추가 바로가기"]}),c.jsx("div",{className:"text-xs opacity-80 mt-0.5",children:"채널 아이디: @크로바가구_공식"})]})})]})]})]})})},"kakao-guide"):c.jsxs(Ge.div,{initial:{opacity:0,y:15}
4473,animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.4},className:"w-full space-y-28 animate-fade-in pb-16 relative",children:[c.jsxs("div",{className:"rounded-[3.5rem] relative overflow-hidden h-[540px] md:h-[620px] flex flex-col justify-center items-center text-center px-6",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center transition-transform duration-[12000ms] hover:scale-105",style:{backgroundImage:`url('${t.b2bHeroBgImage||"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80"}')`}}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/70 via-black/45 to-black/85"}),c.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto space-y-8 px-4",children:[c.jsx("h2",{className:"text-[42px] md:text-[48px] font-black tracking-tight leading-snug md:leading-[64.2px] mb-8 text-white whitespace-pre-line",children:t.b2bHeroTitle||`공공기관 · 기업 맞춤
4474스마트 공간 솔루션, CLOVER`}),c.jsx("p",{className:"text-white/80 text-base md:text-xl max-w-2xl mx-auto leading-relaxed font-normal whitespace-pre-line",children:t.b2bHeroDesc||`단순히 가구를 납품하는 것을 넘어, 기업의 고유문화와 동선을 연구합니다.
4475전국 어디든 무상 방문 실측 및 2D/3D 레이아웃 최적 설계를 무상 지원합니다.`}),c.jsxs("div",{className:"pt-8 flex flex-col sm:flex-row justify-center items-center gap-4",children:[c.jsx("button",{onClick:()=>{var M;return(M=document.getElementById("b2b-form-section"))==null?void 0:M.scrollIntoView({behavior:"smooth"})},className:"w-full sm:w-auto px-10 py-5 bg-[#1b5428] hover:bg-[#236b34] text-white font-black text-base rounded-2xl transition-all shadow-lg hover:-translate-y-0.5 active:translate-y-0 cursor-pointer",children:"무료 공간 컨설팅 신청하기"}),c.jsx("button",{onClick:()=>{var M;return(M=document.getElementById("g2b-consulting"))==null?void 0:M.scrollIntoView({behavior:"smooth"})},className:"w-full sm:w-auto px-10 py-5 bg-white/10 hover:bg-white/15 border border-white/20 text-white font-bold text-base rounded-2xl transition-all backdrop-blur-sm cursor-pointer hover:-translate-y-0.5 active:translate-y-0",children:"핵심 서비스 특징 보기"})]})]})]}),c.jsx("div",{className:"absolute -bottom-10 left-16 right-16 h-32 bg-gradient-to-t from-emerald-500/30 via-emerald-200/10 to-transparent blur-3xl pointer-events-none z-0"}),c.jsxs("div",{id:"g2b-consulting",className:"max-w-6xl mx-auto px-4 md:px-0 pt-2 pb-12 mb-[50px] scroll-mt-24 space-y-20",children:[c.jsxs("div",{className:"text-center space-y-4 max-w-3xl mx-auto",children:[c.jsx("span",{className:"text-xs font-black uppercase tracking-widest text-emerald-700",children:"Why Clover B2B"}),c.jsx("h3",{className:"text-3xl md:text-5xl font-black text-gray-950 tracking-tight leading-tight mt-3 mb-4 whitespace-pre-line",children:t.b2bWhyTitle||`공공기관 공간 컨설팅,
4476왜 크로바가구 일까요?`}),c.jsx("p",{className:"text-sm md:text-lg text-gray-500 font-medium leading-relaxed whitespace-pre-line",children:t.b2bWhyDesc||"20년 이상의 현장 노하우를 지닌 베테랑 설계 엔지니어와 직접 제조 공장을 보유한 강점을 바탕으로 차별화된 오피스를 선사합니다."})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-10",children:[c.jsxs("div",{className:"bg-[#f4f7f4] rounded-[2.5rem] p-10 text-left space-y-6 hover:shadow-xl transition-all duration-300 group hover:-translate-y-1",children:[c.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#224328] text-white flex items-center justify-center group-hover:scale-105 transition-transform duration-300",children:c.jsx(Cf,{className:"w-7 h-7"})}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("h4",{className:"text-xl md:text-2xl font-extrabold text-gray-950",children:["100% 무상 현장 실측 및",c.jsx("br",{className:"hidden lg:block"})," 2D/3D 레이아웃 기획"]}),c.jsx("p",{className:"text-xs md:text-sm text-gray-500 leading-relaxed font-medium",children:"도면이 없는 빈 공간이라도 무관합니다. 전문 실측팀이 즉시 현장으로 방문하여 최적의 부서 배치와 복도 동선을 기획한 3D 시뮬레이션 시안을 무상으로 전달해 드립니다."})]})]}),c.jsxs("div",{className:"bg-[#f4f7f4] rounded-[2.5rem] p-10 text-left space-y-6 hover:shadow-xl transition-all duration-300 group hover:-translate-y-1",children:[c.jsx("div",{className:"w-14 h-14 roun
4476ded-2xl bg-[#224328] text-white flex items-center justify-center group-hover:scale-105 transition-transform duration-300",children:c.jsx(Uw,{className:"w-7 h-7"})}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("h4",{className:"text-xl md:text-2xl font-extrabold text-gray-950",children:"본사 자체 가구 공장 직접생산 및 철저한 품질 관리"}),c.jsx("p",{className:"text-xs md:text-sm text-gray-500 leading-relaxed font-medium",children:"유통 마진이 없는 직배송 및 본사 정직원 책임 시공을 약속합니다. 자체 생산 라인을 갖추어 고품질 가구를 정확한 납기일 내에 안정적으로 제작 및 인도해 드립니다."})]})]}),c.jsxs("div",{className:"bg-[#f4f7f4] rounded-[2.5rem] p-10 text-left space-y-6 hover:shadow-xl transition-all duration-300 group hover:-translate-y-1",children:[c.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#224328] text-white flex items-center justify-center group-hover:scale-105 transition-transform duration-300",children:c.jsx(oc,{className:"w-7 h-7"})}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("h4",{className:"text-xl md:text-2xl font-extrabold text-gray-950",children:["정부조달 우수제품 지정 및",c.jsx("br",{className:"hidden lg:block"})," 친환경 자재 사용"]}),c.jsx("p",{className:"text-xs md:text-sm text-gray-500 leading-relaxed font-medium",children:"정부조달청의 엄격한 가이드라인을 통과한 우수 친환경 가구만을 공급합니다. 유해 물질이 없는 친환경 자재 사용으로 안심하고 생활할 수 있는 건강한 업무공간을 보장합니다."})]})]})]})]}),c.jsx("div",{className:"w-screen relative left-1/2 -translate-x-1/2 bg-amber-50/50 border-y border-amber-100 pt-16 pb-24 px-6 md:px-12 my-12",children:c.jsxs("div",{className:"max-w-6xl mx-auto space-y-16",children:[c.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6 pb-6 text-left border-b border-amber-200",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx("span",{className:"text-xs font-black uppercase tracking-widest text-amber-700",children:"PROVEN RECORD"}),c.jsx("h3",{className:"text-3xl md:text-5xl font-black text-gray-950 tracking-tight leading-none mt-3 mb-[13px]",children:t.provenRecordTitle||"실제 납품 사례로 증명합니다."}),c.jsx("p",{className:"text-sm md:text-base text-gray-500 font-medium",children:t.provenRecordDesc||"수많은 공공기관, 청사, 학교, 대기업의 신축 및 이전을 성공적으로 조달한 크로바의 완벽한 결과물입니다."})]}),(t.provenRecordButtonText||Nf.provenRecordButtonText)&&c.jsx("a",{href:t.provenRecordButtonUrl||"https://cloveroa.baiceconnect.co.kr/blog/index.php",target:"_blank",rel:"noopener noreferrer",className:"bg-amber-800 border-2 border-amber-800 text-white font-extrabold text-base py-3 px-6 rounded-full hover:bg-white hover:text-amber-800 transition-colors flex items-center gap-2 cursor-pointer self-start md:self-auto",children:t.provenRecordButtonText||"+ 납품사례 확인하러 가기"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-10",children:(t.provenRecordCards||Nf.provenRecordCards).map((M,O)=>{const q=Array.isArray(M.tags)?M.tags:(M.tags||"").split(",").map(L=>L.trim()).filter(Boolean);return c.jsx("div",{className:"bg-white rounded-[2rem] overflow-hidden border border-gray-200 shadow-sm hover:shadow-xl transition-all duration-300 group hover:-translate-y-1 flex flex-col justify-between",children:c.jsxs("div",{children:[c.jsxs("div",{className:"h-64 overflow-hidden relative",children:[c.jsx(et,{src:M.imageUrl||"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=600&q=80",alt:M.title||"Case Image",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105 animate-fade-in",referrerPolicy:"no-referrer"}),M.category&&c.jsx("div",{className:"absolute top-4 left-4 bg-gray-900/80 backdrop-blur-md text-white text-[10px] font-bold px-3 py-1 rounded-md",children:M.category})]}),c.jsxs("div",{className:"p-8 text-left space-y-3",children:[c.jsx("h4",{className:"text-lg md:text-xl font-bold text-gray-950",children:M.title}),c.jsx("p",{className:"text-xs text-gray-500 font-medium leading-relaxed",children:M.description}),q.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1.5 pt-2",children:q.map((L,k)=>c.jsx("span",{className:"text-[12px] bg-gray-100 text-gray-600 font-semibold px-2 py-0.5 rounded",children:L.startsWith("#")?L:`#${L}`},k))})]})]})},M.id||O)})})]})}),c.jsx("div",{className:"-mx-6 md:-mx-12 pt-12 pb-24 px-6 md:px-12 bg-white text-gray-950 rounded-[3.5rem] relative overflow-hidden my-16",children:c.jsxs("div",{className:"max-w-6xl mx-auto 
4476space-y-16 relative z-10 text-center",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsx("span",{className:"text-xs font-black tracking-widest text-emerald-700 uppercase",children:"Consulting Process"}),c.jsx("h3",{className:"text-3xl md:text-5xl font-black text-gray-950 tracking-tight mt-3",children:"공간설계 프로세스"}),c.jsx("p",{className:"text-sm md:text-lg text-gray-600 font-medium max-w-2xl mx-auto",children:"의뢰부터 실측, 시안 제안 및 맞춤 가구 인도까지 원스톱으로 처리합니다"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-8 relative",children:[c.jsx("div",{className:"hidden md:flex absolute top-[64px] left-[15%] right-[15%] z-0 items-center justify-between pointer-events-none",children:[1,2,3,4].map(M=>c.jsx("div",{className:"w-[12%] h-[2px] bg-emerald-900 relative",children:c.jsx("div",{className:"absolute -right-2 -top-2 bg-white px-0.5",children:c.jsx(nd,{className:"w-4 h-4 text-emerald-900"})})},M))}),[{step:"01",title:"간편 의뢰 접수",desc:"하단 신청서에 인원 및 희망 공간을 작성해 접수합니다."},{step:"02",title:"무상 방문 실측",desc:"실측 엔지니어가 직접 방문하여 정밀 스캔을 실행합니다."},{step:"03",title:"3D 시안 & 견적 수령",desc:"실측 맞춤형 가구 배치도 및 상세 견적서를 즉시 받아봅니다."},{step:"04",title:"공장 생산 및 시공",desc:"자체 정밀 라인에서 안전하고 내구성 높게 완성합니다."},{step:"05",title:"철저한 보증 케어",desc:"사용 중 발생하는 제품 보증 및 사후 관리 서비스를 지속 제공합니다."}].map((M,O)=>c.jsxs("div",{className:"bg-white p-8 rounded-[2rem] flex flex-col items-center justify-between text-center relative z-10",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-emerald-600 text-white flex items-center justify-center font-black text-lg shadow-sm mb-6",children:M.step}),c.jsxs("div",{className:"space-y-3 h-32 flex flex-col items-center",children:[c.jsx("h4",{className:"text-lg font-extrabold text-gray-950",children:M.title}),c.jsx("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:M.desc})]})]},O))]})]})}),c.jsxs("div",{className:"max-w-6xl mx-auto bg-white rounded-[3rem] shadow-xl overflow-hidden scroll-mt-24",id:"b2b-form-section",children:[c.jsxs("div",{className:"p-10 md:p-14 border-b border-gray-100 bg-gray-50/70 flex flex-col md:flex-row md:items-center justify-between gap-6",children:[c.jsxs("div",{className:"text-left space-y-2",children:[c.jsxs("h3",{className:"text-2xl md:text-3xl font-black text-gray-950 flex items-center gap-2.5 mt-6",children:[c.jsx(zu,{className:"w-8 h-8 text-emerald-600 animate-pulse"}),t.b2bFormTitle||"CLOVER 1:1 공간 솔루션 의뢰서"]}),c.jsx("p",{className:"text-sm text-gray-500 font-medium whitespace-pre-line",children:t.b2bFormDesc||"필수 항목을 기재해 주시면 크로바 전담 기획팀이 최적의 프리미엄 파트너로서 응대하겠습니다."})]}),c.jsxs("div",{className:"shrink-0 flex items-center gap-2 text-xs text-emerald-800 bg-emerald-50 border border-emerald-100/50 py-2.5 px-4 rounded-xl font-extrabold",children:[c.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),"24시간 이내 상담 매칭 보장"]})]}),_?c.jsxs(Ge.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"p-16 text-center flex flex-col items-center justify-center min-h-[460px] space-y-6",children:[c.jsx("div",{className:"w-20 h-20 rounded-full bg-emerald-50 text-emerald-600 flex items-center justify-center shadow-md border border-emerald-100 animate-bounce",children:c.jsx($B,{className:"w-10 h-10"})}),c.jsx("h3",{className:"text-3xl font-black text-gray-950",children:"공간 컨설팅 신청이 정상 접수되었습니다!"}),c.jsx("p",{className:"text-sm md:text-base text-gray-500 max-w-md leading-relaxed",children:"기입해주신 정보를 토대로 담당 오피스 컨설턴트가 영업일 기준 24시간 이내로 유선 연락을 전해 드리고 도면 작성을 즉시 착수합니다."}),c.jsx("button",{onClick:()=>N(!1),className:"px-8 py-4 rounded-2xl bg-emerald-600 hover:bg-emerald-700 text-white font-extrabold text-sm transition-colors shadow-lg shadow-emerald-600/20 cursor-pointer",children:"새로운 공간 의뢰 추가 신청하기"})]}):c.jsxs("form",{onSubmit:A,className:"p-10 md:p-16 space-y-12",children:[E&&c.jsx("div",{className:"p-5 rounded-2xl bg-red-50 text-red-600 border border-red-100 text-sm font-bold text-left animate-fade-in",children:E}),c.jsxs("div",{className:"space-y-8",children:[c.jsxs("h4",{className:"text-lg font-black text-gray-950 flex items-center gap-2.5 pb-3 border-b border-gray-100 text-left",children:[c.jsx("span",{className:"w-1 h-4 bg-emerald-600 rounded"}),"신청자 기본 인적사항"]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsxs("label",{className:"block text-xs font-black text-gray-600",children:["담당자 이름 ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(sz,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),c.jsx("input",{type:"text",name:"name",value:l.name,onChange:P,required:!0,placeholder:"홍길동 팀장",className:"w-full pl-12 pr-4 h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium"})]})]}),c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsxs("label",{className:"block text-xs font-black text-gray-600",children:["기업 / 기관명 ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(NB,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),c.jsx("input",{type:"text",name:"company",value:l.company,onChange:P,required:!0,placeholder:"(주)크로바 ì˜
4476¤í”¼ìФ",className:"w-full pl-12 pr-4 h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium"})]})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsxs("label",{className:"block text-xs font-black text-gray-600",children:["직통 전화번호 ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsxs("div",{className:"relative",children:[c.jsx(PU,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),c.jsx("input",{type:"tel",name:"phone",value:l.phone,onChange:P,required:!0,placeholder:"010-1234-5678",className:"w-full pl-12 pr-4 h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium"})]})]}),c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsxs("label",{className:"block text-xs font-black text-gray-600",children:["이메일 주소 ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(Yw,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),c.jsx("input",{type:"text",name:"emailId",value:l.emailId,onChange:P,required:!0,placeholder:"id",className:"w-full pl-12 pr-4 h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium"})]}),c.jsx("span",{className:"self-center",children:"@"}),c.jsxs("select",{name:"emailDomain",value:l.emailDomain,onChange:P,className:"h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl px-4 text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium",children:[c.jsx("option",{value:"gmail.com",children:"gmail.com"}),c.jsx("option",{value:"naver.com",children:"naver.com"}),c.jsx("option",{value:"hanmail.net",children:"hanmail.net"}),c.jsx("option",{value:"kakao.com",children:"kakao.com"}),c.jsx("option",{value:"custom",children:"직접 입력"})]})]}),l.emailDomain==="custom"&&c.jsx("input",{type:"text",name:"customDomain",value:l.customDomain,onChange:P,required:!0,placeholder:"domain.com",className:"w-full pl-4 pr-4 h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium mt-2"})]})]})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("h4",{className:"text-lg font-black text-gray-950 flex items-center gap-2.5 pb-3 border-b border-gray-100 text-left",children:[c.jsx("span",{className:"w-1 h-4 bg-emerald-600 rounded"}),"업종 카테고리 선택 ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-4",children:[{value:"일반기업",label:"일반 기업",icon:Uw},{value:"공공기관",label:"공공 기관",icon:hU},{value:"교육기관",label:"교육/학원",icon:ZB},{value:"프랜차이즈",label:"유통/매장",icon:QU},{value:"병원",label:"의료/병원",icon:uB},{value:"기타",label:"기타 업종",icon:mU}].map(M=>{const O=M.icon,q=l.businessType===M.value;return c.jsxs("button",{type:"button",onClick:()=>d(L=>({...L,businessType:M.value})),className:`flex flex-col items-center justify-center p-5 rounded-[1.5rem] border text-center transition-all duration-300 gap-3 group cursor-pointer ${q?"bg-emerald-600 border-emerald-600 text-white shadow-lg shadow-emerald-500/10 scale-[1.02]":"bg-white border-gray-200 text-gray-700 hover:border-emerald-400 hover:bg-gray-50"}`,children:[c.jsx(O,{className:`w-7 h-7 transition-transform duration-300 group-hover:scale-110 ${q?"text-white":"text-gray-400 group-hover:text-emerald-600"}`}),c.jsx("span",{className:"text-xs md:text-sm font-extrabold tracking-tight",children:M.label})]},M.value)})})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("h4",{className:"text-lg font-black text-gray-950 flex items-center gap-2.5 pb-3 border-b border-gray-100 text-left",children:[c.jsx("span",{className:"w-1 h-4 bg-emerald-600 rounded"}),"대상 오피스 공간 유형(다중선택 가능) ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-4",children:[{value:"사무공간",label:"사무공간 (데스크)",icon:AU},{value:"임원실",label:"중역/임원 공간",icon:FB},{value:"회의실",label:"회의실/세미나룸",icon:iz},{value:"로비",label:"로비/라운지",icon:$U}
4476,{value:"교육실",label:"교육실/세미나실",icon:Kf},{value:"기타",label:"기타 공간",icon:_B}].map(M=>{const O=M.icon,q=Array.isArray(l.spaceType)?l.spaceType.includes(M.value):l.spaceType===M.value;return c.jsxs("button",{type:"button",onClick:()=>d(L=>{const k=Array.isArray(L.spaceType)?L.spaceType:[L.spaceType],I=k.includes(M.value)?k.filter(R=>R!==M.value):[...k,M.value];return{...L,spaceType:I}}),className:`flex flex-col items-center justify-center p-5 rounded-[1.5rem] border text-center transition-all duration-300 gap-3 group cursor-pointer ${q?"bg-emerald-600 border-emerald-600 text-white shadow-lg shadow-emerald-500/10 scale-[1.02]":"bg-white border-gray-200 text-gray-700 hover:border-emerald-400 hover:bg-gray-50"}`,children:[c.jsx(O,{className:`w-7 h-7 transition-transform duration-300 group-hover:scale-110 ${q?"text-white":"text-gray-400 group-hover:text-emerald-600"}`}),c.jsx("span",{className:"text-xs md:text-sm font-extrabold tracking-tight",children:M.label})]},M.value)})})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("h4",{className:"text-lg font-black text-gray-950 flex items-center gap-2.5 pb-3 border-b border-gray-100 text-left",children:[c.jsx("span",{className:"w-1 h-4 bg-emerald-600 rounded"}),"대략적인 예상 예산 ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-5 gap-4",children:[{value:"1천만원 미만",label:"1,000만원 미만",icon:vg},{value:"1천만원 ~ 3천만원",label:"1,000만 ~ 3,000만",icon:vg},{value:"3천만원 ~ 5천만원",label:"3,000만 ~ 5,000만",icon:vg},{value:"5천만원 ~ 1억원",label:"5,000만 ~ 1억",icon:vg},{value:"1억원 이상",label:"1억원 초과 프로젝트",icon:XB}].map(M=>{const O=M.icon,q=l.budget===M.value;return c.jsxs("button",{type:"button",onClick:()=>d(L=>({...L,budget:M.value})),className:`flex items-center justify-center p-4.5 rounded-[1.5rem] border transition-all duration-300 gap-3 group cursor-pointer ${q?"bg-emerald-600 border-emerald-600 text-white shadow-lg shadow-emerald-500/10 scale-[1.02]":"bg-white border-gray-200 text-gray-700 hover:border-emerald-400 hover:bg-gray-50"}`,children:[c.jsx(O,{className:`w-5 h-5 shrink-0 transition-transform duration-300 group-hover:scale-110 ${q?"text-white":"text-emerald-600"}`}),c.jsx("span",{className:"text-xs md:text-sm font-extrabold tracking-tight",children:M.label})]},M.value)})})]}),c.jsxs("div",{className:"space-y-8",children:[c.jsxs("h4",{className:"text-lg font-black text-gray-950 flex items-center gap-2.5 pb-3 border-b border-gray-100 text-left",children:[c.jsx("span",{className:"w-1 h-4 bg-emerald-600 rounded"}),"상세 기획 및 요구조건"]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsx("label",{className:"block text-xs font-black text-gray-600",children:"의뢰 프로젝트 핵심 타이틀"}),c.jsxs("div",{className:"relative",children:[c.jsx(Dy,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),c.jsx("input",{type:"text",name:"title",value:l.title,onChange:P,placeholder:"예: 행정복지센터 종합사무소 리뉴얼 및 가구 실측",className:"w-full pl-12 pr-4 h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium"})]})]}),c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsx("label",{className:"block text-xs font-black text-gray-600",children:"컨설팅 희망일"}),c.jsxs("div",{className:"relative",children:[c.jsx(Wf,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-600 z-50 pointer-events-none"}),c.jsx(Jte,{selected:l.preferredDate?new Date(l.preferredDate):null,onChange:M=>P({target:{name:"preferredDate",value:M?M.toISOString().split("T")[0]:""}}),dateFormat:"yyyy-MM-dd",placeholderText:"연도-월-일",className:"w-full pl-12 pr-4 h-14 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all bg-white font-medium"})]})]})]}),c.jsxs("div",{className:"space-y-2 text-left",children:[c.jsxs("label",{className:"block text-xs font-black text-gray-600",children:["공간 규모 및 상세 요구사항 ",c.jsx("span",{className:"text-red-500",children:"*"})]}),c.jsx("textarea",{name:"content",value:l.content,onChange:P,required:!0,rows:6,placeholder:"예: 상주 인원은 약 35인이며, 전체 50평 규모 사무실 리뉴얼 예정입니다. 부서 구분을 지을 수 있는 칸막이 데스크 구성과 대형 회의 테이블, 3D 도면 배치를 희망합니다.",className:"w-full p-5 border border-gray-200 focus:border-emerald-500 rounded-2xl text-sm md:text-base focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all font-medium leading-relaxed resize-none"})]})]}),c.jsxs("div",{className:"pt-10 border-t border-gray-150/60 flex flex-col sm:flex-row items-center justify-between gap-6",children:[c.jsxs("div",{className:"flex items-center gap-2.5 text-xs md:text-sm text-gray-500 font-semibold text-left",children:[c.jsx(qw,{className:"w-5 h-5 text-emerald-600 shrink-0"}),c.jsx("span",{children:"전담 오피스 플래너 매칭: 평일 09:00 ~ 18:00 (영업일 기준 24시간 피드백)"})]}),c.jsx("button",{type:"submit",disabled:b||g,className:"w-full sm:w-auto flex items-center justify-center gap-2.5 py-4.5 px-12 rounded-2xl bg-emerald-600 hover:bg-emerald-700 disabled:bg-emerald-400 text-white font-extrabold text-base transition-all shadow-lg shadow-emerald-600/25 hover:-translate-y-0.5 active:translate-y-0 cursor-pointer",children:b?c.jsxs(c.Fragment,{children:[c.jsx(No,{className:"w-5 h-5 animate-spin"}
4476),c.jsx("span",{children:"공간 컨설팅 접수 등록 중..."})]}):c.jsxs(c.Fragment,{children:[c.jsx(II,{className:"w-5 h-5"}),c.jsx("span",{children:"CLOVER 공간 컨설팅 무료 접수하기"})]})})]})]})]})]},"b2b-consult")})})})]})},P1={title:"(주)크로바가구의 지능형 서비스",subtitle:"혁신적인 기술로 새로운 차원의 경험을 시작하세요.",catalogTitle:"지능형 카탈로그",catalogSubtitle:"INTELLIGENT CATALOG",catalogDesc:"제품과 연계된 데이터를 똑똑하게 모아보는 스마트 카탈로그. 가장 최신 데이터를 확인할 수 있습니다.",catalogLink:"https://cloveroa.baiceconnect.co.kr/catalog/category.php",searchTitle:"인공지능 이미지 검색",searchSubtitle:"AI IMAGE SEARCH",searchDesc:"이미지나 나라장터식별번호만으로, 제품을 찾고싶다면? AI 기술로 빠르고 정확하게 확인해보세요.",searchLink:"https://cloveroa.g2bfinder.com"},ene=()=>{const[n,e]=D.useState(P1),[t,r]=D.useState(!0);return D.useEffect(()=>{(async()=>{try{const i=qt(ot,"page_configs","ai_hub_page"),l=await mn(i);l.exists()&&e(ar(P1,l.data()))}catch(i){console.error("Error fetching data",i)}finally{r(!1)}})()},[]),t?c.jsx("div",{className:"min-h-screen bg-[#0a110d]"}):c.jsxs("div",{className:"min-h-screen bg-[#0a110d] text-white pt-48 pb-24 relative overflow-hidden flex flex-col justify-center font-sans tracking-tight",children:[c.jsxs("div",{className:"absolute inset-0 z-0",children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center opacity-60",style:{backgroundImage:'url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?q=80&w=2560&auto=format&fit=crop")'}}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#0a110d]/95 via-[#0a110d]/60 to-[#0a110d]/95 backdrop-blur-[2px]"}),c.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#22c55e1a_1px,transparent_1px),linear-gradient(to_bottom,#22c55e1a_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)]"}),c.jsx("div",{className:"absolute top-[-20%] left-[-10%] w-[70vw] h-[70vw] max-w-[800px] max-h-[800px] bg-[#22c55e]/15 blur-[130px] rounded-full mix-blend-screen pointer-events-none"}),c.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[60vw] h-[60vw] max-w-[600px] max-h-[600px] bg-blue-500/15 blur-[120px] rounded-full mix-blend-screen pointer-events-none"})]}),c.jsxs("div",{className:"max-w-7xl mx-auto px-6 relative z-10 w-full",children:[c.jsxs("div",{className:"text-center mb-20 md:mb-28",children:[c.jsx(Ge.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1,ease:"easeOut"},className:"text-4xl md:text-6xl lg:text-7xl font-bold tracking-tighter mb-6 bg-clip-text text-transparent bg-gradient-to-r from-white via-gray-200 to-gray-500",children:n.title}),c.jsx(Ge.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2,ease:"easeOut"},className:"text-lg md:text-2xl text-gray-400 max-w-2xl mx-auto font-light",children:n.subtitle})]}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-8 lg:gap-12 max-w-6xl mx-auto",children:[c.jsxs(Ge.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3,ease:"easeOut"},className:"group relative",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#22c55e]/10 to-transparent rounded-[2.5rem] blur-xl opacity-0 group-hover:opacity-100 transition-opacity duration-700"}),c.jsxs("a",{href:n.catalogLink,target:"_blank",rel:"noopener noreferrer",className:"relative block h-full rounded-[2.5rem] bg-gray-900/40 backdrop-blur-xl border border-white/10 p-10 md:p-14 overflow-hidden flex flex-col group-hover:border-[#22c55e]/50 transition-all duration-500 group-hover:-translate-y-2",children:[c.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-[#22c55e]/10 blur-[80px] rounded-full translate-x-1/2 -translate-y-1/2 group-hover:bg-[#22c55e]/20 transition-colors duration-700"}),c.jsxs("div",{className:"relative z-10",children:[c.jsx("div",{className:"w-20 h-20 rounded-2xl bg-black border border-white/10 flex items-center justify-center mb-10 shadow-[0_0_30px_rgba(255,255,255,0.05)] group-hover:shadow-[0_0_40px_rgba(34,197,94,0.2)] group-hover:border-[#22c55e]/30 transition-all duration-500",children:c.jsx(Kf,{size:32,className:"text-gray-300 group-hover:text-[#39ff14] transition-colors duration-500"})}),c.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[c.jsx("div",{className:"h-[1px] w-8 bg-[#22c55e]/50"}),c.jsx("div",{className:"text-[#22c55e] text-xs font-bold tracking-[0.2em] uppercase",children:n.catalogSubtitle})]}),c.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-6 tracking-tight text-white group-hover:text-transparent group-hover:bg-clip-text group-hover:bg-gradient-to-r group-hover:from-white group-hover:to-gray-400 transition-all duration-300",children:n.catalogTitle}),c.jsx("p",{className:"text-gray-400 text-lg leading-relaxed mb-16 flex-1 font-light group-hover:text-gray-300 transition-colors duration-300",children:n.catalogDesc}),c.jsxs("div",{className:"mt-auto flex items-center justify-between border-t border-white/10 pt-6 group-hover:border-[#22c55e]/20 transition-colors duration-500",children:[c.jsx("span",{className:"text-sm font-semibold tracking-wider text-gray-400 group-hover:text-white transition-colors duration-300 uppercase",children:"Explore System"}),c.jsx("div",{className:"w-12 h-12 rounded-full border border-white/20 flex items-center justify-center text-white group-hover:bg-[#22c55e] group-hover:border-[#22c55e] group-hover:text-black shadow-[0_0_0_rgba(34,197,94,0)] group-hover:shadow-[0_0_20px_rgba(34,197,94,0.4)] transition-all duration-500",children:c.jsx(dA,{size:22,className:"transform group-hover:scale-110 transition-transform duration-300"})})]})]})]})]}),c.jsxs(Ge.div,{initial:{opacity:0,y:30}
4476,animate:{opacity:1,y:0},transition:{duration:.8,delay:.4,ease:"easeOut"},className:"group relative",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-blue-500/10 to-transparent rounded-[2.5rem] blur-xl opacity-0 group-hover:opacity-100 transition-opacity duration-700"}),c.jsxs("a",{href:n.searchLink,target:"_blank",rel:"noopener noreferrer",className:"relative block h-full rounded-[2.5rem] bg-gray-900/40 backdrop-blur-xl border border-white/10 p-10 md:p-14 overflow-hidden flex flex-col group-hover:border-blue-500/50 transition-all duration-500 group-hover:-translate-y-2",children:[c.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-blue-500/10 blur-[80px] rounded-full translate-x-1/2 -translate-y-1/2 group-hover:bg-blue-500/20 transition-colors duration-700"}),c.jsxs("div",{className:"relative z-10",children:[c.jsx("div",{className:"w-20 h-20 rounded-2xl bg-black border border-white/10 flex items-center justify-center mb-10 shadow-[0_0_30px_rgba(255,255,255,0.05)] group-hover:shadow-[0_0_40px_rgba(59,130,246,0.2)] group-hover:border-blue-500/30 transition-all duration-500",children:c.jsx(Yo,{size:32,className:"text-gray-300 group-hover:text-blue-400 transition-colors duration-500"})}),c.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[c.jsx("div",{className:"h-[1px] w-8 bg-blue-500/50"}),c.jsx("div",{className:"text-blue-400 text-xs font-bold tracking-[0.2em] uppercase",children:n.searchSubtitle})]}),c.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-6 tracking-tight text-white group-hover:text-transparent group-hover:bg-clip-text group-hover:bg-gradient-to-r group-hover:from-white group-hover:to-gray-400 transition-all duration-300",children:n.searchTitle}),c.jsx("p",{className:"text-gray-400 text-lg leading-relaxed mb-16 flex-1 font-light group-hover:text-gray-300 transition-colors duration-300",children:n.searchDesc}),c.jsxs("div",{className:"mt-auto flex items-center justify-between border-t border-white/10 pt-6 group-hover:border-blue-500/20 transition-colors duration-500",children:[c.jsx("span",{className:"text-sm font-semibold tracking-wider text-gray-400 group-hover:text-white transition-colors duration-300 uppercase",children:"Explore System"}),c.jsx("div",{className:"w-12 h-12 rounded-full border border-white/20 flex items-center justify-center text-white group-hover:bg-blue-500 group-hover:border-blue-500 group-hover:text-black shadow-[0_0_0_rgba(59,130,246,0)] group-hover:shadow-[0_0_20px_rgba(59,130,246,0.4)] transition-all duration-500",children:c.jsx(dA,{size:22,className:"transform group-hover:scale-110 transition-transform duration-300"})})]})]})]})]})]})]})]})},tne=({label:n,value:e={fontFamily:"font-pretendard",fontWeight:"font-bold",fontSize:"text-base"},onChange:t,sizeType:r="description"})=>{const s=r==="title"?aX:r==="subtitle"?iX:oX;return c.jsxs("div",{className:"bg-indigo-50/50 border border-indigo-100/90 rounded-lg p-2.5 my-1.5 text-xs space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between text-indigo-950 font-bold",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx(MI,{className:"w-3.5 h-3.5 text-indigo-600"}),n," 글씨 스타일"]}),c.jsx("span",{className:`text-xs px-2 py-0.5 bg-white rounded border border-indigo-200/80 shadow-2xs ${V3(e)}`,children:"Aa 폰트 스타일 예시"})]}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-slate-500 font-bold mb-0.5",children:"글씨체 (Font)"}),c.jsx("select",{value:e.fontFamily||"font-pretendard",onChange:i=>t({...e,fontFamily:i.target.value}),className:"w-full p-1.5 text-xs border border-indigo-200 rounded bg-white font-medium focus:outline-none focus:ring-1 focus:ring-indigo-500 cursor-pointer",children:rX.map(i=>c.jsx("option",{value:i.value,children:i.label.split(" (")[0]},i.value))})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-slate-500 font-bold mb-0.5",children:"굵기 (Weight)"}),c.jsx("select",{value:e.fontWeight||"font-bold",onChange:i=>t({...e,fontWeight:i.target.value}),className:"w-full p-1.5 text-xs border border-indigo-200 rounded bg-white font-medium focus:outline-none focus:ring-1 focus:ring-indigo-500 cursor-pointer",children:sX.map(i=>c.jsx("option",{value:i.value,children:i.label},i.value))})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-slate-500 font-bold mb-0.5",children:"크기 (Size)"}),c.jsx("select",{value:e.fontSize||(r==="title"?"text-2xl":"text-base"),onChange:i=>t({...e,fontSize:i.target.value}),className:"w-full p-1.5 text-xs border border-indigo-200 rounded bg-white font-medium focus:outline-none focus:ring-1 focus:ring-indigo-500 cursor-pointer",children:s.map(i=>c.jsx("option",{value:i.value,children:i.label},i.value))})]})]})]})},Er=({fieldName:n,fieldLabel:e,value:t,onChange:r,sizeType:s="description"})=>
4476{const[i,l]=D.useState(!1);return c.jsxs("div",{className:"relative inline-block my-0.5",children:[c.jsxs("button",{type:"button",onClick:()=>l(!i),className:"inline-flex items-center gap-1 px-2 py-0.5 text-[11px] font-bold text-indigo-700 bg-indigo-50 hover:bg-indigo-100 border border-indigo-200 rounded-md transition-all cursor-pointer whitespace-nowrap shrink-0",children:[c.jsx(MI,{className:"w-3.5 h-3.5 text-indigo-600 shrink-0"}),c.jsx("span",{children:"T조정"}),t&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0",title:"커스텀 적용됨"}),i?c.jsx(Xf,{className:"w-3 h-3 ml-0.5 shrink-0"}):c.jsx(Qf,{className:"w-3 h-3 ml-0.5 shrink-0"})]}),i&&c.jsx("div",{className:"mt-1.5 p-2 bg-white border border-indigo-200 rounded-lg shadow-lg max-w-full w-80 sm:w-96 z-10",children:c.jsx(tne,{label:e||n,value:t,onChange:r,sizeType:s})})]})},nne=({data:n,onChange:e,onUploadBase:t})=>{var Se,Be,$e,Je,wt,at;const[r,s]=D.useState(0),i=["히어로 섹션","크로바가구 스토리","회사 연혁","인증 및 특허","오시는길"],l=(G,re)=>{e({...n,[G]:re})},d=n.historyPeriods||[],h=n.certsList||[],m=n.patentList||[],g=n.storyCards||[],p=()=>{const G={num:String(g.length+1).padStart(2,"0"),title:"새로운 스토리 챕터",badge:"STORY",desc:"여기에 스토리 세부 설명을 입력하세요.",image:"https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80",image2:""};l("storyCards",[...g,G])},b=G=>{const re=[...g];re.splice(G,1);const ve=re.map((Re,Le)=>({...Re,num:String(Le+1).padStart(2,"0")}));l("storyCards",ve)},w=(G,re,ve)=>{const Re=[...g];Re[G]={...Re[G],[re]:ve},l("storyCards",Re)},_=(G,re)=>{const ve=[...g],Re=re==="up"?G-1:G+1;if(Re<0||Re>=ve.length)return;const Le=ve[G];ve[G]=ve[Re],ve[Re]=Le;const qe=ve.map((Yt,qn)=>({...Yt,num:String(qn+1).padStart(2,"0")}));l("storyCards",qe)},N=()=>{l("historyPeriods",[{period:"2021 ~ 현재",milestone:"새로운 성장 및 기술 혁신",events:[{date:"2026",text:"새로운 특허 및 기술 인증 등록"}],image1:"",image2:"",image3:""},...d])},E=G=>{const re=[...d];re.splice(G,1),l("historyPeriods",re)},j=(G,re)=>{const ve=[...d],Re=re==="up"?G-1:G+1;if(Re<0||Re>=ve.length)return;const Le=ve[G];ve[G]=ve[Re],ve[Re]=Le,l("historyPeriods",ve)},P=(G,re,ve)=>{const Re=[...d];Re[G]={...Re[G],[re]:ve},l("historyPeriods",Re)},A=G=>{const re=[...d],ve=[...re[G].events||[]],Le=re[G].period.match(/\d{4}/),qe=Le?Le[0]:new Date().getFullYear().toString();ve.push({date:qe,text:"새로운 연혁 기입"}),re[G]={...re[G],events:ve},l("historyPeriods",re)},M=(G,re)=>{const ve=[...d],Re=[...ve[G].events||[]];Re.splice(re,1),ve[G]={...ve[G],events:Re},l("historyPeriods",ve)},O=(G,re,ve,Re)=>{const Le=[...d],qe=[...Le[G].events||[]];let Yt=Re;ve==="date"&&(Yt=Re.replace(/\D/g,"").slice(0,4)),qe[re]={...qe[re],[ve]:Yt},Le[G]={...Le[G],events:qe},l("historyPeriods",Le)},q=(G,re,ve)=>{const Re=[...d],Le=[...Re[G].events||[]],qe=ve==="up"?re-1:re+1;if(qe<0||qe>=Le.length)return;const Yt=Le[re];Le[re]=Le[qe],Le[qe]=Yt,Re[G]={...Re[G],events:Le},l("historyPeriods",Re)},[L,k]=D.useState(null),[I,R]=D.useState(null),F=G=>{if(L===null||L===G)return;const re=[...h],[ve]=re.splice(L,1);re.splice(G,0,ve),l("certsList",re),k(null),R(null)},B=()=>{const G={title:"새로운 인증",desc:"발행기관",tag:"인증태그",image:"",highlight:!1};l("certsList",[...h,G])},V=G=>{const re=[...h];re.splice(G,1),l("certsList",re)},se=(G,re,ve)=>{const Re=[...h];Re[G]={...Re[G],[re]:ve}
4476,l("certsList",Re)},[ye,W]=D.useState(null),[$,X]=D.useState(null),be=G=>{if(ye===null||ye===G)return;const re=[...m],[ve]=re.splice(ye,1);re.splice(G,0,ve),l("patentList",re),W(null),X(null)},Oe=()=>{const G={title:"새로운 특허/상표",image:""};l("patentList",[...m,G])},H=G=>{const re=[...m];re.splice(G,1),l("patentList",re)},he=(G,re,ve)=>{const Re=[...m];Re[G]={...Re[G],[re]:ve},l("patentList",Re)},we=D.useRef({});return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"flex gap-2 border-b border-slate-200 overflow-x-auto pb-px",children:i.map((G,re)=>c.jsx("button",{onClick:()=>s(re),className:`py-2 px-4 text-sm font-bold whitespace-nowrap transition-all border-b-2 ${r===re?"text-indigo-600 border-indigo-600":"text-slate-500 border-transparent hover:text-slate-800"}`,children:G},re))}),r===0&&c.jsx("div",{className:"space-y-12",children:c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 mb-4",children:[c.jsx(Dy,{className:"w-5 h-5 text-indigo-500"})," 히어로 섹션 설정"]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"히어로 대제목"}),c.jsx(Er,{fieldName:"heroTitle",fieldLabel:"히어로 대제목",value:n.heroTitle_typography||((Se=n.heroTypography)==null?void 0:Se.title),onChange:G=>l("heroTitle_typography",G),sizeType:"title"})]}),c.jsx("textarea",{value:n.heroTitle,onChange:G=>l("heroTitle",G.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none transition-all",placeholder:"줄바꿈(\\n) 포함 가능"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"히어로 소제목"}),c.jsx(Er,{fieldName:"heroSubtitle",fieldLabel:"히어로 소제목",value:n.heroSubtitle_typography||((Be=n.heroTypography)==null?void 0:Be.subtitle),onChange:G=>l("heroSubtitle_typography",G),sizeType:"subtitle"})]}),c.jsx("textarea",{value:n.heroSubtitle,onChange:G=>l("heroSubtitle",G.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none transition-all"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"히어로 배경 이미지"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-24 h-14 bg-slate-100 border border-slate-200 rounded-lg overflow-hidden flex items-center justify-center",children:n.heroBgImage?c.jsx(et,{src:n.heroBgImage,className:"w-full h-full object-cover",alt:"",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-[10px] text-slate-400 font-bold",children:"이미지 없음"})}),c.jsxs("div",{className:"flex-1 flex gap-2",children:[c.jsx("input",{type:"text",value:n.heroBgImage,onChange:G=>l("heroBgImage",G.target.value),className:"flex-1 p-2 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500/20",placeholder:"이미지 URL"}),c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 p-2 rounded-lg text-slate-600 flex items-center justify-center transition-colors",children:[c.jsx(En,{className:"w-4 h-4"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:G=>t(G,re=>l("heroBgImage",re))})]})]})]})]})]})]})}),r===1&&c.jsxs("div",{className:"space-y-12",children:[c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80",children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2",children:[c.jsx(Kf,{className:"w-5 h-5 text-indigo-500"})," 크로바가구 스토리 설정"]}),c.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1.5 px-3 py-1.5 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl text-xs font-extrabold transition-all shadow-md hover:shadow-lg",children:[c.jsx(Is,{className:"w-4 h-4"})," 스토리 카드 추가"]})]}),c.jsxs("div",{className:"space-y-4 mb-6",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"스토리 대제목"}),c.jsx(Er,{fieldName:"storyTitle",fieldLabel:"스토리 대제목",value:n.storyTitle_typography||(($e=n.typography)==null?void 0:$e.storyTitle),onChange:G=>l("storyTitle_typography",G),sizeType:"title"})]}),c.jsx("input",{type:"text",value:n.storyTitle||"",onChange:G=>l("storyTitle",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none transition-all",placeholder:"예: 공간을 채우는 가치, 크로바가구 스토리"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"스토리 소제목/설명 (지우면 화면에 표시되지 않습니다)"}),c.jsx(Er,{fieldName:"storySubtitle",fieldLabel:"스토리 소제목/설명",value:n.storySubtitle_typography||((Je=n.typography)==null?void 0:Je.storySubtitle),onChange:G=>l("storySubtitle_typography",G),sizeType:"subtitle"})]}),c.jsx("textarea",{value:n.storySubtitle||"",onChange:G=>l("storySubtitle",G.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none transition-all",placeholder:"내용을 비워두면 화면상에 소제목/설명이 나오지 않습니다."})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"스토리 카드 목록 (연혁 순서)"}),(n.storyCards||[]).map((G,re)=>{var ve,Re,Le;return c.jsxs("div",{className:"bg-white p-4 rounded-xl border border-slate-200 shadow-sm relative group space-y-4",children:[c.jsxs("div",{className:"flex justify-between items-center pb-2 border-b border-slate-100",children:[c.jsxs("span",{className:"font-mono font-bold text-sm text-indigo-600 bg-indigo-50 px-2 py-0.5 rounded-md",children:["챕터 ",G.num]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{type:"button",onClick:()=>_(re,"up"),disabled:re===0,className:"p-1 text-slate-400 hover:text-slate-600 disabled:opacity-25",title:"위로 이동",children:c.jsx(Bw,{className:"w-3.5 h-3.5"})}),c.jsx("button",{type:"button",onClick:()=>_(re,"down"),disabled:re===(n.storyCards||[]).length-1,className:"p-1 text-slate-400 hover:text-slate-600 disabled:opacity-25",title:"아래로 이동",children:c.jsx(uA,{className:"w-3.5 h-3.5"})}),c.jsx("button",{type:"button",onClick:()=>b(re),className:"p-1 text-red-500 hover:text-red-700 hover:bg-red-50 rounded",title:"삭제",children:c.jsx(Sn,{className:"w-3.5 h-3.5"})})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase",children:"대표 이미지 1 (가로형 / 메인)"}),c.jsx("div",{className:"aspect-[4/3] w-full bg-slate-100 border border-slate-200 rounded-lg overflow-hidden flex items-center justify-center relative",children:G.image?c.jsx(et,{src:G.image,className:"w-full h-full object-cover",alt:"",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-xs text-slate-400 font-bold",children:"이미지 없음"})}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("input",{type:"text",value:G.image,onChange:qe=>w(re,"image",qe.target.value),className:"flex-1 p-1.5 text-xs border border-slate-300 rounded-lg",placeholder:"이미지 1 URL"}),c.jsxs("label",{className:"cursor-pointer bg-slate-100 hover:bg-slate-200 p-1.5 rounded-lg border border-slate-300 flex items-center justify-center",children:[c.jsx(En,{className:"w-3.5 h-3.5 text-slate-600"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:qe=>t(qe,Yt=>w(re,"image",Yt))})]})]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase",children:"대표 이미지 2 (세로형 / 추가, 선택)"}),c.jsx("div",{className:"aspect-[4/3] w-full bg-slate-100 border border-slate-200 rounded-lg overflow-hidden flex items-center justify-center relative",children:G.image2?c.jsx(et,{src:G.image2,className:"w-full h-full object-cover",alt:"",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-xs text-slate-400 font-bold",children:"이미지 없음 (단일 이미지로 표시)"})}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("input",{type:"text",value:G.image2||"",onChange:qe=>w(re,"image2",qe.target.value),className:"flex-1 p-1.5 text-xs border border-slate-300 rounded-lg",placeholder:"이미지 2 URL"}),c.jsxs("label",{className:"cursor-pointer bg-slate-100 hover:bg-slate-200 p-1.5 rounded-lg border border-slate-300 flex items-center justify-center",children:[c.jsx(En,{className:"w-3.5 h-3.5 text-slate-600"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:qe=>t(qe,Yt=>w(re,"image2",Yt))})]}),G.image2&&c.jsx("button",{type:"button",onClick:()=>w(re,"image2",""),className:"bg-white border border-slate-300 hover:bg-red-50 p-1.5 rounded-lg text-red-500 transition-colors",title:"이미지 2 삭제",children:c.jsx(Sn,{className:"w-3.5 h-3.5"})})]})]})]}),c.jsxs("div",{className:"md:col-span-2 space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[c.jsxs("div",{className:"sm:col-span-1",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 mb-0.5",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase truncate",children:"태그/배지 (Badge)"}),c.jsx(Er,{fieldName:"badge",fieldLabel:"태그/배지",value:G.badge_typography||((ve=G.typography)==null?void 0:ve.badge),onChange:qe=>w(re,"badge_typography",qe),sizeType:"subtitle"})]}),c.jsx("input",{type:"text",value:G.badge,onChange:qe=>w(re,"badge",qe.target.value),className:"w-full p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 font-bold",placeholder:"예: ERGONOMICS"})]}),c.jsxs("div",{className:"sm:col-span-2",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 mb-0.5",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase truncate",children:"스토리 제목 (Title)"}),c.jsx(Er,{fieldName:"title",fieldLabel:"스토리 제목",value:G.title_typography||((Re=G.typography)==null?void 0:Re.title),onChange:qe=>w(re,"title_typography",qe),sizeType:"title"})]}),c.jsx("input",{type:"text",value:G.title,onChange:qe=>w(re,"title",qe.target.value),className:"w-full p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 font-bold",placeholder:"예: 인체공학적 의자 공학"})]})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 mb-0.5",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase truncate",children:"스토리 설명 (Description)"}),c.jsx(Er,{fieldName:"desc",fieldLabel:"스토리 설명",value:G.desc_typography||((Le=G.typography)==null?void 0:Le.desc),onChange:qe=>w(re,"desc_typography",qe),sizeType:"description"})]}),c.jsx("textarea",{value:G.desc,onChange:qe=>w(re,"desc",qe.target.value),rows:3,className:"w-full p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500",placeholder:"자세한 가치 설명을 입력하세요."})]})]})]})]},re)}
4476),(n.storyCards||[]).length===0&&c.jsxs("div",{className:"text-center py-8 bg-white border border-slate-200 border-dashed rounded-xl text-slate-400",children:[c.jsx(Kf,{className:"w-8 h-8 mx-auto mb-1 stroke-[1.5]"}),c.jsx("p",{className:"text-xs font-medium",children:'등록된 스토리 카드가 없습니다. "스토리 카드 추가" 버튼을 눌러 생성하세요.'})]})]})]}),c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80 shadow-sm",children:[c.jsxs("h3",{className:"text-lg font-bold text-emerald-800 flex items-center gap-2 mb-4",children:[c.jsx(CI,{className:"w-5 h-5 text-emerald-600"})," 친환경 자재(E0) 배너 설정"]}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"배경 이미지 URL"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-16 h-16 bg-slate-100 border border-slate-200 rounded-lg overflow-hidden flex items-center justify-center",children:n.ecoBgImage?c.jsx(et,{src:n.ecoBgImage,className:"w-full h-full object-cover",alt:"",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-[10px] text-slate-400 font-bold",children:"이미지 없음"})}),c.jsxs("div",{className:"flex-1 flex gap-2",children:[c.jsx("input",{type:"text",value:n.ecoBgImage||"",onChange:G=>l("ecoBgImage",G.target.value),className:"flex-1 p-2 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500/20",placeholder:"친환경 배경 이미지 URL"}),c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 p-2 rounded-lg text-slate-600 flex items-center justify-center transition-colors",children:[c.jsx(En,{className:"w-4 h-4"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:G=>t(G,re=>l("ecoBgImage",re))})]})]})]})]}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"배너 서브타이틀"}),c.jsx("input",{type:"text",value:n.ecoSubtitle||"",onChange:G=>l("ecoSubtitle",G.target.value),className:"w-full p-2.5 text-xs border border-slate-300 rounded-lg",placeholder:"예: E0 ECO MATERIALS"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"하단 강조 문구"}),c.jsx("input",{type:"text",value:n.ecoFooterText||"",onChange:G=>l("ecoFooterText",G.target.value),className:"w-full p-2.5 text-xs border border-slate-300 rounded-lg",placeholder:"예: 환경을 생각하는 소재 선택이..."})]})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"배너 타이틀 (줄바꿈 가능)"}),c.jsx("textarea",{value:n.ecoTitle||"",onChange:G=>l("ecoTitle",G.target.value),rows:2,className:"w-full p-2.5 text-xs border border-slate-300 rounded-lg",placeholder:`예: E0 등급 친환경 자재,
4477건강한 공간을 만듭니다`})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"배너 세부 설명 (줄바꿈 가능)"}),c.jsx("textarea",{value:n.ecoDescription||"",onChange:G=>l("ecoDescription",G.target.value),rows:3,className:"w-full p-2.5 text-xs border border-slate-300 rounded-lg",placeholder:"크로바가구의 친환경 고집과 가치를 설명하세요."})]})]}),c.jsxs("div",{className:"border-t border-slate-200/60 pt-4",children:[c.jsx("h4",{className:"text-xs font-bold text-slate-600 uppercase mb-3",children:"4가지 친환경 세부 특징 설정"}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:(n.ecoFeatures||[{title:"E0 등급 자재",desc:"인체에 무해한 E0 등급 목재 사용",icon:"leaf"},{title:"자연 친화적",desc:"지속가능한 산림 자원을 활용한 친환경 자재",icon:"tree"},{title:"유해물질 최소화",desc:"포름알데히드 방출량이 거의 ì—
4477†ì–´ 안심 사용",icon:"shield"},{title:"쾌적한 실내 환경",desc:"건강하고 쾌적한 공간을 위한 친환경 가구",icon:"home"}]).map((G,re)=>c.jsxs("div",{className:"p-3 bg-white border border-slate-200 rounded-xl space-y-2",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("span",{className:"text-[10px] font-extrabold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded-full uppercase font-sans",children:["특징 ",re+1]}),c.jsxs("select",{value:G.icon,onChange:ve=>{const Re=[...n.ecoFeatures||[{title:"E0 등급 자재",desc:"인체에 무해한 E0 등급 목재 사용",icon:"leaf"},{title:"자연 친화적",desc:"지속가능한 산림 자원을 활용한 친환경 자재",icon:"tree"},{title:"유해물질 최소화",desc:"포름알데히드 방출량이 거의 없어 안심 사용",icon:"shield"},{title:"쾌적한 실내 환경",desc:"건강하고 쾌적한 공간을 위한 친환경 가구",icon:"home"}]];Re[re]={...G,icon:ve.target.value},l("ecoFeatures",Re)},className:"text-[10px] border border-slate-200 rounded px-1.5 py-0.5",children:[c.jsx("option",{value:"leaf",children:"나뭇잎 (Leaf)"}),c.jsx("option",{value:"tree",children:"숲/나무 (Trees)"}),c.jsx("option",{value:"shield",children:"방패 (Shield)"}),c.jsx("option",{value:"home",children:"집/환경 (Home)"})]})]}),c.jsx("div",{children:c.jsx("input",{type:"text",value:G.title,onChange:ve=>{const Re=[...n.ecoFeatures||[{title:"E0 등급 자재",desc:"인체에 무해한 E0 등급 목재 사용",icon:"leaf"},{title:"자연 친화적",desc:"지속가능한 산림 자원을 활용한 친환경 자재",icon:"tree"},{title:"유해물질 최소화",desc:"포름알데히드 방출량이 거의 없어 안심 사용",icon:"shield"},{title:"쾌적한 실내 환경",desc:"건강하고 쾌적한 공간을 위한 친환경 가구",icon:"home"}]];Re[re]={...G,title:ve.target.value},l("ecoFeatures",Re)},className:"w-full p-1.5 text-xs font-bold border border-slate-200 rounded",placeholder:"특징 제목"})}),c.jsx("div",{children:c.jsx("textarea",{value:G.desc,onChange:ve=>{const Re=[...n.ecoFeatures||[{title:"E0 등급 자재",desc:"인체에 무해한 E0 등급 목재 사용",icon:"leaf"},{title:"자연 친화적",desc:"지속가능한 산림 자원을 활용한 친환경 자재",icon:"tree"},{title:"유해물질 최소화",desc:"포름알데히드 방출량이 거의 없어 안심 사용",icon:"shield"},{title:"쾌적한 실내 환경",desc:"건강하고 쾌적한 공간을 위한 친환경 가구",icon:"home"}]];Re[re]={...G,desc:ve.target.value},l("ecoFeatures",Re)},rows:2,className:"w-full p-1.5 text-[11px] text-slate-500 border border-slate-200 rounded",placeholder:"특징 설명"})})]},re))})]})]})]}),c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80 shadow-sm",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 mb-4",children:[c.jsx(N_,{className:"w-5 h-5 text-indigo-500"})," 크로바가구 CI 및 다운로드 설정"]}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"한국어 CI 로고 이미지 (미등록 시 기본 엠블럼 표시)"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-20 h-20 bg-slate-100 border border-slate-200 rounded-xl overflow-hidden flex items-center justify-center",children:n.ciImageKorean?c.jsx(et,{src:n.ciImageKorean,className:"w-full h-full object-contain p-2",alt:"Korean CI",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-[10px] text-slate-400 font-bold",children:"기본 로고 사용"})}),c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("input",{type:"text",value:n.ciImageKorean||"",onChange:G=>l("ciImageKorean",G.target.value),className:"w-full p-2 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500/20",placeholder:"한국어 로고 이미지 URL"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 py-1.5 px-3 rounded-lg text-slate-600 flex items-center justify-center gap-1.5 transition-colors text-xs font-semibold",children:[c.jsx(En,{className:"w-3.5 h-3.5"})," 파일 업로드",c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:G=>t(G,re=>l("ciImageKorean",re))})]}),n.ciImageKorean&&c.jsx("button",{type:"button",onClick:()=>l("ciImageKorean",""),className:"bg-white border border-slate-300 hover:bg-red-50 py-1.5 px-3 rounded-lg text-red-500 flex items-center justify-center gap-1.5 transition-colors text-xs font-semibold",children:"초기화"})]})]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"영어 CI 로고 이미지 (미등록 시 기본 엠블럼 표시)"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-20 h-20 bg-slate-100 border border-slate-200 rounded-xl overflow-hidden flex items-center justify-center",children:n.ciImageEnglish?c.jsx(et,{src:n.ciImageEnglish,className:"w-full h-full object-contain p-2",alt:"English CI",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-[10px] text-slate-400 font-bold",children:"기본 로고 사용"})}),c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("input",{type:"text",value:n.ciImageEnglish||"",onChange:G=>l("ciImageEnglish",G.target.value),className:"w-full p-2 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500/20",placeholder:"영어 로고 이미지 URL"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 py-1.5 px-3 rounded-lg text-slate-600 flex items-center justify-center gap-1.5 transition-colors text-xs font-semibold",children:[c.jsx(En,{className:"w-3.5 h-3.5"})," 파일 업로드",c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:G=>t(G,re=>l("ciImageEnglish",re))})]}),n.ciImageEnglish&&c.jsx("button",{type:"button",onClick:()=>l("ciImageEnglish",""),className:"bg-white border border-slate-300 hover:bg-red-50 py-1.5 px-3 rounded-lg text-red-500 flex items-center justify-center gap-1.5 transition-colors text-xs font-semibold",children:"초기화"})]})]})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"CI 설명 문구 (CI Description)"}),c.jsx("textarea",{value:n.ciDescription||"",onChange:G=>l("ciDescription",G.target.value),rows:3,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none",placeholder:"행운과 자연을 상징하는 클로버에 가구의 본질인 목재의 결을 더해 오랜 제조 기술과 장인정신을 담았습니다."})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"구글 드라이브 및 CI 파일 다운로드 URL 링크 (입력 시 다운받기 버튼 생성)"}),c.jsx("input",{type:"text",value:n.ciDownloadUrl||"",onChange:G=>l("ciDownloadUrl",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none",placeholder:"https://drive.google.com/..."}),c.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"* 구글 드라이브나 Dropbox 등 클라우드에 올린 CI 원본 파일(AI, PNG 등)의 공유 링크를 기입해 주세요. 링크를 등록하면 웹사이트 About 화면에 다운로드 버튼이 생깁니다."})]})]})]})]}),r===2&&c.jsx("div",{className:"space-y-12",children:c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2",children:[c.jsx(Wf,{className:"w-5 h-5 text-indigo-500"})," 연혁(History) 관리"]}),c.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"실제 화면과 유사한 디자인으로 연혁 기간별 대표 마크와 개별 일자별 연혁 내용을 추가/편집할 수 있습니다."})]}),c.jsxs("button",{type:"button",onClick:N,className:"flex items-center gap-1.5 px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl text-xs font-extrabold transition-all shadow-md hover:shadow-lg",children:[c.jsx(Is,{className:"w-4 h-4"})," 연혁 그룹 추가"]})]}),c.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-200 mb-8 space-y-4 shadow-sm",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"연혁 대제목"}),c.jsx(Er,{fieldName:"historyTitle",fieldLabel:"연혁 대제목",value:n.historyTitle_typography||((wt=n.typography)==null?void 0:wt.historyTitle),onChange:G=>l("historyTitle_typography",G),sizeType:"title"})]}),c.jsx("input",{type:"text",value:n.historyTitle??"공간을 혁신해온 크로바가구 연혁",onChange:G=>l("historyTitle",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none transition-all font-semibold text-slate-800",placeholder:"예: 공간을 혁신해온 크로바가구 연혁"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"연혁 소제목/설명 (지우면 화면에 표시되지 않습니다)"}),c.jsx(Er,{fieldName:"historySubtitle",fieldLabel:"연혁 소제목/설명",value:n.historySubtitle_typography||((at=n.typography)==null?void 0:at.historySubtitle),onChange:G=>l("historySubtitle_typography",G),sizeType:"subtitle"})]}),c.jsx("textarea",{value:n.historySubtitle??"1988년부터 이어온 인간 중심의 가구 공학과 끊임없는 신제품 개발로 쌓아 올린 영광과 도전의 흔적입니다.",onCh
4477ange:G=>l("historySubtitle",G.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none transition-all text-slate-700",placeholder:"내용을 비워두면 화면상에 소제목/설명이 나오지 않습니다."})]})]}),c.jsxs("div",{className:"space-y-8",children:[d.map((G,re)=>{var ve,Re;return c.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6 shadow-sm hover:shadow-md transition-all relative overflow-hidden",children:[c.jsx("div",{className:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-emerald-400 to-indigo-500"}),c.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 pb-4 border-b border-slate-100 mb-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3 flex-1",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"기간 범위 (예: 2016 ~ 2020)"}),c.jsx(Er,{fieldName:"period",fieldLabel:"기간 범위",value:G.period_typography||((ve=G.typography)==null?void 0:ve.period),onChange:Le=>P(re,"period_typography",Le),sizeType:"title"})]}),c.jsx("input",{type:"text",value:G.period,onChange:Le=>P(re,"period",Le.target.value),className:"mt-1 font-mono text-base font-extrabold text-indigo-600 border border-slate-200 rounded-lg px-2.5 py-1 w-36 focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none"})]}),c.jsxs("div",{className:"flex flex-col flex-1 min-w-[200px] md:min-w-[320px]",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"대표 성과 및 지정명칭"}),c.jsx(Er,{fieldName:"milestone",fieldLabel:"대표 성과",value:G.milestone_typography||((Re=G.typography)==null?void 0:Re.milestone),onChange:Le=>P(re,"milestone_typography",Le),sizeType:"subtitle"})]}),c.jsxs("div",{className:"flex items-start gap-2 mt-1",children:[c.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-full bg-emerald-500 flex-shrink-0 animate-pulse mt-2"}),c.jsx("textarea",{value:G.milestone,onChange:Le=>P(re,"milestone",Le.target.value),placeholder:"사무용의자 우수조달물품 지정 (Enter 키로 줄바꿈 가능)",rows:2,className:"font-extrabold text-slate-800 text-sm md:text-base border border-slate-200 rounded-lg px-2.5 py-1 w-full focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 outline-none resize-y min-h-[38px]"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 self-end md:self-auto",children:[c.jsx("button",{type:"button",onClick:()=>j(re,"up"),disabled:re===0,className:"p-1.5 text-slate-400 hover:text-slate-600 bg-slate-50 hover:bg-slate-100 rounded-lg transition-colors disabled:opacity-30",title:"위로 이동",children:c.jsx(Xf,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>j(re,"down"),disabled:re===d.length-1,className:"p-1.5 text-slate-400 hover:text-slate-600 bg-slate-50 hover:bg-slate-100 rounded-lg transition-colors disabled:opacity-30",title:"아래로 이동",children:c.jsx(Qf,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>E(re),className:"p-1.5 text-slate-400 hover:text-red-500 bg-slate-50 hover:bg-red-50 rounded-lg transition-colors border border-transparent hover:border-red-100 ml-1",title:"그룹 삭제",children:c.jsx(Sn,{className:"w-4 h-4"})})]})]}),c.jsxs("div",{className:"flex flex-col gap-4 mb-6 p-4 bg-slate-50/50 rounded-xl border border-slate-100/80",children:[c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-500 uppercase tracking-wider",children:"대표 이미지 1 (Image 1)"}),c.jsxs("div",{className:"flex items-center gap-3",children:[G.image1?c.jsx("div",{className:"w-12 h-12 rounded-lg border border-slate-200 overflow-hidden bg-white flex-shrink-0 relative group shadow-sm",children:c.jsx("img",{src:G.image1,alt:"Preview 1",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}):c.jsx("div",{className:"w-12 h-12 rounded-lg border border-dashed border-slate-200 bg-slate-100 flex-shrink-0 flex items-center justify-center text-[9px] text-slate-400 font-medium",children:"No Img"}),c.jsxs("div",{className:"flex-1 flex gap-2",children:[c.jsx("input",{type:"text",value:G.image1||"",onChange:Le=>P(re,"image1",Le.target.value),placeholder:"이미지 URL",className:"flex-1 p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 bg-white"}),c.jsxs("label",{className:"cursor-pointer bg-slate-100 hover:bg-slate-200 p-2 px-3 rounded-lg border border-slate-300 flex items-center justify-center gap-1 flex-shrink-0",children:[c.jsx(En,{className:"w-4 h-4 text-slate-600"}),c.jsx("span",{className:"text-xs font-medium text-slate-600 hidden sm:inline",children:"업로드"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:Le=>t(Le,qe=>P(re,"image1",qe))})]})]})]})]}),c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-500 uppercase tracking-wider",children:"대표 이미지 2 (Image 2 - 선택사항)"}),c.jsxs("div",{className:"flex items-center gap-3",children:[G.image2?c.jsx("div",{className:"w-12 h-12 rounded-lg border border-slate-200 overflow-hidden bg-white flex-shrink-0 relative group shadow-sm",children:c.jsx("img",{src:G.image2,alt:"Preview 2",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}):c.jsx("div",{className:"w-12 h-12 rounded-lg border border-dashed border-slate-200 bg-slate-100 flex-shrink-0 flex items-center justify-center text-[9px] text-slate-400 font-medium",children:"No Img"}),c.jsxs("div",{className:"flex-1 flex gap-2",children:[c.jsx("input",{type:"text",value:G.image2||"",onChange:Le=>P(re,"image2",Le.target.value),placeholder:"이미지 URL",className:"flex-1 p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 bg-white"}),c.jsxs("label",{className:"cursor-pointer bg-slate-100 hover:bg-slate-200 p-2 px-3 rounded-lg border border-slate-300 flex items-center justify-center gap-1 flex-shrink-0",children:[c.jsx(En,{className:"w-4 h-4 text-slate-600"}),c.jsx("span",{className:"text-xs font-medium text-slate-600 hidden sm:inline",children:"업로드"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:Le=>t(Le,qe=>P(re,"image2",qe))})]})]})]})]}),c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-500 uppercase tracking-wider",children:"대표 이미지 3 (Image 3 - 선택사항)"}),c.jsxs("div",{className:"flex items-center gap-3",children:[G.image3?c.jsx("div",{className:"w-12 h-12 rounded-lg border border-slate-200 overflow-hidden bg-white flex-shrink-0 relative group shadow-sm",children:c.jsx("img",{src:G.image3,alt:"Preview 3",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}):c.jsx("div",{className:"w-12 h-12 rounded-lg border border-dashed border-slate-200 bg-slate-100 flex-shrink-0 flex items-center justify-center text-[9px] text-slate-400 font-medium",children:"No Img"}),c.jsxs("div",{className:"flex-1 flex gap-2",children:[c.jsx("input",{type:"text",value:G.image3||"",onChange:Le=>P(re,"image3",Le.target.value),placeholder:"이미지 URL",className:"flex-1 p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 bg-white"}),c.jsxs("label",{className:"cursor-pointer bg-slate-100 hover:bg-slate-200 p-2 px-3 rounded-lg border border-slate-300 flex items-center justify-center gap-1 flex-shrink-0",children:[c.jsx(En,{className:"w-4 h-4 text-slate-600"}),c.jsx("span",{className:"text-xs font-medium text-slate-600 hidden sm:inline",children:"업로드"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:Le=>t(Le,qe=>P(re,"image3",qe))})]})]})]})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider block mb-2",children:"세부 연혁 목록"}),(G.events||[]).map((Le,qe)=>{var Yt;return c.jsxs("div",{className:"flex items-center gap-3 bg-slate-50/50 p-2 rounded-xl border border-slate-100 group transition-all",children:[c.jsx("div",{className:"flex-shrink-0 w-24",title:"4자리 연도만 입력 가능합니다 (예: 2026)",children:c.jsx("input",{type:"text",value:Le.date,onChange:qn=>O(re,qe,"date",qn.target.value),placeholder:"2020",maxLength:4,className:"w-full font-mono text-center text-xs font-bold text-indigo-500 bg-indigo-50/70 border border-indigo-100/80 py-1.5 px-2 rounded-lg focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 focus:bg-white outline-none"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-[10px] font-bold text-slate-400",children:"내용"}),c.jsx(Er,{fieldName:"text",fieldLabel:"연혁 내역",value:Le.text_typography||((Yt=Le.typography)==null?void 0:Yt.text),onChange:qn=>O(re,qe,"text_typography",qn),sizeType:"description"})]}),c.jsx("textarea",{value:Le.text,onChange:qn=>O(re,qe,"text",qn.target.value),placeholder:"사무용의자 NEP(신제품)인증 (Enter 키로 줄바꿈 가능)",rows:2,className:"w-full text-slate-800 text-sm font-semibold border border-transparent hover:border-slate-200 focus:border-indigo-500 focus:bg-white bg-transparent py-1.5 px-2.5 rounded-lg outline-none transition-all resize-y min-h-[44px] leading-relaxed block align-middle"})]}),c.jsxs("div",{className:"flex items-center gap-1 opacity-40 group-hover:opacity-100 transition-opacity",children:[c.jsx("button",{type:"button",onClick:()=>q(re,qe,"up"),disabled:qe===0,className:"p-1 text-slate-400 hover:text-slate-600 disabled:opacity-20",children:c.jsx(Bw,{className:"w-3.5 h-3.5"})}),c.jsx("button",{type:"button",onClick:()=>q(re,qe,"down"),disabled:qe===(G.events||[]).length-1,className:"p-1 text-slate-400 hover:text-slate-600 disabled:opacity-20",children:c.jsx(uA,{className:"w-3.5 h-3.5"})}),c.jsx("button",{type:"button",onClick:()=>M(re,qe),className:"p-1 text-slate-400 hover:text-red-500 rounded hover:bg-red-50",children:c.jsx(Sn,{className:"w-3.5 h-3.5"})})]})]},qe)}),c.jsxs("button",{type:"button",onClick:()=>A(re),className:"w-full py-2.5 border border-dashed border-slate-200 hover:border-indigo-300 bg-slate-50/30 hover:bg-indigo-50/20 text-slate-500 hover:text-indigo-600 rounded-xl text-xs font-bold transition-all flex justify-center items-center gap-1.5 mt-2",children:[c.jsx(Is,{className:"w-3.5 h-3.5"})," 세부 연혁 항목 추가 (예: ",G.period.split(" ~ ")[0]||"2020",")"]})]})]},re)}
4477),d.length===0&&c.jsxs("div",{className:"text-center py-10 bg-white border border-slate-200 border-dashed rounded-2xl text-slate-400",children:[c.jsx(Wf,{className:"w-8 h-8 mx-auto mb-2 stroke-[1.5]"}),c.jsx("p",{className:"text-sm font-medium",children:"등록된 연혁이 없습니다. 새로운 연혁 그룹을 추가하세요."})]})]})]})}),r===3&&c.jsxs("div",{className:"space-y-12",children:[c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2",children:[c.jsx(oc,{className:"w-5 h-5 text-indigo-500"})," 인증 및 특허 관리"]}),c.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"각 우수 조달 물품 및 특허 목록입니다. 지정된 타이틀명에 부합하는 예쁜 기본 로고가 표시되며, 원하는 이미지를 업로드하면 해당 이미지로 대체됩니다."})]}),c.jsxs("button",{type:"button",onClick:B,className:"flex items-center gap-1.5 px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl text-xs font-extrabold transition-all shadow-md hover:shadow-lg",children:[c.jsx(Is,{className:"w-4 h-4"})," 새 인증 추가"]})]}),c.jsx("div",{className:"space-y-4 mb-6",children:c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"인증 섹션 타이틀"}),c.jsx("input",{type:"text",value:n.certsTitle,onChange:G=>l("certsTitle",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"인증 섹션 서브타이틀"}),c.jsx("input",{type:"text",value:n.certsSubtitle,onChange:G=>l("certsSubtitle",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none"})]})]})}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[h.map((G,re)=>c.jsxs("div",{draggable:!0,onDragStart:()=>k(re),onDragEnter:()=>R(re),onDragLeave:()=>R(null),onDragOver:ve=>ve.preventDefault(),onDrop:()=>F(re),onDragEnd:()=>k(null),className:`bg-white p-5 rounded-2xl border ${I===re?"border-2 border-dashed border-indigo-500 bg-indigo-50/50 shadow-inner":"border-slate-200 shadow-sm"} relative hover:shadow-md transition-all flex flex-col justify-between ${L===re?"opacity-30":""}`,children:[c.jsx("button",{type:"button",onClick:()=>V(re),className:"absolute top-3 right-3 p-1 text-slate-400 hover:text-red-500 bg-slate-50 hover:bg-red-50 rounded-lg transition-colors border border-transparent hover:border-red-100",title:"인증 삭제",children:c.jsx(Sn,{className:"w-4 h-4"})}),c.jsx("div",{className:"absolute top-3 right-10 cursor-grab text-slate-400",children:c.jsx(fA,{className:"w-5 h-5"})}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2 flex-shrink-0",children:[c.jsxs("div",{className:"w-20 h-20 md:w-24 md:h-24 flex items-center justify-center rounded-2xl bg-slate-50 border border-slate-200 p-2 shadow-inner relative group overflow-hidden",children:[c.jsx(F3,{title:G.title,image:G.image,className:"w-full h-full object-contain"}),G.image&&c.jsx("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:c.jsx("button",{type:"button",onClick:()=>se(re,"image",""),className:"p-1.5 bg-white rounded-full text-slate-700 hover:text-indigo-600 shadow-sm transition-all",title:"기본 로고로 복원",children:c.jsx(UU,{className:"w-4 h-4"})})})]}),c.jsxs("div",{className:"flex gap-1",children:[c.jsxs("button",{type:"button",onClick:()=>{var ve;return(ve=we.current[`cert-${re}`])==null?void 0:ve.click()},className:"px-2 py-1 bg-indigo-50 hover:bg-indigo-100 text-indigo-700 rounded-md text-[10px] font-black transition-all flex items-center gap-1 border border-indigo-100",children:[c.jsx(En,{className:"w-3 h-3"})," 이미지 업로드"]}),c.jsx("input",{type:"file",ref:ve=>we.current[`cert-${re}`]=ve,className:"hidden",accept:"image/*",onChange:ve=>t(ve,Re=>se(re,"image",Re))})]})]}),c.jsxs("div",{className:"flex-1 space-y-3 w-full",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase",children:"인증명 (Title)"}),c.jsx("input",{type:"text",value:G.title,onChange:ve=>se(re,"title",ve.target.value),className:"w-full mt-0.5 p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 font-extrabold text-slate-800",placeholder:"예: 우수제품, 친환경제품"})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase",children:"발급기관 (Desc)"}),c.jsx("input",{type:"text",value:G.desc,onChange:ve=>se(re,"desc",ve.target.value),className:"w-full mt-0.5 p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 text-slate-700",placeholder:"예: 조달청"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase",children:"태그 (Tag)"}),c.jsx("input",{type:"text",value:G.tag,onChange:ve=>se(re,"tag",ve.target.value),className:"w-full mt-0.5 p-2 text-xs border border-slate-200 rounded-lg focus:ring-1 focus:ring-indigo-500 text-slate-700",placeholder:"예: 우선구매"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[c.jsx("input",{id:`cert-highlight-${re}`,type:"checkbox",checked:G.highlight||!1,onChange:ve=>se(re,"highlight",ve.target.checked),className:"rounded border-slate-300 text-indigo-600 focus:ring-indigo-500/20 w-4 h-4"}),c.jsx("label",{htmlFor:`cert-highlight-${re}`,className:"text-xs font-bold text-slate-500 cursor-pointer select-none",children:"우선구매 대상 강조 표시 (붉은색 테두리 및 반짝임 효과)"})]})]})]})]}
4477,re)),h.length===0&&c.jsxs("div",{className:"col-span-full text-center py-10 bg-white border border-slate-200 border-dashed rounded-2xl text-slate-400",children:[c.jsx(oc,{className:"w-8 h-8 mx-auto mb-2 stroke-[1.5]"}),c.jsx("p",{className:"text-sm font-medium",children:"등록된 인증이 없습니다. 새로운 인증을 추가하세요."})]})]})]}),c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("div",{children:c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2",children:[c.jsx(oc,{className:"w-5 h-5 text-indigo-500"})," 상표 | 특허 | 디자인등록"]})}),c.jsxs("button",{type:"button",onClick:Oe,className:"flex items-center gap-1.5 px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl text-xs font-extrabold transition-all shadow-md hover:shadow-lg",children:[c.jsx(Is,{className:"w-4 h-4"})," 새 등록 추가"]})]}),c.jsx("div",{className:"space-y-4 mb-6",children:c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"상표/특허 섹션 타이틀"}),c.jsx("input",{type:"text",value:n.patentTitle,onChange:G=>l("patentTitle",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none"})]})}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:m.map((G,re)=>c.jsxs("div",{draggable:!0,onDragStart:()=>W(re),onDragEnter:()=>X(re),onDragLeave:()=>X(null),onDragOver:ve=>ve.preventDefault(),onDrop:()=>be(re),onDragEnd:()=>W(null),className:`bg-white p-5 rounded-2xl border ${$===re?"border-2 border-dashed border-indigo-500 bg-indigo-50/50 shadow-inner":"border-slate-200 shadow-sm"} relative hover:shadow-md transition-all ${ye===re?"opacity-30":""}`,children:[c.jsx("button",{type:"button",onClick:()=>H(re),className:"absolute top-3 right-3 p-1 text-slate-400 hover:text-red-500 bg-slate-50 hover:bg-red-50 rounded-lg transition-colors border border-transparent hover:border-red-100",title:"삭제",children:c.jsx(Sn,{className:"w-4 h-4"})}),c.jsx("div",{className:"absolute top-3 right-10 cursor-grab text-slate-400",children:c.jsx(fA,{className:"w-5 h-5"})}),c.jsxs("div",{className:"flex gap-4",children:[c.jsxs("div",{className:"w-24 h-32 flex-shrink-0 bg-slate-50 border border-slate-200 rounded-lg overflow-hidden flex items-center justify-center relative group",children:[G.image?c.jsx(et,{src:G.image,className:"w-full h-full object-cover",alt:"",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-[10px] text-slate-400 font-bold",children:"이미지 없음"}),c.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:[c.jsx("button",{type:"button",onClick:()=>{var ve;return(ve=we.current[`patent-${re}`])==null?void 0:ve.click()},className:"p-1.5 bg-white rounded-full text-slate-700 shadow-sm transition-all",children:c.jsx(En,{className:"w-4 h-4"})}),c.jsx("input",{type:"file",ref:ve=>we.current[`patent-${re}`]=ve,className:"hidden",accept:"image/*",onChange:ve=>t(ve,Re=>he(re,"image",Re))})]})]}),c.jsxs("div",{className:"flex-[2] space-y-2",children:[c.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase",children:"등록명"}),c.jsx("textarea",{value:G.title,onChange:ve=>he(re,"title",ve.target.value),className:"w-full p-2 text-sm border border-slate-200 rounded-lg h-20 resize-none"})]})]})]},re))})]})]}),r===4&&c.jsx("div",{className:"space-y-12",children:c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 mb-4",children:[c.jsx(Cf,{className:"w-5 h-5 text-indigo-500"})," 오시는 길 및 주소 설정"]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"본사 이미지"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-16 h-16 bg-slate-100 border border-slate-200 rounded-lg overflow-hidden flex items-center justify-center",children:n.hqImage?c.jsx(et,{src:n.hqImage,className:"w-full h-full object-cover",alt:"",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-[10px] text-slate-400 font-bold",children:"이미지 없음"})}),c.jsxs("div",{className:"flex-1 flex gap-2",children:[c.jsx("input",{type:"text",value:n.hqImage,onChange:G=>l("hqImage",G.target.value),className:"flex-1 p-2 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500/20",placeholder:"본사 이미지 URL"}),c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 p-2 rounded-lg text-slate-600 flex items-center justify-center transition-colors",children:[c.jsx(En,{className:"w-4 h-4"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:G=>t(G,re=>l("hqImage",re))})]})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"제2공장 이미지"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-16 h-16 bg-slate-100 border border-slate-200 rounded-lg overflow-hidden flex items-center justify-center",children:n.factory2Image?c.jsx(et,{src:n.factory2Image,className:"w-full h-full object-cover",alt:"",referrerPolicy:"no-referrer"}):c.jsx("span",{className:"text-[10px] text-slate-400 font-bold",children:"이미지 없음"})}),c.jsxs("div",{className:"flex-1 flex gap-2",children:[c.jsx("input",{type:"text",value:n.factory2Image,onChange:G=>l("factory2Image",G.target.value),className:"flex-1 p-2 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500/20",placeholder:"제2공장 이미지 URL"}),c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 p-2 rounded-lg text-slate-600 flex items-center justify-center transition-colors",children:[c.jsx(En,{className:"w-4 h-4"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:G=>t(G,re=>l("factory2Image",re))})]})]})]})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"섹션 대제목"}),c.jsx("input",{type:"text",value:n.locationTitle,onChange:G=>l("locationTitle",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"섹션 서브타이틀"}),c.jsx("input",{type:"text",value:n.locationSubtitle,onChange:G=>l("locationSubtitle",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none"})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"본사 및 제1공장 주소"}),c.jsx("input",{type:"text",value:n.headquartersAddress,onChange:G=>l("headquartersAddress",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"제2공장 주소"}),c.jsx("input",{type:"text",value:n.factory2Address,onChange:G=>l("factory2Address",G.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none"})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"본사 및 제1공장 설명 문구"}),c.jsx("textarea",{value:n.hqDescription||"",onChange:G=>l("hqDescription",G.target.value),placeholder:"본사 및 제1공장 설명 문구를 입력하세요.",rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none resize-y min-h-[60
4477px]"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"제2공장 설명 문구"}),c.jsx("textarea",{value:n.factory2Description||"",onChange:G=>l("factory2Description",G.target.value),placeholder:"제2공장 설명 문구를 입력하세요.",rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 outline-none resize-y min-h-[60px]"})]})]})]})]})})]})},rne=({data:n,onChange:e,onUploadBase:t})=>{const r=D.useRef(null),s=D.useRef(null),i=(l,d)=>{e({...n,[l]:d})};return c.jsxs("div",{className:"space-y-8 text-left font-sans",children:[c.jsxs("div",{className:"bg-emerald-50 border border-emerald-100 p-6 rounded-2xl flex gap-4",children:[c.jsx(T_,{className:"w-6 h-6 text-emerald-600 flex-shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-emerald-950 font-bold text-base",children:"💡 업로드 가이드 및 권장 규격"}),c.jsxs("ul",{className:"text-sm text-emerald-800 space-y-1.5 list-disc pl-4 font-medium leading-relaxed",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"포맷:"})," 배경이 투명한 ",c.jsx("strong",{children:"PNG"})," 이미지 파일"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"가로형 비율:"})," 가로가 세로보다 긴 비율(3:1 ~ 5:1)이 헤더 영역에 가장 잘 어울립니다."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"권장 크기:"})," 헤더 노출 높이 40px ~ 60px 기준, 선명한 해상도를 위해 ",c.jsx("strong",{children:"실제 이미지 높이를 80px ~ 120px"})," 정도로 업로드하시는 것을 권장합니다."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Default 로고:"})," 메인 화면 상단 투명 헤더(어두운 이미지 배경)에 표시됩니다. 가급적 ",c.jsx("strong",{children:"흰색 또는 밝은 단색"}),"의 로고를 권장합니다."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Scroll/Inverted 로고:"})," 스크롤을 내렸을 때 흰색 배경 헤더에 표시됩니다. ",c.jsx("strong",{children:"브랜드 컬러 또는 어두운 회색/검은색"}),"의 로고를 권장합니다."]})]})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[c.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-2xl p-6 space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("h3",{className:"text-base font-bold text-gray-900 flex items-center gap-2",children:[c.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),"어두운 배경용 로고 (Default)"]}),n.defaultLogoUrl&&c.jsxs("button",{onClick:()=>i("defaultLogoUrl",""),className:"text-xs text-red-600 hover:text-red-700 font-bold flex items-center gap-1 transition-colors",children:[c.jsx(Sn,{className:"w-3.5 h-3.5"})," 삭제"]})]}),c.jsx("div",{className:"bg-gray-900 border border-gray-800 rounded-xl p-8 flex flex-col items-center justify-center min-h-[160px] relative group overflow-hidden",children:n.defaultLogoUrl?c.jsxs("div",{className:"flex flex-col items-center gap-2",children:[c.jsx(et,{src:n.defaultLogoUrl,alt:"Default Logo Preview",className:"object-contain max-h-[60px]",style:{width:`${n.logoWidth||180}px`},referrerPolicy:"no-referrer"}),c.jsxs("span",{className:"text-[10px] text-gray-400 font-bold bg-black/40 px-2 py-0.5 rounded-full mt-2",children:["가로폭: ",n.logoWidth||180,"px"]})]}):c.jsxs("div",{className:"text-center space-y-2",children:[c.jsx("p",{className:"text-sm font-bold text-gray-400",children:"등록된 기본 로고가 없습니다"}),c.jsx("p",{className:"text-xs text-gray-500",children:"기본 로고가 없을 시 자체 제작된 벡터 크로바 로고가 표시됩니다."})]})}),c.jsxs("div",{className:"flex justify-center",children:[c.jsxs("button",{onClick:()=>{var l;return(l=r.current)==null?void 0:l.click()},className:"w-full bg-white hover:bg-gray-100 text-gray-800 border border-gray-200 font-bold py-3 px-4 rounded-xl text-sm flex items-center justify-center gap-2 transition-colors shadow-sm",children:[c.jsx(En,{className:"w-4 h-4 text-gray-500"}),n.defaultLogoUrl?"기본 로고 변경하기":"기본 로고 업로드"]}),c.jsx("input",{ref:r,type:"file",accept:"image/png",className:"hidden",onChange:l=>t(l,d=>i("defaultLogoUrl",d))})]})]}),c.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-2xl p-6 space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("h3",{className:"text-base font-bold text-gray-900 flex items-center gap-2",children:[c.jsx("span",{className:"w-2 h-2 rounded-full bg-blue-500"}),"밝은 배경용 로고 (Scroll / Inverted)"]}),n.scrollLogoUrl&&c.jsxs("button",{onClick:()=>i("scrollLogoUrl",""),className:"text-xs text-red-600 hover:text-red-700 font-bold flex items-center gap-1 transition-colors",children:[c.jsx(Sn,{className:"w-3.5 h-3.5"})," 삭제"]})]}),c.jsx("div",{className:"bg-white border border-gray-200 rounded-xl p-8 flex flex-col items-center justify-center min-h-[160px] relative group overflow-hidden shadow-inner",children:n.scrollLogoUrl?c.jsxs("div",{className:"flex flex-col items-center gap-2",children:[c.jsx(et,{src:n.scrollLogoUrl,alt:"Scroll Logo Preview",className:"object-contain max-h-[60px]",style:{width:`${n.logoWidth||180}px`},referrerPolicy:"no-referrer"}),c.jsxs("span",{className:"text-[10px] text-gray-500 font-bold bg-gray-100 px-2 py-0.5 rounded-full mt-2",children:["가로폭: ",n.logoWidth||180,"px"]})]}):c.jsxs("div",{className:"text-center space-y-2",children:[c.jsx("p",{className:"text-sm font-bold text-gray-400",children:"등록된 스크롤 로고가 없습니다"}),c.jsx("p",{className:"text-xs text-gray-400",children:"스크롤 로고가 없을 시 자체 제작된 벡터 크로바 로고가 표시됩니다."})]})}),c.jsxs("div",{className:"flex justify-center",children:[c.jsxs("button",{onClick:()=>{var l;return(l=s.current)==null?void 0:l.click()},className:"w-full bg-white hover:bg-gray-100 text-gray-800 border border-gray-200 font-bold py-3 px-4 roun
4477ded-xl text-sm flex items-center justify-center gap-2 transition-colors shadow-sm",children:[c.jsx(En,{className:"w-4 h-4 text-gray-500"}),n.scrollLogoUrl?"스크롤 로고 변경하기":"스크롤 로고 업로드"]}),c.jsx("input",{ref:s,type:"file",accept:"image/png",className:"hidden",onChange:l=>t(l,d=>i("scrollLogoUrl",d))})]})]})]}),c.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-2xl p-6 space-y-4",children:[c.jsx("h3",{className:"text-base font-bold text-gray-900",children:"헤더 노출 가로폭 설정 (px)"}),c.jsx("p",{className:"text-xs text-gray-500 leading-relaxed font-medium",children:"로고 이미지의 실제 가로폭 비율에 맞게 헤더에서 노출될 가로 크기를 설정합니다. 세로 크기는 가로폭 비율에 따라 자동으로 조절됩니다."}),c.jsxs("div",{className:"flex items-center gap-4 max-w-xs",children:[c.jsx("input",{type:"number",value:n.logoWidth||"180",onChange:l=>i("logoWidth",l.target.value),className:"w-full p-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-500 outline-none transition-all font-bold text-gray-800",min:"50",max:"400",placeholder:"예: 180"}),c.jsx("span",{className:"text-sm font-bold text-gray-500 flex-shrink-0",children:"px"})]})]}),c.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-2xl p-6 space-y-4",children:[c.jsxs("h3",{className:"text-base font-bold text-gray-900 flex items-center gap-2",children:[c.jsx("span",{className:"w-2 h-2 rounded-full bg-[#224328]"}),"시공 사례 바로가기 링크 설정 (외부 URL)"]}),c.jsxs("p",{className:"text-xs text-gray-500 leading-relaxed font-medium",children:["헤더 메뉴의 '시공 사례 (Portfolio)' 클릭 시 바로 이동할 외부 바로가기 웹사이트 주소를 설정합니다.",c.jsx("br",{}),"예: 블로그, 노션 포트폴리오, 인스타그램 등 외부 주소를 입력하세요. (입력 시 해당 링크로 새 창에서 연결됩니다.)"]}),c.jsx("div",{className:"flex items-center gap-2 w-full max-w-2xl",children:c.jsx("input",{type:"url",value:n.constructionUrl||"",onChange:l=>i("constructionUrl",l.target.value),className:"w-full p-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-500 outline-none transition-all font-bold text-gray-800 text-sm",placeholder:"예: https://blog.naver.com/cloverfurniture"})})]})]})},sne=({data:n,onChange:e,onUploadBase:t})=>{var Re,Le,qe,Yt,qn,gs,Jt,Zt,Dr,la,ys,kn,kr,xs,Ps,Ir;const[r,s]=D.useState("news"),[i,l]=D.useState(null),[d,h]=D.useState(""),[m,g]=D.useState(null),[p,b]=D.useState(null),[w,_]=D.useState(null),[N,E]=D.useState([]),[j,P]=D.useState(!1),[A,M]=D.useState(null),[O,q]=D.useState(null),[L,k]=D.useState([]),[I,R]=D.useState(!1),[F,B]=D.useState(null),[V,se]=D.useState(""),[ye,W]=D.useState(null);D.useEffect(()=>{E(oe=>oe.filter(de=>de<(n.companyNews||[]).length))},[n.companyNews]),D.useEffect(()=>{k(oe=>oe.filter(de=>de<(n.promotionalMaterials||[]).length))},[n.promotionalMaterials]),D.useEffect(()=>{E([]),k([])},[r]);const $=()=>{if(N.length===0)return;const oe=(n.companyNews||[]).filter((de,Te)=>!N.includes(Te));H("companyNews",oe),E([]),P(!1)},X=()=>{if(L.length===0)return;const oe=(n.promotionalMaterials||[]).filter((de,Te)=>!L.includes(Te));H("promotionalMaterials",oe),k([]),R(!1)},be=()=>{const oe=new Date().toISOString().split("T")[0].replace(/-/g,"."),Te=[{title:"",category:n.materialCategories&&n.materialCategories[0]||"카탈로그",desc:"",fileUrl:"",image:"",fileSize:"",date:oe,downloads:0},...n.promotionalMaterials||[]];H("promotionalMaterials",Te),M(0)},Oe=()=>{if(O!==null){const oe=(n.promotionalMaterials||[]).filter((de,Te)=>Te!==O);H("promotionalMaterials",oe),q(null)}},H=(oe,de)=>{e({...n,[oe]:de})},he=(oe,de)=>{const Te=[...n.categories||[]];Te[oe]=de,e({...n,categories:Te}),l(null)},we=oe=>{g(oe)},Se=()=>{if(m!==null){const oe=(n.categories||[]).filter((de,Te)=>Te!==m);e({...n,categories:oe}),g(null)}},Be=(oe,de)=>{const Te=[...n.materialCategories||["카탈로그","인증서"]];Te[oe]=de,e({...n,materialCategories:Te}),B(null)},$e=oe=>{W(oe)},Je=()=>{if(ye!==null){const oe=(n.materialCategories||["카탈로그","인증서"]).filter((de,Te)=>Te!==ye);e({...n,materialCategories:oe}),W(null)}},wt=()=>{const oe=new Date().toISOString().split("T")[0].replace(/-/g,"."),Te=[{title:"",category:n.categories&&n.categories[0]||"카테고리",content:"",image:"",date:oe,newsUrl:""},...n.companyNews||[]];H("companyNews",Te),b(0)},at=()=>{if(w!==null){const oe=(n.companyNews||[]).filter((de,Te)=>Te!==w);H("companyNews",oe),_(null)}},G=(oe,de)=>{const Te=[...n.companyNews||[]];if(de==="up"&&oe===0||de==="down"&&oe===Te.length-1)return;const St=de==="up"?oe-1:oe+1,ue=Te[oe];Te[oe]=Te[St],Te[St]=ue,H("companyNews",Te),E([])},re=()=>{const oe=[...n.companyNews||[]];oe.sort((de,Te)=>{const St=(de.date||"").replace(/\./g,"-"),ue=(Te.date||"").replace(/\./g,"-");return!St&&!ue?0:St?ue?ue.localeCompare(St):-1:1}),H("companyNews",oe),E([])},ve=(oe,de)=>{const Te=[...n.promotionalMaterials||[]];if(de==="up"&&oe===0||de==="down"&&oe===Te.length-1)return;const St=de==="up"?oe-1:oe+1,ue=Te[oe];Te[oe]=Te[St],Te[St]=ue,H("promotionalMaterials",Te),k([])};return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex border-b border-gray-200",children:[c.jsx("button",{onClick:()=>s("news"),className:`px-6 py-3 text-sm font-bold border-b-2 transition-colors ${r==="news"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-900"}`,children:"회사뉴스 관리"}),c.jsx("button",{onClick:()=>s("materials"),className:`px-6 py-3 text-sm font-bold border-b-2 transition-colors ${r==="materials"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-900"}`,children:"카탈로그 관리"})]}),r==="materials"?c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"bg-white p-4 rounded-xl border border-gray-200 space-y-2",children:[c.jsx("h4",{className:"font-bold text-gray-900",children:"카테고리 관리"}),c.jsx("div",{className:"flex gap-2",children:c.jsx("input",{className:"flex-1 p-2 border rounded",placeholder:"새 카테고리",onKeyDown:oe=>
4477{oe.key==="Enter"&&(e({...n,materialCategories:[...n.materialCategories||["카탈로그","인증서"],oe.currentTarget.value]}),oe.currentTarget.value="")}})}),c.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(n.materialCategories||["카탈로그","인증서"]).map((oe,de)=>c.jsxs("span",{className:"flex items-center gap-1 bg-gray-100 px-2 py-1 rounded text-sm hover:bg-gray-200 transition-colors group",children:[F===de?c.jsx("input",{value:V,onChange:Te=>se(Te.target.value),onBlur:()=>Be(de,V),onKeyDown:Te=>Te.key==="Enter"&&Be(de,V),className:"bg-transparent border-none outline-none w-20",autoFocus:!0}):c.jsx("span",{onClick:()=>{B(de),se(oe)},className:"cursor-pointer font-medium text-gray-700 group-hover:text-blue-600",title:"클릭하여 수정",children:oe}),c.jsx("button",{type:"button",onClick:Te=>{Te.stopPropagation(),Te.preventDefault(),$e(de)},className:"text-red-500 hover:text-red-700 ml-1 p-0.5 hover:bg-red-50 rounded transition-all flex-shrink-0",title:"삭제",children:c.jsx(ds,{className:"w-3.5 h-3.5"})})]},`${oe}-${de}`))})]}),c.jsxs("div",{className:"flex justify-between items-center pb-2",children:[c.jsx("h3",{className:"font-bold text-gray-900",children:"카탈로그 목록"}),c.jsxs("div",{className:"flex items-center gap-2",children:[L.length>0&&c.jsxs("button",{type:"button",onClick:()=>R(!0),className:"px-3 py-1.5 bg-red-50 hover:bg-red-100 text-red-600 border border-red-200 text-xs font-bold rounded-lg flex items-center gap-1.5 transition-all shadow-sm",children:[c.jsx(Sn,{className:"w-3.5 h-3.5"})," 선택 삭제 (",L.length,")"]}),c.jsxs("button",{type:"button",onClick:be,className:"px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-xs font-bold rounded-lg flex items-center gap-1 transition-all",children:[c.jsx(Is,{className:"w-3.5 h-3.5"})," 카탈로그 등록"]})]})]}),c.jsx("div",{className:"overflow-x-auto rounded-xl border border-gray-200 bg-white shadow-sm",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[c.jsx("thead",{className:"bg-gray-50",children:c.jsxs("tr",{children:[c.jsx("th",{scope:"col",className:"px-4 py-3 text-center w-10",children:c.jsx("input",{type:"checkbox",checked:(n.promotionalMaterials||[]).length>0&&L.length===(n.promotionalMaterials||[]).length,onChange:oe=>{oe.target.checked?k((n.promotionalMaterials||[]).map((de,Te)=>Te)):k([])},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500/20 w-4 h-4 cursor-pointer"})}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500 w-12",children:"번호"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500 w-24",children:"카테고리"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500",children:"카탈로그 제목"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500 w-32",children:"등록일자"}),c.jsx("th",{scope:"col",className:"px-3 py-3 text-center font-bold text-gray-500 w-20",children:"순서"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-center font-bold text-gray-500 w-28",children:"관리"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:(n.promotionalMaterials||[]).length>0?(n.promotionalMaterials||[]).map((oe,de)=>c.jsxs("tr",{className:`hover:bg-gray-50/50 transition-colors ${L.includes(de)?"bg-blue-50/20":""}`,children:[c.jsx("td",{className:"px-4 py-3 text-center w-10",children:c.jsx("input",{type:"checkbox",checked:L.includes(de),onChange:Te=>{Te.target.checked?k(St=>[...St,de]):k(St=>St.filter(ue=>ue!==de))},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500/20 w-4 h-4 cursor-pointer"})}),c.jsx("td",{className:"px-4 py-3 text-gray-500 font-mono text-xs",children:(n.promotionalMaterials||[]).length-de}),c.jsx("td",{className:"px-4 py-3",children:c.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[11px] font-bold bg-blue-50 text-blue-600 border border-blue-100",children:oe.category})}),c.jsx("td",{className:"px-4 py-3 font-medium text-gray-900",children:c.jsx("div",{className:"line-clamp-1 max-w-[340px] truncate",title:oe.title,children:oe.title||c.jsx("span",{className:"text-gray-400 italic",children:"제목 없음"})})}),c.jsx("td",{className:"px-4 py-3 text-gray-500 font-mono text-xs",children:oe.date||c.jsx("span",{className:"text-gray-400 italic",children:"미지정"})}),c.jsx("td",{className:"px-3 py-3 text-center",children:c.jsxs("div",{className:"flex items-center justify-center gap-0.5",children:[c.jsx("button",{type:"button",onClick:()=>
4477ve(de,"up"),disabled:de===0,className:"p-1 text-slate-400 hover:text-blue-600 hover:bg-blue-50 disabled:opacity-20 rounded transition-colors",title:"위로 이동",children:c.jsx(Xf,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>ve(de,"down"),disabled:de===(n.promotionalMaterials||[]).length-1,className:"p-1 text-slate-400 hover:text-blue-600 hover:bg-blue-50 disabled:opacity-20 rounded transition-colors",title:"아래로 이동",children:c.jsx(Qf,{className:"w-4 h-4"})})]})}),c.jsxs("td",{className:"px-4 py-3 text-center space-x-1",children:[c.jsx("button",{type:"button",onClick:()=>M(de),className:"px-2 py-1 text-xs font-bold text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded transition-colors",children:"수정"}),c.jsx("button",{type:"button",onClick:()=>q(de),className:"px-2 py-1 text-xs font-bold text-red-500 hover:text-red-700 hover:bg-red-50 rounded transition-colors",children:"삭제"})]})]},de)):c.jsx("tr",{children:c.jsx("td",{colSpan:7,className:"px-4 py-8 text-center text-gray-400 italic",children:"등록된 카탈로그가 없습니다. '카탈로그 등록' 버튼을 눌러 첫 항목을 추가해 보세요!"})})})]})})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"bg-white p-4 rounded-xl border border-gray-200 space-y-2",children:[c.jsx("h4",{className:"font-bold text-gray-900",children:"카테고리 관리"}),c.jsx("div",{className:"flex gap-2",children:c.jsx("input",{className:"flex-1 p-2 border rounded",placeholder:"새 카테고리",onKeyDown:oe=>{oe.key==="Enter"&&(e({...n,categories:[...n.categories||[],oe.currentTarget.value]}),oe.currentTarget.value="")}})}),c.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:(n.categories||[]).map((oe,de)=>c.jsxs("span",{className:"flex items-center gap-1 bg-gray-100 px-2 py-1 rounded text-sm hover:bg-gray-200 transition-colors group",children:[i===de?c.jsx("input",{value:d,onChange:Te=>h(Te.target.value),onBlur:()=>he(de,d),onKeyDown:Te=>Te.key==="Enter"&&he(de,d),className:"bg-transparent border-none outline-none w-20",autoFocus:!0}):c.jsx("span",{onClick:()=>{l(de),h(oe)},className:"cursor-pointer font-medium text-gray-700 group-hover:text-blue-600",title:"클릭하여 수정",children:oe}),c.jsx("button",{type:"button",onClick:Te=>{Te.stopPropagation(),Te.preventDefault(),we(de)},className:"text-red-500 hover:text-red-700 ml-1 p-0.5 hover:bg-red-50 rounded transition-all flex-shrink-0",title:"삭제",children:c.jsx(ds,{className:"w-3.5 h-3.5"})})]},`${oe}-${de}`))})]}),c.jsxs("div",{className:"flex justify-between items-center pb-2",children:[c.jsx("h3",{className:"font-bold text-gray-900",children:"회사뉴스 목록"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:re,className:"px-3 py-1.5 bg-slate-100 hover:bg-slate-200 text-slate-700 border border-slate-300 text-xs font-bold rounded-lg flex items-center gap-1.5 transition-all shadow-sm",title:"작성일자(등록일자) 기준으로 최신순 정렬합니다",children:[c.jsx(gB,{className:"w-3.5 h-3.5 text-blue-600"})," 작성일자순 정렬"]}),N.length>0&&c.jsxs("button",{type:"button",onClick:()=>P(!0),className:"px-3 py-1.5 bg-red-50 hover:bg-red-100 text-red-600 border border-red-200 text-xs font-bold rounded-lg flex items-center gap-1.5 transition-all shadow-sm",children:[c.jsx(Sn,{className:"w-3.5 h-3.5"})," 선택 삭제 (",N.length,")"]}),c.jsxs("button",{type:"button",onClick:wt,className:"px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-xs font-bold rounded-lg flex items-center gap-1 transition-all",children:[c.jsx(Is,{className:"w-3.5 h-3.5"})," 뉴스 등록"]})]})]}),c.jsx("div",{className:"overflow-x-auto rounded-xl border border-gray-200 bg-white shadow-sm",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[c.jsx("thead",{className:"bg-gray-50",children:c.jsxs("tr",{children:[c.jsx("th",{scope:"col",className:"px-4 py-3 text-center w-10",children:c.jsx("input",{type:"checkbox",checked:(n.companyNews||[]).length>0&&N.length===(n.companyNews||[]).length,onChange:oe=>{oe.target.checked?E((n.companyNews||[]).map((de,Te)=>Te)):E([])},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500/20 w-4 h-4 cursor-pointer"})}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500 w-12",children:"번호"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500 w-24",children:"카테고리"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500",children:"뉴스 제목"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-left font-bold text-gray-500 w-32",children:"등록일자"}),c.jsx("th",{scope:"col",className:"px-3 py-3 text-center font-bold text-gray-500 w-20",children:"순서"}),c.jsx("th",{scope:"col",className:"px-4 py-3 text-center font-bold text-gray-500 w-28",children:"관리"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:(n.companyNews||[]).length>0?(n.companyNews||[]).map((oe,de)=>c.jsxs("tr",{className:`hover:bg-gray-50/50 transition-colors ${N.includes(de)?"bg-blue-50/20":""}`,children:[c.jsx("td",{className:"px-4 py-3 text-center w-10",children:c.jsx("input",{type:"checkbox",checked:N.includes(de),onChange:Te=>{Te.target.checked?E(St=>[...St,de]):E(St=>St.filter(ue=>ue!==de))},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500/20 w-4 h-4 cursor-pointer"})}),c.jsx("td",{className:"px-4 py-3 text-gray-500 font-mono text-xs",children:(n.companyNews||[]).length-de}),c.jsx("td",{className:"px-4 py-3",children:c.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[11px] font-bold bg-blue-50 text-blue-600 border border-blue-100",children:oe.category})}),c.jsx("td",{className:"px-4 py-3 font-medium text-gray-900",children:c.jsx("div",{className:"line-clamp-1 max-w-[340px] truncate",title:oe.title,children:oe.title||c.jsx("span",{className:"text-gray-400 italic",children:"제목 없음"})})}),c.jsx("td",{className:"px-4 py-3 text-gray-500 font-mono text-xs",children:oe.date||c.jsx("span",{className:"text-gray-400 italic",children:"미지정"})}),c.jsx("td",{className:"px-3 py-3 text-center",children:c.jsxs("div",{className:"flex items-center justify-center gap-0.5",children:[c.jsx("button",{type:"button",onClick:()=>G(de,"up"),disabled:de===0,className:"p-1 text-slate-400 hover:text-blue-600 hover:bg-blue-50 disabled:opacity-20 rounded transition-colors",title:"위로 이동",children:c.jsx(Xf,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>G(de,"down"),disabled:de===(n.companyNews||[]).length-1,className:"p-1 text-slate-400 hover:text-blue-600 hover:bg-blue-50 disabled:opacity-20 rounded transition-colors",title:"아래로 이동",children:c.jsx(Qf,{className:"w-4 h-4"})})]})}),c.jsxs("td",{className:"px-4 py-3 text-center space-x-1",children:[c.jsx("button",{type:"button",onClick:()=>b(de),className:"px-2 py-1 text-xs font-bold text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded transition-colors",children:"수정"}),c.jsx("button",{type:"button",onClick:()=>_(de),className:"px-2 py-1 text-xs font-bold text-red-500 hover:text-red-700 hover:bg-red-50 rounded transition-colors",children:"삭제"})]})]},de)):c.jsx("tr",{children:c.jsx("td",{colSpan:7,className:"px-4 py-8 text-center text-gray-400 italic",children:"등록된 회사 뉴스가 없습니다. '뉴스 등록' 버튼을 눌러 첫 뉴스를 추가해 보세요!"})})})]})})]}),m!==null&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"카테고리 삭제"}),c.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["정말 ",c.jsxs("span",{className:"font-bold text-red-600",children:["'",n.categories[m],"'"]})," 카테고리를 삭제하시겠습니까? 되돌릴 수 없습니다."]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>g(null),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:Se,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"삭제"})]})]})}),ye!==null&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"카테고리 삭제"}),c.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["정말 ",c.jsxs("span",{className:"font-bold text-red-600",children:["'",(n.materialCategories||["카탈로그","인증서"])[ye],"'"]})," 카테고리를 삭제하시겠습니까? 되돌릴 수 없습니다."]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>W(null),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:Je,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"삭제"})]})]})}),p!==null&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl border border-gray-100 max-w-2xl w-full mx-4 flex flex-col max-h-[90vh] overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"px-6 py-4 border-b border-gray-100 flex justify-between items-center bg-gray-50",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900",children:"회사뉴스 상세 편집"}),c.jsx("button",{type:"button",onClick:()=>b(null),className:"text-gray-400 hover:text-gray-600 p-1.5 rounded-lg hover:bg-gray-100 transition-colors",children:c.jsx(ds,{className:"w-5 h-5"})})]}),c.jsxs("div",{className:"p-6 overflow-y-auto space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"뉴스 제목"}),c.jsx("input",{value:((Re=n.companyNews[p])==null?void 0:Re.title)||"",onChange:oe=>{const de=[...n.companyNews||[]];de[p].title=oe.target.value,H("companyNews",de)},className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm",placeholder:"뉴스 제목을 입력해주세요"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"카테고리"}),c.jsx("select",{value:((Le=n.companyNews[p])==null?void 0:Le.category)||"",onChange:oe=>{const de=[...n.companyNews||[]];de[p].category=oe.target.value,H("companyNews",de)},className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none bg-white transition-all text-sm",children:(n.categories||[]).map(oe=>c.jsx("option",{value:oe,children:oe},oe))})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"등록일자"}),c.jsxs("div",{className:"relative flex items-center",children:[c.jsx("input",{type:"text",value:((qe=n.companyNews[p])==null?void 0:qe.date)||"",onChange:oe=>{const de=[...n.companyNews||[]];de[p].date=oe.target.value,H("companyNews",de)},className:"w-full p-2.5 pr-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm font-mono",placeholder:"예: 202
44776.06.10"}),c.jsx("div",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 flex items-center",children:c.jsxs("div",{className:"relative p-1.5 rounded-md text-gray-400 hover:text-blue-600 hover:bg-gray-100 transition-colors flex items-center justify-center cursor-pointer",children:[c.jsx(Wf,{className:"w-4 h-4 pointer-events-none"}),c.jsx("input",{type:"date",id:`news-date-picker-${p}`,className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(()=>{var Te;const de=(((Te=n.companyNews[p])==null?void 0:Te.date)||"").replace(/\./g,"-");return/^\d{4}-\d{2}-\d{2}$/.test(de)?de:""})(),onChange:oe=>{const de=oe.target.value;if(de){const Te=de.replace(/-/g,"."),St=[...n.companyNews||[]];St[p].date=Te,H("companyNews",St)}}})]})})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"기사 더보기 URL (선택사항)"}),c.jsx("input",{value:((Yt=n.companyNews[p])==null?void 0:Yt.newsUrl)||"",onChange:oe=>{const de=[...n.companyNews||[]];de[p].newsUrl=oe.target.value,H("companyNews",de)},className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm",placeholder:"클릭 시 이동할 외부 뉴스 링크가 있다면 입력해주세요 (예: http://...)"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"대표 이미지 URL"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{value:((qn=n.companyNews[p])==null?void 0:qn.image)||"",onChange:oe=>{const de=[...n.companyNews||[]];de[p].image=oe.target.value,H("companyNews",de)},className:"flex-1 p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm",placeholder:"https://..."}),c.jsx("input",{type:"file",className:"hidden",id:`upload-news-modal-${p}`,accept:"image/*",onChange:oe=>t(oe,de=>{const Te=[...n.companyNews||[]];Te[p].image=de,H("companyNews",Te)})}),c.jsx("button",{type:"button",onClick:()=>{var oe;return(oe=document.getElementById(`upload-news-modal-${p}`))==null?void 0:oe.click()},className:"p-2.5 bg-gray-100 hover:bg-gray-200 border border-gray-200 rounded-lg transition-colors flex items-center justify-center",title:"이미지 업로드",children:c.jsx(En,{className:"w-5 h-5 text-gray-600"})})]}),((gs=n.companyNews[p])==null?void 0:gs.image)&&c.jsxs("div",{className:"mt-2.5 flex items-start gap-3 p-2 bg-gray-50 border border-gray-200 rounded-lg max-w-fit",children:[c.jsx("div",{className:"relative group w-16 h-16 rounded-md overflow-hidden border border-gray-150 bg-white flex-shrink-0",children:c.jsx(et,{src:n.companyNews[p].image,alt:"대표 이미지 미리보기",className:"w-full h-full object-cover",referrerPolicy:"no-referrer",onError:oe=>{oe.currentTarget.style.display="none"}})}),c.jsxs("div",{className:"flex flex-col justify-between py-1",children:[c.jsx("span",{className:"text-xs font-semibold text-gray-700",children:"이미지 썸네일 미리보기"}),c.jsxs("button",{type:"button",onClick:()=>{const oe=[...n.companyNews||[]];oe[p].image="",H("companyNews",oe)},className:"text-[11px] font-bold text-red-600 hover:text-red-700 mt-1 flex items-center gap-1 transition-colors",children:[c.jsx(ds,{className:"w-3 h-3"})," 이미지 지우기"]})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"뉴스 내용"}),c.jsx("textarea",{value:((Jt=n.companyNews[p])==null?void 0:Jt.content)||"",onChange:oe=>{const de=[...n.companyNews||[]];de[p].content=oe.target.value,H("companyNews",de)},rows:6,className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm resize-y",placeholder:"뉴스 상세 본문 내용을 입력해주세요"})]})]}),c.jsx("div",{className:"px-6 py-4 border-t border-gray-100 flex justify-end bg-gray-50",children:c.jsx("button",{type:"button",onClick:()=>b(null),className:"px-5 py-2.5 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow-sm transition-all hover:scale-[1.01] active:scale-[0.99]",children:"저장"})})]})}),w!==null&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"뉴스 삭제"}),c.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["정말 ",c.jsxs("span",{className:"font-bold text-red-600",children:["'",((Zt=n.companyNews[w])==null?void 0:Zt.title)||"제목 없음","'"]})," 뉴스를 삭제하시겠습니까? 되돌릴 수 없습니다."]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>_(null),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:at,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"삭제"})]})]})}),j&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"뉴스 일괄 삭제"}),c.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["선택한 ",c.jsxs("span",{className:"font-bold text-red-600",children:[N.length,"개"]}),"의 뉴스를 정말 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다."]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>P(!1),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:$,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"선택 삭제"})]})]})}),A!==null&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl border border-gray-100 max-w-2xl w-full mx-4 flex flex-col max-h-[90vh] overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"px-6 py-4 border-b border-gray-100 flex justify-between items-center bg-gray-50",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900",children:"카탈로그 상세 편집"}),c.jsx("button",{type:"button",onClick:()=>M(null),className:"text-gray-400 hover:text-gray-600 p-1.5 rounded-lg hover:bg-gray-100 transition-colors",children:c.jsx(ds,{className:"w-5 h-5"})})]}),c.jsxs("div",{className:"p-6 overflow-y-auto space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"카탈로그 제목"}),c.jsx("input",{value:((Dr=n.promotionalMaterials[A])==null?void 0:Dr.title)||"",onChange:oe=>{const de=[...n.promotionalMaterials||[]];de[A].title=oe.target.value,H("promotionalMaterials",de)},className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm",placeholder:"카탈로그 제목을 입력해주세요"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"카테고리"}),c.jsx("select",{value:((la=n.promotionalMaterials[A])==null?void 0:la.category)||n.materialCategories&&n.materialCategories[0]||"카탈로그",onChange:oe=>{const de=[...n.promotionalMaterials||[]];de[A].category=oe.target.value,H("promotionalMaterials",de)},className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none bg-white transition-all text-sm",children:(n.materialCategories||["카탈로그","인증서"]).map(oe=>c.jsx("option",{value:oe,children:oe},oe))})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"등록일자"}),c.jsxs("div",{className:"relative flex items-center",children:[c.jsx("input",{type:"text",value:((ys=n.promotionalMaterials[A])==null?void 0:ys.date)||"",onChange:oe=>{const de=[...n.promotionalMaterials||[]];de[A].date=oe.target.value,H("promotionalMaterials",de)},className:"w-full p-2.5 pr-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm font-mono",placeholder:"예: 202
44776.01.15"}),c.jsx("div",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 flex items-center",children:c.jsxs("div",{className:"relative p-1.5 rounded-md text-gray-400 hover:text-blue-600 hover:bg-gray-100 transition-colors flex items-center justify-center cursor-pointer",children:[c.jsx(Wf,{className:"w-4 h-4 pointer-events-none"}),c.jsx("input",{type:"date",id:`material-date-picker-${A}`,className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full",value:(()=>{var Te;const de=(((Te=n.promotionalMaterials[A])==null?void 0:Te.date)||"").replace(/\./g,"-");return/^\d{4}-\d{2}-\d{2}$/.test(de)?de:""})(),onChange:oe=>{const de=oe.target.value;if(de){const Te=de.replace(/-/g,"."),St=[...n.promotionalMaterials||[]];St[A].date=Te,H("promotionalMaterials",St)}}})]})})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"파일 URL"}),c.jsx("input",{value:((kn=n.promotionalMaterials[A])==null?void 0:kn.fileUrl)||"",onChange:oe=>{const de=[...n.promotionalMaterials||[]];de[A].fileUrl=oe.target.value,H("promotionalMaterials",de)},className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm",placeholder:"다운로드용 파일 공유 링크 (예: 구글 드라이브 등)"})]}),c.jsx("p",{className:"text-[12px] text-[#0059ff] leading-normal font-medium bg-blue-50/50 p-2.5 rounded-lg border border-blue-100",children:'💡 PDF 파일은 클라우드(구글 드라이브, 네이버 드라이브 등)에 업로드하신 후, 공유 링크를 입력하세요. 이때 공유 상태는 "링크가 있는 모든 사용자 접근 가능" 이어야 합니다. 파일의 크기가 50MB 이상일 경우 미리보기가 되지 않고 다운로드만 가능할 수 있습니다.'}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"대표 이미지 URL"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{value:((kr=n.promotionalMaterials[A])==null?void 0:kr.image)||"",onChange:oe=>{const de=[...n.promotionalMaterials||[]];de[A].image=oe.target.value,H("promotionalMaterials",de)},className:"flex-1 p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm",placeholder:"https://..."}),c.jsx("input",{type:"file",className:"hidden",id:`upload-material-modal-${A}`,accept:"image/*",onChange:oe=>t(oe,de=>{const Te=[...n.promotionalMaterials||[]];Te[A].image=de,H("promotionalMaterials",Te)})}),c.jsx("button",{type:"button",onClick:()=>{var oe;return(oe=document.getElementById(`upload-material-modal-${A}`))==null?void 0:oe.click()},className:"p-2.5 bg-gray-100 hover:bg-gray-200 border border-gray-200 rounded-lg transition-colors flex items-center justify-center",title:"이미지 업로드",children:c.jsx(En,{className:"w-5 h-5 text-gray-600"})})]}),((xs=n.promotionalMaterials[A])==null?void 0:xs.image)&&c.jsxs("div",{className:"mt-2.5 flex items-start gap-3 p-2 bg-gray-50 border border-gray-200 rounded-lg max-w-fit",children:[c.jsx("div",{className:"relative group w-16 h-16 rounded-md overflow-hidden border border-gray-150 bg-white flex-shrink-0",children:c.jsx(et,{src:n.promotionalMaterials[A].image,alt:"대표 이미지 미리보기",className:"w-full h-full object-cover",referrerPolicy:"no-referrer",onError:oe=>{oe.currentTarget.style.display="none"}})}),c.jsxs("div",{className:"flex flex-col justify-between py-1",children:[c.jsx("span",{className:"text-xs font-semibold text-gray-700",children:"이미지 썸네일 미리보기"}),c.jsxs("button",{type:"button",onClick:()=>{const oe=[...n.promotionalMaterials||[]];oe[A].image="",H("promotionalMaterials",oe)},className:"text-[11px] font-bold text-red-600 hover:text-red-700 mt-1 flex items-center gap-1 transition-colors",children:[c.jsx(ds,{className:"w-3 h-3"})," 이미지 지우기"]})]})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-gray-500 mb-1",children:"카탈로그 설명"}),c.jsx("textarea",{value:((Ps=n.promotionalMaterials[A])==null?void 0:Ps.desc)||"",onChange:oe=>{const de=[...n.promotionalMaterials||[]];de[A].desc=oe.target.value,H("promotionalMaterials",de)},rows:4,className:"w-full p-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all text-sm resize-y",placeholder:"카탈로그 상세 설명을 입력해주세요"})]})]}),c.jsx("div",{className:"px-6 py-4 border-t border-gray-100 flex justify-end bg-gray-50",children:c.jsx("button",{type:"button",onClick:()=>M(null),className:"px-5 py-2.5 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow-sm transition-all hover:scale-[1.01] active:scale-[0.99]",children:"저장"})})]})}),O!==null&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"카탈로그 삭제"}),c.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["정말 ",c.jsxs("span",{className:"font-bold text-red-600",children:["'",((Ir=n.promotionalMaterials[O])==null?void 0:Ir.title)||"제목 없음","'"]})," 항목을 삭제하시겠습니까? 되돌릴 수 없습니다."]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>q(null),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:Oe,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"삭제"})]})]})}),I&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"카탈로그 일괄 삭제"}),c.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["선택한 ",c.jsxs("span",{className:"font-bold text-red-600",children:[L.length,"개"]}),"의 카탈로그 항목을 정말 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다."]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>R(!1),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:X,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"선택 삭제"})]})]})})]})},ane=({data:n,onChange:e,onUploadBase:t,onGoToInquiries:r})=>{var g,p;const s=(b,w)=>{e({...n,[b]:w})},i=n.provenRecordCards||[{id:"1",category:"사무공간 / 중역실",title:"공공기관 행정복지센터",description:"부서 칸막이형 데스크 배치 및 민원실 친환경 소파 커스텀 납품 완료",tags:["#가구 제안","#3D 레이아웃"],imageUrl:"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=600&q=80"},{id:"2",category:"교육기관 / 대학교",title:"초·중·고 다목적 러닝 센터",description:"안정성이 가미된 가변식 회의 데스크 및 다목적 이동용 의자 일체 납품 완료",tags:["#러닝 가구","#자체 시공"],imageUrl:"https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&w=600&q=80"},{id:"3",category:"어메니티 / 라운지",title:"대기업 본사 카페테리아 & 라운지",description:"감각적 카페테리아 구성의 바 테이블, 우드 톤 가구, 라운지 소파 완벽 시공 완료",tags:["#커스텀 제작","#공간 혁신"],imageUrl:"https://images.unsplash.com/photo-1556911220-e15b29be8c8f?auto=format&fit=crop&w=600&q=80"}],l=()=>{const b={id:Date.now().toString(),category:"사무공간 / 기타",title:"신규 납품 사례 프로젝트",description:"납품 사례에 대한 상세 설명을 입력하세요.",tags:["#가구 제안","#공간 연출"],imageUrl:"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=600&q=80"};s("provenRecordCards",[...i,b])},d=(b,w,_)=>{const N=[...i];N[b]={...N[b],[w]:_},s("provenRecordCards",N)},h=b=>{const w=i.filter((_,N)=>N!==b);s("provenRecordCards",w)},m=(b,w)=>{if(w==="up"&&b===0||w==="down"&&b===i.length-1)return;const _=[...i],N=w==="up"?b-1:b+1,E=_[b];_[b]=_[N],_[N]=E,s("provenRecordCards",_)};return c.jsxs("div",{className:"space-y-10 text-left",children:[c.jsxs("div",{className:"bg-emerald-50 border border-emerald-200 p-5 rounded-2xl flex flex-col md:flex-row items-start md:items-center justify-between gap-4 shadow-sm",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-12 h-12 rounded-xl bg-emerald-600 text-white flex items-center justify-center shrink-0 shadow-md",children:c.jsx(oU,{className:"w-6 h-6"})}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-base font-extrabold text-emerald-950",children:"고객 B2B 상담 접수함 (B2B Inquiries)"}
4477),c.jsx("p",{className:"text-xs text-emerald-800 font-medium mt-0.5",children:"고객이 웹사이트 B2B 상담신청 폼에서 작성하여 제출한 모든 신청 내역을 확인하고 관리할 수 있습니다."})]})]}),r&&c.jsxs("button",{type:"button",onClick:r,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-emerald-700 hover:bg-emerald-800 text-white font-bold text-xs rounded-xl shadow transition-all shrink-0 active:scale-95 cursor-pointer",children:["B2B 상담 접수함 바로가기",c.jsx(nd,{className:"w-4 h-4"})]})]}),c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80 shadow-sm space-y-6",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 border-b border-slate-200/80 pb-3",children:[c.jsx(DI,{className:"w-5 h-5 text-amber-500"})," 카카오톡 1:1 상담 설정"]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"상담 안내 제목"}),c.jsx(Er,{fieldName:"kakaoTitle",fieldLabel:"상담 안내 제목",value:n.kakaoTitle_typography||((g=n.kakaoTypography)==null?void 0:g.title),onChange:b=>s("kakaoTitle_typography",b),sizeType:"title"})]}),c.jsx("input",{type:"text",value:n.kakaoTitle||"",onChange:b=>s("kakaoTitle",b.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 font-medium",placeholder:"예: 크로바가구 카카오톡 1:1 채팅 문의"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between mb-1",children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500",children:"상담 안내 설명"}),c.jsx(Er,{fieldName:"kakaoDesc",fieldLabel:"상담 안내 설명",value:n.kakaoDesc_typography||((p=n.kakaoTypography)==null?void 0:p.description),onChange:b=>s("kakaoDesc_typography",b),sizeType:"description"})]}),c.jsx("textarea",{value:n.kakaoDesc||"",onChange:b=>s("kakaoDesc",b.target.value),rows:3,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20",placeholder:"카카오톡 상담 채널 안내 문구를 입력하세요."})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"카카오톡 채널 링크 (URL)"}),c.jsx("input",{type:"text",value:n.kakaoUrl||"",onChange:b=>s("kakaoUrl",b.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20",placeholder:"https://pf.kakao.com/..."})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"상담 운영시간 표시"}),c.jsx("input",{type:"text",value:n.counselingHours||"",onChange:b=>s("counselingHours",b.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20",placeholder:"예: 평일 09:00 ~ 17:00"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"카카오톡 QR코드 이미지 URL"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-16 h-16 bg-slate-100 border border-slate-200 rounded-xl overflow-hidden flex items-center justify-center shrink-0",children:n.kakaoQrImage?c.jsx(et,{src:n.kakaoQrImage,alt:"QR Code",className:"w-full h-full object-contain p-1",referrerPolicy:"no-referrer"}):c.jsx(VU,{className:"w-6 h-6 text-slate-400"})}),c.jsx("input",{type:"text",value:n.kakaoQrImage||"",onChange:b=>s("kakaoQrImage",b.target.value),className:"flex-1 p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20",placeholder:"QR코드 이미지 URL 또는 자동 생성 QR 링크"})]})]})]})]}),c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80 shadow-sm space-y-6",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2 border-b border-slate-200/80 pb-3",children:[c.jsx(Uw,{className:"w-5 h-5 text-emerald-600"})," B2B 상담신청 페이지 문구 및 배너 설정"]}),c.jsxs("div",{className:"space-y-5",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"B2B 히어로 배너 메인 대제목"}),c.jsx("textarea",{value:n.b2bHeroTitle??`공공기관 · 기업 맞춤
4478스마트 공간 솔루션, CLOVER`,onChange:b=>s("b2bHeroTitle",b.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 font-bold",placeholder:"예: 공공기관 · 기업 맞춤 공간 솔루션, CLOVER"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"B2B 히어로 배너 설명 문구"}),c.jsx("textarea",{value:n.b2bHeroDesc??`단순히 가구를 납품하는 것을 넘어, 기업의 고유문화와 동선을 연구합니다.
4479전국 어디든 무상 방문 실측 및 2D/3D 레이아웃 최적 설계를 무상 지원합니다.`,onChange:b=>s("b2bHeroDesc",b.target.value),rows:3,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20",placeholder:"B2B 상단 배너 설명 문구를 입력하세요."})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"B2B 히어로 배너 배경 이미지"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-24 h-16 bg-slate-200 border border-slate-300 rounded-xl overflow-hidden shrink-0",children:c.jsx("img",{src:n.b2bHeroBgImage||"https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80",alt:"Hero Bg",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}),c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("input",{type:"text",value:n.b2bHeroBgImage||"",onChange:b=>s("b2bHeroBgImage",b.target.value),className:"w-full p-2.5 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-indigo-500/20",placeholder:"이미지 URL"}),t&&c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 py-1.5 px-3 rounded-lg text-slate-700 inline-flex items-center gap-1.5 transition-colors text-xs font-semibold",children:[c.jsx(En,{className:"w-3.5 h-3.5"})," 배경 이미지 업로드",c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:b=>t(b,w=>s("b2bHeroBgImage",w))})]})]})]})]}),c.jsx("hr",{className:"border-slate-200 my-4"}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Why Clover (서비스 특징) 대제목"}),c.jsx("textarea",{value:n.b2bWhyTitle??`공공기관 공간 컨설팅,
4480왜 크로바가구 일까요?`,onChange:b=>s("b2bWhyTitle",b.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 font-bold"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Why Clover (서비스 특징) 설명 문구"}),c.jsx("textarea",{value:n.b2bWhyDesc??"20년 이상의 현장 노하우를 지닌 베테랑 설계 엔지니어와 직접 제조 공장을 보유한 강점을 바탕으로 차별화된 오피스를 선사합니다.",onChange:b=>s("b2bWhyDesc",b.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20"})]}),c.jsx("hr",{className:"border-slate-200 my-4"}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"B2B 상담 신청 폼 대제목"}),c.jsx("input",{type:"text",value:n.b2bFormTitle??"CLOVER 1:1 공간 솔루션 의뢰서",onChange:b=>s("b2bFormTitle",b.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20 font-bold"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"B2B 상담 신청 폼 안내 문구"}),c.jsx("textarea",{value:n.b2bFormDesc??"필수 항목을 기재해 주시면 크로바 전담 기획팀이 최적의 프리미엄 파트너로서 응대하겠습니다.",onChange:b=>s("b2bFormDesc",b.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500/20"})]})]})]}),c.jsxs("section",{className:"bg-slate-50 p-6 rounded-2xl border border-slate-200/80 shadow-sm space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-slate-200/80 pb-3",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2",children:[c.jsx(oc,{className:"w-5 h-5 text-amber-600"})," 실제 납품 사례 (PROVEN RECORD) 설정"]}),c.jsxs("button",{type:"button",onClick:l,className:"inline-flex items-center gap-1.5 px-3.5 py-2 bg-amber-600 hover:bg-amber-700 text-white font-bold text-xs rounded-xl shadow transition-all active:scale-95 cursor-pointer",children:[c.jsx(Is,{className:"w-4 h-4"})," 납품 사례 카드리스트 추가"]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"섹션 메인 대제목"}),c.jsx("input",{type:"text",value:n.provenRecordTitle??"실제 납품 사례로 증명합니다.",onCh
4480ange:b=>s("provenRecordTitle",b.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20 font-extrabold text-slate-900",placeholder:"예: 실제 납품 사례로 증명합니다."})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"섹션 설명 문구"}),c.jsx("textarea",{value:n.provenRecordDesc??"수많은 공공기관, 청사, 학교, 대기업의 신축 및 이전을 성공적으로 조달한 크로바의 완벽한 결과물입니다.",onChange:b=>s("provenRecordDesc",b.target.value),rows:2,className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20 text-slate-700",placeholder:"섹션 서브 설명을 입력하세요."})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"우상단 이동 버튼 문구 (지우면 비활성화)"}),c.jsx("input",{type:"text",value:n.provenRecordButtonText??"+ 납품사례 확인하러 가기",onChange:b=>s("provenRecordButtonText",b.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20 font-bold",placeholder:"예: + 납품사례 확인하러 가기"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"우상단 버튼 이동 링크 (URL)"}),c.jsx("input",{type:"text",value:n.provenRecordButtonUrl??"https://cloveroa.baiceconnect.co.kr/blog/index.php",onChange:b=>s("provenRecordButtonUrl",b.target.value),className:"w-full p-3 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20",placeholder:"https://..."})]})]}),c.jsxs("div",{className:"space-y-6 pt-4",children:[c.jsx("h4",{className:"text-sm font-bold text-slate-700 flex items-center justify-between",children:c.jsxs("span",{children:["납품 사례 카드리스트 (",i.length,"개)"]})}),i.map((b,w)=>{const _=Array.isArray(b.tags)?b.tags.join(", "):b.tags||"";return c.jsxs("div",{className:"bg-white p-5 rounded-2xl border border-slate-200/90 shadow-sm space-y-4 relative",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 pb-3",children:[c.jsxs("span",{className:"text-xs font-extrabold text-amber-700 bg-amber-50 px-2.5 py-1 rounded-lg",children:["사례 #",w+1," (",b.category||"카테고리 미지정",")"]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{type:"button",onClick:()=>m(w,"up"),disabled:w===0,className:"p-1.5 text-slate-400 hover:text-slate-700 disabled:opacity-30 rounded-lg hover:bg-slate-100 transition-colors",title:"위로 이동",children:c.jsx(Xf,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>m(w,"down"),disabled:w===i.length-1,className:"p-1.5 text-slate-400 hover:text-slate-700 disabled:opacity-30 rounded-lg hover:bg-slate-100 transition-colors",title:"아래로 이동",children:c.jsx(Qf,{className:"w-4 h-4"})}),c.jsx("button",{type:"button",onClick:()=>h(w),className:"p-1.5 text-rose-500 hover:text-rose-700 rounded-lg hover:bg-rose-50 transition-colors ml-2",title:"삭제",children:c.jsx(Sn,{className:"w-4 h-4"})})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"상단 카테고리 태그"}),c.jsx("input",{type:"text",value:b.category||"",onChange:N=>d(w,"category",N.target.value),className:"w-full p-2.5 text-xs border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20 font-bold",placeholder:"예: 사무공간 / 중역실"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"사례 제목"}),c.jsx("input",{type:"text",value:b.title||"",onChange:N=>d(w,"title",N.target.value),className:"w-full p-2.5 text-xs border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20 font-bold text-slate-800",placeholder:"예: 공공기관 행정복지센터"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"납품 사례 상세 설명"}),c.jsx("textarea",{value:b.description||"",onChange:N=>d(w,"description",N.target.value),rows:2,className:"w-full p-2.5 text-xs border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20 text-slate-700",placeholder:"사례 설명을 입력하세요."})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"해시태그 (쉼표로 구분, 예: #가구 제안, #3D 레이아웃)"}
4480),c.jsx("input",{type:"text",value:_,onChange:N=>{const E=N.target.value.split(",").map(j=>j.trim()).filter(Boolean);d(w,"tags",E)},className:"w-full p-2.5 text-xs border border-slate-300 rounded-xl focus:ring-2 focus:ring-amber-500/20 font-medium",placeholder:"#가구 제안, #3D 레이아웃"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"사례 대표 이미지"}),c.jsxs("div",{className:"flex gap-4 items-center",children:[c.jsx("div",{className:"w-20 h-16 bg-slate-100 border border-slate-200 rounded-xl overflow-hidden shrink-0",children:c.jsx("img",{src:b.imageUrl||"https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=600&q=80",alt:"Card Preview",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}),c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("input",{type:"text",value:b.imageUrl||"",onChange:N=>d(w,"imageUrl",N.target.value),className:"w-full p-2.5 text-xs border border-slate-300 rounded-lg focus:ring-2 focus:ring-amber-500/20",placeholder:"이미지 URL"}),t&&c.jsxs("label",{className:"cursor-pointer bg-white border border-slate-300 hover:bg-slate-50 py-1.5 px-3 rounded-lg text-slate-700 inline-flex items-center gap-1.5 transition-colors text-xs font-semibold",children:[c.jsx(En,{className:"w-3.5 h-3.5"})," 이미지 업로드",c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:N=>t(N,E=>d(w,"imageUrl",E))})]})]})]})]})]},b.id||w)})]})]})]})]})},ine=({data:n,onChange:e})=>{const[t,r]=D.useState("");return c.jsxs("div",{className:"space-y-8 text-left font-sans",children:[c.jsxs("div",{className:"bg-blue-50 border border-blue-100 p-6 rounded-2xl flex gap-4",children:[c.jsx(T_,{className:"w-6 h-6 text-blue-600 flex-shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-blue-950 font-bold text-base",children:"✉️ B2B 상담 수신 이메일 설정 가이드"}),c.jsxs("p",{className:"text-sm text-blue-800 leading-relaxed font-medium",children:["고객들이 ",c.jsx("strong",{children:"CLOVER 1:1 공간 솔루션 의뢰서"}),"를 제출하면, 실시간 알림 메일과 상세 의뢰 내역이 이곳에서 설정된 관리자 메일로 자동 발송됩니다."]}),c.jsxs("ul",{className:"text-sm text-blue-800 space-y-1 list-disc pl-4 font-medium leading-relaxed",children:[c.jsx("li",{children:"수신 메일을 변경하면, 새로 접수되는 모든 상담 내역이 변경된 이메일로 즉시 라우팅됩니다."}),c.jsxs("li",{children:["기본값은 ",c.jsx("strong",{children:"[email protected]"})," 이며, 이메일을 변경하고자 하시면 홈페이지 제작사에 문의하세요."]})]})]})]}),c.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-2xl p-6 space-y-4",children:[c.jsx("h4",{className:"text-sm font-bold text-gray-900",children:"현재 수신 라우팅 프리뷰"}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs font-mono",children:[c.jsxs("div",{className:"bg-white p-4 border border-gray-100 rounded-xl",children:[c.jsx("span",{className:"text-gray-400 block mb-1",children:"To (관리자 수신함)"}),c.jsx("span",{className:"text-blue-600 font-bold",children:n.adminEmail||"[email protected]"})]}),c.jsxs("div",{className:"bg-white p-4 border border-gray-100 rounded-xl",children:[c.jsx("span",{className:"text-gray-400 block mb-1",children:"Status (실시간 발송 여부)"}),c.jsx("span",{className:`font-bold ${n.receiveNotifications!==!1?"text-emerald-600":"text-amber-500"}`,children:n.receiveNotifications!==!1?"ON (발송 활성화)":"OFF (일시 중단)"})]})]})]})]})},one=()=>{const[n,e]=D.useState([]),[t,r]=D.useState(!1),[s,i]=D.useState(""),[l,d]=D.useState(null),[h,m]=D.useState(!1),g=async()=>{r(!0),i("");try{const N=dc(ot,"mail"),E=FM(N,BM(100)),j=await ey(E),P=[];j.forEach(A=>{P.push({id:A.id,...A.data()})}),P.sort((A,M)=>{const O=A.createdAt||0;return(M.createdAt||0)-O}),e(P)}catch(N){console.error("Failed to fetch mail delivery logs:",N),i(N.message||"로그를 불러오는데 실패했습니다.")}finally{r(!1)}};D.useEffect(()=>{g()},[]);const p=async N=>{try{await XM(qt(ot,"mail",N)),e(E=>E.filter(j=>j.id!==N)),d(null)}catch(E){alert("로그 삭제에 실패했습니다: "+E.message)}},b=()=>{m(!0)},w=async()=>{m(!1),r(!0);try{const E=(await ey(dc(ot,"mail"))).docs,j=400;for(let P=0;P<E.length;P+=j){const A=E.slice(P,P+j),M=V2(ot);A.forEach(O=>M.delete(O.ref)),await M.commit()}e([]),alert("모든 로그가 삭제되었습니다.")}catch(N){alert("삭제 실패: "+N.message)}finally{r(!1)}},_=N=>{var j;switch((j=N.delivery)==null?void 0:j.state){case"SUCCESS":return c.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-emerald-100 text-emerald-800",children:[c.jsx(RB,{className:"w-3.5 h-3.5"})," 성공 (SUCCESS)"]});case"ERROR":return c.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-rose-100 text-rose-800 animate-pulse",children:[c.jsx(vU,{className:"w-3.5 h-3.5"})," 실패 (ERROR)"]});case"PROCESSING":return c.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-blue-100 text-blue-800 animate-spin",children:[c.jsx(yA,{className:"w-3.5 h-3.5"})," 전송중 (PROCESSING)"]});case"PENDING":return c.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-amber-100 text-amber-800",children:[c.jsx(qw,{className:"w-3.5 h-3.5"})," 대기중 (PENDING)"]});default:return c.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold bg-gray-100 text-gray-800",children:[c.jsx(qw,{className:"w-3.5 h-3.5"})," 대기중 / 미발송 (PENDING)"]})}};return c.jsxs("div",{className:"space-y-6 text-left font-sans",children:[c.jsx("div",{className:"bg-gray-50 border border-gray-200 p-6 rounded-2xl",children:c.jsxs("div",{className:"flex gap-4",children:[c.jsx(Hw,{className:"w-6 h-6 text-blue-600 flex-shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-gray-900 font-bold text-base",children:"🔍 이메일 발송 상태 실시간 디버거"}),c.jsxs("p",{className:"text-sm text-gray-600 leading-relaxed",children:["Firestore의 ",c.jsx("strong",{className:"text-emerald-600",children:"Trigger Email"})," 확장 프로그램이 처리하는 모든 이메일의 실제 SMTP 송수신 상세 ê²°ê
4480³¼ìž…니다. 메일이 수신되지 않을 경우, 아래 로그에서 ",c.jsx("strong",{className:"text-red-500",children:"실패 (ERROR)"})," 상태를 클릭하거나 세부 오류 로그를 확인해 SMTP 정보 입력 오류나 인증 오류를 진단할 수 있습니다."]})]})]})}),c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-lg font-bold text-gray-900 flex items-center gap-2",children:[c.jsx(Yw,{className:"w-5 h-5 text-gray-700"})," 총 ",n.length,"건의 발송 로그"]}),c.jsx("p",{className:"text-xs text-gray-500",children:"최신 100개의 메일 발송 상태가 보입니다."})]}),c.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 px-4 py-2 text-sm font-semibold text-red-600 bg-red-50 hover:bg-red-100 rounded-xl transition-colors",children:[c.jsx(RI,{className:"w-4 h-4"}),"전체 삭제"]}),c.jsxs("button",{onClick:g,disabled:t,className:"flex items-center gap-2 px-4 py-2 text-sm font-semibold bg-white border border-gray-200 rounded-xl hover:bg-gray-50 transition-colors disabled:opacity-50",children:[c.jsx(yA,{className:`w-4 h-4 ${t?"animate-spin":""}`}),"새로고침 (F5)"]})]}),s&&c.jsxs("div",{className:"p-4 bg-rose-50 border border-rose-100 rounded-xl text-rose-700 text-sm font-medium flex items-center gap-2",children:[c.jsx(xA,{className:"w-4 h-4"}),s]}),n.length===0&&!t?c.jsxs("div",{className:"border border-gray-200 rounded-2xl p-12 text-center text-gray-400 bg-white",children:[c.jsx(Yw,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),c.jsx("p",{className:"font-medium",children:"발송 요청 기록이 아직 없습니다."}),c.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"B2B 상담 신청을 접수하면 자동으로 이메일 발송이 트리거됩니다."})]}):c.jsx("div",{className:"bg-white border border-gray-200 rounded-2xl shadow-sm overflow-hidden",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm text-left border-collapse",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"bg-gray-50/70 border-b border-gray-200 text-gray-500 font-bold text-xs uppercase",children:[c.jsx("th",{className:"px-6 py-4",children:"발송 일시"}),c.jsx("th",{className:"px-6 py-4",children:"수신자 (To)"}),c.jsx("th",{className:"px-6 py-4",children:"이메일 제목"}),c.jsx("th",{className:"px-6 py-4",children:"발송 상태"}),c.jsx("th",{className:"px-6 py-4 text-center",children:"동작"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-100",children:n.map(N=>{var E,j,P;return c.jsxs(ae.Fragment,{children:[c.jsxs("tr",{className:"hover:bg-gray-50/40 transition-colors",children:[c.jsx("td",{className:"px-6 py-4 text-xs font-mono text-gray-500",children:N.createdAt?new Date(N.createdAt).toLocaleString("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):c.jsx("span",{className:"text-gray-300",children:"시간 정보 없음"})}),c.jsxs("td",{className:"px-6 py-4 font-semibold text-gray-900",children:[Array.isArray(N.to)?N.to.join(", "):N.to,N.bcc&&c.jsxs("span",{className:"block text-xs text-gray-400 mt-0.5",children:["BCC: ",Array.isArray(N.bcc)?N.bcc.join(", "):N.bcc]})]}),c.jsx("td",{className:"px-6 py-4 text-gray-700 font-medium max-w-[240px] truncate",title:(E=N.message)==null?void 0:E.subject,children:((j=N.message)==null?void 0:j.subject)||"(제목 없음)"}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:_(N)}),c.jsx("td",{className:"px-6 py-4 text-center whitespace-nowrap",children:c.jsx("button",{onClick:()=>d(N.id),className:"p-1.5 text-gray-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-all",title:"로그 삭제",children:c.jsx(Sn,{className:"w-4 h-4"})})})]}),((P=N.delivery)==null?void 0:P.state)==="ERROR"&&c.jsx("tr",{children:c.jsx("td",{colSpan:5,className:"bg-rose-50/50 px-6 py-4 border-t border-b border-rose-100",children:c.jsxs("div",{className:"flex gap-3 items-start text-xs text-rose-800",children:[c.jsx(xA,{className:"w-4 h-4 text-rose-500 flex-shrink-0 mt-0.5 animate-bounce"}),c.jsxs("div",{className:"space-y-1 w-full",children:[c.jsx("p",{className:"font-bold text-rose-900",children:"🚨 메일 전송 오류 진단 (SMTP Error Logs):"}),c.jsx("pre",{className:"p-3 bg-rose-950 text-rose-100 rounded-lg font-mono text-[11px] whitespace-pre-wrap overflow-x-auto leading-relaxed border border-rose-900 shadow-inner max-h-[150px]",children:N.delivery.error||"Trigger Email Error (no description provided by the extension). Check firebase console logs."}),c.jsxs("div",{className:"mt-2 text-rose-700/90 leading-relaxed font-medium bg-white/75 p-3 rounded-xl border border-rose-100",children:[c.jsx("p",{className:"font-bold text-rose-800 mb-1",children:"💡 자주 발생하는 SMTP 원인 및 자가진단:"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"535 Authentication Failed (인증 실패):"}),' SMTP 계정의 비밀번호나 2차인증 전용 "애플리케이션 비밀번호"가 변경되었거나 올바르지 않습니다. Naver/Gmail 등의 보안 메뉴에서 앱 비밀번호를 새로 발급받아 Trigger Email 설정을 업데이트하세요.']}),c.jsxs("li",{children:[c.jsx("strong",{children:"Sender address rejected (발송 주소 거부):"}),' SMTP로 로그인한 Naver/Gmail 계정과 실제 메일의 "From" 발송인 주소가 불일치할 때 발생합니다.']}),c.jsxs("li",{children:[c.jsx("strong",{children:"554 / 530 SMTP Error:"})," SMTP 포트(보통 465 또는 587)나 SSL/TLS 보안 설정이 어긋났습니다."]})]}),c.jsx("p",{className:"mt-2 text-[11px] text-gray-500",children:"* 자세한 정보는 Firebase Console > Extensions (확장 프로그램) > Trigger Email > How it works 및 인스턴스 구성에서 SMTP Connection URI(예: smtps://user:[email protected]:465)를 올바르게 재수정하세요."})]})]})]})})})]},N.id)})})]})})}),l&&c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4 backdrop-blur-xs",children:c.jsxs("div",{className:"bg-white rounded-2xl max-w-sm w-full p-6 shadow-xl space-y-4 text-center",children:[c.jsx(Sn,{className:"w-12 h-12 text-rose-500 mx-auto bg-rose-50 p-2.5 rounded-full"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h4",{className:"font-bold text-gray-900 text-base",children:"로그 기록 삭제"}),c.jsx("p",{className:"text-sm text-gray-500",children:"이 발송 로그 기록을 삭제하시겠습니까? (이 작업은 되돌릴 수 없습니다)"})]}),c.jsxs("div",{className:"flex gap-2 pt-2",children:[c.jsx("button",{onClick:()=>d(null),className:"flex-1 py-2.5 text-sm font-semibold text-gray-600 bg-gray-50 hover:bg-gray-100 rounded-xl transition-colors",children:"취소"}),c.jsx("button",{onClick:()=>p(l),className:"flex-1 py-2.5 text-sm font-semibold text-white bg-rose-600 hover:bg-rose-700 rounded-xl transition-colors",children:"삭제하기"})]})]})}),h&&c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4 backdrop-blur-xs",children:c.jsxs("div",{className:"bg-white rounded-2xl max-w-sm w-full p-6 shadow-xl space-y-4 text-center",children:[c.jsx(Sn,{className:"w-12 h-12 text-rose-500 mx-auto bg-rose-50 p-2.5 rounded-full"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h4",{className:"font-bold text-gray-900 text-base",children:"전체 로그 삭제"}),c.jsx("p",{className:"text-sm text-gray-500",children:"전체 삭제는 모든 데이터가 지워지며, 복구할수 없습니다. 정말 복구하시겠습니까?"})]}),c.jsxs("div",{className:"flex gap-2 pt-2",children:[c.jsx("button",{onClick:()=>m(!1),className:"flex-1 py-2.5 text-sm font-semibold text-gray-600 bg-gray-50 hover:bg-gray-100 rounded-xl transition-colors",children:"취소"}),c.jsx("button",{onClick:w,className:"flex-1 py-2.5 text-sm font-semibold text-white bg-rose-600 hover:bg-rose-700 rounded-xl transition-colors",children:"확인"})]})]})})]})},lne=({data:n,onChange:e,onUploadBase:t})=>{var I;const r=D.useRef({}),[s,i]=D.useState(null),[l,d]=D.useState(null),h=(R,F)=>{e({...n,[R]:F})},m=(R,F,B)=>{const V=[...n.categories];V[R]={...V[R],[F]:B},h("categories",V)},g=()=>{const R={name:"새 카테고리",description:"카테고리에 대한 설명을 입력해주세요.",colors:[{name:"샘플색상 1",color:"#deb887",order:1},{name:"샘플색상 2",color:"#ece0d1",order:2}]};h("categories",[...n.categories,R])},p=R=>{if(confirm("정말로 이 마감재 카테고리를 삭제하시겠습니까?")){const F=n.categories.filter((B,V)=>V!==R);h("categories",F)}},b=(R,F)=>{const B=parseInt(F,10);if(isNaN(B)||B<1||B>n.categories.length)return;const V=[...n.categories],[se]=V.splice(R,1);V.splice(B-1,0,se),h("categories",V)},w=(R,F,B,V)=>{const se=[...n.categories],ye=[...se[R].colors];let W={...ye[F],[B]:V};B==="color"&&V?W.image="":B==="image"&&V&&(W.color=""),ye[F]=W,se[R]={...se[R],colors:ye},h("categories",se)},_=R=>{const F=[...n.categories],B=F[R].colors||[],se={name:"새 색상",color:"#cccccc",order:B.length+1};F[R]={...F[R],colors:[...B,se]},h("categories",F)},N=(R,F)=>{const B=[...n.categories],V=B[R].colors.filter((se,ye)=>ye!==F).map((se,ye)=>({...se,order:ye+1}));B[R]={...B[R],colors:V},h("categories",B)},E=(R,F,B)=>{const V=[...n.categories[R].colors],se=parseInt(B,10);if(isNaN(se)||se<1||se>V.length)return;const[ye]=V.splice(F,1);V.splice(se-1,0,ye);const W=V.map((X,be)=>({...X,order:be+1})),$=[...n.categories];$[R]={...$[R],colors:W},h("categories",$)},j=(R,F)=>{R.dataTransfer.effectAllowed="move",setTimeout(()=>{i(F)},0)},P=()=>{i(null)},A=(R,F)=>{R.preventDefault()},M=(R,F)=>{if(R.preventDefault(),s===null||s===F)return;const B=[...n.categories],[V]=B.splice(s,1);B.splice(F,0,V),h("categories",B),i(null)},O=(R,F,B)=>{R.dataTransfer.effectAllowed="move",setTimeout(()=>{d({catIdx:F,colorIdx:B})},0)},q=()=>{d(null)},L=(R,F,B)=>{R.preventDefault()},k=(R,F,B)=>
4480{if(R.preventDefault(),!l||l.catIdx!==F)return;const V=l.colorIdx;if(V===B)return;const se=[...n.categories[F].colors],[ye]=se.splice(V,1);se.splice(B,0,ye);const W=se.map((X,be)=>({...X,order:be+1})),$=[...n.categories];$[F]={...$[F],colors:W},h("categories",$),d(null)};return c.jsxs("div",{className:"space-y-8 text-left font-sans",children:[c.jsxs("div",{className:"bg-emerald-50 border border-emerald-100 p-6 rounded-2xl flex gap-4",children:[c.jsx(T_,{className:"w-6 h-6 text-emerald-600 flex-shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-emerald-950 font-bold text-base",children:"💡 마감재 정렬 및 순서 지정 안내"}),c.jsxs("p",{className:"text-sm text-emerald-800 leading-relaxed font-medium",children:["- ",c.jsx("strong",{children:"드래그 앤 드롭:"})," 카테고리 카드나 색상 카드의 가장자리나 핸들을 마우스로 잡고 드래그하면 직관적으로 순서를 바꿀 수 있습니다.",c.jsx("br",{}),"- ",c.jsx("strong",{children:"순서 입력:"})," 정렬 순서 입력란에 원하는 숫자(예: 1)를 직접 입력하시면 순서가 해당 위치로 즉시 재배치됩니다.",c.jsx("br",{}),"- ",c.jsx("strong",{children:"노출 제한:"})," 디자인상 최대 3개의 카테고리만 노출할 수 있습니다."]})]})]}),c.jsxs("div",{className:"bg-white border border-gray-100 rounded-2xl p-6 space-y-6",children:[c.jsxs("h3",{className:"text-lg font-bold text-gray-900 flex items-center gap-2",children:[c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),"마감재 섹션 상단 기본 타이틀 및 설명문구"]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-bold text-gray-700 block mb-1.5",children:"섹션 대제목"}),c.jsx("input",{type:"text",value:n.title||"",onChange:R=>h("title",R.target.value),className:"w-full p-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-500 outline-none transition-all font-semibold text-gray-800 text-sm",placeholder:"예: 마감재 보기 (Materials & Finishes)"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-bold text-gray-700 block mb-1.5",children:"섹션 상세 설명문구"}),c.jsx("textarea",{value:n.description||"",onChange:R=>h("description",R.target.value),className:"w-full p-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-500 outline-none transition-all text-gray-800 text-sm min-h-[80px]",placeholder:"마감재 섹션의 상단 세부 설명문을 작성해주세요."})]})]})]}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("h3",{className:"text-lg font-bold text-gray-900 flex items-center gap-2",children:[c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-blue-500"}),"마감재 카테고리별 세부 목록 (",((I=n.categories)==null?void 0:I.length)||0,")"]}),c.jsxs("button",{type:"button",onClick:g,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-xl font-bold text-sm flex items-center gap-1.5 transition-colors shadow-sm",children:[c.jsx(Is,{className:"w-4 h-4"})," 카테고리 추가"]})]}),!n.categories||n.categories.length===0?c.jsx("div",{className:"text-center py-16 bg-gray-50 rounded-2xl border border-dashed border-gray-200 text-gray-400 font-medium",children:"등록된 카테고리가 없습니다. 오른쪽 상단 '카테고리 추가' 버튼을 눌러 추가해주세요."}):c.jsx("div",{className:"space-y-8",children:n.categories.map((R,F)=>{var B;return c.jsxs("div",{className:`bg-gray-50 border border-gray-200 rounded-2xl p-6 relative space-y-6 shadow-sm transition-all ${s===F?"opacity-50 border-blue-400 border-dashed bg-blue-100/10":""}`,draggable:!0,onDragStart:V=>j(V,F),onDragEnd:P,onDragOver:V=>A(V),onDrop:V=>M(V,F),children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-gray-200",children:[c.jsxs("div",{className:"flex items-center gap-2.5 flex-1 min-w-0",children:[c.jsx("div",{className:"cursor-move text-gray-400 hover:text-gray-900 p-1",title:"드래그하여 순서 변경 가능",children:c.jsx(gA,{className:"w-5 h-5"})}),c.jsx("span",{className:"w-6 h-6 rounded-full bg-slate-900 text-white text-xs font-bold flex items-center justify-center flex-shrink-0",children:F+1}),c.jsx("input",{type:"text",value:R.name||"",onChange:V=>m(F,"name",V.target.value),className:"text-base font-bold bg-white px-3 py-1.5 border border-gray-300 rounded-lg text-gray-800 outline-none focus:border-blue-500 transition-colors w-full sm:w-64",placeholder:"예: LPM, 인조대리석"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"text-xs font-bold text-gray-500",children:"순서:"}),c.jsx("select",{value:F+1,onChange:V=>b(F,V.target.value),className:"bg-white border border-gray-300 text-xs font-bold text-gray-700 rounded-lg px-2 py-1.5 focus:outline-none focus:ring-1 focus:ring-blue-500",children:Array.from({length:n.categories.length},(V,se)=>se+1).map(V=>c.jsx("option",{value:V,children:V},V))})]}),c.jsx("button",{type:"button",onClick:()=>p(F),className:"p-2 bg-red-50 hover:bg-red-100 border border-red-200 text-red-600 rounded-lg transition-colors",title:"카테고리 삭제",children:c.jsx(Sn,{className:"w-4 h-4"})})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs font-bold text-gray-500 block mb-1",children:"카테고리 대표 설명문구"}),c.jsx("input",{type:"text",value:R.description||"",onChange:V=>m(F,"description",V.target.value),className:"w-full p-2.5 bg-white border border-gray-300 rounded-lg text-sm text-gray-800 outline-none focus:border-blue-500 transition-colors",placeholder:"예: 가장 많이 사용되는 친환경 마감재로, 내마모성과 내스크래치성이 우수합니다."})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("h4",{className:"text-sm font-bold text-slate-800 flex items-center gap-1.5",children:[c.jsx(E_,{className:"w-4 h-4 text-emerald-500"}),"색상/이미지 목록 (",((B=R.colors)==null?void 0:B.length)||0,")"]}),c.jsxs("button",{type:"button",onClick:()=>_(F),className:"px-3 py-1.5 bg-white border border-gray-300 text-xs font-bold text-gray-700 rounded-lg hover:bg-gray-100 transition-colors flex items-center gap-1",children:[c.jsx(Is,{className:"w-3.5 h-3.5"})," 색상 추가"]})]}),!R.colors||R.colors.length===0?c.jsx("div",{className:"text-center py-8 bg-white border border-dashed border-gray-200 rounded-xl text-xs text-gray-400",children:"추가된 색상이 없습니다. 색상 추가 버튼을 눌러 마감재 색상을 추가하세요."}):c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:R.colors.map((V,se)=>{var $;const ye=`${F}-${se}`,W=l&&l.catIdx===F&&l.colorIdx===se;return c.jsxs("div",{className:`bg-white border border-gray-200 rounded-xl p-4 flex flex-col gap-3 relative shadow-sm group transition-all ${W?"opacity-50 border-emerald-400 border-dashed bg-emerald-50/10":""}`,draggable:!0,onDragStart:X=>O(X,F,se),onDragEnd:q,onDragOver:X=>L(X),onDrop:X=>k(X,F,se),children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-gray-100 pb-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("div",{className:"cursor-move text-gray-300 group-hover:text-gray-600 p-0.5",title:"드래그하여 정렬 변경 가능",children:c.jsx(gA,{className:"w-4 h-4"})}),c.jsx("span",{className:"text-xs font-bold text-blue-600 bg-blue-50 px-2.5 py-1 rounded",children:se+1})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-[10px] font-bold text-gray-400",children:"순서:"}),c.jsx("select",{value:se+1,onChange:X=>E(F,se,X.target.value),className:"bg-white border border-gray-200 text-[11px] font-bold text-gray-700 rounded px-1.5 py-0.5 focus:outline-none",children:Array.from({length:R.colors.length},(X,be)=>be+1).map(X=>c.jsx("option",{value:X,children:X},X))})]}),c.jsx("button",{type:"button",onClick:()=>N(F,se),className:"p-1 hover:bg-red-50 text-red-600 rounded ml-1",title:"색상 삭제",children:c.jsx(Sn,{className:"w-3.5 h-3.5"})})]})]}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 items-center",children:[c.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[V.image?c.jsxs("div",{className:"w-14 h-14 roun
4480ded-full border border-gray-200 overflow-hidden shadow-inner relative group/img",children:[c.jsx(et,{src:V.image,alt:"",className:"w-full h-full object-cover"}),c.jsx("button",{type:"button",onClick:()=>w(F,se,"image",""),className:"absolute inset-0 bg-black/60 text-white font-bold text-[10px] flex items-center justify-center opacity-0 group-hover/img:opacity-100 transition-opacity",children:"삭제"})]}):c.jsx("div",{className:"w-14 h-14 rounded-full border border-gray-200 shadow-inner",style:{backgroundColor:V.color||"#cccccc"}}),c.jsx("span",{className:"text-[10px] text-gray-400 font-bold whitespace-nowrap",children:"미리보기"})]}),c.jsxs("div",{className:"sm:col-span-2 space-y-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] font-bold text-gray-400 block",children:"색상/마감재 이름"}),c.jsx("input",{type:"text",value:V.name||"",onChange:X=>w(F,se,"name",X.target.value),className:"w-full p-2 border border-gray-300 rounded text-xs font-semibold text-gray-800",placeholder:"예: 망펄비취, 파스텔그린"})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("label",{className:"text-[10px] font-bold text-gray-400 block",children:"단색 RGB코드"}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("input",{type:"color",value:($=V.color)!=null&&$.startsWith("#")?V.color:"#cccccc",onChange:X=>w(F,se,"color",X.target.value),className:"w-6 h-6 border-0 p-0 rounded-md cursor-pointer flex-shrink-0"}),c.jsx("input",{type:"text",value:V.color||"",onChange:X=>w(F,se,"color",X.target.value),className:"w-full p-1 border border-gray-300 rounded text-[11px]",placeholder:"#deb887"})]})]}),c.jsxs("div",{className:"flex-shrink-0 flex items-end",children:[c.jsxs("button",{type:"button",onClick:()=>{var X;return(X=r.current[ye])==null?void 0:X.click()},className:"p-2 border border-gray-300 hover:bg-gray-50 rounded text-gray-700 flex items-center gap-1 text-[11px] font-semibold",title:"나뭇결/텍스처 패턴 이미지 등록",children:[c.jsx(AI,{className:"w-3.5 h-3.5 text-blue-500"}),"패턴"]}),c.jsx("input",{ref:X=>r.current[ye]=X,type:"file",accept:"image/*",className:"hidden",onChange:X=>t(X,be=>w(F,se,"image",be))})]})]})]})]})]},se)})})]})]},F)})})]})]})},hw=[{id:"logo_config",label:"로고 및 시공 사례"},{id:"footer_config",label:"Footer Config"},{id:"home_page",label:"Home Page"},{id:"about_page_v2",label:"About Page"},{id:"spaces_page",label:"Product Page"},{id:"excellent_product_page",label:"우수제품",isSubpage:!0},{id:"office_system_page",label:"사무용 가구",isSubpage:!0},{id:"partition_system_page",label:"파티션 시스템",isSubpage:!0},{id:"education_system_page",label:"도서관/교육용 가구",isSubpage:!0},{id:"executive_furniture_page",label:"중역용 가구",isSubpage:!0},{id:"chair_collection_page",label:"의자 컬렉션",isSubpage:!0},{id:"sofa_lounge_page",label:"소파 & 라운지",isSubpage:!0},{id:"spaces_materials_section",label:"마감재 섹션",isSubpage:!0},{id:"materials_page",label:"Materials Library Page"},{id:"design_page_v2",label:"자료실 (Archive)"},{id:"sustainability_page_v2",label:"고객지원 및 B2B 설정"},{id:"b2b_inquiries_manager",label:"B2B 상담 접수함",isSpecial:!0},{id:"mail_settings",label:"수신 메일 설정",isSpecial:!0},{id:"mail_delivery_logs",label:"메일 발송 로그",isSpecial:!0},{id:"ai_hub_page",label:"AI HUB Page"},{id:"chatbot_knowledge",label:"챗봇 지식 (FAQ·URL)"},{id:"maintenance",label:"유지보수 (이미지 URL 정리)",isSpecial:!0}],cne={title:"마감재 보기 (Materials & Finishes)",description:"크로바가구의 세심한 디테일을 완성하는 마감재 라인업입니다. 공간의 분위기와 용도에 맞는 최적의 소재와 컬러를 제안합니다.",categories:[{name:"LPM",description:"가장 많이 사용되는 친환경 마감재로, 내마모성과 내스크래치성이 우수합니다.",colors:[{name:"망펄비취",color:"#deb887",image:"",order:1},{name:"애플",color:"#fada5e",image:"",order:2},{name:"화이트오크",color:"#ece0d1",image:"",order:3},{name:"메이플",color:"#e8d2a6",image:"",order:4}]},{name:"LPM (학생용사물함 전용 컬러)",description:"가장 많이 사용되는 친환경 마감재로, 내마모성과 내스크래치성이 우수합니다.",colors:[{name:"파스텔그린",color:"#a8e4a0",image:"",order:1}
4480,{name:"파스텔블루",color:"#add8e6",image:"",order:2},{name:"파스텔퍼플",color:"#e6e6fa",order:3},{name:"파스텔핑크",color:"#ffb6c1",order:4}]},{name:"인조대리석",description:"견고한 내구성과 위생적인 표면 가공으로 오랫동안 품격을 유지합니다.",colors:[{name:"아스펜스노우",color:"#f0f8ff",image:"",order:1},{name:"페블프러스트",color:"#dcdcdc",image:"",order:2},{name:"아스펜그레이",color:"#778899",image:"",order:3}]}]},gf={chatbot_knowledge:{faqs:[],sources:[]},logo_config:{defaultLogoUrl:"",scrollLogoUrl:"",logoWidth:"180",constructionUrl:""},footer_config:A1,home_page:d0,about_page_v2:Nr,design_page_v2:b0,sustainability_page_v2:Nf,spaces_page:Qu,spaces_materials_section:cne,materials_page:Wu,ai_hub_page:P1,excellent_product_page:m0,office_system_page:h0,partition_system_page:p0,education_system_page:f0,executive_furniture_page:g0,chair_collection_page:y0,sofa_lounge_page:x0,mail_settings:{adminEmail:"[email protected]",bccEmail:"",receiveNotifications:!0}},E0=({path:n,value:e,onChange:t,onUploadBase:r,onOpenMaterialPicker:s,activePage:i,pageData:l})=>{const[d,h]=D.useState(0),[m,g]=D.useState("card"),[p,b]=D.useState([]),w=P=>{p.length===P.length?b([]):b(P.map((A,M)=>M))},_=P=>{b(A=>A.includes(P)?A.filter(M=>M!==P):[...A,P])},N=typeof e=="string"&&((e.startsWith("http")||e.startsWith("/assets/")||e.startsWith("data:"))&&(e.match(/\.(png|jpg|jpeg|gif|webp|mp4|webm|mov|ogg)|(images\.unsplash\.com)/i)||e.includes("video"))||typeof n=="string"&&n.toLowerCase().includes("image")),E=typeof n=="string"&&(n.endsWith(".colors")||n==="colors"),j=typeof n=="string"&&(n.endsWith(".categories")||n==="categories");if(Array.isArray(e)){if(e.length>0&&typeof e[0]=="object"&&e[0],j)return c.jsxs("div",{className:"pl-4 border-l-2 border-gray-200 mt-2",children:[c.jsxs("div",{className:"flex overflow-x-auto gap-2 mb-4 pb-2 border-b border-gray-100 items-center",children:[e.map((A,M)=>c.jsx("button",{onClick:()=>h(M),className:`px-4 py-2 text-sm font-semibold rounded-t-lg transition-colors whitespace-nowrap ${d===M?"bg-blue-50 text-blue-600 border-b-2 border-blue-600":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:typeof A=="string"?A:A.name||`Item ${M+1}`},M)),c.jsxs("button",{className:"flex items-center justify-center gap-1.5 px-3 py-1.5 ml-2 border border-dashed border-gray-300 rounded-md text-gray-500 hover:text-blue-600 hover:border-blue-300 hover:bg-blue-50 transition-all font-medium text-sm whitespace-nowrap flex-shrink-0",onClick:()=>{const A=[...e];let M={};if(e.length>0){const O=e[e.length-1];typeof O=="object"&&O!==null?M=Object.keys(O).reduce((q,L)=>(q[L]=typeof O[L]=="string"?"":typeof O[L]=="boolean"?!1:Array.isArray(O[L])?[]:0,q),{}):M=typeof O=="string"?"":typeof O=="boolean"?!1:0}else M={id:"",name:"",heroTitle:"",heroSubtitle:"",introKicker:"",introTitle:"",introDesc:"",featuresMain:[],featuresSub:[],colors:[],heroImage:""};A.push(M),t(A),h(A.length-1)},children:[c.jsx(Is,{className:"w-4 h-4"})," 항목 추가"]})]}),e.length>0&&d<e.length&&c.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-100 shadow-sm relative",children:[c.jsx("button",{onClick:()=>{const A=[...e];A.splice(d,1),t(A),h(Math.max(0,d-1))},className:"absolute top-2 right-2 p-1.5 text-gray-400 hover:text-red-500 hover:bg-red-50 rounded-md transition-colors",title:"항목 삭제",children:c.jsx(Sn,{className:"w-5 h-5"})}),c.jsx("div",{className:"flex items-center gap-2 mb-4 pr-8",children:c.jsx("div",{className:"text-sm font-bold text-gray-800",children:typeof e[d]=="string"?e[d]:e[d].name||`Item ${d+1}`})}),c.jsx(E0,{path:`${n}[${d}]`,value:e[d],onChange:A=>{const M=[...e];M[d]=A,t(M)},onUploadBase:r,onOpenMaterialPicker:s,activePage:i,pageData:l})]})]});const P=typeof n=="string"&&n.endsWith("materialsData");return c.jsxs("div",{className:"pl-4 border-l-2 border-gray-200 mt-2",children:[P&&c.jsxs("div",{className:"flex gap-2 mb-4 justify-between items-center",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>g("card"),className:`px-3 py-1 text-xs font-bold rounded-lg ${m==="card"?"bg-blue-600 text-white":"bg-gray-100 text-gray-600"}`,children:"카드뷰"}),c.jsx("button",{onClick:()=>g("table"),className:`px-3 py-1 text-xs font-bold rounded-lg ${m==="table"?"bg-blue-600 text-white":"bg-gray-100 text-gray-600"}`,children:"테이블뷰"})]}),m==="table"&&c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("select",{className:"px-2 py-1 text-xs font-bold rounded-lg bg-gray-100 text-gray-600 border-none",onChange:A=>{if(!A.target.value)return;const M=e.map((O,q)=>p.includes(q)?{...O,category:A.target.value}:O);t(M),b([])},children:[c.jsx("option",{value:"",children:"카테고리 일괄변경"}),((l==null?void 0:l.categories)||[]).filter(A=>A!=="All").map(A=>c.jsx("option",{value:A,children:A},A))]}),c.jsx("button",{onClick:()=>{const A=e.filter((M,O)=>!p.includes(O));t(A),b([])},className:"px-3 py-1 text-xs font-bold rounded-lg bg-red-100 text-red-600",children:"선택 삭제"})]})]}),c.jsx("div",{className:E?"grid grid-cols-1 md:grid-cols-2 gap-4":m==="table"&&P?"w-full":"flex flex-col gap-6 w-full",children:m==="table"&&P?c.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-xs",children:[c.jsx("thead",{className:"bg-gray-50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:c.jsx("input",{type:"checkbox",onChange:()=>w(e),checked:p.length===e.length&&e.length>0})}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"No."}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"Id"}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"Category"}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"Name"}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"Code"}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"Color"}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"Image"}),c.jsx("th",{className:"px-3 py-2 text-left font-bold text-gray-500",children:"Actions"})]})}),c.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map((A,M)=>c.jsxs("tr",{children:[c.jsx("td",{className:"px-3 py-2",children:c.jsx("input",{type:"checkbox",checked:p.includes(M),onChange:()=>_(M)})}),c.jsx("td",{className:"px-3 py-2",children:M+1}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("input",{value:A.id,onChange:O=>{const q=[...e];q[M].id=O.target.value,t(q)},className:"w-full border-none focus:ring-0 p-0"})}),c.jsx("td",{className:"px-3 py-2",children:i==="materials_page"?c.jsxs("select",{value:A.category,onChange:O=>{const q=[...e];q[M].category=O.target.value,t(q)},className:"w-full border-none focus:ring-0 p-0 bg-transparent font-semibold",children:[c.jsx("option",{value:"",children:"-- 선택 --"}),((l==null?void 0:l.categories)||[]).filter(O=>O!=="All").map(O=>c.jsx("option",{value:O,children:O},O))]}):c.jsx("input",{value:A.category,onChange:O=>{const q=[...e];q[M].category=O.target.value,t(q)},className:"w-full border-none focus:ring-0 p-0"})}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("input",{value:A.name,onChange:O=>{const q=[...e];q[M].name=O.target.value,t(q)},className:"w-full border-none focus:ring-0 p-0"})}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("input",{value:A.code,onChange:O=>{const q=[...e];q[M].code=O.target.value,t(q)},className:"w-full border-none focus:ring-0 p-0"})}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("input",{value:A.color,onChange:O=>{const q=[...e];q[M].color=O.target.value,t(q)},className:"w-full border-none focus:ring-0 p-0"})}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("div",{className:"flex flex-col gap-1",children:[A.image&&c.jsx(et,{src:A.image,alt:A.name,className:"w-10 h-10 object-cover rounded"}),c.jsxs("div",{className:"flex gap-1",children:[c.jsx("input",{value:A.image||"",onChange:O=>{const q=[...e];q[M].image=O.target.value,t(q)},className:"w-full border-none focus:ring-0 p-0 text-[10px]",placeholder:"Image URL"}),c.jsxs("label",{className:"cursor-pointer p-1 text-gray-400 hover:text-blue-600",children:[c.jsx(AI,{className:"w-4 h-4"}),c.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:O=>r(O,q=>{const L=[...e];L[M].image=q,t(L)})})]})]})]})}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("button",{onClick:()=>{const O=[...e];O.splice(M,1),t(O)},className:"text-gray-400 hover:text-red-500 transition-colors",children:c.jsx(Sn,{className:"w-4 h-4"})})})]},M))})]})}):e.map((A,M)=>c.jsxs("div",{className:"bg-white p-4 rounded-xl border border-gray-200/90 shadow-2xs relative w-full min-w-0",children:[c.jsx("button",{onClick:()=>{const O=[...e];O.splice(M,1),t(O)},className:"absolute top-2 right-2 p-1.5 text-gray-400 hover:text-red-500 hover:bg-red-50 rounded-md transition-colors",title:"항목 삭제",children:c.jsx(Sn,{className:"w-4 h-4"})}),c.jsxs("div",{className:"flex items-center gap-2 mb-2 pr-8",children:[c.jsxs("div",{className:"text-xs font-bold text-gray-400",children:["Item ",M+1]}),E&&typeof A=="object"&&A!==null&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-5 h-5 rounded-full border border-gray-200 overflow-hidden shadow-sm",style:{backgroundColor:A.color||"#F3F4F6"},children:A.image&&c.jsx(et,{src:A.image,alt:"",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}),A.name&&c.jsx("span",{className:"text-xs font-semibold text-gray-700 truncate max-w-[150px]",children:A.name})]})]}),c.jsx(E0,{path:`${n}[${M}]`,value:A,onChange:O=>{const q=[...e];q[M]=O,t(q)}
4480,onUploadBase:r,onOpenMaterialPicker:s,activePage:i,pageData:l})]},M))}),c.jsx("div",{className:"flex gap-2",children:E&&s?c.jsxs("button",{onClick:()=>{s(A=>{const M={name:A.name,code:A.code,color:A.color};A.image&&(M.image=A.image),t([...e,M])})},className:"mt-4 flex-1 py-2 border-2 border-dashed border-gray-300 text-gray-500 hover:border-indigo-500 hover:text-indigo-500 rounded-lg text-sm font-medium flex justify-center items-center gap-2 transition-colors",children:[c.jsx(E_,{className:"w-4 h-4"})," 색상 라이브러리에서 추가"]}):c.jsxs("button",{onClick:()=>{let A={};if(e.length>0){const O=e[e.length-1];typeof O=="object"&&O!==null?A=Object.keys(O).reduce((q,L)=>(q[L]=typeof O[L]=="string"?"":typeof O[L]=="boolean"?!1:typeof O[L]=="number"?0:Array.isArray(O[L])?[]:{},q),{}):A=typeof O=="string"?"":typeof O=="boolean"?!1:0}else typeof n=="string"&&(n.endsWith("featuresMain")?A={kicker:"",title:"",desc:"",image:""}:n.endsWith("featuresSub")?A={title:"",desc:"",image:""}:n.endsWith("categories")?A={id:"",name:"",heroTitle:"",heroSubtitle:"",introKicker:"",introTitle:"",introDesc:"",featuresMain:[],featuresSub:[],colors:[],heroImage:""}:n.endsWith("features")?A={subHeader:"NEW EXCELLENT PRODUCT 신제품 인증",title:`크로바가구
4481NEP 인체공학 시리즈`,desc:`오래 앉을수록 기술의 차이를 경험하세요.
4482국내 최초 NEP 좌판 전면 폴딩 기술이 허벅지의 부담을 효과적으로 분산하여 장시간 착석에도 편안함을 유지합니다.`,list:["NEP 좌판 전면 폴딩 기술","인체공학적 럼버 서포트","맞춤형 멀티 조절 시스템"],image:"https://images.unsplash.com/photo-1592078615290-033ee584e267?auto=format&fit=crop&q=80&w=1000",badgeTitle:"우수 인체공학 디자인",badgeText:"Best Ergonomic Design",badgeImage:"",link:"/about"}:(n.endsWith(".list")||n.endsWith("list")||n.endsWith("featureList"))&&(A=""));typeof n=="string"&&(n.endsWith(".colors")||n==="colors"||n.endsWith("materialsData"))&&typeof A=="object"&&!A.hasOwnProperty("image")&&(A.image=""),t([...e,A])},className:"mt-4 flex-1 py-2 border-2 border-dashed border-gray-300 text-gray-500 hover:border-blue-500 hover:text-blue-500 rounded-lg text-sm font-medium flex justify-center items-center gap-2 transition-colors",children:[c.jsx(Is,{className:"w-4 h-4"})," 항목 추가하기"]})})]})}if(typeof e=="object"&&e!==null){const P=typeof n=="string"&&(n.includes(".colors[")||n.match(/colors\[\d+\]$/)),A=typeof n=="string"&&n.includes("materialsData[");if(P)return null;let M=Object.keys(e).filter(O=>O!=="lineup"&&O!=="reverse"&&O!=="typography"&&O.toLowerCase()!=="colors");return i==="footer_config"&&(M=M.filter(O=>O!=="privacyPolicyContent")),n==="root"&&e.hasOwnProperty("categories")&&e.hasOwnProperty("heroTitle")&&(M=M.filter(O=>!["categories","featureBadgeTitle","featureBadgeText","featureSubHeader","featureTitle","featureDesc","featureList","featureImage","featureBadgeImage","featureLink"].includes(O))),A&&(M=M.filter(O=>!["tags","border","fullName"].includes(O)),M.includes("image")||M.push("image")),c.jsx("div",{className:"space-y-4 w-full",children:M.map(O=>{var I;const L=typeof e[O]=="string"&&!O.toLowerCase().includes("image")&&!O.toLowerCase().includes("url")&&!O.toLowerCase().includes("link")&&!O.toLowerCase().includes("color")&&!O.toLowerCase().includes("category")&&O!=="id"&&O!=="lineup"&&O!=="type",k=O==="heroTitle"?"히어로 메인 타이틀":O==="heroSubtitle"?"히어로 서브 타이틀":O==="heroBgImage"?"히어로 배경 이미지":O==="featureSubHeader"?"특징 섹션 상단 소제목":O==="featureTitle"?"특징 섹션 제목":O==="featureDesc"?"특징 섹션 상세 설명":O==="featureList"?"특징 섹션 리스트":O==="featureImage"?"특징 섹션 메인 이미지":O==="featureBadgeImage"?"우수제품 인증 마크 이미지":O==="featureLink"?"특징 이동 링크":O==="features"?"메인 화면 특징/홍보 섹션 리스트":O==="solutionTitle"?"하단 솔루션 배너 제목":O==="solutionDesc"?"하단 솔루션 배너 상세 설명":O==="solutionButtonText"?"하단 솔루션 배너 버튼 텍스트":O==="solutionButtonLink"?"하단 솔루션 배너 버튼 이동 링크":O==="solutionImage"?"하단 솔루션 이미지 (비어둘 시 3D CAD 모델 자동표시)":O==="subHeader"?"상단 소제목":O==="title"?"섹션 대제목":O==="desc"?"섹션 상세 설명":O==="list"?"주요 특징 체크리스트 항목":O==="badgeTitle"?"인증 마크 텍스트 상단":O==="badgeText"?"인증 마크 텍스트 하단":O==="badgeImage"?"인증 마크 이미지":O==="link"?"상세 이동 링크":O.replace(/([A-Z])/g," $1").trim();return c.jsxs("div",{className:"flex flex-col gap-1.5 w-full min-w-0",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between w-full gap-2",children:[c.jsx("label",{className:"text-sm font-semibold text-gray-700 capitalize break-words",children:k}),L&&c.jsx(Er,{fieldName:O,fieldLabel:k,value:e[`${O}_typography`]||((I=e.typography)==null?void 0:I[O]),onChange:R=>{t({...e,[`${O}_typography`]:R})},sizeType:["title","heroTitle","featureTitle","header","name"].some(R=>O.toLowerCase().includes(R))?"title":["subtitle","subHeader","heroSubtitle","featureSubHeader","tagline"].some(R=>O.toLowerCase().includes(R))?"subtitle":"description"})]}),(O==="heroImage"||O==="heroBgImage")&&c.jsx("span",{className:"text-[12px] text-gray-400 font-normal",children:"권장 사항: 1920x1080px 이상, 16:9 비율, WebP/JPG 권장"}),(O==="featureBadgeImage"||O==="badgeImage")&&c.jsx("span",{className:"text-[12px] text-gray-400 font-normal",children:"권장 사항: 투명 배경(PNG/SVG)의 정사각형 인증 마크"}),O==="list"&&c.jsx("span",{className:"text-[12px] text-gray-400 font-normal",children:"이 섹션의 특징 리스트입니다. 여러 줄의 특징을 항목 단위로 구성할 수 있습니다."}),O==="image"&&i==="home_page"&&n.includes("features")&&c.jsx("span",{className:"text-[12px] text-blue-600 font-normal",children:"권장 사항: 800x1000px 이상, 4:5 세로 비율 이미지 권장"}),O==="image"&&i!=="home_page"&&(n.includes("features")||n.includes("categories")||n.includes("lineup")||n.includes("root"))&&c.jsx("span",{className:"text-[12px] text-gray-500 font-normal",children:"권장 사항: 800x600px 이상, 4:3 가로 비율 이미지 권장"}),O==="solutionImage"&&c.jsx("span",{className:"text-[12px] text-amber-800 font-semibold bg-amber-50 px-2.5 py-1.5 rounded-md border border-amber-200 inline-flex items-center gap-1.5 w-fit my-1 shadow-sm",children:"💡 최적 권장 사이즈: 1920 x 1080 px (16:9 파노라마 와이드) 또는 1920 x 820 px (21:9 울트라와이드 3D 조감도/도면)"}),c.jsx("div",{className:"w-full min-w-0",children:c.jsx(E0,{path:`${n}.${O}
4482`,value:e[O]!==void 0?e[O]:"",onChange:R=>{t({...e,[O]:R})},onUploadBase:r,onOpenMaterialPicker:s,activePage:i,pageData:l})})]},O)})})}if(typeof e=="string"){if(i==="materials_page"&&typeof n=="string"&&n.endsWith(".category")){const P=((l==null?void 0:l.categories)||[]).filter(A=>A!=="All");return c.jsxs("select",{value:e,onChange:A=>t(A.target.value),className:"w-full p-2.5 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none bg-white transition-all font-semibold",children:[c.jsx("option",{value:"",children:"-- 카테고리 선택 --"}),P.map(A=>c.jsx("option",{value:A,children:A},A))]})}if(N){let P="aspect-video max-w-sm",A="";if(typeof n=="string"){const M=n.toLowerCase();i==="home_page"?(M.endsWith(".image")||M.endsWith("]image"))&&(M.includes("features")||M.includes("categories"))?(P="aspect-[4/5] max-w-[280px]",A="최적 권장 사이즈: 800x1000px (4:5 비율)"):M.includes("solutionimage")||M.includes("solution")?(P="aspect-[21/9] max-w-md",A="최적 권장 사이즈: 1920x1080px (16:9) 또는 1920x820px (21:9 파노라마 3D 조감도/도면)"):M.endsWith("herobgimage")?(P="aspect-video max-w-sm",A="최적 권장 사이즈: 1920x1080px (16:9 비율)"):(M.includes("badgeimage")||M.includes("featurebadgeimage"))&&(P="aspect-square max-w-[140px]",A="최적 권장 사이즈: 200x200px (1:1 비율)"):i==="about_page_v2"?M.includes("historyperiods")&&M.match(/image\d+$/)?(P="aspect-[4/5] max-w-[280px]",A="최적 권장 사이즈: 800x1000px (4:5 비율)"):M.includes("heroimage")&&(P="aspect-video max-w-sm",A="최적 권장 사이즈: 1920x1080px (16:9 비율)"):i==="materials_page"?M.includes("materialsdata")&&M.endsWith("image")&&(P="aspect-square max-w-[200px]",A="최적 권장 사이즈: 600x600px (1:1 비율)"):M.endsWith(".image")||M.endsWith("]image")?(P="aspect-[4/3] max-w-[280px]",A="최적 권장 사이즈: 800x600px (4:3 비율)"):M.includes("badgeimage")||M.includes("featurebadgeimage")?(P="aspect-square max-w-[140px]",A="최적 권장 사이즈: 200x200px (1:1 비율)"):M.endsWith("heroimage")||M.endsWith("herobgimage")?(P="aspect-video max-w-sm",A="최적 권장 사이즈: 1920x1080px (16:9 비율)"):(M.includes("solutionimage")||M.includes("solution"))&&(P="aspect-[21/9] max-w-md",A="최적 권장 사이즈: 1920x1080px (16:9) 또는 1920x820px (21:9 파노라마 3D 조감도/도면)")}return c.jsxs("div",{className:"flex flex-col gap-2",children:[e?c.jsx("div",{className:`relative ${P} w-full rounded-lg overflow-hidden border border-gray-200 bg-gray-50`,children:typeof e=="string"&&(e.match(/\.(mp4|webm|mov|ogg)(\?.*)?$/i)||e.startsWith("data:video/"))?c.jsx(D5,{src:e,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"w-full h-full object-cover"}):c.jsx(et,{src:e,alt:"",className:"w-full h-full object-cover",referrerPolicy:"no-referrer"})}):c.jsxs("div",{className:`relative ${P} w-full rounded-lg overflow-hidden border-2 border-dashed border-gray-300 bg-gray-50 flex flex-col items-center justify-center text-gray-400`,children:[c.jsx(En,{className:"w-8 h-8 mb-2 opacity-50"}),c.jsx("span",{className:"text-xs font-medium",children:"이미지/비디오 없음"})]}),A&&c.jsxs("span",{className:"text-[11px] text-amber-600 font-semibold bg-amber-50 px-2 py-1 rounded border border-amber-200/50 inline-block w-fit mt-1",children:["💡 ",A]}),c.jsxs("div",{className:"flex gap-2 w-full items-start",children:[c.jsx("input",{type:"text",value:e,onChange:M=>t(M.target.value),placeholder:"이미지/비디오 URL",className:"flex-1 min-w-0 p-2.5 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all"}),c.jsx("label",{htmlFor:`file-upload-${n.replace(/[^a-zA-Z0-9-]/g,"_")}`,className:"cursor-pointer flex-shrink-0 p-2.5 bg-gray-100 hover:bg-gray-200 border border-gray-300 rounded-lg flex items-center justify-center transition-colors text-gray-700",title:"파일 업로드",children:c.jsx(En,{className:"w-5 h-5 pointer-events-none"})}),c.jsx("input",{id:`file-upload-${n.replace(/[^a-zA-Z0-9-]/g,"_")}`,type:"file",className:"hidden",accept:"image/*,video/mp4,video/*,.mp4",onChange:M=>r(M,t)})]}),i==="home_page"&&typeof n=="string"&&n.toLowerCase().includes("features")&&c.jsx("div",{className:"text-[12px] text-gray-500 font-normal pl-1 mt-0.5",children:"* jpg, png, gif, mp4 파일 가능"})]})}return e.length>30||e.includes(`
4483`)||typeof n=="string"&&(n.toLowerCase().includes("desc")||n.toLowerCase().includes("text")||n.toLowerCase().includes("title")||n.toLowerCase().includes("subtitle")||n.toLowerCase().includes("header")||n.toLowerCase().includes("cidescription"))?c.jsx("textarea",{value:e,onCh
4483ange:P=>t(P.target.value),rows:Math.max(2,e.split(`
4484`).length),className:"w-full p-3 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all resize-y min-h-[70px]"}):c.jsx("input",{type:"text",value:e,onChange:P=>t(P.target.value),className:"w-full p-2.5 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all"})}return typeof e=="number"?c.jsx("input",{type:"number",value:e,onChange:P=>t(parseFloat(P.target.value)),className:"w-full p-2.5 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all"}):typeof e=="boolean"?c.jsxs("label",{className:"flex items-center gap-2 mt-1 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:e,onChange:P=>t(P.target.checked),className:"w-4 h-4 text-blue-600 rounded border-gray-300 focus:ring-blue-500"}),c.jsx("span",{className:"text-sm font-medium text-gray-700",children:e?"Yes":"No"})]}):c.jsx("div",{children:"지원되지 않는 타입입니다."})},une=({inquiries:n,loading:e,onUpdateStatus:t,onUpdateComment:r,onDelete:s,onDeleteAll:i,onDeleteSelected:l})=>{const[d,h]=ae.useState(null),[m,g]=ae.useState(!1),[p,b]=ae.useState("전체"),[w,_]=ae.useState(""),[N,E]=ae.useState(""),[j,P]=ae.useState([]),[A,M]=ae.useState(!1);ae.useEffect(()=>{const B=new Set(n.map(V=>V.id));P(V=>V.filter(se=>B.has(se)))},[n]);const O=n.filter(B=>{const V=p==="전체"||B.status===p,se=B.createdAt?new Date(B.createdAt).toISOString().split("T")[0]:"",ye=!w||se>=w,W=!N||se<=N;return V&&ye&&W}),q=O.length>0&&O.every(B=>j.includes(B.id)),L=O.length>0&&O.some(B=>j.includes(B.id))&&!q,k=B=>{if(B){const V=O.map(se=>se.id);P(V)}else P([])},I=(B,V)=>{P(V?se=>[...se,B]:se=>se.filter(ye=>ye!==B))},R=()=>{j.filter(V=>O.some(se=>se.id===V)).length!==0&&M(!0)},F=async()=>{M(!1);const B=j.filter(se=>O.some(ye=>ye.id===se));if(B.length===0)return;await l(B)&&P([])};return e?c.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-gray-400 gap-4",children:[c.jsx(No,{className:"w-8 h-8 animate-spin text-blue-600"}),c.jsx("p",{className:"text-sm font-semibold",children:"B2B 문의 내역을 불러오고 있습니다..."})]}):n.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center py-24 text-gray-400 gap-2",children:[c.jsx(jI,{className:"w-12 h-12 opacity-30"}),c.jsx("p",{className:"text-sm font-semibold",children:"아직 접수된 B2B 상담이 없습니다."})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-wrap gap-4 p-4 bg-white border border-gray-100 rounded-xl items-end",children:[c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("label",{className:"text-xs font-bold text-gray-500",children:"상태"}),c.jsxs("select",{value:p,onChange:B=>b(B.target.value),className:"text-sm border border-gray-200 rounded-lg p-2 focus:outline-none focus:border-blue-500",children:[c.jsx("option",{children:"전체"}),c.jsx("option",{children:"대기중"}),c.jsx("option",{children:"검토중"}),c.jsx("option",{children:"상담완료"})]})]}),c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("label",{className:"text-xs font-bold text-gray-500",children:"시작 날짜"}),c.jsx("input",{type:"date",value:w,onChange:B=>_(B.target.value),className:"text-sm border border-gray-200 rounded-lg p-2 focus:outline-none focus:border-blue-500"})]}),c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("label",{className:"text-xs font-bold text-gray-500",children:"종료 날짜"}),c.jsx("input",{type:"date",value:N,onChange:B=>E(B.target.value),className:"text-sm border border-gray-200 rounded-lg p-2 focus:outline-none focus:border-blue-500"})]}),c.jsx("button",{onClick:()=>{b("전체"),_(""),E(""),P([])},className:"text-sm text-gray-500 hover:text-gray-900 font-medium",children:"초기화"})]}),c.jsxs("div",{className:"flex justify-between items-center pb-4 border-b border-gray-100",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-sm text-gray-500 font-bold",children:["총 ",O.length,"건의 문의 접수"]}),j.length>0&&c.jsxs("button",{onClick:R,className:"flex items-center gap-1.5 text-xs text-rose-600 bg-rose-50 border border-rose-200 px-3 py-1.5 rounded-lg font-bold hover:bg-rose-100 transition-colors",children:[c.jsx(Sn,{className:"w-3.5 h-3.5"}),"선택 삭제 (",j.length,")"]})]}),c.jsxs("button",{onClick:i,className:"flex items-center gap-1 text-xs text-red-600 bg-red-50 px-3 py-1.5 rounded-lg font-bold hover:bg-red-100",children:[c.jsx(RI,{className:"w-3 h-3"}),"전체 삭제"]})]}),c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm text-left",children:[c.jsx("thead",{className:"text-xs text-gray-700 uppercase bg-gray-50",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-3 w-10 text-center",children:c.jsx("input",{type:"checkbox",checked:q,ref:B=>{B&&(B.indeterminate=L)},onChange:B=>k(B.target.checked),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 cursor-pointer"})}),c.jsx("th",{className:"px-4 py-3",children:"No."}),c.jsx("th",{className:"px-4 py-3",children:"날짜"}),c.jsx("th",{className:"px-4 py-3",children:"회사명"}),c.jsx("th",{className:"px-4 py-3",children:"담당자"}),c.jsx("th",{className:"px-4 py-3",children:"제목"}),c.jsx("th",{className:"px-4 py-3",children:"상태"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-200",children:O.map((B,V)=>{const se=j.includes(B.id);return c.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer ${se?"bg-blue-50/40":""}`,onClick:()=>{h(B),g(!0)},children:[c.jsx("td",{className:"px-4 py-3 w-10 text-center",onClick:ye=>ye.stopPropagation(),children:c.jsx("input",{type:"checkbox",checked:se,onChange:ye=>I(B.id,ye.target.checked),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 cursor-pointer"})}),c.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:V+1}),c.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:B.createdAt?new Date(B.createdAt).toLocaleDateString():"-"}),c.jsx("td",{className:"px-4 py-3 font-semibold",children:B.company}),c.jsx("td",{className:"px-4 py-3",children:B.name}),c.jsx("td",{className:"px-4 py-3 truncate max-w-xs",children:B.title||"제목 없음"}),c.jsx("td",{className:"px-4 py-3",children:c.jsx("span",{className:`px-2 py-1 rounded text-xs font-bold ${B.status==="상담완료"?"bg-green-100 text-green-800":B.status==="검토중"?"bg-amber-100 text-amber-800":"bg-blue-100 text-blue-800"}`,children:B.status||"대기중"})})]},B.id)})})]})}),c.jsx(_X,{inquiry:d,isOpen:m,onClose:()=>g(!1),onUpdateStatus:t,onUpdateComment:r,onDelete:s}),A&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"선택 문의 삭제"}),c.jsx("p",{className:"text-sm text-gray-500 mb-6 leading-relaxed",children:"선택하신 문의 삭제는 모든 데이터가 지워지며, 복구할수 없습니다. 정말 복구하시겠습니까?"}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>M(!1),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:F,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"확인"})]})]})})]})},dne=()=>{var Te,St;const{isAdmin:n,login:e,logout:t,isDirty:r,setIsDirty:s,pendingNavigation:i,setPendingNavigation:l}
4484=ox(),d=_y(),[h,m]=D.useState(hw[0].id),[g,p]=D.useState(null),[b,w]=D.useState(!1),[_,N]=D.useState(!1),[E,j]=D.useState({type:"",text:""}),[P,A]=D.useState(null),M=ue=>{p(ue),s(!0)},[O,q]=D.useState([]),[L,k]=D.useState(!1),[I,R]=D.useState(null),[F,B]=D.useState(!1);D.useEffect(()=>{const ue=je=>{r&&(je.preventDefault(),je.returnValue="")};return window.addEventListener("beforeunload",ue),()=>window.removeEventListener("beforeunload",ue)},[r]);const V=async()=>{if(await xs()&&(P&&(P==="__logout__"?kr():m(P),A(null)),i)){const je=i;l(null),d(je)}},se=()=>{if(s(!1),P&&(P==="__logout__"?kr():m(P),A(null)),i){const ue=i;l(null),d(ue)}},ye=()=>{A(null),l(null)},W=async()=>{k(!0);try{const{collection:ue,getDocs:je,query:De,orderBy:ke}=await df(async()=>{const{collection:Gt,getDocs:wr,query:$t,orderBy:wn}=await Promise.resolve().then(()=>uf);return{collection:Gt,getDocs:wr,query:$t,orderBy:wn}},[]),He=De(ue(ot,"b2b_inquiries"),ke("createdAt","desc")),Xe=await je(He),mt=[];Xe.forEach(Gt=>{mt.push({id:Gt.id,...Gt.data()})}),q(mt)}catch(ue){console.error("Failed to fetch B2B inquiries:",ue)}finally{k(!1)}},$=async(ue,je)=>{try{const{doc:De,updateDoc:ke}=await df(async()=>{const{doc:He,updateDoc:Xe}=await Promise.resolve().then(()=>uf);return{doc:He,updateDoc:Xe}},void 0);await ke(De(ot,"b2b_inquiries",ue),{status:je}),q(He=>He.map(Xe=>Xe.id===ue?{...Xe,status:je}:Xe)),j({type:"success",text:"상태가 변경되었습니다."}),setTimeout(()=>j({type:"",text:""}),2e3)}catch(De){console.error(De),j({type:"error",text:"상태 변경에 실패했습니다: "+De.message})}},X=async(ue,je)=>{try{const{doc:De,updateDoc:ke}=await df(async()=>{const{doc:He,updateDoc:Xe}=await Promise.resolve().then(()=>uf);return{doc:He,updateDoc:Xe}},void 0);await ke(De(ot,"b2b_inquiries",ue),{adminComment:je}),q(He=>He.map(Xe=>Xe.id===ue?{...Xe,adminComment:je}:Xe)),j({type:"success",text:"관리자 멘트가 업데이트되었습니다."}),setTimeout(()=>j({type:"",text:""}),2e3)}catch(De){console.error(De),j({type:"error",text:"업데이트에 실패했습니다: "+De.message})}},be=async ue=>{R(ue)},Oe=async ue=>{try{const{doc:je,deleteDoc:De}=await df(async()=>{const{doc:ke,deleteDoc:He}=await Promise.resolve().then(()=>uf);return{doc:ke,deleteDoc:He}},void 0);return await De(je(ot,"b2b_inquiries",ue)),q(ke=>ke.filter(He=>He.id!==ue)),j({type:"success",text:"삭제 완료되었습니다."}),setTimeout(()=>j({type:"",text:""}),2e3),!0}catch(je){return console.error(je),j({type:"error",text:"삭제에 실패했습니다: "+je.message}),!1}},H=async()=>{if(!I)return;await Oe(I)&&R(null)},he=()=>{B(!0)},we=async()=>{B(!1),k(!0);try{const je=(await ey(dc(ot,"b2b_inquiries"))).docs,De=400;for(let ke=0;ke<je.length;ke+=De){const He=je.slice(ke,ke+De),Xe=V2(ot);He.forEach(mt=>Xe.delete(mt.ref)),await Xe.commit()}q([]),j({type:"success",text:"모든 문의 데이터가 삭제되었습니다."}),setTimeout(()=>j({type:"",text:""}),2e3)}catch(ue){console.error(ue),j({type:"error",text:"삭제 실패: "+ue.message})}finally{k(!1)}},Se=async ue=>{if(ue.length===0)return!1;k(!0);try{const{doc:je,writeBatch:De}=await df(async()=>{const{doc:He,writeBatch:Xe}=await Promise.resolve().then(()=>uf);return{doc:He,writeBatch:Xe}},void 0),ke=400;for(let He=0;He<ue.length;He+=ke){const Xe=ue.slice(He,He+ke),mt=De(ot);Xe.forEach(Gt=>{mt.delete(je(ot,"b2b_inquiries",Gt))}),await mt.commit()}return q(He=>He.filter(Xe=>!ue.includes(Xe.id))),j({type:"success",text:`${ue.length}건의 선택한 문의가 삭제되었습니다.`}),setTimeout(()=>j({type:"",text:""}),2e3),!0}catch(je){return console.error(je),j({type:"error",text:"삭제 실패: "+je.message}),!1}finally{k(!1)}},[Be,$e]=D.useState(Wu.materialsData),[Je,wt]=D.useState(null),[at,G]=D.useState(""),[re,ve]=D.useState(!1),Re=(ue,je)=>{if(!je||ue===je)return;const De=g.categories.map(He=>He===ue?je:He);M({...g,categories:De});const ke=Be.map(He=>He.category===ue?{...He,category:je}:He);$e(ke),M({...g,categories:De,materialsData:ke})},Le=ue=>{const je=g.categories.filter(ke=>ke!==ue);M({...g,categories:je});const De=Be.map(ke=>ke.category===ue?{...ke,category:"All"}:ke);$e(De),M({...g,categories:je,materialsData:De})},qe=ue=>{!ue||g.categories.includes(ue)||M({...g,categories:[...g.categories,ue]})}
4484,[Yt,qn]=D.useState(""),[gs,Jt]=D.useState(!1),[Zt,Dr]=D.useState(""),[la,ys]=D.useState(!1),kn=ue=>{ue.preventDefault(),e(Yt)?(Dr(""),qn("")):Dr("비밀번호가 일치하지 않습니다.")},kr=()=>{t()};D.useEffect(()=>{if(!n)return;(async()=>{try{const je=await mn(qt(ot,"site_content","materials_page"));if(je.exists()&&je.data().content){const De=JSON.parse(je.data().content);De.materialsData&&$e(De.materialsData)}}catch(je){console.error("Failed to fetch materials for admin:",je)}})()},[n]),D.useEffect(()=>{if(!n)return;if(h==="b2b_inquiries_manager"){W(),p({});return}if(h==="mail_delivery_logs"){p({});return}if(h==="maintenance"){p({});return}let ue=!0;return(async()=>{p(null),w(!0),j({type:"",text:""}),s(!1);try{const De=qt(ot,"site_content",h),ke=await mn(De);if(!ue)return;if(ke.exists()){const He=ke.data();if(He.content)try{const Xe=He.content==="undefined"?"{}":He.content||"{}",mt=JSON.parse(Xe);h==="footer_config"&&(delete mt.newsletterTitle,delete mt.newsletterDesc,delete mt.description,delete mt.contactInfo,delete mt.productsLinks,delete mt.companyLinks,delete mt.designSustainabilityDesc,delete mt.designSustainabilityTitle),h==="home_page"&&(delete mt.spacesImage1,delete mt.spacesLink1,delete mt.spacesImage2,delete mt.spacesLink2),p(ar(gf[h],mt))}catch{p(gf[h]||{})}else p(gf[h]||{})}else p(gf[h]||{})}catch(De){console.error(De),ue&&(j({type:"error",text:`데이터를 불러오는 중 오류가 발생했습니다: ${De.message}`}),p(gf[h]||{}))}finally{ue&&w(!1)}})(),()=>{ue=!1}},[h,n]);const xs=async()=>{if(h==="b2b_inquiries_manager"||h==="maintenance")return!0;N(!0),j({type:"",text:""});const ue=De=>{if(typeof De!="object"||De===null)return De;if(Array.isArray(De))return De.map(ue);const ke={};for(const He in De)typeof De[He]=="string"&&De[He].startsWith("data:image/")&&De[He].length>4e5?(ke[He]="",console.warn(`Extremely large Data URL removed from ${He} to prevent Firestore size limit error.`)):ke[He]=ue(De[He]);return ke},je=ue(g);console.log("Saving cleanPageData:",je);try{return await O2(qt(ot,"site_content",h),{content:JSON.stringify(je),updatedAt:Date.now(),updatedBy:"admin"}),s(!1),j({type:"success",text:"성공적으로 저장되었습니다."}),setTimeout(()=>j({type:"",text:""}),3e3),!0}catch(De){return console.error(De),j({type:"error",text:"저장에 실패했습니다. 권한을 확인해주세요."}),!1}finally{N(!1)}},Ps=(ue,je=350,De=350)=>new Promise((ke,He)=>{const Xe=new FileReader;Xe.onload=mt=>{var wr;const Gt=new Image;Gt.onload=()=>{var dl;const $t=document.createElement("canvas");let wn=Gt.width,Hn=Gt.height;wn>Hn?wn>je&&(Hn=Math.round(Hn*je/wn),wn=je):Hn>De&&(wn=Math.round(wn*De/Hn),Hn=De),$t.width=wn,$t.height=Hn;const Rr=$t.getContext("2d");if(!Rr){ke((dl=mt.target)==null?void 0:dl.result);return}Rr.drawImage(Gt,0,0,wn,Hn);const Zd=$t.toDataURL("image/jpeg",.65);ke(Zd)},Gt.onerror=()=>{He(new Error("Image loading failed"))},Gt.src=(wr=mt.target)==null?void 0:wr.result},Xe.onerror=()=>{He(new Error("File reading failed"))},Xe.readAsDataURL(ue)}),Ir=async ue=>{const je=await M3(),De=new FormData;De.append("file",ue);const ke=await fetch("/api/upload",{method:"POST",headers:je?{Authorization:`Bearer ${je}`}:{},body:De});if(!ke.ok)throw new Error(`S3 업로드 실패 (${ke.status})`);const{url:He}=await ke.json();return He},oe=async(ue,je)=>{var He;const De=ue.target,ke=(He=De.files)==null?void 0:He[0];if(ke){ys(!0);try{try{const Xe=await Ir(ke);je(Xe)}catch(Xe){if(console.warn("Firebase Storage upload failed, falling back to Base64:",Xe),ke.type.startsWith("video/")||ke.name.match(/\.(mp4|webm|mov|ogg)$/i)){const mt=new FileReader;mt.onload=Gt=>{var wr;(wr=Gt.target)!=null&&wr.result&&je(Gt.target.result)},mt.readAsDataURL(ke)}else{const mt=await Ps(ke,350,350);je(mt)}}}catch(Xe){console.error(Xe),alert("파일 업로드 및 처리에 실패했습니다. 올바른 파일(이미지 또는 비디오)을 선택하거나 네트워크를 확인해주세요.")}finally{ys(!1),De.value=""}}},de=async(ue,je)=>{var He;const De=ue.target,ke=(He=De.files)==null?void 0:He[0];if(ke){ys(!0);try{try{const Xe=await Ir(ke);je(Xe)}catch(Xe){console.warn("Firebase Storage upload failed for logo, falling back to compressed Base64:",Xe);const mt=await Ps(ke,250,250);je(mt)}}catch(Xe){console.error(Xe),alert("로고 업로드 및 처리에 실패했습니다.")}finally{ys(!1),De.value=""}}};return n?c.jsxs("div",{className:"min-h-screen bg-gray-50 pt-20 font-sans flex flex-col md:flex-row",children:[c.jsxs("aside",{className:"w-full md:w-64 bg-white border-r border-gray-200 flex-shrink-0 flex flex-col min-h-[calc(100vh-80px)]",children:[c.jsx("div",{className:"p-6 border-b border-gray-100",children:c.jsxs("h2",{className:"text-lg font-bold flex items-center gap-2 text-gray-900",children:[c.jsx(zu,{className:"w-5 h-5 text-blue-600"})," 관리자 대시보드"]})}),c.jsxs("nav",{className:"p-4 flex-1 space-y-1",children:[c.jsx("div",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-3 px-3",children:"웹사이트 폼 관리"}),hw.map(ue=>c.jsxs("button",{onClick:()=>{r?A(ue.id):m(ue.id)},className:`w-full flex items-center gap-3 py-2.5 rounded-lg text-sm font-medium transition-colors ${ue.isSubpage?"pl-8 pr-3":"px-3"} ${h===ue.id?"bg-blue-50 text-blue-700":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"}`,children:[c.jsx(kI,{className:"w-4 h-4"}),ue.label]},ue.id))]}),c.jsx("div",{className:"p-4 border-t border-gray-100",children:c.jsxs("button",{onClick:()=>{r?A("__logout__"):kr()},className:"w-full flex items-center justify-center gap-2 px-4 py-2 text-sm text-gray-600 hover:bg-red-50 hover:text-red-600 rounded-lg transition-colors font-medium",children:[c.jsx(xU,{className:"w-4 h-4"})," 로그아웃"]})})]}),c.jsxs("main",{className:"flex-1 overflow-auto bg-gray-50",children:[c.jsxs("div",{className:"max-w-4xl mx-auto p-6 lg:p-8",children:[c.jsxs("div",{className:"mb-6 flex flex-col md:flex-row md:items-center justify-between gap-4 bg-white p-6 rounded-2xl shadow-sm border border-gray-100",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-2xl font-bold text-gray-900 mb-1 flex items-center gap-2",children:[(Te=hw.find(ue=>ue.id===h))==null?void 0:Te.label,c.jsx("span",{className:"text-sm font-normal px-2 py-1 bg-blue-50 text-blue-600 rounded-full",children:h==="b2b_inquiries_manager"?"수신함":"폼 에디터"})]}),c.jsx("p",{className:"text-gray-500 text-sm",children:h==="b2b_inquiries_manager"?"접수된 B2B 가구 구축 및 공간 레이아웃 상담 신청 내역입니다.":"페이지의 콘텐츠를 항목별로 직관적으로 수정할 수 있습니다."})]}),h!=="b2b_inquiries_manager"&&c.jsxs("button",{onClick:xs,disabled:_||b||la,className:"bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-xl font-bold text-sm flex items-center justify-center gap-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-xl",children:[_?c.jsx(No,{className:"w-5 h-5 animate-spin"}):c.jsx(Vv,{className:"w-5 h-5"}),_?"저장 중...":"변경사항 저장하기"]})]}),E.text&&c.jsx("div",{className:"fixed top-24 left-1/2 -translate-x-1/2 z-50 animate-in fade-in slide-in-from-top-4 duration-300",children:c.jsx("div",{className:`px-6 py-3 rounded-2xl text-sm font-bold flex items-center justify-center shadow-xl ${E.type==="error"?"bg-red-500 text-white":"bg-slate-900 text-white"}`,children:E.text})}
4484),la&&c.jsxs("div",{className:"mb-6 px-4 py-3 rounded-xl text-sm font-medium bg-blue-50 text-blue-600 border border-blue-100 flex items-center justify-center gap-2",children:[c.jsx(No,{className:"w-4 h-4 animate-spin"})," 이미지를 업로드하고 있습니다..."]}),c.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-gray-200 p-6 md:p-8 min-h-[500px]",children:b?c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-400 py-20 gap-4",children:[c.jsx(No,{className:"w-10 h-10 animate-spin text-blue-500"}),c.jsx("p",{className:"font-medium",children:"폼 데이터를 불러오고 있습니다..."})]}):g!==null?h==="b2b_inquiries_manager"?c.jsx(une,{inquiries:O,loading:L,onUpdateStatus:$,onUpdateComment:X,onDelete:be,onDeleteAll:he,onDeleteSelected:Se}):h==="logo_config"?c.jsx(rne,{data:g,onChange:M,onUploadBase:de}):h==="mail_settings"?c.jsx(ine,{data:g,onChange:M}):h==="mail_delivery_logs"?c.jsx(one,{}):h==="chatbot_knowledge"?c.jsx(bX,{data:g,onChange:M}):h==="maintenance"?c.jsx(wX,{}):h==="about_page_v2"?c.jsx(nne,{data:g,onChange:M,onUploadBase:oe}
4484):h==="spaces_materials_section"?c.jsx(lne,{data:g,onChange:M,onUploadBase:oe}):h==="design_page_v2"?c.jsx(sne,{data:g,onChange:M,onUploadBase:oe}):h==="sustainability_page_v2"?c.jsx(ane,{data:g,onChange:M,onUploadBase:oe,onGoToInquiries:()=>m("b2b_inquiries_manager")}):c.jsxs(c.Fragment,{children:[h==="materials_page"&&c.jsxs("div",{className:"mb-6 bg-white p-4 rounded-lg border border-gray-200 shadow-sm",children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsx("h3",{className:"font-bold text-gray-800",children:"카테고리 관리"}),c.jsx("button",{onClick:()=>ve(!re),className:"text-sm text-blue-600 font-bold hover:underline",children:re?"접기":"관리"})]}),re&&c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:(St=g==null?void 0:g.categories)==null?void 0:St.map((ue,je)=>c.jsxs("div",{className:"flex gap-2 items-center bg-gray-50 p-2 rounded-lg border border-gray-100",children:[c.jsx("input",{value:ue,onChange:De=>Re(ue,De.target.value),className:"flex-1 bg-transparent border-none text-sm font-semibold p-1"}),ue!=="All"&&c.jsx("button",{onClick:()=>Le(ue),className:"text-gray-400 hover:text-red-500",children:c.jsx(Sn,{className:"w-4 h-4"})})]},je))}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{placeholder:"새 카테고리 이름",id:"new-category-input",className:"flex-1 p-2 border border-gray-300 rounded-lg text-sm"}),c.jsx("button",{onClick:()=>{const ue=document.getElementById("new-category-input");qe(ue.value),ue.value=""},className:"px-4 py-2 bg-blue-600 text-white font-bold rounded-lg text-sm hover:bg-blue-700",children:"추가"})]})]})]}),c.jsx(E0,{path:"root",value:g,onChange:M,onUploadBase:oe,onOpenMaterialPicker:ue=>wt(()=>ue),activePage:h,pageData:g}),h==="footer_config"&&c.jsxs("div",{className:"mt-8 pt-8 border-t border-gray-100",children:[c.jsx("label",{className:"text-sm font-bold text-gray-900 block mb-2",children:"Privacy Policy Content"}),c.jsx("textarea",{value:g.privacyPolicyContent||"",onChange:ue=>M({...g,privacyPolicyContent:ue.target.value}),className:"w-full p-3 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all resize-y min-h-[200px]",placeholder:"Enter privacy policy content here."}),c.jsx("label",{className:"text-sm font-bold text-gray-900 block mb-2 mt-6",children:"Terms of Service Content"}),c.jsx("textarea",{value:g.termsOfServiceContent||"",onChange:ue=>M({...g,termsOfServiceContent:ue.target.value}),className:"w-full p-3 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all resize-y min-h-[200px]",placeholder:"Enter terms of service content here."})]})]}):c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-400 py-20 gap-2",children:[c.jsx(jI,{className:"w-12 h-12 opacity-50 mb-2"}),c.jsx("p",{className:"font-medium text-lg text-gray-600",children:"이 페이지에 아직 데이터가 없습니다."}),c.jsx("p",{className:"text-sm",children:"기본 레이아웃의 데이터가 필요합니다."})]})})]}),h!=="b2b_inquiries_manager"&&r&&c.jsxs("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-40 flex items-center justify-between gap-6 bg-slate-900/95 text-white backdrop-blur-md border border-slate-800 shadow-2xl px-6 py-4 rounded-2xl w-[90%] max-w-xl animate-in fade-in slide-in-from-bottom-5 duration-300",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-500 animate-pulse"}),c.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"수정된 변경사항이 있습니다."})]}),c.jsxs("button",{onClick:xs,disabled:_||b||la,className:"bg-blue-600 hover:bg-blue-700 text-white px-5 py-2.5 rounded-xl font-bold text-sm flex items-center justify-center gap-2 transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg whitespace-nowrap",children:[_?c.jsx(No,{className:"w-4 h-4 animate-spin"}):c.jsx(Vv,{className:"w-4 h-4"}),_?"저장 중...":"변경사항 저장하기"]})]}),Je&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40 backdrop-blur-sm",children:c.jsxs("div",{className:"bg-white w-full max-w-4xl rounded-2xl shadow-2xl flex flex-col max-h-[80vh] overflow-hidden",children:[c.jsxs("div",{className:"p-4 border-b border-gray-100 flex justify-between items-center bg-white z-10 relative",children:[c.jsxs("h3",{className:"text-lg font-bold text-gray-900 flex items-center gap-2",children:[c.jsx(E_,{className:"w-5 h-5 text-blue-500"})," 마감재/색상 라이브러리"]}),c.jsx("button",{onClick:()=>wt(null),className:"p-1.5 text-gray-400 hover:text-gray-900 bg-gray-50 hover:bg-gray-100 rounded-lg transition-colors",children:c.jsx(ds,{className:"w-5 h-5"})})]}),c.jsxs("div",{className:"p-4 border-b border-gray-100 bg-gray-50/50 flex flex-col md:flex-row gap-4 justify-between items-center z-10 relative",children:[c.jsx("p",{className:"text-sm text-gray-500 font-medium",children:"항목을 클릭하여 색상 목록에 추가합니다."}),c.jsxs("div",{className:"relative w-full md:max-w-xs",children:[c.jsx(Yo,{className:"absolute left-3.5 to
4484p-1/2 -translate-y-1/2 text-gray-400 w-4 h-4"}),c.jsx("input",{type:"text",placeholder:"이름 또는 코드 검색...",value:at,onChange:ue=>G(ue.target.value),className:"w-full pl-10 pr-4 py-2.5 border border-gray-200 rounded-xl text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all shadow-sm"})]})]}),c.jsxs("div",{className:"p-6 overflow-y-auto flex-1 bg-gray-50 grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-4",children:[Be.filter(ue=>ue.name.toLowerCase().includes(at.toLowerCase())||ue.code.toLowerCase().includes(at.toLowerCase())).map(ue=>c.jsxs("div",{onClick:()=>{Je(ue),wt(null),G("")},className:"bg-white rounded-2xl p-4 cursor-pointer shadow-sm border border-gray-200 hover:shadow-md hover:border-blue-500 hover:-translate-y-1 transition-all text-center group",children:[ue.image?c.jsxs("div",{className:"aspect-square w-full rounded-xl mb-3 overflow-hidden bg-gray-50 border border-gray-100 relative",children:[c.jsx(et,{src:ue.image,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500",alt:"",referrerPolicy:"no-referrer"}),c.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/5 transition-colors duration-300"})]}):c.jsx("div",{className:"aspect-square w-full rounded-xl mb-3 border border-gray-100 shadow-inner group-hover:scale-105 transition-transform duration-300",style:{backgroundColor:ue.color}}),c.jsx("div",{className:"text-[10px] uppercase font-bold text-blue-600 mb-1 tracking-wider",children:ue.category}),c.jsx("div",{className:"text-sm font-bold text-gray-900 truncate mb-0.5",children:ue.name}),c.jsx("div",{className:"text-xs text-gray-400 font-medium",children:ue.code})]},ue.id)),Be.filter(ue=>ue.name.toLowerCase().includes(at.toLowerCase())||ue.code.toLowerCase().includes(at.toLowerCase())).length===0&&c.jsxs("div",{className:"col-span-full py-20 flex flex-col items-center justify-center text-gray-400 text-sm gap-3",children:[c.jsx(Yo,{className:"w-10 h-10 opacity-20"}),"검색 결과가 없습니다."]})]})]})}),I!==null&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"문의 내역 삭제"}),c.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"이 문의 내역을 정말 삭제하시겠습니까? 되돌릴 수 없습니다."}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>R(null),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:H,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"삭제"})]})]})}),F&&c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl border border-gray-100 animate-in fade-in zoom-in-95 duration-200",children:[c.jsx("h4",{className:"text-lg font-bold text-gray-900 mb-2",children:"전체 문의 삭제"}),c.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"전체 삭제는 모든 데이터가 지워지며, 복구할수 없습니다. 정말 복구하시겠습니까?"}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:()=>B(!1),className:"px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:"취소"}),c.jsx("button",{type:"button",onClick:we,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-lg transition-colors",children:"확인"})]})]})}),(P!==null||i!==null)&&c.jsx("div",{className:"fixed inset-0 z-[160] flex items-center justify-center bg-black/55 backdrop-blur-md animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white rounded-2xl p-6 max-w-md w-full mx-4 shadow-2xl border border-gray-150 animate-in fade-in zoom-in-95 duration-200 font-sans text-left",children:[c.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[c.jsx("div",{className:"p-3 bg-amber-50 rounded-xl text-amber-500 flex-shrink-0",children:c.jsx(zu,{className:"w-6 h-6"})}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-lg font-extrabold text-gray-900 mb-1",children:"저장하지 않은 변경사항"}),c.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:"수정 중인 변경사항이 있습니다. 저장하지 않고 화면을 이동할 시 변경된 내용이 유실될 수 있습니다. 지금 저장하시겠습니까?"})]})]}),c.jsxs("div",{className:"flex flex-col sm:flex-row justify-end gap-2 mt-6",children:[c.jsx("button",{type:"button",onClick:ye,className:"w-full sm:w-auto px-4 py-2.5 text-sm font-bold text-gray-500 hover:text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-xl transition-all",children:"취소"}),c.jsx("button",{type:"button",onClick:se,className:"w-full sm:w-auto px-4 py-2.5 text-sm font-bold text-red-600 hover:text-white hover:bg-red-600 border border-red-200 hover:border-red-600 bg-red-50 rounded-xl transition-all",children:"그냥 나가기"}),c.jsx("button",{type:"button",onClick:V,disabled:_,className:"w-full sm:w-auto px-5 py-2.5 text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 rounded-xl transition-all shadow-md hover:shadow-lg disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-1.5",children:_?c.jsxs(c.Fragment,{children:[c.jsx(No,{className:"w-4 h-4 animate-spin"}),"저장 중..."]}):c.jsxs(c.Fragment,{children:[c.jsx(Vv,{className:"w-4 h-4"}),"저장하고 이동"]})})]})]})})]})]}):c.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center pt-20 px-4 font-sans",children:c.jsx("div",{className:"bg-white p-10 rounded-3xl shadow-xl max-w-md w-full text-center border border-gray-100",children:c.jsxs("form",{onSubmit:kn,className:"flex flex-col items-center",children:[c.jsx("div",{className:"w-16 h-16 bg-gray-100 text-gray-700 rounded-full flex items-center justify-center mb-6",children:c.jsx(zu,{className:"w-8 h-8"})}),c.jsx("h1",{className:"text-2xl font-bold mb-2",children:"관리자 로그인"}),c.jsx("div",{className:"text-gray-500 mb-8 text-sm leading-relaxed",children:c.jsxs("p",{children:["통합 관리자 대시보드에 접근하려면",c.jsx("br",{}),"비밀번호를 입력해주세요."]})}),c.jsxs("div",{className:"flex flex-col w-full mb-6 gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:gs?"text":"password",value:Yt,onChange:ue=>qn(ue.target.value),placeholder:"비밀번호",className:"w-full p-3 pl-10 pr-10 border border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none transition-all",autoFocus:!0}),c.jsx(uU,{className:"w-5 h-5 text-gray-400 absolute left-3 top-3.5"}),c.jsx("button",{type:"button",onClick:()=>Jt(!gs),className:"absolute right-3 top-3.5 text-gray-400 hover:text-gray-600",children:gs?c.jsx(qB,{className:"w-5 h-5"}):c.jsx(YB,{className:"w-5 h-5"})})]}),Zt&&c.jsx("p",{className:"text-red-500 text-sm opacity-90",children:Zt})]}),c.jsx("button",{type:"submit",className:"w-full bg-gray-900 text-white rounded-xl py-3.5 font-bold hover:bg-gray-800 transition-colors flex items-center justify-center gap-2 shadow-lg hover:shadow-xl transition-all",children:"로그인"})]})})})},hne=()=>{const{pathname:n}=ps();return D.useEffect(()=>{window.scrollTo(0,0)},[n]),null},fne=()=>{const{pathname:n}=ps(),{lang:e}=L3();return D.useEffect(()=>{if(e==="en"){const t=window.location.hostname;document.cookie="googtrans=/ko/en; path=/;",t&&(document.cookie=`googtrans=/ko/en; path=/; domain=${t};`);const r=()=>{const l=document.querySelector(".goog-te-combo");l&&(l.value="en",l.dispatchEvent(new Event("change",{bubbles:!0})))},s=setTimeout(r,100),i=setTimeout(r,350);return()=>{clearTimeout(s),clearTimeout(i)}}},[n,e]),null};function mne(){return c.jsx(KQ,{children:c.jsx($Q,{children:c.jsxs(ML,{children:[c.jsx(hne,{}),c.jsx(fne,{}),c.jsxs("div",{className:"min-h-screen bg-white selection:bg-gray-200 flex flex-col",children:[c.jsx(WQ,{}),c.jsx("div",{className:"fixed inset-0 pointer-events-none z-40 w-full px-6 md:px-12",children:c.jsx("div",{className:"relative w-full max-w-7xl mx-auto h-full",children:c.jsx(XQ,{})})}),c.jsx("main",{className:"flex-1",children:c.jsxs(uL,{children:[c.jsx(Gn,{path:"/",element:c.jsx(nX,{})}),c.jsx(Gn,{path:"/about",element:c.jsx(cX,{})}),c.jsx(Gn,{path:"/spaces",element:c.jsx(ZQ,{})}),c.jsx(Gn,{path:"/spaces/excellent",element:c.jsx(hX,{})}),c.jsx(Gn,{path:"/spaces/office",element:c.jsx(uX,{})}),c.jsx(Gn,{path:"/spaces/partition",element:c.jsx(fX,{})}),c.jsx(Gn,{path:"/spaces/education",element:c.jsx(dX,{})}),c.jsx(Gn,{path:"/spaces/executive",element:c.jsx(mX,{})}),c.jsx(Gn,{path:"/spaces/chair",element:c.jsx(pX,{})}),c.jsx(Gn,{path:"/spaces/sofa",element:c.jsx(gX,{})}),c.jsx(Gn,{path:"/design",element:c.jsx(xD,{})}),c.jsx(Gn,{path:"/archive",element:c.jsx(xD,{})}),c.jsx(Gn,{path:"/admin",element:c.jsx(dne,{})}),c.jsx(Gn,{path:"/sustainability",element:c.jsx(o5,{})}),c.jsx(Gn,{path:"/support",element:c.jsx(o5,{})}),c.jsx(Gn,{path:"/materials",element:c.jsx(JQ,{})}),c.jsx(Gn,{path:"/ai-hub",element:c.jsx(ene,{})}),c.jsx(Gn,{path:"*",element:c.jsx(lL,{to:"/",replace:!0})})]})}),c.jsx(QQ,{})]})]})})})}hO.createRoot(document.getElementById("root")).render(c.jsx(D.StrictMode,{children:c.jsx(mne,{})}));

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.